Beijer Electronics (formerly QSI Corporation)
http://qsiforums.com/

Starting your application (SignalStarted)
http://qsiforums.com/viewtopic.php?f=11&t=4441
Page 1 of 1

Author:  Jeremy [ Fri Feb 17, 2012 1:17 pm ]
Post subject:  Starting your application (SignalStarted)

If you start your application via HKEY_LOCAL_MACHINE\init you are required to call SignalStartedin your application to ensure that the system fully boots. Failure to call this API will result in intermittent failures that can be very difficult to diagnose, but can include:

* Repeatedly incorrectly calibrated touch screen.
* Registry is not persistent (values are not saved)
* Signals (such as ignition sense or dock sense) don't trigger at the proper time.
* Other issues.

The key is to call SignalStarted at the beginning of your application's main function.

C++:
Code:
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
    SignalStarted(_ttoi(argv[1]));
}


C#

Code:
        [DllImport("coredll.dll")]
         private extern static void SignalStarted(UInt32 code);
         /// <summary>
         /// The main entry point for the application.
         /// </summary>
         [MTAThread]
         static void Main(string[] args)
         {
             UInt32 code = UInt32.Parse(args[0]);
             SignalStarted(code);
         }

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/