D1106: Resource Is Wrong Type

The given resource [resource] is not of an expected type.

Placeholders

resource

The address of the resource.

 

Possible Causes

An interface was improperly cast and used as a parameter for a method or function.

Examples

The following example passes an ID2D1SolidColorBrush when an ID2D1Geometry is expected.

        m_pRenderTarget->FillGeometry(
            (ID2D1Geometry*)m_pYellowGreenBrush,
            m_pYellowGreenBrush
            );

This example produces the following debug message:

DEBUG ERROR - The given resource[003A2C98] is not of an expected type

Fixes

Use the type required by the method.