Platform SDK: Windows Sockets |
The NSPInstallServiceClass function registers service class schema within the name-space providers.
The schema includes the class name, class identifier, and any name space-specific type information that is common to all instances of the service, such as SAP identifier or object identifier. A dynamic name-space provider is expected to store any class information associated with that name space. Other name-space providers should do whatever makes sense.
int NSPInstallServiceClass ( LPGUID lpProviderId, LPWSASERVICECLASSINFOW lpServiceClassInfo );
The function should return NO_ERROR (zero) if the routine succeeds. It should return SOCKET_ERROR (–1) if the routine fails and it must set the appropriate error code using SetLastError.
Name space providers are encouraged but not required to store information that is specific to the name space they support.
Error code | Meaning |
---|---|
WSAEACCES | Calling routine does not have sufficient privileges to perform this operation. |
WSAEALREADY | Service class information has already been registered for this service class identifier. To modify service class information, first use NSPRemoveServiceClass, then reinstall with updated class information data. |
WSAEINVAL | Service class identifier was invalid or improperly structured. |
WSA_INVALID_PARAMETER | Name space provider cannot supply the requested class information. |
WSA_NOT_ENOUGH_MEMORY | Not enough free memory available to perform this operation. |
Version: Requires Windows Sockets 2.0.
Header: Declared in Ws2spi.h.