I wonder if there is any WinAPI that can replace the following function EventLog::Exists()
and EventLog::CreateEventSource()
so my code won't rely on the .NET Framework
.
I will be very grateful if you can give me some advice!
#define PRINT_SOURCE_NAME "Microsoft-Windows-PrintService"
#define PRINT_LOG_NAME "Microsoft-Windows-PrintService/Operational"
BOOL bRet = EventLog::Exists(PRINT_LOG_NAME );
if (!bRet)
{
EventLog::CreateEventSource(PRINT_SOURCE_NAME , PRINT_LOG_NAME );
}