WSAInstallServiceClass function

The WSAInstallServiceClass function registers a service class schema within a namespace. This schema includes the class name, class identifier, and any namespace-specific information that is common to all instances of the service, such as the SAP identifier or object identifier.

Syntax


INT WSAInstallServiceClass(
  _In_ LPWSASERVICECLASSINFO lpServiceClassInfo
);

Parameters

lpServiceClassInfo [in]

Service class to namespace specific–type mapping information. Multiple mappings can be handled at one time.

See the section Service Class Data Structures for a description of pertinent data structures.

Return value

The return value is zero if the operation was successful. Otherwise, the value SOCKET_ERROR is returned, and a specific error number can be retrieved by calling WSAGetLastError.

Error codeMeaning
WSA_INVALID_PARAMETER

The namespace provider cannot supply the requested class information.

WSA_NOT_ENOUGH_MEMORY

There was insufficient memory to perform the operation.

WSAEACCES

The calling function does not have sufficient privileges to install the service.

WSAEALREADY

Service class information has already been registered for this service class identifier. To modify service class information, first use WSARemoveServiceClass, and then reinstall with updated class information data.

WSAEINVAL

The service class information was not valid or improperly structured. This error is returned if the lpServiceClassInfo parameter is NULL.

WSAEOPNOTSUPP

The operation is not supported. This error is returned if the namespace provider does not implement this function.

WSANO_DATA

The requested name is valid, but no data of the requested type was found.

WSANOTINITIALISED

The WS2_32.DLL has not been initialized. The application must first call WSAStartup before calling any Windows Sockets functions.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winsock2.h

Library

Ws2_32.lib

DLL

Ws2_32.dll

Unicode and ANSI names

WSAInstallServiceClassW (Unicode) and WSAInstallServiceClassA (ANSI)

See also

Winsock Reference
Winsock Functions
WSAGetLastError
WSAGetServiceClassInfo
WSASERVICECLASSINFO

 

 

Show: