Platform SDK: Windows Sockets

NSPRemoveServiceClass

The NSPRemoveServiceClass function permanently removes a specified service class from the name space.

int NSPRemoveServiceClass (
  LPGUID   lpProviderId,   
  LPGUID   lpServiceClassId   
);

Parameters

lpProviderId
[in] Pointer to the GUID of the specific name-space provider that this service class schema is to be removed from.
lpServiceClassId
[in] Pointer to the GUID for the service class to remove.

Return Values

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.

Error Codes

Error code Meaning
WSATYPE_NOT_FOUND Specified class was not found in any of the name spaces.
WSAEACCES Calling routine does not have sufficient privileges to remove the Service.
WSA_INVALID_PARAMETER Specified GUID was not valid.
WSAEINVAL Specified service class identifier GUID was not valid.
WSA_NOT_ENOUGH_MEMORY Not enough free memory available to perform this operation.

Requirements

  Version: Requires Windows Sockets 2.0.
  Header: Declared in Ws2spi.h.