Solved

OpenEventLog /RegisterEventSource

Posted on 2001-07-21
2
1,253 Views
Last Modified: 2008-01-09
Hi Folks,

what's the difference between these two functions?
OpenEventLog()/RegisterEventSource() - they both require the same arguments, return the same info, seem to be used for the same purpose.

when should i use one and not the other?

thanks and regards,

Mike.

0
Comment
Question by:meverest
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 6305138
>>when should i use one and not the other?

They both serve different purposes - 'RegisterEventSource()' is used when reporting an event:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/hh/winbase/eventlog_969g.asp

"After you have added a source name to the registry, use the RegisterEventSource function to get a handle to the Application event log. The following example obtains the handle and then adds an event to the log using the ReportEvent function."

Whereas 'OpenEventLog()' is used for reading the event log:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/hh/winbase/eventlog_2u93.asp
0
 
LVL 37

Author Comment

by:meverest
ID: 6305471
ok,

that seems sensible enough.  if only the devstudio online docs made it that clear! ;-)

thanks and regards.
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question