I'm trying to use Events that are Created from a VectorInformatik CanCardX.
The DLL uses the following type of EventHandling:
// create a synchronisation object
gEventHandle = CreateEvent(NULL, FALSE, FALSE, NULL);
vErr = ncdSetNotification(gPortHandle, (unsigned long*)&gEventHandle, 1);
if (vErr) goto error;
...
// create a thread
threadHandle = CreateThread(0,0x1000,thread,0,0,&threadId);
SetThreadPriority(threadHandle,THREAD_PRIORITY_TIME_CRITICAL);
within the thread the follwing is used:
// wait for receive event
WaitForSingleObject(gEventHandle,1000);
In my CVI App. all compiles fine, it works if I place a breakpoint within
the thread and let
it run from break to break.
Once the breakpoint is removed, the thread is never called again.
I guess it has to do with different Event/Thread handling between CVI Callbacks and
Windows SDK Threads/Events.
How can I workaround this in order to use the ncdSetNotification(..) of the above
described code snippet?
Thanks in advance
David