Export (0) Print
Expand All
Expand Minimize

MI_Operation_GetClass function

Gets a synchronous result for a class operation.

Syntax


 MI_INLINE MI_Result MI_Operation_GetClass(
  _In_       MI_Operation *operation,
  const _Outptr_result_maybenull_ MI_Class **classResult,
  _Out_opt_  MI_Boolean *moreResults,
  _Out_opt_  MI_Result *result,
  const _Outptr_opt_result_maybenull_z_ MI_Char **errorMessage,
  const _Outptr_opt_result_maybenull_ MI_Instance **completionDetails
);

Parameters

operation [in]

Operation handle returned from an instance session operation.

classResult

Returned class. If the operation fails, this value may be Null. The returned class is valid until the next call to MI_Operation_GetClass or MI_Operation_Close. If the class needs to be stay active across these calls, then the class needs to be cloned via MI_Class_Clone.

moreResults [out, optional]

Returned Boolean value indicating if more results are available. A value of MI_TRUE means that more results can be retrieved. This is accomplished by calling this function until moreResults has a value of MI_FALSE (even if the operation is canceled via MI_Operation_Cancel. Calling MI_Operation_Close before retrieving the last result where moreResults is set to MI_FALSE will cause the MI_Operation_Close function to stop responding.

result [out, optional]

Returned value indicating the success or failure of the function call. A value of MI_RESULT_OK indicates success. Otherwise, the returned errorMessage value should be used to determine the cause of failure.

errorMessage

In the case of an error, this returned value provides additional debugging information as to the cause of failure. This error message has the same lifetime as the classResult value.

completionDetails

In the case of an error, this returned value provides additional error information - typically in the form of a CIM_Error object (or a derived class). This returned instance has the same lifetime as the classResult value. If this value is needs to stay active longer, then the value needs to be cloned via MI_Instance_Clone.

Return value

A value of the MI_Result enumeration that specifies the function return code. This can be one of the following codes.

Return codeDescription
MI_RESULT_OK

The operation succeeded.

MI_RESULT_SERVER_LIMITS_EXCEEDED

There is not enough memory to complete the request.

MI_RESULT_INVALID_PARAMETER

One or more parameters passed to the function were not valid.

MI_RESULT_FAILED

A failure not covered by other MI_Result error codes.

MI_RESULT_ACCESS_DENIED

Access to a CIM resource is not available to the client.

 

Remarks

This function will block until a result is available. It must be called until the moreResults parameter is returned with a value of MI_FALSE. It is an error to call this function if a class callback is registered.

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

 

 

Show:
© 2014 Microsoft