BOOL __cdecl KP_XXX_IntAtIrql(PVOID pIntContext, BOOL *pfIsMyInterrupt) { XXX_HANDLE hXXX = (XXX_HANDLE) pIntContext; DWORD data = 0; PVOID pData = NULL; DWORD addrSpace; WD_ITEMS *pItem; addrSpace = XXX_INTCSR_SPACE; pItem = &hXXX->cardReg.Card.Item[hXXX->addrDesc[addrSpace].index]; pData = (DWORD*)pItem->I.Mem.dwTransAddr; (DWORD)pData += XXX_INTCSR_OFFSET; data = dtoh32(*((DWORD*)pData)); if (data == 0xFF) // The interrupt was generated by our hardware { // Write 0x0 to INTCSR to acknowledge the interrupt *((DWORD*)pData) = dtoh32(data); // Accept control of the interrupt *pfIsMyInterrupt = TRUE; // Schedule deferred interrupt processing (KP_IntAtDpc()) return TRUE; } else { // (Do not acknowledge the interrupt) // Do not accept control of the interrupt *pfIsMyInterrupt = FALSE; // Do not schedule deferred interrupt processing return FALSE; } }