WsCloseServiceProxy function
Closes down communication with the specified service proxy.
Syntax
HRESULT WINAPI WsCloseServiceProxy(
_In_ WS_SERVICE_PROXY* serviceProxy,
_In_opt_ const WS_ASYNC_CONTEXT* asyncContext,
_In_opt_ WS_ERROR* error
);
Parameters
- serviceProxy [in]
-
Pointer to a WS_SERVICE_PROXY structure representing he service proxy to be closed.
- asyncContext [in, optional]
-
Pointer to a WS_ASYNC_CONTEXT structure containing information for invoking the function asynchronously. Pass NULL to invoke the function synchronously.
- 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 |
|---|---|
|
The asynchronous operation is still pending. |
|
The current state of the service proxy is not valid for this operation. This is only error for which close will fail. |
|
The underlying WS_CHANNEL was disconnected during the close operation. This error occurs only in cases where the underlying channel is session based. |
|
The operation was aborted. |
|
The remote endpoint could not process the request. |
|
The input data was not in the expected format or did not have the expected value. |
|
The operation did not complete within the time allotted. |
|
A quota was exceeded. |
|
Insufficient memory to complete the operation. |
|
One or more arguments are invalid. |
|
This function may return other errors not listed above. |
Remarks
If a service operation call is pending on the service proxy, WsCloseServiceProxy waits for each call to complete. After calling WsCloseServiceProxy application should not perform any more calls on the service proxy.
Note that WS_E_INVALID_OPERATION is the only error code that indicates that closure has failed. Other error codes indicate that the operation succeeded, and the error code is for informational purposes only.
Requirements
|
Minimum supported client | Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|