April 2002
Intermediate to advanced
1024 pages
23h 26m
English
The same functionality that is provided with the tlbimp utility is exposed in the TypeLibConverter class. To use this class, load a type library description. Listing 8.5 shows the most straightforward method to load a type library. The full source to this sample is available in the TypeLibraryConversion directory.
private enum RegKind { RegKind_Default = 0, RegKind_Register = 1, RegKind_None = 2 } [ DllImport( "oleaut32.dll", CharSet = CharSet.Unicode, PreserveSig = false )] private static extern void LoadTypeLibEx(String strTypeLibName, RegKind regKind, [MarshalAs(UnmanagedType.Interface)] out Object typeLib); [STAThread] static void Main(string[] args) { Object ... |
Read now
Unlock full access