The Windows Sockets WSAGetServiceClassInfo function retrieves all of the class information (schema) pertaining to a specified service class from a specified name space provider.
INT WSAGetServiceClassInfo(
LPGUID lpProviderId,
LPGUID lpServiceClassId,
LPDWORD lpdwBufferLength,
LPWSASERVICECLASSINFO lpServiceClassInfo
);
The WSAGetServiceClassInfo function retrieves service class information but the service class information retrieved from a particular name space provider might not be the complete set of class information that was supplied when the service class was installed. Individual name space providers are only required to retain service class information that is applicable to the name spaces that they support. See section Service Class Data Structures for more information.
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.
WSAEACCESS | The calling routine does not have sufficient privileges to access the information. |
WSAEFAULT | The buffer referenced by lpServiceClassInfo is too small. Pass in a larger buffer. |
WSAEINVAL | the specified service class ID or name space provider ID is invalid. |
WSANOTINITIALIZED | 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. |
WSA NOT ENOUGH MEMORY | There was insufficient memory to perform the operation. |
Windows NT: Yes
Windows: Yes
Windows CE: Unsupported.
Header: Declared in winsock2.h.
Import Library: Link with ws2_32.lib.