The following example uses the OEMHLP IOCtl interface to verify the EISA card ID:
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
USHORT FindMyEISACard(void) { HFILE filehandle; USHORT action; EISAFunctionInfo.efi_SubFunc = OEM_GET_SLOT_INFO; /* EISA Get Slot Info */ EISAFunctionInfo.efi_Slot = 0; /* Slot 0 */ rc = DosOpen("OEMHLP$", &filehandle, &action, 0L, 0, 1, 0x40, 0L); if (rc == 0) { for(index=1;index<CFG_MAX_EISA_SLOTS;index++) /* For each slot */ { EISAFunctionInfo.efi_Slot = (UCHAR) index; /* Slot Number */ EISASlotInfo.esi_CardID = 0; /* Reset Card ID value*/ rc = DosDevIOCtl((PVOID)&EISASlotInfo, /* Data Packet */ (PVOID)&EISAFunctionInfo, /* Parm Packet */ (USHORT)OEMHLP_QUERYEISACONFIG, (USHORT)OEMHLP_CATEGORY, (HFILE)filehandle); /* If IOCtl successful and slot has adapter, then store away the adapter ID, otherwise mark as empty with a zero. */ if((rc==0)&&(EISASlotInfo.esi_Error==0)) { if (EISASlotInfo.esi_CardID == MYCARDID) DosClose(filehandle); /* Close handle to OEMHLP$ */ return(FOUND); } } DosClose(filehandle); /* Close handle to OEMHLP$ * / } return(NOTFOUND); }
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ