What does HRESULT 0x80040240 (VFW_E_UNKNOWN_FILE_TYPE) mean?

 
Previous Next
VFW_E_IN_FULLSCREEN_MODE TPC_E_INVALID_PROPERTY

VFW_E_UNKNOWN_FILE_TYPE

Meaning

Windows documents VFW_E_UNKNOWN_FILE_TYPE as “The media type of this file is not recognized”. In practical terms, it is returned when DirectShow graph building cannot recognize the media type or select a source filter for the supplied file.

Where the failure belongs

This result belongs to DirectShow filter-graph processing. The relevant condition is that DirectShow graph building cannot recognize the media type or select a source filter for the supplied file.

Evidence to collect

  • Capture 1: file signature and extension.
  • Capture 2: source-filter enumeration and registration.
  • Capture 3: IGraphBuilder::RenderFile result before fallback handlers.

Likely causes

  • Possible cause 1: the file signature is unknown to registered source filters.
  • Possible cause 2: the extension is misleading and no byte-pattern match succeeds.
  • Possible cause 3: the required source filter is not installed or registered.

Diagnostic sequence

  1. Confirm that the observed path matches this condition: DirectShow graph building cannot recognize the media type or select a source filter for the supplied file.

Practical scenario

A proprietary container is renamed with a common extension but no registered filter recognizes its signature; installing the correct source filter resolves it.

Correct handling and retry

  • Corrective action 1: identify the actual container format.
  • Corrective action 2: install a supported source filter or use Media Foundation where appropriate.
  • Corrective action 3: avoid trusting extension alone.

Retry guidance. Retry after changing the file, source-filter registration or explicit source selection.

Difference from nearby HRESULTs

VFW_E_INVALID_FILE_FORMAT means a format was selected but its structure is invalid; it means DirectShow cannot identify the type.

Official Microsoft references


Looking for a different code? Search another status or error code.