Author | Message | Time |
---|---|---|
Grok | Visual Basic 6, NT Event Log The NotifyChangeEventLog function enables an application to receive notification when an event is written to the specified event logfile. When the event is written to the event logfile, the specified event object is set to the signaled state. When an event is written to the logfile specified by hEventLog, the system uses the PulseEvent function to set the event specified by the hEvent parameter to the signaled state. If the thread is not waiting on the event when the system calls PulseEvent, the thread will not receive the notification. Therefore, you should create a separate thread to wait for notifications. **** How would anyone with experience recommend I do this from a self-contained VB class module? | September 9, 2003, 5:26 PM |
Adron | That sounds like a stupid design. You can never know for sure that you haven't missed an event. An event could come in just after you finished processing the last one but before you get to wait for the event. | September 9, 2003, 7:15 PM |
Grok | It's what we're stuck with. | September 9, 2003, 10:16 PM |
DrivE | [quote author=Grok link=board=5;threadid=2638;start=0#msg20749 date=1063145789] It's what we're stuck with. [/quote] We have it tough. | September 10, 2003, 1:00 AM |
Grok | [quote author=Hazard link=board=5;threadid=2638;start=0#msg20765 date=1063155629] [quote author=Grok link=board=5;threadid=2638;start=0#msg20749 date=1063145789] It's what we're stuck with. [/quote] We have it tough. [/quote] Who is "we"? | September 10, 2003, 1:44 AM |
DrivE | [quote author=Grok link=board=5;threadid=2638;start=0#msg20768 date=1063158280] [quote author=Hazard link=board=5;threadid=2638;start=0#msg20765 date=1063155629] [quote author=Grok link=board=5;threadid=2638;start=0#msg20749 date=1063145789] It's what we're stuck with. [/quote] We have it tough. [/quote] VB programmers in general. Who is "we"? [/quote] | September 10, 2003, 8:16 PM |
Adron | If you really care about getting the notifications, you should have a thread sit in a tight loop waiting for that event and setting another event or posting a message every time the first event is pulsed. You should try to ensure that the tight loop thread gets back to waiting before the second thread polls for the new message(s) in the event log. | September 10, 2003, 11:15 PM |
Grok | That sounds effective, I'll try it. | September 11, 2003, 12:06 AM |