How do I use the MS DIA SDK from C#?

前端 未结 3 1564
猫巷女王i
猫巷女王i 2020-12-15 00:05

I\'m trying to use the Microsoft Debug Interface Access SDK from C#. This is installed with Visual Studio, but the docs don\'t seem to mention how you use this from C#.

3条回答
  •  借酒劲吻你
    2020-12-15 00:47

    The previous instructions worked, but needed some updating. VSINSTALLDIR doesn't exist anymore (and is ambiguous when you have multiple VS versions installed) so I generalized and corrected the instructions. Here is a VS 2015 version:

    "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" amd64
    set DIASDK=%VS140COMNTOOLS%..\..\DIA SDK
    midl /I "%DIASDK%\include" "%DIASDK%\idl\dia2.idl" /tlb dia2.tlb
    tlbimp dia2.tlb
    

    Change VS140 to match whatever version you are trying to use.

    This created dia2lib.dll which I added as a reference - right-click References, Add Reference, Browse, find the file. It works and I can now build and run symbolsort.

提交回复
热议问题