| Previous | Next |
| ERROR_INVALID_WINDOW_STYLE | ERROR_TRANSFORM_NOT_SUPPORTED |
ERROR_METAFILE_NOT_SUPPORTED
The requested metafile operation is not supported.
ERROR_METAFILE_NOT_SUPPORTED is Win32 error 2003 (0x7D3). Windows supports classic Windows metafiles and enhanced metafiles, but not every record, conversion, playback target, device context, or driver supports every operation. The code indicates a capability boundary rather than necessarily proving that the entire metafile is corrupt.
Where support breaks down
- an enhanced-metafile-only operation is attempted on a classic WMF or vice versa
- the destination printer, memory, information, or display DC cannot reproduce a requested record or mapping behavior
- conversion between WMF and EMF encounters records, headers, or embedding assumptions it cannot preserve
- application-generated records rely on a GDI feature not representable in the chosen metafile format
- sandboxing, remote display, compatibility layers, or a driver omit a path available on the developer machine
Metafile diagnostics
Record file type, header bounds and version, byte size, record count and failing record type when known, source application, destination DC technology, driver name/version, mapping mode, playback or conversion API, and output dimensions. Retain a minimal non-sensitive sample metafile when permitted. Do not log arbitrary embedded comments without sanitizing them.
Investigation steps
Validate the header and enumerate records before playback. Determine whether failure follows one specific record, the destination DC, or the conversion API. Test the same file on a display DC and a known printer driver to distinguish file feature support from device-driver behavior.
If code creates the metafile, reduce it to basic GDI records and add transforms, clipping, bitmap transfers, paths, and comments incrementally. Confirm that WMF/EMF conversion is actually required; retaining EMF may avoid a lossy unsupported path.
Recovery options
Use the compatible metafile type, omit or rasterize unsupported operations, or render to an intermediate bitmap/PDF when fidelity requirements allow. For printing, update or replace the driver only after proving the failure is driver-specific.
Developers should validate imported files, bound record enumeration, and provide a fallback that preserves document layout. Telemetry should identify the first unsupported record instead of reporting only a generic export failure.
Difference from malformed metafile data
Corrupt or invalid data fails structural validation. Error 2003 can occur with a structurally valid metafile when a requested conversion, record, or destination capability is not supported.
Example
A reporting tool converts an EMF containing advanced records to classic WMF for an old export path. Conversion returns 2003, while direct EMF playback succeeds. Keeping EMF or rasterizing the page avoids the unsupported down-conversion.
References
- Microsoft: System Error Codes (1700–3999)
- Microsoft: Win32 Error Codes in MS-ERREF
- Microsoft: Metafiles
- Microsoft: Enhanced metafiles
Looking for a different code? Search another status or error code.