mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[EVENTLOG]
- Open the application log if the desired log does not exist. - Log eventlog service stop and shutdown. svn path=/trunk/; revision=54580
This commit is contained in:
parent
4ce4744000
commit
ebf5940723
2 changed files with 18 additions and 0 deletions
|
@ -63,6 +63,12 @@ ServiceControlHandler(DWORD dwControl,
|
|||
{
|
||||
case SERVICE_CONTROL_STOP:
|
||||
DPRINT(" SERVICE_CONTROL_STOP received\n");
|
||||
|
||||
LogfReportEvent(EVENTLOG_INFORMATION_TYPE,
|
||||
0,
|
||||
EVENT_EventlogStopped, 0, NULL, 0, NULL);
|
||||
|
||||
|
||||
/* Stop listening to incoming RPC messages */
|
||||
RpcMgmtStopServerListening(NULL);
|
||||
UpdateServiceStatus(SERVICE_STOPPED);
|
||||
|
@ -86,6 +92,11 @@ ServiceControlHandler(DWORD dwControl,
|
|||
|
||||
case SERVICE_CONTROL_SHUTDOWN:
|
||||
DPRINT(" SERVICE_CONTROL_SHUTDOWN received\n");
|
||||
|
||||
LogfReportEvent(EVENTLOG_INFORMATION_TYPE,
|
||||
0,
|
||||
EVENT_EventlogStopped, 0, NULL, 0, NULL);
|
||||
|
||||
UpdateServiceStatus(SERVICE_STOPPED);
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
|
|
|
@ -104,6 +104,13 @@ PLOGHANDLE ElfCreateEventLogHandle(LPCWSTR Name, BOOL Create)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Use the application log if the desired log does not exist */
|
||||
if (lpLogHandle->LogFile == NULL)
|
||||
{
|
||||
lpLogHandle->LogFile = LogfListItemByName(L"Application");
|
||||
lpLogHandle->CurrentRecord = LogfGetOldestRecord(lpLogHandle->LogFile);
|
||||
}
|
||||
}
|
||||
|
||||
if (!lpLogHandle->LogFile)
|
||||
|
|
Loading…
Reference in a new issue