LPNSPREMOVESERVICECLASS callback function (ws2spi.h)

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

Syntax

LPNSPREMOVESERVICECLASS Lpnspremoveserviceclass;

INT Lpnspremoveserviceclass(
  [in] LPGUID lpProviderId,
  [in] LPGUID lpServiceClassId
)
{...}

Parameters

[in] lpProviderId

A pointer to the GUID of the specific namespace provider that this service class schema is to be removed from.

[in] lpServiceClassId

A pointer to the GUID for the service class to remove.

Return value

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 WSASetLastError.

Error code Meaning
WSA_NOT_ENOUGH_MEMORY
There is not enough memory available to perform this operation.
WSA_INVALID_PARAMETER
The specified GUID was not valid.
WSAEACCES
The calling routine does not have sufficient privileges to remove the Service.
WSAEINVAL
The specified service class identifier GUID was not valid.
WSAEOPNOTSUPP
The operation is not supported. This error is returned if the namespace provider does not implement this function.
WSATYPE_NOT_FOUND
The specified class was not found in any of the namespaces.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ws2spi.h

See also

WSASetLastError