next up previous contents
Next: 3. Low Level WD_xxx Up: 2. WD_xxx PCI/PCMCIA/ISA Functions Previous: 2.18 InterruptEnable()   Contents


2.19 InterruptDisable()


PURPOSE

$\bullet$A convenient function for shutting down interrupt handling.


PROTOTYPE

DWORD InterruptDisable(HANDLE hThread);


PARAMETERS

Name Type Input/Output
$\bullet$hThread HANDLE Input


DESCRIPTION

Name Description
hThread Interrupt thread handle, as received from InterruptEnable() [2.18] (*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() */
    }
    ....
}