Skip to content

Latest commit

 

History

History
285 lines (189 loc) · 9.61 KB

ns-winsock2-wsaquerysetw.md

File metadata and controls

285 lines (189 loc) · 9.61 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NS:winsock2._WSAQuerySetW
WSAQUERYSETW (winsock2.h)
Provides relevant information about a given service, including service class ID, service name, applicable namespace identifier and protocol information, as well as a set of transport addresses at which the service listens. (Unicode)
*LPWSAQUERYSETW
*PWSAQUERYSETW
LPWSAQUERYSET
LPWSAQUERYSET structure pointer [Winsock]
NS_ALL
NS_BTH
NS_DNS
NS_EMAIL
NS_NLA
NS_PNRPCLOUD
NS_PNRPNAME
PWSAQUERYSET
PWSAQUERYSET structure pointer [Winsock]
WSAQUERYSET
WSAQUERYSET structure [Winsock]
WSAQUERYSETA
WSAQUERYSETW
_win32_wsaqueryset_2
winsock.wsaqueryset_2
winsock2/LPWSAQUERYSET
winsock2/PWSAQUERYSET
winsock2/WSAQUERYSET
winsock2/WSAQUERYSETA
winsock2/WSAQUERYSETW
winsock\wsaqueryset_2.htm
WinSock
6c81fbba-aaf4-49ca-ab79-b6fe5dfb0076
12/05/2018
*LPWSAQUERYSETW, *PWSAQUERYSETW, LPWSAQUERYSET, LPWSAQUERYSET structure pointer [Winsock], NS_ALL, NS_BTH, NS_DNS, NS_EMAIL, NS_NLA, NS_PNRPCLOUD, NS_PNRPNAME, PWSAQUERYSET, PWSAQUERYSET structure pointer [Winsock], WSAQUERYSET, WSAQUERYSET structure [Winsock], WSAQUERYSETA, WSAQUERYSETW, _win32_wsaqueryset_2, winsock.wsaqueryset_2, winsock2/LPWSAQUERYSET, winsock2/PWSAQUERYSET, winsock2/WSAQUERYSET, winsock2/WSAQUERYSETA, winsock2/WSAQUERYSETW
winsock2.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
WSAQUERYSETW (Unicode) and WSAQUERYSETA (ANSI)
Windows
WSAQUERYSETW, *PWSAQUERYSETW, *LPWSAQUERYSETW
19H1
_WSAQuerySetW
winsock2/_WSAQuerySetW
PWSAQUERYSETW
winsock2/PWSAQUERYSETW
WSAQUERYSETW
winsock2/WSAQUERYSETW
c++
APIRef
kbSyntax
HeaderDef
Winsock2.h
WSAQUERYSET
WSAQUERYSETA
WSAQUERYSETW

WSAQUERYSETW structure

-description

The WSAQUERYSET structure provides relevant information about a given service, including service class ID, service name, applicable namespace identifier and protocol information, as well as a set of transport addresses at which the service listens.

-struct-fields

-field dwSize

Type: DWORD

The size, in bytes, of the WSAQUERYSET structure. This member is used as a versioning mechanism since the size of the WSAQUERYSET structure has changed on later versions of Windows.

-field lpszServiceInstanceName

Type: LPTSTR

A pointer to an optional NULL-terminated string that contains service name. The semantics for using wildcards within the string are not defined, but can be supported by certain namespace providers.

-field lpServiceClassId

Type: LPGUID

The GUID corresponding to the service class. This member is required to be set.

-field lpVersion

Type: LPWSAVERSION

A pointer to an optional desired version number of the namespace provider. This member provides version comparison semantics (that is, the version requested must match exactly, or version must be not less than the value supplied).

-field lpszComment

Type: LPTSTR

This member is ignored for queries.

-field dwNameSpace

Type: DWORD

A namespace identifier that determines which namespace providers are queried. Passing a specific namespace identifier will result in only namespace providers that support the specified namespace being queried. Specifying NS_ALL will result in all installed and active namespace providers being queried.

Options for the dwNameSpace member are listed in the Winsock2.h include file. Several new namespace providers are included with Windows Vista and later. Other namespace providers can be installed, so the following possible values are only those commonly available. Many other values are possible.

Value Meaning
NS_ALL
All installed and active namespaces.
NS_BTH
The Bluetooth namespace. This namespace identifier is supported on Windows Vista and later.
NS_DNS
The domain name system (DNS) namespace.
NS_EMAIL
The email namespace. This namespace identifier is supported on Windows Vista and later.
NS_NLA
The network location awareness (NLA) namespace. This namespace identifier is supported on Windows XP and later.
NS_PNRPNAME
The peer-to-peer name space for a specific peer name. This namespace identifier is supported on Windows Vista and later.
NS_PNRPCLOUD
The peer-to-peer name space for a collection of peer names. This namespace identifier is supported on Windows Vista and later.

-field lpNSProviderId

Type: LPGUID

A pointer to an optional GUID of a specific namespace provider to query in the case where multiple namespace providers are registered under a single namespace such as NS_DNS. Passing the GUID for a specific namespace provider will result in only the specified namespace provider being queried. The WSAEnumNameSpaceProviders and WSAEnumNameSpaceProvidersEx functions can be called to retrieve the GUID for a namespace provider.

-field lpszContext

Type: LPTSTR

A pointer to an optional starting point of the query in a hierarchical namespace.

-field dwNumberOfProtocols

Type: DWORD

The size, in bytes, of the protocol constraint array. This member can be zero.

-field lpafpProtocols

Type: LPAFPROTOCOLS

A pointer to an optional array of AFPROTOCOLS structures. Only services that utilize these protocols will be returned.

-field lpszQueryString

Type: LPTSTR

A pointer to an optional NULL-terminated query string. Some namespaces, such as Whois++, support enriched SQL-like queries that are contained in a simple text string. This parameter is used to specify that string.

-field dwNumberOfCsAddrs

Type: DWORD

This member is ignored for queries.

-field lpcsaBuffer

Type: LPCSADDR_INFO

This member is ignored for queries.

-field dwOutputFlags

Type: DWORD

This member is ignored for queries.

-field lpBlob

Type: LPBLOB

An optional pointer to data that is used to query or set provider-specific namespace information. The format of this information is specific to the namespace provider.

-remarks

The WSAQUERYSET structure is used as part of the original namespace provider version 1 architecture available on Windows 95 and later. A newer version 2 of the namespace architecture is available on Windows Vista and later.

In most instances, applications interested in only a particular transport protocol should constrain their query by address family and protocol rather than by namespace. This would allow an application that needs to locate a TCP/IP service, for example, to have its query processed by all available namespaces such as the local hosts file, DNS, and NIS.

Note

The winsock2.h header defines WSAQUERYSET as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

Bluetooth and WSAQUERYSET for Device Inquiry

Bluetooth and WSAQUERYSET for Service Inquiry

Bluetooth and WSAQUERYSET for Set Service

WSAEnumNameSpaceProviders

WSAEnumNameSpaceProvidersEx

WSALookupServiceBegin

WSALookupServiceNext

WSAQUERYSET2

WSASetService