#import mso.dll RRS feed

  • Question

  • Hello!

    I write plugin for Microsoft Office 2010 on C++ using VS2005. I have libraries and executables to import ingterfaces and objects. Importing is undocumented and weird. To work with Microsoft Word I have the following:

    #import "import2010\\msword.olb" raw_interfaces_only

    msword.olb has the following cross-references: vb6ext and mso.dll. Vb6ext is no problem but mso.dll is the problem. Microsoft Office 2010 uses mso.dll version 2.5. I have Microsoft Office 2007 installed and mso.dll version is 2.4. msword.olb searches for mso.dll version 2.5 in registry and does not find it. It is the true: version 2.5 is not installed as type library. Is it required to have type library installed? I can import this library manually:

    #import "import2010\\mso.dll" raw_interfaces_only named_guids

    But it does not work. mso.dll is searched in registry anthough it is already loaded manually. This is the question: is it possible import type libraries from the files and only files? I can gather all required libraries but it is unacceptable to install/register these libraries because these libraries are for the target system and not for the development system.

    • Edited by rus-k Thursday, October 3, 2013 6:27 AM
    Tuesday, October 1, 2013 9:04 PM

All replies

  • Try to use LoadLibrary function

    HINSTANCE hGetProcIDDLL = LoadLibrary("C:\\Documents and Settings\\User\\Desktop\\test.dll");
      if (hGetProcIDDLL == NULL) {
        std::cout << "could not load the dynamic library" << std::endl;
        return EXIT_FAILURE;
    And I think it's a VC++ issue, you might get help from Visual C++ forum.

    Thursday, October 3, 2013 6:55 AM
  • I import libraries to get the definitions of interfaces, objects, enumerations, types, etc. Program cannot be compiled without these definitions. LoadLibrary will not help here.

    Thursday, October 3, 2013 7:30 AM