Microsoft KB Archive/248684: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 45: Line 45:
== SUMMARY ==
== 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.
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 ===
=== Sample Code ===


Line 52: Line 52:


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


         AfxBeginThread(IST_Moses,this,THREAD_PRIORITY_TIME_CRITICAL);     
         AfxBeginThread(IST_Moses,this,THREAD_PRIORITY_TIME_CRITICAL);     


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


</div>
</div>

Latest revision as of 13:51, 21 July 2020

Knowledge Base


INFO: Auto Events in an Interrupt Service Thread

Article ID: 248684

Article Last Modified on 12/19/2003



APPLIES TO

  • Microsoft Windows CE 2.12 for the Handheld PC
  • Microsoft Windows CE 2.11 for the Handheld PC



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.

Keywords: kbinfo KB248684