Partager via


DoInquiry (Compact 2013)

3/26/2014

Initiates a Bluetooth inquiry (search for devices).

Syntax

HRESULT DoInquiry(
    IBTDevice **pDev,
   WORD *pwNumDevices,
   BOOL *pfStopSearch, 
    HWND hWindow, 
    UINT uiMessage, 
    BOOL fAllocate
);

Parameters

  • pDev
    [in/out] Optional. Pointer to the address of an array that lists the devices found during inquiry.
  • pwNumDevices
    [in/out] Optional. Pointer that indicates the number of entries in pDev.
  • pfStopSearch
    [in] Pointer to a Boolean variable that can be used to cancel a search. The initial value must be FALSE.
  • hWindow
    [in] Optional. Window to receive a message for each device that is found. No messages are sent if NULL.
  • uiMessage
    [in] Optional. Specifies a message to send to hWindow. For more information on window messages, see PostMessage.
  • fAllocate
    [in] TRUE if this function is to allocate memory for and create the IBTDevice array, for example, if pDev is NULL. FALSE if pDev points to an existing array.

Return Value

Returns ERROR_SUCCESS on success; otherwise, returns a standard HRESULT error.

Remarks

Setting pfStopSearch to TRUE from another thread while an inquiry is in progress causes the inquiry to stop after the next lookup.

Requirements

Header

bthutil_p.h

Library

Bthutil.lib

See Also

Reference

Bluetooth API Miscellaneous Functions