Compartilhar via


NSPInstallServiceClass

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This 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 class information associated with that name space. Other name-space providers should do whatever makes sense.

Syntax

int NSPInstallServiceClass(
  LPGUID lpProviderId,
  LPWSASERVICECLASSINFOW lpServiceClassInfo 
);

Parameters

  • lpProviderId
    [in] Pointer to the GUID of the specific name-space provider that this service class schema is being registered in.
  • lpServiceClassInfo
    [in] Contains service class schema information.

Return Value

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

The following table shows the possible error codes.

Value Description

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.

Remarks

Name space providers are encouraged but not required to store information that is specific to the name space they support.

Requirements

Header ws2spi.h
Library Ws2.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

NSPRemoveServiceClass