Skip to main content
MI_Context_PostCimError function

Posts a return code and an error message (in the form of a CIM_Error object) to the server in response to a request.

Syntax


 MI_INLINE MI_Result MI_Context_PostCimError(
  _In_  MI_Context *context,
  _In_  const MI_Instance *error
);

Parameters

context [in]

A pointer to the request context.

error [in]

A pointer to a CIM_Error object to be posted to the server.

Return value

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.

 

Remarks

The CIM_Error instance that is returned in the error parameter can be compiled into your provider so you can initialize and then post it. Once an error has been posted, the context must not be used, as it becomes invalid at this point.

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_Context
MI_Instance
CIM_Error
MI_Context_WriteCimError