473,326 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Event Log

hi,
i want to know what is event that windows log in "Event Log".
i have read that there r some services that log the event, but at the
base level what exactly event is ?

and can we make our own events and can supply that to those services?

Jul 2 '06 #1
4 2752
"Anis" <an**********@gmail.comwrote
hi,
i want to know what is event that windows log in "Event Log".
i have read that there r some services that log the event, but at the
base level what exactly event is ?

and can we make our own events and can supply that to those services?
Windows works by sending "messages" to windows.
If we are writing our program in C, we instantly have a problem. C only
allows us to call functions, not to receive messages.

The workaround is to pass a pointer to a message processing function to the
Windows system. Windows then calls this function from its internals. That is
one example of why function pointers can be useful.

Now there will be ways to getting Windows to log the calls it makes to the
message processing functions, and there will be ways of getting Windows to
generate such calls. However that takes us too far from the C language
issues of your question and into the details of the Windows implementation,
which is not topical here. However comp.os.windows.programmer will probably
be only too happy to help.

--
Buy my book 12 Common Atheist Arguments (refuted)
$1.25 download or $7.20 paper, available www.lulu.com/bgy1mm
Jul 2 '06 #2
Malcolm wrote:
"Anis" <an**********@gmail.comwrote
>hi,
i want to know what is event that windows log in "Event Log".
i have read that there r some services that log the event, but at the
base level what exactly event is ?

and can we make our own events and can supply that to those services?
Windows works by sending "messages" to windows.
If we are writing our program in C, we instantly have a problem. C only
allows us to call functions, not to receive messages.

The workaround is to pass a pointer to a message processing function to the
Windows system. Windows then calls this function from its internals. That is
one example of why function pointers can be useful.
Off-topic as this is, what on earth are you babbling about? Windows
implements message queues, and requires you to implement a callback function
for processing these message queues. This is not a "workaround", it's the
way things are implemented. It's a workaround only insofar as messages do
not magically appear somewhere.
Now there will be ways to getting Windows to log the calls it makes to the
message processing functions, and there will be ways of getting Windows to
generate such calls.
Which is not at all what OP's asking. The "event" is just a packet of data
with some structure in it. You add them to the event log by calling
ReportEvent() on an event log you opened with OpenEventLog(). You do not
even need to create windows for this, and services usually do not.

My advice to the OP is to forget everything they've read so far.
However that takes us too far from the C language issues of your question
and into the details of the Windows implementation, which is not topical
here. However comp.os.windows.programmer will probably be only too happy
to help.
Yes. Directing people to the correct newsgroup without further ado is the
best course of action. You should usually leave it at that, lest you lose
the benefit of such redirecting (reduced OT traffic).

S.
Jul 2 '06 #3
Malcolm wrote:
"Anis" <an**********@gmail.comwrote
>hi,
i want to know what is event that windows log in "Event Log".
i have read that there r some services that log the event, but at the
base level what exactly event is ?

and can we make our own events and can supply that to those services?
Windows works by sending "messages" to windows.
If we are writing our program in C, we instantly have a problem. C only
allows us to call functions, not to receive messages.

The workaround is to pass a pointer to a message processing function to the
Windows system. Windows then calls this function from its internals. That is
one example of why function pointers can be useful.

Now there will be ways to getting Windows to log the calls it makes to the
message processing functions, and there will be ways of getting Windows to
generate such calls. However that takes us too far from the C language
issues of your question and into the details of the Windows implementation,
which is not topical here. However comp.os.windows.programmer will probably
be only too happy to help.
Incidentally, it's comp.os.ms-windows.programmer, and you'll probably want
comp.os.ms-windows.programmer.win32 to be specific.

Alternatively, look it up in the MSDN: http://msdn.microsoft.com and search
for "event log".

S.
Jul 2 '06 #4
thx ..
thx for the reply

Jul 3 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andy Read | last post by:
Hello all, I have the requirement to produce source code that produces an object hierarchy. Example: Root | Folder 1
18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
8
by: Mark | last post by:
Hi, I'm looking for some ideas on how to build a very simple Event processing framework in my C++ app. Here is a quick background ... I'm building a multithreaded app in C++ (on Linux) that...
9
by: VK | last post by:
My original idea of two trains, however pictural it was, appeared to be wrong. The truth seems to be even more chaotic. IE implements its standard down-up model: any mouse event goes from the...
13
by: Charles Law | last post by:
Mr "yEaH rIgHt" posted the following link about a week ago in answer to my question about removing event handlers. > http://www.vbinfozine.com/t_bindevt.shtml Following on from that post, the...
12
by: Jack Russell | last post by:
My unstanding of all VB up to and including vb6 is that an event could not "interrupt" itself. For instance if you had a timer event containing a msgbox then you would only get one message. ...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
9
by: jeff | last post by:
New VB user...developer... Situation...simplified... - I want to wrap a pre and post event around a system generated where the pre-event will always execute before the system event and the...
19
by: Daniela Roman | last post by:
Hello, I try to fire an event under a button click event and maybe anybody can give a clue please. I have let's say a WEB grid with PageIndexChanged event: private void...
5
by: jaysonnward | last post by:
Hello All: I've recently been recreating some 'dropdown menus' for a website I manage. I'm writing all my event handlers into my .js file. I've got the coding to work in Firefox, but the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.