Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Providers call this function to post a return code to the client in response to a request.
Syntax
MI_INLINE MI_Result MI_INLINE_CALL MI_Context_PostError(
[in] MI_Context *context,
MI_Uint32 resultCode,
const MI_Char *resultType,
const MI_Char *errorMessage
);
Parameters
[in] context
A pointer to the request context.
resultCode
The Result code to be sent to the client.
resultType
A null-terminated string that represents the type of the result code. The string can be one of these values or an arbitrary value defined by the provider.
MI_RESULT_TYPE_MI ("MI")
MI result type
MI_RESULT_TYPE_HRESULT ("HRESULT")
HRESULT (COM return type) result type
MI_RESULT_TYPE_WIN32 ("WIN32")
Win32 result type
errorMessage
A null-terminated string that represents the error message to be sent to the client. The message should be in the requested UI locale, if possible.
Return value
This function returns MI_INLINE MI_Result MI_INLINE_CALL.
Remarks
After an error is posted, the request context must not be used, because it becomes invalid at this point.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 |
Minimum supported server | Windows Server 2012 |
Target Platform | Windows |
Header | mi.h |
Redistributable | Windows Management Framework 3.0 on Windows Server 2008 R2 with SP1, Windows 7 with SP1, and Windows Server 2008 with SP2 |