Export (0) Print
Expand All
Expand Minimize

WSAGetQOSByName function

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 WSAGetQOSByName(
  _In_     SOCKET s,
  _Inout_  LPWSABUF lpQOSName,
  _Out_    LPQOS lpQOS
);

Parameters

s [in]

A descriptor identifying a socket.

lpQOSName [in, out]

A pointer to a specific quality of service template.

lpQOS [out]

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 codeMeaning
WSANOTINITIALISED

A successful WSAStartup call must occur before using this function.

WSAENETDOWN

The network subsystem has failed.

WSAENOTSOCK

The descriptor is not a socket.

WSAEFAULT

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winsock2.h

Library

Ws2_32.lib

DLL

Ws2_32.dll

See also

Winsock Reference
Winsock Functions
getsockopt
QOS
WSAAccept
WSAConnect

 

 

Community Additions

ADD
Show:
© 2015 Microsoft