TLBIMP tip-o-the-day

TLBIMP (the utulity for importingtype libraries into managed assemblies) allows you to define the namespace for generated classes. 

Unlike me, try not to give TLBIMP an invalid namespace name, because it doesn't check.  e.g. you can specify Interop.MyApp.5.0.0 (as in v5.0.0).  This does generate an assembly, but you then can't use it because in code specifying, say, using Interop.MyApp.5 yields an error.

1 Comment

  • tip:

    IT is possible to use these to assemblies converted typelibs by simply including the Interop as a namespace, then you simply refer to the underlying namespace:

    C++.NET

    using namespace Interop;



    MyApp.5* app5;

    --------------------

    VB.NET

    Imports Interop;

    --------------------

    C#.NET

    using Interop;





    etc...

Comments have been disabled for this content.