WsCreateServiceHost function
Creates a service host for the specified endpoints.
Syntax
HRESULT WINAPI WsCreateServiceHost( const WS_SERVICE_ENDPOINT* endpoints, _In_ const USHORT endpointCount, const WS_SERVICE_PROPERTY* serviceProperties, _In_ ULONG servicePropertyCount, WS_SERVICE_HOST** serviceHost, _In_opt_ WS_ERROR* error );
Parameters
- endpoints
-
An array of WS_SERVICE_ENDPOINT structures representing the service endpoints for which to create the service host.
- endpointCount [in]
-
The number of endpoints in the endpoints array.
- serviceProperties
-
An array of WS_SERVICE_PROPERTY structures containing optional properties for the service host.
The value of this parameter may be NULL, in which case, the servicePropertyCount parameter must be 0 (zero).
- servicePropertyCount [in]
-
The number of properties in the serviceProperties array.
- serviceHost
-
On success, a pointer that receives the address of the WS_SERVICE_HOST structure representing the new service host. When you no longer need this structure, you must free it by calling WsFreeServiceHost.
- error [in, optional]
-
Pointer to a WS_ERROR structure that receives additional error information if the function fails.
Return value
If the function succeeds, it returns NO_ERROR; otherwise, it returns an HRESULT error code.
| Return code | Description |
|---|---|
|
An invalid argument is specified for creating the service host. |
|
A quota was exceeded. |
|
Insufficient memory to complete the operation. |
|
This function may return other errors not listed above. |
Requirements
|
Minimum supported client | Windows 7 [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|