Skip to main content

Windows Dev Center

MI_Session_AssociatorInstances function

Finds instances that are associated with the specific key instance.

Syntax


 MI_INLINE void MI_Session_AssociatorInstances(
  _In_      MI_Session               *session,
  MI_Uint32                flags,
  _In_opt_  MI_OperationOptions      *options,
  _In_opt_z_ const MI_Char *namespaceName,
  _In_      const MI_Instance              *instanceKey,
  _In_opt_z_ const MI_Char *assocClass,
  _In_opt_z_ const MI_Char *resultClass,
  _In_opt_z_ const MI_Char *role,
  _In_opt_z_ const MI_Char *resultRole,
  MI_Boolean               keysOnly,
  _In_opt_  MI_OperationCallbacks    *callbacks,
  _Out_     MI_Operation             *operation
);

Parameters

session [in]

Handle created from a call to MI_Application_NewSession.

flags

Runtime type information (RTTI) flags.

options [in, optional]

Optional MI_OperationOptions value that specifies options such as timeouts and how to control the CIM semantics. Specify NULL if no operation options are to be sent.

namespaceName

A null-terminated string that contains the optional namespace name to carry out the operation. If none is specified the server will pick a default. The namespace cannot include a computer name. It can only be in the form of namespace names separated by a slash character, for instance root/cimv2.

instanceKey [in]

An MI_Instance that represents the class name and the keys of the instance where the association will start.

assocClass

A null-terminated string that represents the optional value that specifies to only map the association via this association class. If this value is NULL, then any association classes will be used.

resultClass

A null-terminated string that represents the optional values that restricts the result set to only this class. Specify NULL if no filtering is wanted.

role

A null-terminated string that represents the property name in the association object that points to our key object.

resultRole

A null-terminated string that represents the property name in the association object that points to the resultant class.

keysOnly

If set to MI_TRUE the operation will only retrieve the key properties of the instances. Otherwise, specify MI_FALSE.

callbacks [in, optional]

Optional MI_OperationCallbacks structure that defines the operational callbacks to receive the instance result and CIM semantics. For asynchronous operation, the callback must be specified. For synchronous operation, specify NULL; the client must then call MI_Operation_GetInstance to retrieve the results.

operation [out]

Operation handle that must be closed with a call to MI_Operation_Close once the operation is finished and all results have been received. The handle can be used to cancel the operation with a call to MI_Operation_Cancel.

Remarks

An association is a relationship between two objects. It is represented with a third object containing two properties, each being a reference to one of those two related objects. The role parameter is the association object's reference property, pointing to the object being associated. The resultRole parameter points to the other, resultant object.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Redistributable

Windows Management Framework 3.0 on Windows Server 2008 R2 with SP1, Windows 7 with SP1, and Windows Server 2008 with SP2

Header

Mi.h

See also

MI_Application_NewSession
MI_Operation_GetInstance
MI_Operation_Cancel
MI_Operation_Close