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 code | Meaning |
|---|---|
|
The namespace provider cannot supply the requested class information. | |
|
There was insufficient memory to perform the operation. | |
|
The calling function does not have sufficient privileges to install the service. | |
|
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. | |
|
The service class information was not valid or improperly structured. This error is returned if the lpServiceClassInfo parameter is NULL. | |
|
The operation is not supported. This error is returned if the namespace provider does not implement this function. | |
|
The requested name is valid, but no data of the requested type was found. | |
|
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 |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
WSAInstallServiceClassW (Unicode) and WSAInstallServiceClassA (ANSI) |
See also