IMFCaptureSource::GetAvailableDeviceMediaType returns 0xC00D36B2 (The request is invalid in the current state. )

Tony 86 Reputation points

Why and/or what is the origin of this resultcode?
I can't find anything that explains on docs what this result actually means and how to resolve this.

Thank you.

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
509 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,068 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Tony 86 Reputation points

    Thank you.

    The resultcode is not documented as a possible result of IMFCaptureSource::GetAvailableDeviceMediaType.
    I can't give a sample without the whole code explained.

    In the mean while this result is solved by implementing WaitForSingleObject(Event, INFINITE), before calling this method.
    When IMFCaptureSource is created from IMFCaptureEngine::.GetSource the engine needs to sync because the IMFCaptureEngine methods are processed a-synchronous.
    And that's the reason a HResult (0xC00D36B2) will be returned when IMFCaptureSource methods waits to be completed..
    Now, it would be handy to add this resultcode and explanation here

    Thank you.