Author: angel_tsankovangel_tsankov
Date: Apr 25, 2008 06:13
Hallo!
The documentation of the ReportEvent function says:
The function returns ERROR_INVALID_HANDLE if lpSourceName specifies
the
Security event log.
However the flowing code sample (on Windows Server 2003 EE with SP2)
shows
that this is not the case:
#include
#include
int main()
{
HANDLE const h = RegisterEventSource(NULL, _T("Security")); //
Returns NULL
DWORD const err = GetLastError(); // Returns 5 (Access denied)
}
Can someone explain this discrepancy?
Regards,
Angel Tsankov
|