WSAQUERYSET (Bluetooth) (Windows Embedded CE 6.0)
1/6/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 WSAQUERYSET structure 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 WSALookupServiceBegin function or WSALookupServiceNext function.
- lpcsaBuffer
Ignored for service queries. When a name inquiry is performed and LUP_RETURN_ADDR is specified in the dwFlags parameter of the BthNsLookupServiceNext function, 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 WSALookupServiceBegin function and LUP_RETURN_NAME is specified in the call to the WSALookupServiceNext function 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 WSALookupServiceBegin for 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.lpSockaddr member specifies the Bluetooth address of the remote device to query. |
|
lpBlob |
If lpBlob is NULL, the UUID specified in the lpServiceClassId is used for an SDP service search. If lpBlob is not NULL, it points to a BTHNS_RESTRICTIONBLOB structure that contains more specific search parameters. In this case, lpServiceClassId is ignored. |
|
* |
All other WSAQUERYSET fields 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 |
See Also
Reference
Bluetooth Application Development Structures
BthNsLookupServiceBegin
BthNsLookupServiceNext