How can choose msdia80.dll, msdia90.dll, msdia90.dll in an exe com server dynamically? RRS feed

  • Question

  • I have an exe com server build in VS2010, this exe com communicate with visual studio 2005, 2008 or 2010. The server uses the Debug Interface Access (DIA). Original before the server's build, in its pre build event, register the msdia100.dll, so the server refers the msdia100.dll. But in run time, if a PC only has visual studio 2005 installed, the msdia100.dll doesn't exist, it can't be used. How can I build the exe com server which can choose anyone of the following dynamically.

    • msdia80.dll
    • msdia90.dll
    • msdia100.dll

    I know the Visual studio its has program id which is very convenient, it seems DIA dlls don't. Are DIA dlls redistributable? Thanks for support!

    • Edited by YangmeiGe Thursday, February 23, 2012 1:51 PM
    Thursday, February 23, 2012 1:47 PM


  • I don't recall if these are redistributable. Generally speaking, I would guess not. But you'll have to double check the dia sdk bits to see what is/isn't licensed for redist.

    That said, each of these dll's COM objects have different guids, so you should certainly be able to programatically create whichever you require. If the CoCreateInstance fails with REGDB_E_CLASSNOTREG, that would indicate the one you're looking for isn't installed on the target system.

    P.S. You can use the OleView.exe utility to examine what each version implements with respect to objects and guids. Just use the View TypeLib... and open the .dll. You'll see all the cocreatable objects (coclass objects), and thier guids.


    Ed Dore

    Thursday, February 23, 2012 8:30 PM