locked
Why (LoadTypeLibEx failed : : Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))? RRS feed

  • Question

  • Hello,

    I am Loading type library from C++/CLI with following lines of code.

    [DllImportAttribute("oleaut32.dll", SetLastError = true, CharSet = CharSet::Unicode, PreserveSig=false)]

    static void LoadTypeLibEx( String^ strTypeLibName, RegKind regkind,[MarshalAs(UnmanagedType::Interface)] interior_ptr typeLib );

    Object^ oTypeLib;

    LoadTypeLibEx( strSubject,RegKind::RegKind_None, &oTypeLib);

    It again and again giving me same exception, all I have registered type library with regsrv32, placed in current directory and given full qualified path but still its giving me same exception. Any way around?

    Regards Usman


    Mutlithreading
    Monday, June 7, 2010 4:32 PM

All replies

  • Try debug your code, check the output window for dll loading information.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, June 8, 2010 7:04 AM
  • It again and again giving me same exception,

    And the exception is...?


    -- Mihai Nita [Microsoft MVP, Visual C++]
    http://www.mihai-nita.net
    ------------------------------------------
    Replace year with _ to get the real email

    Tuesday, June 8, 2010 7:06 AM
  • LoadTypeLibEx failed : : Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, June 9, 2010 9:39 AM