Platform SDK: Windows Sockets |
The NSPGetServiceClassInfo function retrieves all 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 ( LPGUID lpProviderId, OUT LPDWORD lpdwBufSize, OUT LPWSASERVICECLASSINFOW lpServiceClassInfo );
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.
The W2_32.dll uses this function to implement the WSAGetServiceClassNameByClassId function, as well as to retrieve the name space specific information passed into the NSPLookupServiceBegin and NSPSetService.
Error code | Meaning |
---|---|
WSAEACCES | Calling routine does not have sufficient privileges to access the information. |
WSAEFAULT | The lpServiceClass buffer was too small to contain a WSASERVICECLASSINFOW. |
WSAEINVAL | Specified service class identifier or name-space–provider identifier is invalid. |
WSATYPE_NOT_FOUND | Specified class was not found in any of the name spaces. |
WSA_NOT_ENOUGH_MEMORY | Not enough free memory available to perform this operation. |
Version: Requires Windows Sockets 2.0.
Header: Declared in Ws2spi.h.