ReportEvent
-
Hi ALL, I am inserting my entry into the "Application" event log for Windows, thro, ReportEvent as follows, bRet = ::ReportEvent( m_hEventSource, wEventType, 0, //event category INF_DUMMY, psidCurrUser, 1, 0, (LPCTSTR*)&lptszMessage, NULL ); it does one entry into the event log successfully. but if i see the "Category" column in the event log its displayed as "None", here i want to display some text(such as "Test category"), If anyone know how to do it, please help me.
-
Hi ALL, I am inserting my entry into the "Application" event log for Windows, thro, ReportEvent as follows, bRet = ::ReportEvent( m_hEventSource, wEventType, 0, //event category INF_DUMMY, psidCurrUser, 1, 0, (LPCTSTR*)&lptszMessage, NULL ); it does one entry into the event log successfully. but if i see the "Category" column in the event log its displayed as "None", here i want to display some text(such as "Test category"), If anyone know how to do it, please help me.
Hi, Iam not very familiar to this. But I found in MSDN that for event id , categories you need to register message files EventMessageFile, CategoryMessageFile, and ParameterMessageFile to the registry. Please search the msdn for messages files. Since you passed 0 in the category it displayed none. Best Regards Raj
-
Hi, Iam not very familiar to this. But I found in MSDN that for event id , categories you need to register message files EventMessageFile, CategoryMessageFile, and ParameterMessageFile to the registry. Please search the msdn for messages files. Since you passed 0 in the category it displayed none. Best Regards Raj
Yes i have created a message dll. and i have given it as MessageId=1 Facility=FACILITY_CHECK SymbolicName=CATEGORY1 Language=English Category 1 in mc file. during call to ReportEvent, if i give bRet = ::ReportEvent( m_hEventSource, wEventType, CATEGORY1, //category INF_DUMMY, psidCurrUser, 1, 0, (LPCTSTR*)&lptszMessage, NULL ); category column is not displaying with what text i have given for CATEGORY1. it displaus as "Devices" in category column....
-
Yes i have created a message dll. and i have given it as MessageId=1 Facility=FACILITY_CHECK SymbolicName=CATEGORY1 Language=English Category 1 in mc file. during call to ReportEvent, if i give bRet = ::ReportEvent( m_hEventSource, wEventType, CATEGORY1, //category INF_DUMMY, psidCurrUser, 1, 0, (LPCTSTR*)&lptszMessage, NULL ); category column is not displaying with what text i have given for CATEGORY1. it displaus as "Devices" in category column....
Have you correctly set the registry keys for the event source, particularly the "CategoryMessageFile" and its count. And also if you define all the event, category and parameter in a single file the category must be the first. -- modified at 9:21 Monday 25th June, 2007