|
-
August 27th, 1999, 07:33 AM
#1
NT Event Log
Event Viewer in NT has a facility to call a registered Application DLL. Where does one find the interface specifications for this user supplied DLL
-
August 27th, 1999, 08:45 AM
#2
Re: NT Event Log
I do nothing about it. Where comes this info from?
Dmitriy, MCSE
-
August 27th, 1999, 09:32 AM
#3
Re: NT Event Log
This is to allow the Event Viewer to use a message file to format and display event data as per RegisterEventSource()
-
August 27th, 1999, 09:58 AM
#4
Re: NT Event Log
Yes, but I found nothing about dll.
I think you can just use Event Viewer to log your events by using RegisterEventSource(), ReportEvent(), ..., no more.
Event Viewer does not generate any messages.
Dmitriy, MCSE
-
August 27th, 1999, 10:04 AM
#5
Re: NT Event Log
while not having the dll or exe linked allows you add to the event log, the message "The description for Event ID ( 1 ) in Source ( App Name ) could not be found." will be included in error message. It is this section the the DLL helps format and provides the user with relevant information.
ie VirusScan NT McShield service started - scanning for 45212 viruses.
Extra driver name : none
-
August 27th, 1999, 11:34 AM
#6
Re: NT Event Log
Ok, it is interesting question. What coul I find:
1) I try this code:
char* lpBuf=(char*) malloc(80);
strcpy(lpBuf,"Test");
HANDLE h=RegisterEventSource(NULL,AfxGetAppName());
ASSERT(h);
BOOL bRet=ReportEvent(h,EVENTLOG_INFORMATION_TYPE,
IDE_TEST,//for test
IDE_TEST, // event identifier
NULL, // user security identifier (optional)
1, // number of strings to merge with message
0, // size of binary data, in bytes
(LPCTSTR*) &lpBuf, // array of strings to merge with message
NULL);
bRet=CloseEventLog(h);
but it does not work.
Something from Microsoft knowledgebase:
"A version of the Logging sample failed to include the .RC file as part of the build in the makefile. So the DLL is built, but no message resources were included in the build. Some developers have tried to include the .BIN file, which is output from the message compiler, as the resource. This does not properly bind the resource to the DLL. You must use the .RC file that is output from the message compiler because it marks the resource with ID of 1 and of type 11 (RT_MESSAGETABLE). This is required for Event Viewer to find the message resources.
"
I think the problem near.
The article is Q166902
Dmitriy, MCSE
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|