WSAGetServiceClassInfoA

The WSAGetServiceClassInfo function retrieves the class information (schema) pertaining to a specified service class from a specified namespace provider.

Syntax

INT WSAGetServiceClassInfoA(
         LPGUID lpProviderId,
         LPGUID lpServiceClassId,
         LPDWORD lpdwBufSize,
         LPWSASERVICECLASSINFOA lpServiceClassInfo
)  

Parameters

lpProviderId
Type: LPGUID 

[in]

A pointer to a GUID that identifies a specific namespace provider.

lpServiceClassId
Type: LPGUID 

[in]

A pointer to a GUID identifying the service class.

lpdwBufSize
Type: LPDWORD 

[in, out]

lpServiceClassInfo
Type: LPWSASERVICECLASSINFOA 

[out]

A pointer to a WSASERVICECLASSINFO structure that contains the service class information from the indicated namespace provider for the specified service class.

Return value

Type: INT 

The return value is zero if the WSAGetServiceClassInfo was successful. Otherwise, the value SOCKET_ERROR is returned, and a specific error number can be retrieved by calling WSAGetLastError.

Return codes
Return code Description
WSA_NOT_ENOUGH_MEMORY There was insufficient memory to perform the operation.
WSAEACCES The calling routine does not have sufficient privileges to access the information.
WSAEFAULT The buffer pointed to by the lpServiceClassInfo parameter is too small to contain a WSASERVICECLASSINFOW. The application needs to pass in a larger buffer.
WSAEINVAL The specified service class identifier or namespace provider identifier is not valid. This error is returned if the lpProviderId, lpServiceClassId, lpdwBufSize, or lpServiceClassInfo parameters are NULL.
WSAEOPNOTSUPP The operation is not supported for the type of object referenced. This error is returned by some namespace providers that do not support getting service class information.
WSANO_DATA The requested name is valid, but no data of the requested type was found.
WSANOTINITIALISED The WS2_32.DLL has not been initialized. The application must first call WSAStartup before calling any Windows Sockets functions.
WSATYPE_NOT_FOUND The specified class was not found.

Remarks

The WSAGetServiceClassInfo function retrieves service class information from a namespace provider. The service class information retrieved from a particular namespace provider might not be the complete set of class information that was specified when the service class was installed. Individual namespace providers are only required to retain service class information that is applicable to the namespaces that they support. See the section Service Class Data Structures for more information.

Requirements

Header: Declared in winsock2.h.

Library: Use ws2_32.lib.