>sizeof = REPLICATE(' ',2048)+CHR(0) >i = 1 >nInfo = REPLICATE(' ',2048)+CHR(0) >PSP_DEVINFO_DATA = [] > >lnpointer = 0 >DO WHILE .T. > lnpointer = SetupDiGetClassDevs(@cGuid,null,0,DIGCF_INTERFACEDEVICE) > IF TYPE('lnpointer') = "N" .and. lnpointer > 0 > lldestroy = .t. > ? ' Handle to Device Set: ' > ?? ALLTRIM(STR(lnpointer)) > DeviceInfoSet = lnpointer > > i = 0 && first interface is retrieved by passing 0 > LOCAL lcInterfaceData > > DO WHILE .T. > && setup a SP_DEVICE_INTERFACE_DATA structure, > && BINTOC sets dwSize member to 28, + SPACE(24) for the > && rest of the structure > lcInterfaceData = BINTOC(28,'RS') + SPACE(24) > > IF !SetupDiEnumDeviceInterfaces(DeviceInfoSet, > @nInfo , @cGuid, i, @lcInterfaceData) > > > IF GetLastError() = ERROR_NO_MORE_ITEMS > EXIT > ELSE > EXIT > ENDIF > > ELSE > > &&& extract the interface data here ... (CTOBIN, SUBSTR) > > && increment i for next interface > i = i + 1 > ENDIF > > ENDDO > > ENDIF >ENDDO > >.... >.... >>