The following example uses the DevHlp_ABIOSCall to verify the Micro Channel POS ID:
──────────────────────────────────────────────────────────────
USHORT FindMyMicroChannelCard(void)
{
USHORT i,rc; /* Index and return code */
USHORT LID; /* Logical ID */
if (GetLIDEntry(POS,0,1,&LID))
return(NOTFOUND);
/* Get length of RB to use for reading POS data. */
POSLenRB.rb.RBLen = sizeof(POSLENRB);
POSLenRB.rb.Func = 0x01;
POSLenRB.rb.LID = LID;
POSLenRB.rb.Unit = 0;
POSLenRB.rb.Resv1 = 0;
POSLenRB.rb.Resv2 = 0;
POSLenRB.Rsv1 = 0;
POSLenRB.Rsv2 = 0;
POSLenRB.Rsv3 = 0;
rc = ABIOSCall( LID, &POSLenRB, 0);
/*Is my request block big enough? */
if ((rc==0) && (sizeof(POSRB) >= POSLenRB.RBLen))
{
RB.rb.RBLen = POSLenRB.RBLen; /* request block length */
RB.rb.Func = 0x0b; /* read stored POS data to mem */
RB.rb.LID = LID; /* Logical ID */
RB.rb.Unit = 0;
RB.DataBuf = (ULONG)(FARPOINTER)&POSData;
for(i=0;i<=CFG_MAX_POS_SLOTS;i++) /* For each slot, get POS ID */
{
RB.Slot = (UCHAR)i;
rc = ABIOSCall(LID,&RB,0);
if((rc==0)&&(RB.rb.RetCode==0))
if (RB.AdapterID == MYCARD)
{
FreeLIDEntry(LID);
return(FOUND);
}
}
}
FreeLIDEntry(LID); /* Release LID Entry */
return(NOTFOUND);
}
──────────────────────────────────────────────────────────────