Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure is a generic Winsock structure that other service search protocols can use for searching. The options discussed in this topic are specific to Bluetooth queries. For generic use of this structure, please refer to the WSAQUERYSET (Windows Sockets)structure for Winsock.

The following member descriptions indicate how the WSAQUERYSETstructure is used to construct a query. If a member is optional, you can supply a NULL pointer, indicating that the member is not to be used for search criteria.

Members

dwNameSpace

Value that must be set to NS_BTH for Bluetooth queries.

dwNumberOfCsAddrs

Ignored for queries.

dwNumberOfProtocols

Ignored.

dwOutputFlags

Ignored for queries.

dwSize

Value that is equal to sizeof(WSAQUERYSET). This is a versioning mechanism.

lpBlob

This context varies depending upon the function. For a complete description of this value, see the WSALookupServiceBeginfunction or WSALookupServiceNextfunction.

lpcsaBuffer

Ignored for service queries. When a name inquiry is performed and LUP_RETURN_ADDR is specified in the dwFlagsparameter of the BthNsLookupServiceNextfunction, the Bluetooth address of a particular device will be returned in lpcsaBuffer>RemoteAddr.lpSockaddr.

lpNSProviderId

Ignored.

lpServiceClassId

Required. Identifies the services class in the form of a GUID.

lpszComment

Ignored.

lpszContext

Ignored.

lpszQueryString

Ignored.

lpszServiceInstanceName

When LUP_CONTAINERS is specified in the WSALookupServiceBeginfunction and LUP_RETURN_NAME is specified in the call to the WSALookupServiceNextfunction on this handle, the name of the particular device is returned in this member.

lpVersion

Ignored.

Remarks

The following table shows how to set the parameter values for WSALookupServiceBeginfor service queries.

Field Subfield Description

lpqsRestrictions

dwNumber

sizeof(WSAQUERYSET)

 

lpServiceClassId

Optional. The most specific Bluetooth UUID.

 

dwNameSpace

NS BTH

 

dwNumberOfCsAddrs

1

 

lpcsaBuffer

If LUP_RES_SERVICE is not set, the RemoteAddr.lpSockaddrmember specifies the Bluetooth address of the remote device to query.

 

lpBlob

If lpBlobis NULL, the UUID specified in the lpServiceClassIdis used for an SDP service search. If lpBlobis not NULL, it points to a BTHNS_RESTRICTIONBLOB structure that contains more specific search parameters. In this case, lpServiceClassIdis ignored.

 

*

All other WSAQUERYSETfields are ignored.

dwControlFlags

LUP_CONTAINER

Must not be set.

 

LUP_RES_SERVICE

Specifies to search only the local SDP database.

Requirements

Header winsock2.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also