Hi,
I'm developing and application that uses a DAQ(Digital Acquisition) Card on Windows.
In the sample examples there is this piece of code:
IntThread(void* pArg)
{
while (1) {
if (WaitForSingleObject(hEvent[0], INFINITE) == WAIT_OBJECT_0) {
int_count++;
ResetEvent(hEvent[0]);
InvalidateRect(hMainWnd, NULL, FALSE);
}
}
_endthread();
}
IntThread(void* pArg)
{
while (1) {
if (WaitForSingleObject(hEvent[0], INFINITE) == WAIT_OBJECT_0) {
int_count++;
ResetEvent(hEvent[0]);
InvalidateRect(hMainWnd, NULL, FALSE);
}
}
_endthread();
}
To copy to clipboard, switch view to plain text mode
I don't understand how to reimplement the "WaitForSingleObject" function.
As I understand, the DAQ card driver sends an event that is catched on this function, so maybe is the only way to get the driver event processed?
Thanks,
Bookmarks