Platform SDK: Quality of Service

WPUGetQOSTemplate

The WPUGetQOSTemplate function retrieves a QOS template for a particular service provider.

INT WPUGetQOSTemplate ( 
  const LPGUID lpProviderId, 
  LPWSABUF lpQOSName,
  LPQOS lpQOS
);

Parameters

lpProviderId
[in] Pointer to a provider selected–globally unique identifier (GUID).
lpQOSName
[in] Specifies the QOS template name.
lpQOS
[out] Pointer to a QOS structure.

Return Values

If WPUGetQOSTemplate succeeds, the return value is zero. If the function fails, the return value is SOCKET_ERROR. For extended error information, call WSAGetLastError.

Remarks

The WPUGetQOSTemplate function retrieves a QOS-named template containing the associated QOS structure. If lpProviderId is NULL, WPUGetQOSTemplate attempts to find the QOS-named template in the global list of QOS names. Otherwise, WPUGetQOSTemplate searches the template list specific to the service provider indicated by lpProviderId.

The lpQOS parameter can include a ProviderSpecific buffer for retrieval with the basic QOS structure. In this case, the ProviderSpecific buffer must be large enough to hold the provider-specific information stored in the template; otherwise WPUGetQOSTemplate returns WSAENOBUFS.

Error Codes

Error Code Meaning
WSAEFAULT The lpQOS or lpQOSName parameter is not a valid part of the user address space.
WSAEINVAL The specified lpProviderId is invalid, or the lpQOS template is invalid.
WSA_NODATA The specified QOS name could not be found.
WSAENOBUFS The provider-specific buffer is too small.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 98.
  Header: Declared in Qosname.h.
  Library: Use Qosname.lib.

See Also

QOS, WSAGetQOSByName, WSCInstallQOSTemplate, WSCRemoveQOSTemplate