INFO: Auto Events in an Interrupt Service Thread (248684)



The information in this article applies to:

  • Microsoft Windows CE Operating System, Versions 2.12
  • Microsoft Windows CE Operating System, Versions 2.11

This article was previously published under Q248684

SUMMARY

When you create an event for an Interrupt Service Thread (IST) with the flag bManualReset = TRUE, and call the InterruptInitialize function with this event handle, as shown in the sample code, then you always get the "wrong parameter" error message.

Sample Code

HANDLE hMoses;
        hMoses = CreateEvent(NULL,TRUE,FALSE,0);

        if (hMoses == INVALID_HANDLE_VALUE)
                AfxMessageBox(_T("Handle invalid"));

        AfxBeginThread(IST_Moses,this,THREAD_PRIORITY_TIME_CRITICAL);    

        if(!InterruptInitialize(SYSINTR_MOSES,hMoses,NULL,NULL))
                AfxMessageBox(_T("INT Init failed"));
				
You get the "wrong parameter" error message because IST only permits the use of auto-reset events.

Modification Type:MinorLast Reviewed:12/19/2003
Keywords:kbinfo KB248684