3.2.4.1.6 GetDependencies (Opnum 12)

The GetDependencies method returns a list of WSRM objects that are being used or that depend on a specified object.

 [id(6), helpstring("method GetDependencies")] HRESULT GetDependencies(
   [in] BSTR bstrObjectName,
   [in] OBJECT_TYPE enumObject,
   [out] BSTR* pbstrDependencyList
 );

bstrObjectName: A string that specifies the name of the object whose dependencies are to be returned.

enumObject: An OBJECT_TYPE enumeration (section 2.2.3.6) value that specifies the type of object specified in bstrObjectName.

pbstrDependencyList: A pointer to a string that returns the dependencies for the object specified in bstrObjectName, in the form of a DependencyList element (section 2.2.5.14). For an example, see section 4.2.11.

A DependencyList element can specify policies, schedules, calendars, and conditional policy events. The content of the structure that is returned by this method is determined by the value of the enumObject parameter.

Return Values: This method returns 0x00000000 for success or a negative HRESULT value (in the following table or in [MS-ERREF] section 2.1.1) if an error occurs.

Return value/code

Description

0x00000000

S_OK

Operation successful.

0xC1FF006F

WRM_ERR_ID_VALUE

The specified name contains characters that are invalid. The name cannot start with a hyphen ("-") and cannot contain spaces or any of the following characters:

 \   / ? * | : < > " , ;.

0x80004005

E_FAIL

Either an object with the specified name and type was not found or its dependency list could not be created.

0xC1FF0271

WRM_ERR_CAL_UNKNOWN_SCHEDULE

A calendar name or an invalid schedule name was passed in bstrObjectName for OBJECT_SCHEDULE enumObject.

0xC1FF013A

WRM_ERR_DEPENDENCIES_FOR_RESIDUAL

This is a residual PMC and is a part of all policies. All processes that do not match any of the PMC specified by a user in a policy automatically match to residual PMC.

The server SHOULD process this method call as follows:

  • If a PMC object is specified, this method MUST return a list of policies that make use of the PMC.

  • If a resource policy object is specified, this method MUST return a list of calendar events, conditions, and schedules that make use of the resource policy.

  • If a schedule object is specified, this method MUST return a list of calendar events making use of the schedule.

  • If a calendar object is specified, this method MUST return WRM_ERR_CAL_UNKNOWN_SCHEDULE.

Additional IResourceManager interface methods are specified in section 3.2.4.1.