Expand Minimize

WSPGetQOSByName function

The WSPGetQOSByName function initializes a QOS structure based on a named template, or retrieves an enumeration of the available template names.

Syntax


BOOL WSPGetQOSByName(
  _In_     SOCKET s,
  _Inout_  LPWSABUF lpQOSName,
  _Out_    LPQOS lpQOS,
  _Out_    LPINT lpErrno
);

Parameters

s [in]

Descriptor identifying a socket.

lpQOSName [in, out]

Specifies the QOS template name, or supplies a buffer to retrieve an enumeration of the available template names.

lpQOS [out]

Pointer to the QOS structure to be filled.

lpErrno [out]

Pointer to the error code.

Return value

If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE, and a specific error code is available in lpErrno.

Error codeMeaning
WSAENETDOWN

The network subsystem has failed.

WSAENOTSOCK

The descriptor is not a socket.

WSAEFAULT

The lpQOS argument is not a valid part of the user address space, or the buffer length for lpQOS is too small.

WSAEINVAL

The specified QOS template name is invalid.

 

Remarks

Clients can use WSPGetQOSByName 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 member of the WSABUF indicated by lpQOSName to point to a Unicode 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 WSPGetQOSByName to retrieve an enumeration of available template names. The client may do this by setting the buf member of the WSABUF indicated by lpQOSName to a zero-length null-terminated Unicode string. In this case, the buffer indicated by buf is overwritten with a sequence of as many null-terminated Unicode template name strings as are available up to the number of bytes available in buf as indicated by the len member of the WSABUF indicated by lpQOSName. The list of names itself is terminated by a zero-length Unicode name string. When WSPGetQOSByName 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

Ws2spi.h

See also

WSPAccept
WSPConnect
WSPGetSockOpt

 

 

Community Additions

ADD
Show:
© 2014 Microsoft