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

Tony 96 Reputation points
2022-04-24T23:45:13.197+00:00

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.
780 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,589 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Tony 96 Reputation points
    2022-04-26T22:15:21.737+00:00

    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.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.