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.
INT WSAInstallServiceClassA(
LPWSASERVICECLASSINFOA lpServiceClassInfo
)
lpServiceClassInfo
Type: LPWSASERVICECLASSINFOA
[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.
Type: INT
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.
| Return code | Description |
|---|---|
| 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. |
Header: Declared in winsock2.h.
Library: Use ws2_32.lib.