Partager via


BthNsLookupServiceBegin (Windows Embedded CE 6.0)

1/6/2010

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

Note

To preserve Win32 compatibility, consider using the Winsock equivalent of this function. This function is equivalent to WSALookupServiceBegin.

Syntax

INT BthNsLookupServiceBegin(
  LPWSAQUERYSET pQuerySet,
  DWORD dwFlags,
  LPHANDLE lphLookup
);

Parameters

  • pQuerySet
    [in] Pointer to the search criteria.
  • dwFlags
    [in] The following table shows a list of flags for this parameter.

    Flag Description

    LUP_CONTAINERS

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

    LUP_RES_SERVICE

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

  • lphLookup
    [out] Handle to be used when calling the BthNsLookupServiceNext function to start retrieving the results set.

Return Value

None.

Remarks

If LUP_CONTAINERS is set, SDP performs a device inquiry to find other Bluetooth devices in the area. This function performs the query. The BthNsLookupServiceNext 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.

Requirements

Header bt_api.h
Library Btdrt.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Bluetooth OS Functions
BTHNS_INQUIRYBLOB
BTHNS_RESTRICTIONBLOB
BthNsLookupServiceEnd
BthNsLookupServiceNext
WSAQUERYSET (Bluetooth)

Other Resources

Bluetooth Application Development