PT-9230 Mobile Computer SDK Programming Manual 55
FindFirstFTPDevice
Get the first searched device position information after calling InitSearchFTPDevice().
DWORD FindFirstFTPDevice
{
DWORD *dwPos,
LPTSTR szDeviceName,
ULONGLONG *btAddress,
int nNameLen
}
Parameters
dwPos
[in/out] a reference to a position value returned by FindFirstBTDevice or FindNextBTDevice function
szDeviceName
[out] The buffer to receive the device name string
btAddress
[out] Receive the device address of 64-bit unsigned integer
nNameLen
[in] The szDeviceName buffer max size. If terminal device name length > nNameLen, the
szDeviceName buffer store data of nNameLen length
Returned Values
If the action succeeds, the returned value is E_FUNC_SUCCEED. If the action fails, possible returned values are
E_FUNC_ERROR, E_FUNC_PAR_ERROR, BT_ERR_DEVICE_ERROR.
Example
#define GET_NAP(_bt_addr) ( (USHORT) (((_bt_addr) & (ULONGLONG)0xFFFF00000000) >> (8*4)) )
#define GET_SAP(_bt_addr) ( (ULONG) (((_bt_addr) & (ULONGLONG)0x0000FFFFFFFF) >> (0)) )
DWORD dwPos, dwRe;
WCHAR szDeviceName[128], szAddress[16];
ULONGLONG btAddress;
If(InitSearchFTPDevice() == E_FUNC_SUCCEED){
dwRe = FindFirstFTPDevice(&dwPos, szDeviceName, & btAddress, 256);
while(dwRe == E_FUNC_SUCCEED){
FindNextFPTDevice(&dwPos, szDeviceName, & btAddress, 256);
if(dwRe != E_FUNC_SUCCEED)
break;
…………