wdmlib.c

来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· C语言 代码 · 共 24 行

C
24
字号
#include <windows.h>

BOOL HalMapInterrupt(ULONG InterruptNumber,
                     ULONG InterruptVector,
                     PULONG pInterruptId)
{
    ULONG BytesReturned = 0;
    struct IoctlStruct { ULONG IntNum; ULONG IntVect; } MapInfo;

    if (pInterruptId == NULL)
        return(FALSE);

    MapInfo.IntNum  = InterruptNumber;
    MapInfo.IntVect = InterruptVector;

    if (!KernelIoControl(IOCTL_HAL_TRANSLATE_IRQ, &MapInfo, sizeof(MapInfo), pInterruptId, sizeof(pInterruptId), &BytesReturned) || BytesReturned != sizeof(ULONG))
    {
        *pInterruptId = 0;
        return(FALSE);
    }

    return(TRUE);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?