winedevice: Handle failure of RegisterServiceCtrlHandlerExW.

This commit is contained in:
Rob Shearman 2008-03-28 17:52:24 +00:00 committed by Alexandre Julliard
parent 4dc1ee05f3
commit ee811d89a8
1 changed files with 2 additions and 0 deletions

View File

@ -192,6 +192,8 @@ static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv )
stop_event = CreateEventW( NULL, TRUE, FALSE, NULL );
service_handle = RegisterServiceCtrlHandlerExW( driver_name, service_handler, NULL );
if (!service_handle)
return;
status.dwServiceType = SERVICE_WIN32;
status.dwCurrentState = SERVICE_START_PENDING;