Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
(Protocol Version 3) The ApiCloseResource method instructs the server to free any context information that is created in a previous ApiOpenResource, ApiOpenResourceEx, or ApiCreateResource method.
The server SHOULD accept an ApiCloseResource request if its protocol server state is read-only and MUST accept the request for processing if it is in the read/write state, as specified in section 3.1.1.
The server SHOULD accept an ApiCloseResource request if the access level associated with the Resource context handle is at least "Read" (section 3.1.4).
-
error_status_t ApiCloseResource( [in, out] HRES_RPC *Resource );
Resource: A pointer to an HRES_RPC context handle that was obtained in a previous ApiOpenResource, ApiOpenResourceEx, or ApiCreateResource method call. Upon success, the server MUST set to NULL (0x00000000) the context handle that this parameter points to.
Return Values: The method MUST return the following error codes for the conditions specified as follows.
-
Return value/code
Description
0x00000000
ERROR_SUCCESS
Success.
0x00000006
ERROR_INVALID_HANDLE
The data that is pointed to by the Resource parameter does not represent a valid HRES_RPC context handle.
For any other condition, the server MUST return a value that is not listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table.