Findnextbtdevice – Argox PT-9130 User Manual
Page 64

PT-90 Mobile Computer SDK Programming Manual 57
FindNextBTDevice
This function retrieves the results of an nearby Bluetooth device search.
DWORD FindNextBTDevice
{
HANDLE
hLookup
,
LPTSTR
szDeviceName
,
ULONGLONG *
btAddress
,
int
nNameLen
}
Parameters
hLookup
[in] Handle obtained from InitSearchBTDevice 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
. If the action fails, possible returned values are
Remarks
Must call EndSearchBTDevice function frees the handle after calls to the InitSearchBTDevice and
FindNextBTDevice function.
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 dwRe;
HANDLE hLookup;
ULONGLONG btAddress;
WCHAR szAddress[16], szDeviceName[128];
dwRe = InitSearchBTDevice(&hLookup)
while(dwRe == E_FUNC_SUCCEED){