Showing posts with label COM Components. Show all posts
Showing posts with label COM Components. Show all posts

Wednesday, 16 November 2011

How can we use COM Components in .NET?

.NET components communicate with COM using RCW (Runtime Callable Wrapper). Following are the ways with which you can generate RCW :-

  • Adding reference in Visual Studio.net. See figure below. Wrapper class is generated and placed in the “BIN” directory.


Adding Reference using VS.NET




  • Using Type library import tool. Tlbimp.exe yourname.dll.

  • Using interopservices.System.runtime.Interopservices