3.1.4.1.22 ApiCanResourceBeDependent (Opnum 21)

(Protocol Version 2) The ApiCanResourceBeDependent method determines whether a resource can be dependent on another resource as specified in section 3.1.1.1.2. The nonvolatile cluster state associated with either resource is not updated.

The server MUST fail this method using error ERROR_DEPENDENCY_ALREADY_EXISTS for any of the following conditions:

  • hResource and hResourceDependent represent the same resource.

  • The resources are not in the same group.

  • A dependency between hResource and hResourceDependent already exists.

  • A dependent of hResourceDependent is already dependent on hResource, either directly or indirectly. That is, circular dependencies are not permitted.

The server SHOULD accept an ApiCanResourceBeDependent 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.

 error_status_t ApiCanResourceBeDependent(
   [in] HRES_RPC hResource,
   [in] HRES_RPC hResourceDependent
 );

hResource: An HRES_RPC context handle that was obtained in a previous ApiOpenResource or ApiCreateResource method call.

hResourceDependent: An HRES_RPC context handle that was obtained in a previous ApiOpenResource or ApiCreateResource method call.

Return Values: The method MUST return the following error codes for the specified conditions.

Return value/code

Description

0x00000000

ERROR_SUCCESS

Success.

0x00000006

ERROR_INVALID_HANDLE

The data that is pointed to by either the hResource parameter or the hResourceDependent parameter does not represent a valid HRES_RPC context handle.

0x00000057

ERROR_INVALID_PARAMETER

See the preceding text for details of when this error can occur.

0x00000423

ERROR_CIRCULAR_DEPENDENCY

See the preceding text for details of when this error can occur.

0x0000138B

ERROR_DEPENDENCY_ALREADY_EXISTS

See the preceding text for details of when this error can occur.

0x0000138E

ERROR_RESOURCE_NOT_AVAILABLE

The resource represented by either the hResource parameter or the hResourceDependent parameter no longer exists in the nonvolatile cluster state.

0x0000139B

ERROR_RESOURCE_ONLINE

See the preceding text for details of when this error can occur.

0x000013CD

ERROR_DEPENDENCY_NOT_ALLOWED

See the preceding text for details of when this error can occur.

0x00001729

ERROR_DEPENDENCY_TREE_TOO_COMPLEX

See the preceding text for details of when this error can occur.

For any other condition, the server MUST set Status to a value that is not one of the values listed in the preceding table. The client MUST treat all values that are not listed in the preceding table the same, except as specified in section 3.2.4.6.

Show: