MpManagerOpen function

Establishes a connection to the malware protection manager on the local computer.

Syntax

HRESULT WINAPI MpManagerOpen(
  _In_  DWORD     dwReserved,
  _Out_ PMPHANDLE phMpHandle
);

Parameters

dwReserved [in]

Type: DWORD

Reserved for future use. Must be set to 0.

phMpHandle [out]

Type: PMPHANDLE

Handle to the malware protection manager interface. This handle must be closed with the MpHandleClose function.

Return value

Type: HRESULT

If the function succeeds the return value is S_OK. This function call is guaranteed to succeed even if an AntiMalware service is not running.

If the function fails then the return value is a failed HRESULT code. The caller can use the MpErrorMessageFormat function to get a generic description of the error message.

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

MpErrorMessageFormat

MpHandleClose