WsCreateServiceEndpointFromTemplate 函数 (webservices.h)
用于从策略模板创建服务终结点 (WS_SERVICE_ENDPOINT) 的帮助程序例程。
语法
HRESULT WsCreateServiceEndpointFromTemplate(
[in] WS_CHANNEL_TYPE channelType,
[in] const WS_SERVICE_ENDPOINT_PROPERTY *properties,
[in] ULONG propertyCount,
[in, optional] 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, optional] WS_ERROR *error
);
参数
[in] channelType
表示终结点托管的通道类型的 WS_CHANNEL_TYPE 枚举值。
[in] properties
包含服务终结点属性 的WS_SERVICE_ENDPOINT_PROPERTY 结构的数组。 (应用程序应在模板结构中填写通道属性。)
[in] propertyCount
属性数组中的 属性 数。
[in, optional] addressUrl
终结点要侦听的 URL 地址。
[in] contract
表示终结点协定 的WS_SERVICE_CONTRACT 结构。
[in] authorizationCallback
服务终结点 的WS_SERVICE_SECURITY_CALLBACK 授权回调。
[in] heap
成功返回时为服务终结点分配内存的 堆 。
[in] templateType
一个 WS_BINDING_TEMPLATE_TYPE 枚举值,该值表示用于创建服务终结点的模板类型。
[in] templateValue
应用程序要创建和填充的可选模板结构。 该模板必须与在 templateType 参数) 中传递的 输入模板 类型 (一致。 当 templateValue 参数为 NULL 时,它等效于初始化为零的相应模板结构。
[in] templateSize
输入 templateValue 结构的大小(以字节为单位)。
[in] templateDescription
模板结构的说明 (templateValue 参数) 传递。 需要匹配 templateType。
[in] templateDescriptionSize
模板说明的大小。
[out] serviceEndpoint
成功时,一个指针,用于接收表示新服务终结点的 WS_SERVICE_ENDPOINT 结构的地址。
[in, optional] error
指向 WS_ERROR 结构的指针,该结构在函数失败时接收其他错误信息。
返回值
如果函数成功,则返回NO_ERROR;否则,它将返回 HRESULT 错误代码。
注解
WsCreateServiceEndpointFromTemplate 从指定的输入策略模板和其他用户输入创建 WS_SERVICE_ENDPOINT 结构。
要求
要求 | 值 |
---|---|
最低受支持的客户端 | Windows 7 [仅限桌面应用] |
最低受支持的服务器 | Windows Server 2008 R2 [仅限桌面应用] |
目标平台 | Windows |
标头 | webservices.h |
Library | WebServices.lib |
DLL | WebServices.dll |