WDStatus function (windowsdefender.h)

Returns the current status of Windows Defender.

Syntax

HRESULT WDStatus(
  [out] BOOL *pfEnabled
);

Parameters

[out] pfEnabled

Type: BOOL*

The status of Windows Defender as a boolean. TRUE means Windows Defender is in enabled status. FALSE means Windows Defender is in disabled status.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header windowsdefender.h
DLL MpClient.dll

See also

WDEnable