mattKnight
Programmer
Hi all,
I have a question regards CreateEvent...
I wish to capture a event signal from the system so I need to create an event something like
My problem comes with, somewhat obviously, the WaitforSingleObject bit...
As VB is essentially single threaded, the whole system will freeze until the event is signalled!
Does anyone understand my problem?
Can anyone suggest a potential solution framework?
The only one I can think of is a free-threaded com server that raises a VB event on the signal, but that seems to be a large overhead for a simple (ish) operation.
Thanks for your thoughts
Matt
I have a question regards CreateEvent...
I wish to capture a event signal from the system so I need to create an event something like
Code:
dim hHandle as handle
'create event
hHandle = CreateEvent(NULL,true,false, "myEvent")
'register event
NotifyEventLogChange(hEvHandle,hHandle)
'then do a waitforsingle object
My problem comes with, somewhat obviously, the WaitforSingleObject bit...
As VB is essentially single threaded, the whole system will freeze until the event is signalled!
Does anyone understand my problem?
Can anyone suggest a potential solution framework?
The only one I can think of is a free-threaded com server that raises a VB event on the signal, but that seems to be a large overhead for a simple (ish) operation.
Thanks for your thoughts
Matt