Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 686 Bytes

File metadata and controls

45 lines (35 loc) · 686 Bytes
title c33020
description C33020 warning for HRESULTs
keywords c33020
author hwisungi
ms.author hwisungi
ms.date 06/20/2020
ms.topic reference
f1_keywords
C33020
helpviewer_keywords
C33020
dev_langs
C++

C33020

Warning C33020: Likely incorrect HRESULT usage detected.

This is high-confidence warning indicating that HRESULT-returning function returns FALSE.

Example

#include <Windows.h>

HRESULT foo()
{
    // ......
    return FALSE; // C33020
}

These warnings are corrected by using proper HRESULT value:

#include <Windows.h>

HRESULT foo()
{
    // ......
    return E_FAIL; // OK
}

See also

C33022