Click here to Skip to main content
15,918,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

Could anyone please suggest me how to query events from event logs from a source ?
I referred to "MSDN"[^] but I'm not sure what -
C++
#define RESOURCE_DLL            L"<path>\\Provider.dll"
refers to in the above link .
I'm pretty new to C++ and I'm badly in need of suggestions and inputs. It would be helpful if you could point me to some other source/link that could resolve the problem.

Regards
Posted
Comments
Sergey Alexandrovich Kryukov 4-Dec-13 2:01am    
The article you referenced really explains how to do that, but the question is unclear: what seems to be a problem and what does this code line mean, how is it related to your problem?
—SA
RedUnited 4-Dec-13 2:46am    
"#define RESOURCE_DLL L"<path>\\Provider.dll"

My question is I'm not sure what this DLL has to be? Why is the DLL needed? I tried without specifying any DLL - in the further part of the code, the HANDLER will be NULL since i have not specified any DLL, and the program doesn't behave as expected.

I want to look for particular event IDs from a particular source, get the message details in form of a string.
Nisamudheen 1-Apr-14 8:04am    
You can look for a particular event ID using the EvtQuery() API. In order to get the message details as a string, use the EvtRender() API. The below link has some more details.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa385768%28v=vs.85%29.aspx


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900