InterruptInitialize (Compact 2013)
3/28/2014
This function initializes a hardware interrupt with the kernel. This initialization enables the device driver to register an event and enable the interrupt. This function can be called from kernel-mode drivers and user-mode drivers.
Syntax
BOOL InterruptInitialize(
DWORD idInt,
HANDLE hEvent,
LPVOID pvData,
DWORD cbData
);
Parameters
- idInt
[in] Interrupt identifier for the interrupt service thread (IST).
- hEvent
[in] Event to be signaled when the interrupt is triggered.
- pvData
[in] Used as a pointer to a block of data that is passed to OEMInterruptEnable. The block of data can be initialization data, scratch space, and so on.
- cbData
[in] Size of data pointed to by pvData.
Return Value
TRUE indicates success. FALSE indicates failure.
Remarks
This function must be called before using the hEvent parameter, which provides a link between the idInt parameter and the SYSINTR value returned by an ISR.
The hEvent parameter can be used only in a WaitForSingleObject call to wait for the event to be triggered by the kernel.
A WaitForMultipleObjects call with hEvent fails.
If you use hEvent in a call to WaitForSingleObject before you call InterruptInitialize, InterruptInitialize fails.
InterruptInitialize is a kernel-mode-only function.
InterruptInitialize is used with device drivers and user-mode drivers. For more information about user-mode drivers, see User Mode Driver Framework.
Requirements
Header |
pkfuncs.h |
Library |
coredll.lib |
See Also
Reference
Kernel Functions
InterruptDisable
InterruptDone
WaitForMultipleObjects
WaitForSingleObject