¿Qué significa el código HRESULT 0x8899001A (D2DERR_TARGET_NOT_GDI_COMPATIBLE)?

 
Anterior Siguiente
D2DERR_WIN32_ERROR D2DERR_TEXT_EFFECT_IS_WRONG_TYPE

D2DERR_TARGET_NOT_GDI_COMPATIBLE

Qué significa D2DERR_TARGET_NOT_GDI_COMPATIBLE

D2DERR_TARGET_NOT_GDI_COMPATIBLE (-2003238886, 0x8899001A) — El destino de renderizado no es compatible con GDI.

Render targets y bitmaps tienen roles y lifetimes concretos. Un bitmap que sirve como target, una superficie GDI o un target perdido no puede usarse indistintamente como fuente; la operación exacta y el binding actual son parte del diagnóstico.

Qué demuestra este HRESULT

La condición específica es target no creado con compatibilidad GDI requerida. Registra bitmap/target options y la llamada GetDC/interop que falla. Recrea únicamente el target que necesita GDI con las opciones compatibles; habilitar GDI en todos los recursos añade restricciones innecesarias.

Conserva binding y generación del target

Registra SetTarget, BeginDraw/EndDraw y cualquier recreate/resize junto con un generation ID. Los recursos dependientes deben pertenecer al target/device actual; una referencia COM que sigue viva después de device loss no garantiza que siga siendo utilizable.

Referencias técnicas


¿Buscas un código diferente? Buscar otro código de estado o error.