Adding assembly reference to QuartzTypeLib

后端 未结 3 1934
迷失自我
迷失自我 2021-01-21 10:14

I am a new programmer using Visual Studio 2008. How can I add an reference to QuartzTypeLib. I have already checked the add reference folder and do not see a library for Quartz

3条回答
  •  孤城傲影
    2021-01-21 10:27

    AFAIK, DirectShow is considered as obsolete by Microsoft, probably this is the reason for not including this assembly into the latest Visual Studio.

    I don't know how to automate the 1st action, but it is needed only once before the first build.

    1. Run tlbimp tool (in your case path will be different):

      "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\TlbImp.exe" %windir%\system32\quartz.dll /out:QuartzTypeLib.dll

    2. Add generated QuartzTypeLib.dll as a COM-reference to your project (click right mouse button on the project name in "Solution Explorer", then select "Add" menu item and then "Reference")

    3. In your Project, expand the "References", find the QuartzTypeLib reference. Right click it and select properties, and change "Embed Interop Types" to false. (Otherwise you won't be able to use the FilgraphManagerClass in your project (and probably a couple of other ones)).

提交回复
热议问题