ApiRestartResource (Opnum 146)

The ApiRestartResource method SHOULD<104> instruct the server to restart a resource without affecting the resource's persistent state. The server SHOULD bring the resource offline, then bring the resource back to its persistent state.

The server MUST accept an ApiRestartResource request only if it is in the read/write state, as specified in section 3.1.1.

The server MUST require that the access level associated with the hResource parameter is "All" (section 3.1.4).

 error_status_t ApiRestartResource(
   [in] HRES_RPC hResource,
   [in] DWORD dwFlags,
   [out] error_status_t *rpc_status

hResource: An HRES_RPC context handle that was obtained in a previous call to ApiOpenResource (section, ApiOpenResourceEx (section, or ApiCreateResource (section

dwFlags: This field is reserved and is ignored by the server. Clients MUST set this value to 0.

rpc_status: A 32-bit integer used to indicate success or failure. The RPC runtime MUST indicate, by writing to this parameter, whether it succeeded in executing this method on the server. The encoding of the value passed in this parameter MUST conform to encoding for comm_status and fault_status, as specified in Appendix E of [C706].

Return Values: This method MUST return ERROR_SUCCESS (0x00000000) on success, or a different value for any other condition. Clients MUST treat all values other than ERROR_SUCCESS identically, except for recoverable errors as specified in section, for which the client MUST initiate the reconnect procedure.