mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
Windows specific: added registerServiceDeviceNotification() and handleDeviceEvent() to handle SERVICE_CONTROL_DEVICEEVENT events
This commit is contained in:
@@ -168,6 +168,16 @@ protected:
|
||||
void defineOptions(OptionSet& options);
|
||||
#endif
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
static HDEVNOTIFY registerServiceDeviceNotification(LPVOID filter, DWORD flags);
|
||||
/// Registers the ServerApplication to receive SERVICE_CONTROL_DEVICEEVENT
|
||||
/// events.
|
||||
|
||||
virtual DWORD handleDeviceEvent(DWORD event_type, LPVOID event_data);
|
||||
/// Handles the SERVICE_CONTROL_DEVICEEVENT event. The default
|
||||
/// implementation does nothing and returns ERROR_CALL_NOT_IMPLEMENTED.
|
||||
#endif // if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
|
||||
private:
|
||||
#if defined(POCO_VXWORKS)
|
||||
static Poco::Event _terminate;
|
||||
@@ -188,7 +198,7 @@ private:
|
||||
SRV_UNREGISTER
|
||||
};
|
||||
static BOOL __stdcall ConsoleCtrlHandler(DWORD ctrlType);
|
||||
static void __stdcall ServiceControlHandler(DWORD control);
|
||||
static DWORD __stdcall ServiceControlHandler(DWORD control, DWORD event_type, LPVOID event_data, LPVOID context);
|
||||
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
|
||||
static void __stdcall ServiceMain(DWORD argc, LPWSTR* argv);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user