IGPMStatusMessage::ErrorCode method (gpmgmt.h)

Returns the error that occurred during the GPMC operation. If the operation was interacting with another system component, the error code is typically one returned by that component. Usually this is the first error GPMC hits while executing the operation. This error code is internally mapped to the operation error code returned by the OperationCode method.

For example, if GPMC calls LookupAccountSid while resolving the destination of a security group in a GPO import operation, and LookupAccountSid returns E_ACCESSDENIED, then the error code for the message will be E_ACCESSDENIED and the operation code of the message will be STATUS_ENTRY_DEST_UNRESOLVED.

Syntax

HRESULT ErrorCode();

Return value

JScript

Returns S_OK if successful. Returns a failure code if an error occurs.

VB

Returns S_OK if successful. Returns a failure code if an error occurs.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header gpmgmt.h
DLL Gpmgmt.dll

See also

IGPMStatusMessage

IGPMStatusMsgCollection