Why (LoadTypeLibEx failed : : Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))? [modified]
-
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. Regards Usman -- Modified Monday, June 7, 2010 12:52 PM
-
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. Regards Usman -- Modified Monday, June 7, 2010 12:52 PM
Hi, Did you try to find out if if any dependencies are missing or are out-of-date? As you may know, your library may be in place while some of its dependencies not. Should you consider to try that, you could use depends.exe from sysinternals
SkyWalker