Why exception occured at LoadTypeLibEx System.ArgumentException: Value does not fall within the exp

Posted by Usman on Stack Overflow See other posts from Stack Overflow or by Usman
Published on 2010-06-07T17:00:33Z Indexed on 2010/06/07 17:02 UTC
Read the original article Hit count: 658

Hello,

I am loading type library in C++/CLI. In C# its loading successfully but it's giving again and again following exception in managed C++/CLI.

exception occured at LoadTypeLibEx System.ArgumentException: Value does not fall within the expected range

at LoadTypeLib(String strTypeLibName, ITypeLi b typeLib)

Here's a PInvoke Signature:

[DllImport("oleaut32.dll", CharSet = CharSet::Unicode, PreserveSig = false)] static void LoadTypeLib(String^ strTypeLibName,[MarshalAs(UnmanagedType::Interface)] [Out] System::Runtime::InteropServices::ComTypes::ITypeLib^ typeLib);

ITypeLib^ oTypeLib; and call LoadtypeLib(TLB,oTypeLib);

I am stuck here..kindly give me way around to get rid of this exception

Regards Usman

© Stack Overflow or respective owner

Related posts about interop

Related posts about c++-cli