private ConvertTypeLibToAssembly ( [ typeLib, string asmFileName, TypeLibImporterFlags flags, ITypeLibImporterNotifySink notifySink, byte publicKey, |
||
typeLib | [ | |
asmFileName | string | |
flags | TypeLibImporterFlags | |
notifySink | ITypeLibImporterNotifySink | |
publicKey | byte | |
keyPair | ||
asmNamespace | string | |
asmVersion | System.Version | |
return |
public AssemblyBuilder ConvertTypeLibToAssembly ([MarshalAs(UnmanagedType.Interface)] object typeLib, string asmFileName, TypeLibImporterFlags flags, ITypeLibImporterNotifySink notifySink, byte[] publicKey, StrongNameKeyPair keyPair, string asmNamespace, Version asmVersion)
{
throw new NotImplementedException ();
}
TypeLibConverter::ConvertTypeLibToAssembly ( [ typeLib, string asmFileName, int flags, ITypeLibImporterNotifySink notifySink, byte publicKey, |
static int Main(string[] args) { if (args.Length < 2) { Console.WriteLine("Usage: tlb-convert <unmanaged COM DLL path> <managed wrapper path> [root namespace]"); return 2; } try { string srcDll = args[0]; string outDll = args[1]; string rootNamespace = args.Length == 3 ? args[2] : null; Object typeLib; LoadTypeLibEx(srcDll, RegKind.RegKind_None, out typeLib); TypeLibConverter tlbConv = new TypeLibConverter(); AssemblyBuilder asm = tlbConv.ConvertTypeLibToAssembly(typeLib, outDll, 0, new ConversionEventHandler(), null, null, rootNamespace, null); asm.Save(outDll); } catch (Exception e) { Console.WriteLine("Exception: {0}\n{1}", e.Message, e.StackTrace); return 1; } Console.WriteLine("\nConversion successful."); return 0; }