220.127.116.11.20 ApiAddResourceDependency (Opnum 19)
(Protocol Version 2) The ApiAddResourceDependency method instructs the server to add a simple dependency, as specified in section 18.104.22.168.2, from the resource that is identified by the hResource parameter to the resource that is identified by the hDependsOn parameter. For successful completion of the method, the server MUST add the dependency to the nonvolatile cluster state.
The server MUST fail this method with ERROR_DEPENDENCY_ALREADY_EXISTS (0x0000138B) if a dependency already exists between the resource that is identified by hResource and the resource that is identified by hDependsOn. The server MUST fail this method with ERROR_CIRCULAR_DEPENDENCY (0x00000423) if the new dependency would result in a circular dependency between the two resources. The server MUST fail this method with ERROR_INVALID_PARAMETER (0x00000057) if hResource and hDependsOn designate the same resource.
Any limits imposed by the server on the depth of a resource's dependency tree are implementation-specific.
error_status_t ApiAddResourceDependency( [in] HRES_RPC hResource, [in] HRES_RPC hDependsOn );
hDependsOn: An HRES_RPC context handle that was obtained in a previous ApiOpenResource method call. After successful completion of this method, the resource that is specified in the hResource parameter has a simple dependency to this resource.
Return Values: The method MUST return the following error codes for the specified conditions.
The data that is pointed to by either the hResource parameter or the hDependsOn parameter does not represent a valid HRES_RPC context handle.
A dependency already exists from the resource that is identified by hResource to the resource that is identified by hDependsOn.
The dependent resource is the quorum.
The new dependency would result in a circular dependency between the two resources.
The hResource parameter and the hDependsOn parameter designate the same resource.
This error code MUST be returned if the following condition is true:
The resource that is identified by hResource is not in the ClusterResourceFailed, ClusterResourceOffline, or ClusterResourceInitializing state.
The resource represented by either the hResource parameter or the hDependsOn parameter no longer exists in the nonvolatile cluster state.
For any other condition, this method MUST return a value that is not one of the values 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. The client SHOULD treat errors specified in section 22.214.171.124 as recoverable errors and initiate the reconnect procedure as specified in section 126.96.36.199.