IMFActivate::ActivateObject return error code “CoInitialize has not been called.”

后端 未结 1 453
说谎
说谎 2021-01-21 12:30

I\'m writing a simple multimedia application in Visual Studio 2013 and I need to enumerate camera devices connected to my computer and create a media source object to link to on

相关标签:
1条回答
  • 2021-01-21 12:52

    Com Libraries need to be initialized for each thread, through either of

    • CoInitialize
    • CoInitializeEx
    • OleInitialize

    depending on which services are to be used in this thread.

    Do this at the start of your program, for all threads that use COM, and don't forget to call the respective Uninitialize function

    0 讨论(0)
提交回复
热议问题