WsCreateServiceEndpointFromTemplate function
Helper routine for creating a service endpoint (WS_SERVICE_ENDPOINT) from policy templates.
Syntax
HRESULT WINAPI WsCreateServiceEndpointFromTemplate( _In_ WS_CHANNEL_TYPE channelType, _In_ const WS_SERVICE_ENDPOINT_PROPERTY *properties, _In_ ULONG propertyCount, _In_opt_ const WS_STRING *addressUrl, _In_ const WS_SERVICE_CONTRACT *contract, _In_ WS_SERVICE_SECURITY_CALLBACK authorizationCallback, _In_ WS_HEAP *heap, _In_ WS_BINDING_TEMPLATE_TYPE templateType, _In_ void *templateValue, _In_ ULONG templateSize, _In_ const void *templateDescription, _In_ ULONG templateDescriptionSize, _Out_ WS_SERVICE_ENDPOINT **serviceEndpoint, _In_opt_ WS_ERROR *error );
Parameters
- channelType [in]
-
A WS_CHANNEL_TYPE enumeration value representing the type of channel hosted by the endpoint.
- properties [in]
-
An array of WS_SERVICE_ENDPOINT_PROPERTY structures containing properties for the service endpoint. (Application should fill in channel properties in the template structure.)
- propertyCount [in]
-
The number of properties in the properties array.
- addressUrl [in, optional]
-
The URL address on which the endpoint is to listen.
- contract [in]
-
A WS_SERVICE_CONTRACT structure representing the contract of the endpoint.
- authorizationCallback [in]
-
A WS_SERVICE_SECURITY_CALLBACK authorization callback for the service endpoint.
- heap [in]
-
The heap from which memory for the service endpoint is allocated on successful return.
- templateType [in]
-
A WS_BINDING_TEMPLATE_TYPE enumeration value representing the type of templates being used to create the service endpoint.
- templateValue [in]
-
Optional template structure to be created and filled in by application. The template must be consistent with the input template type (passed in the templateType parameter). When the templateValue parameter is NULL, it is equivalent to the corresponding template structure initialized to zero.
- templateSize [in]
-
The size, in bytes, of the input templateValue structure.
- templateDescription [in]
-
The description of template structure (passed in the templateValue parameter). Needs to match templateType.
- templateDescriptionSize [in]
-
The size of the template description.
- serviceEndpoint [out]
-
On success, a pointer that receives the address of the WS_SERVICE_ENDPOINT structure representing the new service endpoint.
- 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.
Remarks
WsCreateServiceEndpointFromTemplate creates the WS_SERVICE_ENDPOINT structure from the specified input policy templates and additional user input.
Requirements
|
Minimum supported client | Windows 7 [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|