2.18. InterruptDisable()

Purpose

A convenient function for shutting down interrupt handling.

Prototype
DWORD InterruptDisable(HANDLE hThread);
Parameters
NameTypeInput/Output
hThreadHANDLEInput
Description
NameDescription
hThread Interrupt thread handle, as received from InterruptEnable() [2.17] (*phThread)
Return Value

Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise [A].

Remarks
Example
main()
{
    ....
    if (InterruptEnable(&thread_handle, hWD, &Intrp,
        interrupt_handler, pData))
    {
        printf("failed enabling interrupt\n");
    }
    else
    {
        printf("Press Enter to uninstall interrupt\n");
        fgets(line, sizeof(line), stdin);
        InterruptDisable(thread_handle); /* Calls WD_IntDisable() */
    }
    ....
}