WSAInstallServiceClass

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

INT WSAInstallServiceClass(
  LPWSASERVICECLASSINFO lpServiceClassInfo  
);
 

Parameters

lpServiceClasslnfo
[in] The service class to name-space-specific type-mapping information. Multiple mappings can be handled at one time.

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

Return Values

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 Codes

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 ID. To modify service class info, first use WSARemoveServiceClass, and then re-install with updated class info data.
WSAEINVAL The service class information was invalid or improperly structured.
WSANOTINITIALIZED The WS2_32.DLL has not been initialized. The application must first call WSAStartup before calling any Windows Sockets functions.
WSA NOT ENOUGH MEMORY There was insufficient memory to perform the operation.

QuickInfo

  Windows NT: Yes
  Windows: Yes
  Windows CE: Unsupported.
  Header: Declared in winsock2.h.
  Import Library: Link with ws2_32.lib.