?
Solved

OpenEventLog /RegisterEventSource

Posted on 2001-07-21
2
Medium Priority
?
1,289 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

770 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