>typedef struct _STRUCTDEV { > DWORD iType; > WORD wPort; > CHAR strSerialNo[11]; >} STRUCTDEV;>An equivalent FoxPro code should be something like this:
>#DEFINE SDTYPE_SERIAL 0x0001 > >DECLARE INTEGER FSL_SelectDevice IN <dll name>; > STRING @dev, STRING param2 > >LOCAL cBuffer, nType, nPort, cSerial >nType = SDTYPE_SERIAL >nPort = 1 >cSerial = "ABC02000001" > >cBuffer = PADR(Chr(nType), 4, Chr(0)) +; > PADR(Chr(nPort), 2, Chr(0)) +; > cSerial > >nResult = FSL_SelectDevice(@cBuffer, "any string") >>If the structure has different definition than you have to make corresponding changes in the way you populate cBuffer.