^NyAw^
10th February 2012, 16:07
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();
}
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,
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();
}
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,