How to create native image of TLB file using NGEN
Hi,
I have created interface inside C# project and this project has one dialog box. Inorder to use this interface from MFC I have created tlb file using REGASM.
I have imported this TLB file in MFC. But it takes lot of time to load dialog. Can I create Native image of this TLB file so that it will get loaded pretty fast.
Hi Nikam,
NGEN is a tool that improves the performance of managed applications. This converts your application's IL code to native code. If you convert IL code to native code, its loaded speed should run faster. Based on my understanding, you can not create a native image from the tlb file, but from the assembly. As far as I know, REGASM has registered the tlb into COM. Try to check out this MSDN document about "Native Image Generator (Ngen.exe)" for details - http://msdn2.microsoft.com/en-us/library/6t9t5wcf(vs.80).aspx
Sample codes to convert IL code to native code using NGEN as follows:
ngen install c:\myfiles\MyAssembly.dll
Hope this helps,
Regards,
Citizens on the earth