punjabtechnicaluniversity.blogspot.in
2.Using Type library import tool. Tlbimp.exe yourname.dll.
3.Using interopservices.System.runtime.Interopservices namespace contains class TypeLib Converter which provides methods to convert COM classes and interface in to assembly metadata.
.NET components communicate with COM using RCW (Runtime Callable Wrapper).Following are the ways with which you can generate RCW :-
1.Adding reference in Visual Studio.net.See figure below (Adding reference using VS.NET 2005).Wrapper class is generated and placed in the “BIN” directory.
Adding reference using VS.NET 2005
2.Using Type library import tool. Tlbimp.exe yourname.dll.
3.Using interopservices.System.runtime.Interopservices namespace contains class TypeLib Converter which provides methods to convert COM classes and interface in to assembly metadata.
4. Make your custom wrappers.If your COM component does not have type library then the only way to communicate is writing custom wrappers. That means communicating directly with COM components.
0 comments:
Post a Comment
North India Campus