Click below for Step by Step and Interview Q & A (dotnetinter) wrote,
Click below for Step by Step and Interview Q & A
dotnetinter

.NET Interview questions: - Will you explain RCW (Runtime Callable Wrapper)?

.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 (Adding reference using VS.NET 2005). Wrapper class is generated and placed in the “BIN” directory.

vs

Figure: - Adding Reference using VS.NET 2005


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


  1. Using interopservices.System.runtime.Interopservices namespace contains class TypeLib Converter that provides methods to convert COM classes and interface in to assembly metadata.

  2. 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.

Watch the below video, visual studio and .NET tips and tricks 17:- Removing unused namespaces.


See for more stuffs on important Dotnet interview questions

Regards,

Click to view more from author's on Dotnet interview questions and answers

Tags: .net and c# interview questions, .net and c# training, .net interview questions and answers, csharp interview questions, information technology questions, programming interview questions, rcw
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments