Skip to Content

Solved: How do I fix Windows Error D2DERR_OUTSTANDING_BITMAP_REFERENCES 0x88990022, -2003238878, 2291728418?

This article discusses what and most effective solutions to fix Windows Error D2DERR_OUTSTANDING_BITMAP_REFERENCES, also known as 0x88990022, -2003238878, and 2291728418. D2DERR_OUTSTANDING_BITMAP_REFERENCES error means the operation cannot complete while there are outstanding references to the target bitmap.

Error Information

Error Number/Return Code/Error Code Value

HEX: 0x88990022

Signed Integer/Dec: -2003238878

Unsigned Integer: 2291728418

What is Windows Error D2DERR_OUTSTANDING_BITMAP_REFERENCES 0x88990022, -2003238878, 2291728418?

Constant Name/Result String/String Error: D2DERR_OUTSTANDING_BITMAP_REFERENCES

Error Message Description

  • The operation cannot complete while there are outstanding references to the target bitmap.
  • 対象のビットマップに対する未解決の参照がある間は操作を完了できません。

Category: HRESULT

HRESULT is a data type numerical error code used in Windows operating systems, and the earlier IBM/Microsoft OS/2 operating system, to represent error conditions, and warning conditions, and to prevent collisions between error codes in different subsystems of the OS/2 operating system at the same time. Various bits within an HRESULT encode information about the nature of the error code. HRESULT error codes are commonly used in COM programming, where they form the basis for a standardized COM error handling convention.

HRESULT analysis

flags: SX; facility: 2201 (FACILITY_DIRECT2D); error: 34

  • Flags/Severity: Failure
  • Flags/Reserved (R): false
  • Flags/Origin: Microsoft
  • Flags/NTSTATUS: false
  • Flags/Reserved (X): true
  • Facility/Code: 2201 (0x899)
  • Facility/Name: FACILITY_DIRECT2D
  • Error Code: 34 (0x0022)
  • Facility: DLS
  • Operating System: Windows

Where does Windows Error D2DERR_OUTSTANDING_BITMAP_REFERENCES 0x88990022, -2003238878, 2291728418 come from?

Windows Error D2DERR_OUTSTANDING_BITMAP_REFERENCES 0x88990022, -2003238878, 2291728418 declared in the following source:

  • winerror.h from Windows SDK 10.0.14393.0
  • COM-based APIs Error Codes (UI, Audio, DirectX, Codec)
  • Direct 2D (hardware accelerated GUI rendering) > FACILITY_DIRECT2D
    Value: 2201 | 0x899 | 0b100010011001
  • Error code definitions for the Win32 API functions
    pub const D2DERR_OUTSTANDING_BITMAP_REFERENCES: HRESULT = 0x88990022
  • PythonForWindows > generated Windows defines and structures
    windows.generated_def.D2DERR_OUTSTANDING_BITMAP_REFERENCES = D2DERR_OUTSTANDING_BITMAP_REFERENCES(0x88990022)
  • GO windows package
    D2DERR_OUTSTANDING_BITMAP_REFERENCES Handle = 0x88990022
  • Xbox One Kernelbase.dll
    0x88990022, “The operation failed because the original target is not currently bound as a target.\r\n”
  • danmar/cppcheck/cfg/windows.cfg
    <define name=”D2DERR_OUTSTANDING_BITMAP_REFERENCES” value=”0x88990022″/>
  • RattletraPM/Snickerstream/include/Direct2DConstants.au3
    Global Const $D2DERR_OUTSTANDING_BITMAP_REFERENCES = 0x88990022 ;You can’t set the image as a target because it is either an effect or a bitmap that doesn’t have the D2D1_BITMAP_OPTIONS_TARGET option.
  • Google Git > go / sys / refs/heads/master / . / windows / zerrors_windows.go
    D2DERR_OUTSTANDING_BITMAP_REFERENCES Handle = 0x88990022
  • “Fossies” – the Fresh Open Source Software Archive > Member “cppcheck-2.8.2/cfg/windows.cfg” (12 Jul 2022, 840860 Bytes) of package /linux/misc/cppcheck-2.8.2.tar.gz:
    <define name=”D2DERR_OUTSTANDING_BITMAP_REFERENCES” value=”0x88990022″/>
  • twitchapon-anim > zerrors_windows.go (678909B)
    D2DERR_OUTSTANDING_BITMAP_REFERENCES Handle = 0x88990022

How to fix Windows Error D2DERR_OUTSTANDING_BITMAP_REFERENCES 0x88990022, -2003238878, 2291728418?

Question/Problem Description

User like to update the size of the render target the same size with the window client size where called ID2D1HwndRenderTarget::Resize failed, returned the code below:

D2DERR_OUTSTANDING_BITMAP_REFERENCES
0x88990022
The operation cannot complete while there are outstanding references to the target bitmap.

Solution

Remove the ID2D1RenderTarget::Flush Calling.

Solution

Remember to call ID2D1DeviceContext::SetTarget(nullptr); after drawing on the bitmap or something similar. You should add some relevant drawing / resizing code to the question.

Solution

That is because SetTarget is a method of ID2D1DeviceContext. Typical render sequence should look like ID2D1DeviceContext::SetTarget, ID2D1RenderTarget::BeginDraw, draw calls, ID2D1RenderTarget::EndDraw, ID2D1DeviceContext::SetTarget(nullptr);. ID2D1HwndRenderTarget::Resize should not appear in between those calls.