Why (LoadTypeLibEx failed : : Error loading type library/DLL. (Exception from HRESULT
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
Re: Why (LoadTypeLibEx failed : : Error loading type library/DLL. (Exception from HRE
Why do you need PInvoke in C++/CLI? Call LoadTypeLibEx directly, as in good old C++. C++/CLI allows to write unmanaged code in any place.
Re: Why (LoadTypeLibEx failed : : Error loading type library/DLL. (Exception from HRE
I have done almost whole code of interop services using this managed syntax and declared every where objects of TypeLib and TypeInfo with managed type i.e ^.
LoadTypeLib is native and requires all native syntax. So ITypeLib^ won't work on this. Can you please tell me what's wrong with PInvoke calling code of LoadTypeLib.
I am getting issues of converting pin_ptr to managed and managed to pin_ptr and usage as whole of managed types in the code.