Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WSALookupServiceBegin (Bluetooth)

Windows Mobile 6.5
A version of this page is also available for

This function initiates a client query that is constrained by the information contained within a WSAQUERYSET (Bluetooth) structure. This function returns a handle that is used by the WSALookupServiceNext (Bluetooth) function.

This function is actually a Winsock function. However, the information that is presented in it is specific to Bluetooth.

INT WSALookupServiceBegin(
  DWORD dwFlags,
  LPHANDLE lphLookup


[in] Pointer to the search criteria.


[in] The following table shows a list of flags for this parameter.

Flag Description


Specifies that device discovery is to be performed. If this flag is not set, service discovery will be performed instead.


Searches the local SDP database. Clear this flag to search for services on a peer device.


[out] Handle to be used when calling the WSALookupServiceNext (Bluetooth) function to start retrieving the results set.

If LUP_CONTAINERS is set, SDP performs a device inquiry to find other Bluetooth devices in the area. This function performs the query. The WSALookupServiceNext function retrieves the results one device at a time.

You can specify extra parameters for device inquiries by having the lpsqRestriction->IpBlob point to a BTHNS_INQUIRYBLOB structure.

If LUP_CONTAINERS is not set, an SDP service search is performed. The lpsqRestrictions->IpBlob must point to a BTHNS_RESTRICTIONBLOB data structure.

Windows Embedded CEWindows CE .NET 4.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

© 2015 Microsoft