How to download typelib to parse it in C #?

In unmanaged code, I can use LoadTypeLib() to get the ITypeLib* pointer and use it to search typelib to find which interfaces it contains.

C # has the System.Runtime.InteropServices.ComTypes.ITypeLib interface, but I cannot find the equivalent of the LoadTypeLib() function.

How to download typelib and get the ITypeLib link in C #?

+6
source share
1 answer

Copied directly from System.Design.NativeMethods, Reflector useful:

 [DllImport("oleaut32.dll", PreserveSig=false)] public static extern ITypeLib LoadTypeLib([In, MarshalAs(UnmanagedType.LPWStr)] string typelib); 
+7
source

All Articles