What does HRESULT 0xC00D36E2 (MF_E_INVALID_KEY) mean?

 
Previous Next
MF_E_SAMPLE_NOT_WRITABLE MF_E_BAD_STARTUP_VERSION

MF_E_INVALID_KEY

MF_E_INVALID_KEY indicates that a key passed to a Media Foundation keyed operation is not valid in that contract. Media Foundation uses GUID keys extensively for attributes, services, and configuration, so the failing key must be captured exactly rather than logged only as a friendly name.

Trace the GUID at the API boundary

  • Log the full GUID and the exact method that received it.
  • Check for uninitialized GUID storage, a key from the wrong API family, or a constant intended for a different object type.
  • For IMFAttributes, distinguish an invalid key from a valid-but-absent key: documented attribute getters use MF_E_ATTRIBUTENOTFOUND for the latter.

Do not generate GUIDs dynamically for standard Media Foundation attributes or reinterpret a PROPERTYKEY as an IMFAttributes GUID. The Windows property system uses PROPERTYKEY values with both a format GUID and property ID, while IMFAttributes keys are GUIDs. Mixing these key models can produce invalid-key diagnostics before value parsing matters.

Microsoft: IMFAttributes GUID keys · Microsoft: PROPERTYKEY structure · Wine: IMFAttributes keyed methods


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