Thursday, May 31, 2012

Integration of Avay IP Office CTI Link in WPF C# Project and Interoperability Issues


In last I was assigned a task of Avay IP Office CTI Link integration in my WPF C# Project by my client. As Avaya provide SDKs in C++ and VB 6.0 only.  So we can use only Wrapper DLL of SDK in our C# or managed code project. As I have already integrated this Click and Dial functionally in my VB 6 project using   VB 6.0 SDK of Avay IP Office CTI Link. So in order to avoid hurdles using C++ code I decided to use my VB6 SDK code as DLLL.
After compiling the DLL in Visual Studio 6.0 on my XP (32 bit machine) , when I tried to add its reference in WPF project in Visual Studio 2010 installed on Window 7 64 bit operating system I faced following different interoperability issues.
  1.        While adding assemble reference directly in studio I faced " rence to '.dll' could not be added. Please make sure that the file is accessible and that it is a valid assembly or COM component.”
  2. While loading assemble by [ImportDlL()] method I faced “Unable to find an entry point named ...in DLL”
  3.  And once I added reference of DLL in project after processing it by TIBLIB utility  I faced "Retrieving the COM class factory for component with CLSID {F87D03A3-E4DB-4CA1-91D3-4B8254A90C03} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REG DB_E_CLASSNOTREG)).”

So in order to avoid all these hurdles and interoperability issues, I finally got the way of doing all this.

  1. Install Visual Studio 6.O on your 64 bit operating system and don’t forget to run studio as Administrator.
  2. Open the Avaya IP Office SDK project
  3. Make its DLL
  4. Open your Visual Studio 2010 run as Administrator
  5. Open your WPF  project in which you want to integrate the DLL
  6. Add reference of Avaya VB DLL  in the project and compile  it
  7. Make the setup of the project
  8. Don’t forget to run setup as run as administrator


All will be fine and no interoperability hurdles. I have even tested the setup on 32 bit machine build on 64biy machine.

2 comments:

  1. Dear Hanif,
    good to know that you have managed to solve this issue, i am trying to develop a screen popup with details of the caller and some other details from DB based on the Caller id, i am finding it difficult to work on the sample codes, do you have any sample codes that you developed for my reference. You can send the same to arunknair82@gmail.com
    Thanks in advance

    ReplyDelete
  2. Hi Hanif,

    I'm developing a similar WPF app which can trigger phone calls using Avaya IP Office. I went through the sample uploaded on the Avaya site but unfortunately they are developed using C++. Can you please guide me in the right direction ? (I'm a newbie in TAPI). Any sample would be much appreciated.

    ReplyDelete