mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-30 07:26:33 +02:00
fixed for VS2008 and WinCE
This commit is contained in:
parent
e1694c3e68
commit
39b6c79e46
@ -168,15 +168,15 @@ protected:
|
||||
void defineOptions(OptionSet& options);
|
||||
#endif
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(_WIN32_WCE)
|
||||
static HDEVNOTIFY registerServiceDeviceNotification(LPVOID filter, DWORD flags);
|
||||
/// Registers the ServerApplication to receive SERVICE_CONTROL_DEVICEEVENT
|
||||
/// events.
|
||||
/// events via handleDeviceEvent().
|
||||
|
||||
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)
|
||||
#endif
|
||||
|
||||
private:
|
||||
#if defined(POCO_VXWORKS)
|
||||
|
@ -147,7 +147,7 @@ DWORD ServerApplication::handleDeviceEvent(DWORD /*event_type*/, LPVOID /*event_
|
||||
DWORD ServerApplication::ServiceControlHandler(DWORD control, DWORD event_type, LPVOID event_data, LPVOID context)
|
||||
{
|
||||
DWORD result = NO_ERROR;
|
||||
auto instance = reinterpret_cast<ServerApplication*>(context);
|
||||
ServerApplication* pThis = reinterpret_cast<ServerApplication*>(context);
|
||||
|
||||
switch (control)
|
||||
{
|
||||
@ -159,9 +159,9 @@ DWORD ServerApplication::ServiceControlHandler(DWORD control, DWORD event_type,
|
||||
case SERVICE_CONTROL_INTERROGATE:
|
||||
break;
|
||||
case SERVICE_CONTROL_DEVICEEVENT:
|
||||
if (instance)
|
||||
if (pThis)
|
||||
{
|
||||
result = instance->handleDeviceEvent(event_type, event_data);
|
||||
result = pThis->handleDeviceEvent(event_type, event_data);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user