The WinCE version of the MHDDK software does not use deviceID to locate the DAQCard in the system. If you go into the acquireBoards routine for WinCE, you see that the parameter is never used. Therefore it does not matter what value you pass to the function for this parameter.
The acquireBoards function will return the first device found by the NI RLP DLL. Following is the code for the acquireBoards function that should be called in your code.
Christian L
NI Consulting Services
//
// Return iBus for a PCMCIA card inserted in the WinCE system
//
// deviceID is ignored in this implementation
//
iBus* acquireBoard(const u32 deviceID)
{
//u32 devBAR0,BAR0sz,devBAR1,BAR1sz;
void *mem0,*mem1;
iBus *bus;
HANDLE dvrFile;
dvrFile
= CreateFile(L"RLP1:",GENERIC_READ| GENERIC_WRITE,FILE_SHARE_READ| FILE_SHARE_WRITE,
NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL,0);
if(dvrFile == INVALID_HANDLE_VALUE){
newprintf("error opening the driver\n");
return NULL;
}
newprintf("file handle is 0x%08x\n",(unsigned int)dvrFile);
mem1 = (void*)dvrFile;
mem0 = 0;
bus = new iBus(0, 0, mem0, mem1);
bus->osSpecific = (void*)dvrFile;
bus->_physBar[0] = (u32)NULL;
bus->_physBar[1] = (u32)NULL;
bus->_physBar[2] = (u32)NULL;
bus->_physBar[3] = (u32)NULL;
bus->_physBar[4] = (u32)NULL;
bus->_physBar[5] = (u32)NULL;
return bus;
}
authored byChristian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX

