Share via


WSAQUERYSET (Bluetooth) (Compact 2013)

3/26/2014

This structure is a generic Winsock structure that other service search protocols can use for searching.

Syntax

typedef struct _WSAQuerySet {
  DWORD dwSize;
  LPTSTR lpszServiceInstanceName;
  LPGUID lpServiceClassId;
  LPWSAVERSION lpVersion;
  LPTSTR lpszComment;
  DWORD dwNameSpace;
  LPGUID lpNSProviderId;
  LPTSTR lpszContext;
  DWORD dwNumberOfProtocols;
  LPAFPROTOCOLS lpafpProtocols;
  LPTSTR lpszQueryString;
  DWORD dwNumberOfCsAddrs;
  LPCSADDR_INFO lpcsaBuffer;
  DWORD dwOutputFlags;
  LPBLOB lpBlob;
} WSAQUERYSET, *PWSAQUERYSETW;

Members

  • dwSize
    Value that is equal to sizeof(WSAQUERYSET). This is a versioning mechanism.
  • 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.
  • lpServiceClassId
    Required. Identifies the services class in the form of a GUID.
  • lpVersion
    Ignored.
  • lpszComment
    Ignored.
  • dwNameSpace
    Must be set to NS_BTH for Bluetooth queries.
  • lpNSProviderId
    Ignored.
  • lpszContext
    Ignored.
  • dwNumberOfProtocols
    Ignored.
  • lpafpProtocols
    Ignored.
  • lpszQueryString
    Ignored.
  • dwNumberOfCsAddrs
    Ignored for queries.
  • 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.
  • dwOutputFlags
    Ignored for queries.

Remarks

The options discussed in this topic are specific to Bluetooth queries. For generic use of this structure, refer to the WSAQUERYSET (Windows Sockets) structure for Winsock.

The previous 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.

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.

See Also

Reference

Bluetooth Application Development Structures
BthNsLookupServiceBegin
BthNsLookupServiceNext

Other Resources

WSAQUERYSET (Windows Sockets)