WSAGetQOSByName function (winsock2.h)
The WSAGetQOSByName function initializes a QOS structure based on a named template, or it supplies a buffer to retrieve an enumeration of the available template names.
Syntax
BOOL WSAAPI WSAGetQOSByName(
[in] SOCKET s,
[in, out] LPWSABUF lpQOSName,
[out] LPQOS lpQOS
);
Parameters
[in] s
A descriptor identifying a socket.
[in, out] lpQOSName
A pointer to a specific quality of service template.
[out] lpQOS
A pointer to the QOS structure to be filled.
Return value
If WSAGetQOSByName succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call WSAGetLastError.
Error code | Meaning |
---|---|
A successful WSAStartup call must occur before using this function. | |
The network subsystem has failed. | |
The descriptor is not a socket. | |
The lpQOSName or lpQOS parameter are not a valid part of the user address space, or the buffer length for lpQOS is too small. |
Remarks
The WSAGetQOSByName function is used by applications to initialize a QOS structure to a set of known values appropriate for a particular service class or media type. These values are stored in a template that is referenced by a well-known name. The client may retrieve these values by setting the buf parameter of the WSABUF structure indicated by lpQOSName, which points to a string of nonzero length specifying a template name. In this case, the usage of lpQOSName is IN only, and results are returned through lpQOS.
Alternatively, the client may use this function to retrieve an enumeration of available template names. The client may do this by setting the buf parameter of the WSABUF indicated by lpQOSName to a zero-length null-terminated string. In this case the buffer indicated by buf is overwritten with a sequence of as many available, null-terminated template names up to the number of bytes available in buf as indicated by the len parameter of the WSABUF indicated by lpQOSName. The list of names itself is terminated by a zero-length name. When the WSAGetQOSByName function is used to retrieve template names, the lpQOS parameter is ignored.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winsock2.h |
Library | Ws2_32.lib |
DLL | Ws2_32.dll |