Redagować

Udostępnij przez


MpErrorMessageFormat function

Returns a formatted error message based on an error code.

Syntax

HRESULT WINAPI MpErrorMessageFormat(
  _In_  MPHANDLE hMpHandle,
  _In_  HRESULT  hrError,
  _Out_ LPWSTR   *pwszErrorDesc
);

Parameters

hMpHandle [in]

Type: MPHANDLE

Handle to the malware protection manager interface. This handle is returned by the MpManagerOpen function.

hrError [in]

Type: HRESULT

An HRESULT-based error code.

pwszErrorDesc [out]

Type: LPWSTR*

Returns a formatted error message based on hrError. This string must be freed using MpFreeMemory.

Return value

Type: HRESULT

If the function succeeds the return value is S_OK.

If the function fails then the return value is a failed HRESULT code.

Remarks

This function is capable of formatting system error codes in addition to specific error codes returned by malware protection functions. The HRESULT error codes specific to malware protection functions have a facility of 0x50. Below is a list of a subset of the malware protection-specific error codes that can be returned by various malware protection functions. Using the macro HRESULT_FROM_MP_STATUS, the following error codes can be converted to HRESULT. See also Forefront Client Security anti-malware engine error codes for a list of other possible error codes.

Error Code Description
ERROR_MP_NOENGINE No engine is loaded in antimalware service to perform the requested operation.
ERROR_MP_NO_MEMORY The antimalware engine has encountered a no memory situation.
ERROR_MP_REMOVE_FAILED Remove operation failed for a specific threat.
ERROR_MP_QUARANTINE_FAILED Quarantine operation failed for a specific threat.
ERROR_MP_THREAT_NOT_FOUND The specific threat no longer exists in the system.
ERROR_MP_REMOVE_NOT_SUPPORTED Remove operation for a specific threat inside the container type is not supported.
ERROR_MP_REMOVE_IMMUTABLE_CONTAINER Due to engine policy, a remove operation of a specific threat inside a blocked container is not supported. (Mail archives.)
ERROR_MP_BADDB_OLDENGINE Signature update request provided an older engine or signature files(s).

Requirements

Requirement Value
Minimum supported client
Windows 8 [desktop apps only]
Minimum supported server
Windows Server 2012 [desktop apps only]
Header
MpClient.h
DLL
MpClient.dll

See also

MpFreeMemory

MpManagerOpen

Forefront Client Security anti-malware engine error codes