Results 1 to 7 of 7

Thread: Com automation (Tapi3.dll)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Posts
    6

    Default Com automation (Tapi3.dll)

    Im trying to interface with tapi3.dll from the windows system32 directory by importing it as a com automation class, I need it to make and receive calls on an Avaya phone system.

    I can make calls successfully using the below procedure TapiCall, but when I try to register an event to receive calls, using the below procedure TapiRegisterEvent, the event is never called.
    I based the code on a C# example that works just fine, but in Dataflex the event is never called.

    I have very little experience working with com automation so I might be missing something, so if anyone can see if there is something missing in the code (besides the cleanup stuff like destroy object and release com object), or even better have worked with tapi3.dll, then please help, Im all out of ideas myself.

    Code:
        Object oTAPI is a cComTAPI
            Set peAutoCreate to acAutoCreate
            
            Procedure OnComEvent OLETAPI_EVENT llTapiEvent Variant llpEvent
                Forward Send OnComEvent llTapiEvent llpEvent 
            End_Procedure
                      
        End_Object    
        
        
        Procedure TapiRegisterEvent
            Integer iReg iEvents
            Variant vAddress vAddressCollection
            Handle hAddress hCollection
     
            Get Create U_cComITAddress to hAddress
            Get Create U_cComITCollection to hCollection
            
            // Event Filter
            Move (OLETE_CALLNOTIFICATION ior OLETE_DIGITEVENT ior OLETE_PHONEEVENT ior OLETE_CALLSTATE ior OLETE_GENERATEEVENT ior OLETE_GATHERDIGITS ior OLETE_REQUEST) to iEvents
            
            // Initialize TAPI.
            Send ComInitialize of oTAPI
           
            // Set Event Filter.
            Set ComEventFilter of oTAPI to iEvents
            
            // Active Lines and a line is chosen
            Get ComAddresses of oTAPI to vAddressCollection
            Set pvComObject of hCollection to vAddressCollection
            Get ComItem of hCollection 6 to vAddress
                    
            // Reg: Notifications.
            Get ComRegisterCallNotifications of oTAPI vAddress True True 8 2 to iReg        
        End_Procedure
        
        
        Procedure TapiCall
            Variant vAddress vAddresses vCallControl
            Handle hAddress hCollection hCallControl 
     
            Get Create U_cComITCollection to hCollection
            Get Create U_cComITAddress to hAddress
            Get Create U_cComITBasicCallControl to hCallControl
     
            // Initialize TAPI.
            Send ComInitialize of oTAPI
                   
            // Active Lines.
            Get ComAddresses of oTAPI to vAddresses
            Set pvComObject of hCollection to vAddresses
            Get ComItem of hCollection 6 to vAddress
     
            Set pvComObject of hAddress to vAddress
            Get ComCreateCall of hAddress "473" 0 8 to vCallControl
            
            // Set pvComobject and make a call.
            Set pvComObject of hCallControl to vCallControl
            Send ComConnect of hCallControl True
        End_Procedure

  2. #2
    Join Date
    Apr 2009
    Location
    Wilmington NC, USA or Oaxaca Mexico
    Posts
    924

    Default Re: Com automation (Tapi3.dll)

    Did you ever get any farther with this? May I contact you? I don't see an email address in your profile.
    Last edited by danwalsh46; 18-Oct-2011 at 07:38 AM.

  3. #3
    Join Date
    Mar 2009
    Posts
    6

    Default Re: Com automation (Tapi3.dll)

    We never got events to work from dataflex, so we ended up doing it in .net and then made a com wrapper to use in dataflex and that worked just fine.

  4. #4
    Join Date
    Apr 2009
    Location
    Wilmington NC, USA or Oaxaca Mexico
    Posts
    924

    Default Re: Com automation (Tapi3.dll)

    We are looking at the same phone system. Are you interested in sharing or selling your work? May I contact you about this? You can send me an email through this Forum.

  5. #5
    Join Date
    Apr 2009
    Location
    Wilmington NC, USA or Oaxaca Mexico
    Posts
    924

    Default Re: Com automation (Tapi3.dll)

    I attempted to import the Tapi3.dll today using VDF16.1 and, even though the dll exists on the computer, I'm unable to find the dll in the list of dll's/ocx's available for import. How did you do this? Anyone?

    I'm running VDF16.1 on an XP box.

  6. #6
    Join Date
    Feb 2009
    Location
    Adelaide, South Australia
    Posts
    2,899

    Default Re: Com automation (Tapi3.dll)

    Hi Dan

    In the Import COM Automation dialog, is a browse button. Use that one to navigate to your tlb/olb/DLL.

    Cheers from OZ
    Marco
    Marco Kuipers
    DataFlex Consultant
    28 IT Pty Ltd - DataFlex Specialist Consultancy
    DataFlex Channel Partner for Australia and Pacific region
    Adelaide, South Australia
    www.28it.com.au

  7. #7
    Join Date
    Apr 2009
    Location
    Wilmington NC, USA or Oaxaca Mexico
    Posts
    924

    Default Re: Com automation (Tapi3.dll)

    Cheers Marco, that did it.

Similar Threads

  1. Deploying CRW XI Runtime -> unable to load dll. crpe32.dll
    By charnold in forum Crystal Reports
    Replies: 10
    Last Post: 18-May-2009, 02:25 AM
  2. Error Unable to load DLL, FCP.DLL
    By Jim Albright in forum Code Library
    Replies: 1
    Last Post: 27-Apr-2009, 09:42 AM
  3. Problem with craxddrt.dll and crdb_p2bdfapi.dll???
    By Joacim Eriksson in forum Crystal Reports
    Replies: 3
    Last Post: 8-Dec-2005, 08:35 AM
  4. Problem with craxddrt.dll and crdb_p2bdfapi.dll???
    By Joacim Eriksson in forum Crystal Reports
    Replies: 0
    Last Post: 7-Dec-2005, 04:22 PM
  5. Alternate DLL (crpe32.dll) Loading
    By Brendon in forum Crystal Reports
    Replies: 3
    Last Post: 3-Aug-2005, 08:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •