none
cannot load msvcr dll depenpency in xll application with Visual C++ RRS feed

  • Question

  • I created an xll excel add-in with Visual C++ 2013 and Excel 2007/2010/2013 XLL SDK package. In the application I have to load a third party dll which depends on MSVCR90.dll for release version and MSVCR90D.dll for debug version. But I don't know how to load the MSVCR90D.dll in the project. What I tried is to create an additional manifest file or use a pragma comment instead in the code like

    #pragma comment(linker, "/manifestdependency:\"name='Microsoft.VC90.DebugCRT' processorArchitecture='x86' version='9.0.30729.1' type='win32' publicKeyToken='1fc8b3b9a1e18e3b' \"")


    It works in win32 console application but not in xll application.

    Also I wonder why in the xll application all the release version of msvcr dll including MSVCR90.dll, MSVCR100.dll and MSVCR120.dll are automatically loaded if they are installed in windows system. Since I am working in vc++ 2013, msvcr120d.dll is loaded as well. 

    Can anyone tell me how msvcr90d.dll can be loaded as well? 

    visual c++ 2008/2010/2013 redistributable packages are installed.

    Friday, September 22, 2017 2:23 PM

All replies

  • Hello,

    Thanks for posting here. This forum is for VSTO add-ins. We are not familiar with XLL add-ins and C++. I am trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.

    Could you please share a sample XLL application via OneDrive so that we could reproduce the issue?

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, September 26, 2017 6:58 AM
    Moderator
  • Generally there is no need to explicitly load the VC runtime libraries as they will be auto-loaded if there is any dependency from your application. In case you really want to explicitly load the DLL from your application, you can try to call LoadLibrary/LoadLibraryEx APIs to do that. Some examples can be found here. By the way, the MSVCR90D.dll is for debug build application, so you don't need it on your release version application. The release version application should load MSVCR90.dll. Hope this helps.

    Best Regards,

    Jimmy Zhu


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Monday, October 9, 2017 6:06 AM