Monday, November 26, 2007

Creating an Interop Assembly for RTC Client API 1.3

If you want to use the RTC Client API 1.3 in managed code (like C# or VB.Net), you need to create an Interop assembly from the rtccore.idl file that is found in the C:\Program Files\RTC Client API v1.3 SDK\SDK\IDL directory (if you used the default installation path).

There are some steps detailing how to create the assembly here: Creating a Interop Assembly for RTC Client API 1.3. However, I found that they were a little out of date and I had to do some reading around before I understood them.

To create the assembly:

1. Download and install the Microsoft ® Windows Server® 2003 R2 Platform SDK. This SDK works for "the x86, x64 and Itanium-based versions of Windows Server 2003, Windows Server 2003 R2, Windows XP SP2, Windows XP x64 Pro Edition, and Windows 2000".

2. Go to the Visual Studio 2005 Command Prompt from Start Menu -> All Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools

3. In the Command Prompt window, change directory to where the rtccore.idl file is (C:\Program Files\RTC Client API v1.3 SDK by default).

4. In the Command Prompt type: midl /I "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include" rtccore.idl. This will create 5 new files in the directory. One of which is rtccore.tlb.

5. In the Command Prompt type: tlbimp rtccore.tlb /out:Interop.RTCCore.dll /namespace:RTCCore /sysarray. This will create an Interop.RTCCore.dll file in the directory, which you can then reference in your .Net applications.

2 comments:

rob said...

Kept getting COM error:

Retrieving the COM class factory for component with CLSID {7A42EA29-A2B7-40C4-B091-F6F024AA89BE} failed due to the following error: 80040154.

Using Vista Enterprise/VS2008

AN said...

I have the same problem and i followed the steps but didn't fix the problem.

any other solution.