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

前端 未结 3 1570
猫巷女王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:45

    You need to convert the IDL to a typelib first:

    Something like:

    midl /I "%VSINSTALLDIR%\DIA SDK\include" dia2.idl /tlb dia2.tlb
    tlbimp dia2.tlb
    

    Then you can import the tlb.

    I've never used the DIA SDK this way, so don't know how friendly it would be. You could also consider using it directly from a managed C++ assembly and presenting a managed interface to the functionality you need.

提交回复
热议问题