How To Automatically Launch REPLLOG Using the Notification Subsystem (274337)



The information in this article applies to:

  • Microsoft Windows CE Platform Builder 2.12
  • Microsoft Windows CE Platform Builder 3.0

This article was previously published under Q274337

SUMMARY

To automatically launch Repllog.exe when a serial cable gets connected to the target device you must perform the following:
  1. Register an event in the system events database DB_notify_events.
  2. From your serial device driver, call the CeEventHasOccurred function when you detect that a cable has been connected.

MORE INFORMATION

Following is a sample of how to populate the DB_notify_events database by using the Project.db file of your Platform Builder project:
Database: "DB_notify_events" : 888 : 1 : 0001001f : 0
   Record :
   Field : 0001001f : "repllog.exe"
   Field : 0002001f : ""
   Field : 00030013 : 9
   End
End Database
				
The value of the field with the property identifier 0001001f (PROP_TAG(CEVT_LPWSTR,1)) specifies the name of the application that should be launched. The value of the field with the property identifier 0002001f (PROP_TAG(CEVT_LPWSTR,2)) specifies the command line for the application. The value of the field with the property identifier 00030013 (PROP_TAG(CEVT_UI4,3)) specifies the event notification code.

From your serial device driver, when it detects an RS232 cable event, call the CeEventHasOccurred function with the event notification code set to NOTIFICATION_EVENT_RS232_DETECTED (0x09). For an example, see the source code of the ODO serial driver sample located in the Platform Builder subfolder \PLATFORM\ODO\DRIVERS\SERIAL\P2IO.C (line 1681 for version 2.12, line 1675 for version 3.0).

REFERENCES

For more information about the Windows CE notification subsystem, refer to the Microsoft Windows CE Platform Builder 3.0 documentation.

Modification Type:MinorLast Reviewed:8/18/2005
Keywords:kbhowto KB274337