I'm not sure why, but when I try to write to the Event Log, it just writes this:
The code I'm using is:The description for Event ID ( 20515 ) in Source ( MyService ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: ﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮ ﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮ ﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮﻮ (܈ퟰŮŮ.
Code:BOOL LogMessage (const DWORD msg_id, const TCHAR **InsertionStrings, const int nInsertionStrings,const WORD wType,DWORD DataSize,LPVOID Data){ if (!ReportEvent( EventSource, wType, 0, msg_id, NULL, nInsertionStrings, DataSize, InsertionStrings, Data)){ return (FALSE); } return (TRUE); } bool LogEventQueueIncreasing( const std::wstring& queueName, double percentFull ) { std::wstringstream ss; ss << L"Outgoing Queue " << queueName.c_str() << L" has exceeded " << percentFull << L"% full!"; const TCHAR* pMsg = ss.str().c_str(); return (LogMessage( WAIT_Q_FILLING, &pMsg, 1, EVENTLOG_WARNING_TYPE ) == TRUE); }



LinkBack URL
About LinkBacks




, I just thought of that, so I fixed it like this: