The NSPGetServiceClassInfo function retrieves all of the pertinent class information (schema) pertaining to the name space provider. This call retrieves any name space-specific information that is common to all instances of the service, including connection information for SAP, or port information for SAP or TCP.
int NSPGetServiceClassInfo (
IN LPGUID lpProviderId,
IN OUT LPDWORD lpdwBufSize,
IN OUT LPWSASERVICECLASSINFOW lpServiceClassInfo
);
The W2_32.DLL uses this function to implement the WSAGetServiceClassNameByServiceClassId function, as well as to retrieve the name space specific information passed into the NSPLookupServiceBegin and NSPSetService.
If no error occurs, the NSPGetServiceClassInfo function returns NO_ERROR (zero). Otherwise, SOCKET_ERROR (-1) is returned and it must set the appropriate error code using SetLastError.
WSAEACCES | The calling routine does not have sufficient privileges to access the information. |
WSAEFAULT | The lpServiceClass buffer was too small to contain a WSASERVICECLASSINFOW. |
WSAEINVAL | The specified service class ID or name space provider ID is invalid. |
WSATYPE_NOT_FOUND | The specified class was not found in any of the name spaces. |
WSA_NOT_ENOUGH_MEMORY | Not enough free memory available to perform this operation. |
Windows NT: Yes
Windows: Yes
Windows CE: Unsupported.
Header: Declared in ws2spi.h.