Hello, I am developing a Windows service that will process extended service control requests from Windows.
For example, if the system battery drops, the windows kernel will send a POWER_EVENT with event type of POWERSETTING_CHANGE and a GUID_BATTERY_PERCENTAGE_REMAINING containing a DWORD value between 0 - 100.
For another example, When a user plugs in a COM device, the windows kernel will send a service that has setup RegisterDeviceNotification a SERVICE_CONTROL_DEVICEEVENT message with a DEV_BROADCAST_HDR describing the device that was connected.
I would like to be able to test my service with out having to manually plug and unplug USB devices or wait for battery to drop (my development system does not even have a battery!)
I would like to know if there is some data I can use as a mock that I can pass to my HANDLER_EX function. Or perhaps a tool (similar to sc.exe) that can send mock messages to the service.
Thanks for reading!