Solved

OpenEventLog /RegisterEventSource

Posted on 2001-07-21
2
1,228 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
Comment Utility
>>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
Comment Utility
ok,

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

thanks and regards.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now