Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: Carlos Alloatti
  Where is Carlos Alloatti?
 
 Argentina
 Carlos Alloatti
 Tags
Subject: RE: FoxPro and TAPI 3 COM
Thread ID: 200095 Message ID: 200101 # Views: 39 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Active X Controls & OLE Automation
Date: Friday, October 24, 2008 11:08:15 PM         
   


> Anyone has any experience using TAPI 3 in Visual Foxpro? I am trying to get the callerid data from a modem when there is an incoming call.
>
> I already managed to do it "old school" with the mscomm control, but if I could do it using TAPI it would be great.
>
> I have not found that much info about FoxPro and TAPI 3. I tried opening the Microsoft TAPI 3.0 type library in the object browser, I drag and drop the ITTAPI interface to a prg, and get:
>
>
x=NEWOBJECT("myclass")
> 
> DEFINE CLASS myclass AS session OLEPUBLIC
> 
> 	IMPLEMENTS ITTAPI IN "TAPI3Lib.TAPI"
> ...
> 

>
> But when I run this I get "Type Library TAPI3Lib.TAPI not found"
>
> The problem is:
>
> I don't know anything about TAPI, COM, iDispatch, iUnknown, etc, etc, so I guess I have no hope of making this work right?
>
> Is there any info, docs, faq, howto I could read about this that is not like reading ancient egyptian jeroglifics?
>
> Deep down I suspect the whole COM business is an indescifrable mess, but maybe it´s just me.
>
> ---
> Carlos Alloatti

I also know nothing about TAPI but maybe you need this:

x=NEWOBJECT("myclass")

DEFINE CLASS myclass AS session OLEPUBLIC

    IMPLEMENTS ITCallInfo2 IN "c:\windows\system32\tapi3.dll"

    PROCEDURE ITCallInfo2_get_Address() AS VARIANT;
                 HELPSTRING "property Address"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_get_CallState() AS VARIANT;
                 HELPSTRING "property CallState"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_get_Privilege() AS VARIANT;
                 HELPSTRING "property Privilege"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_get_CallHub() AS VARIANT;
                 HELPSTRING "property CallHub"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_get_CallInfoLong(CallInfoLong AS VARIANT) AS Number;
                 HELPSTRING "property CallInfoLong"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_put_CallInfoLong(CallInfoLong AS VARIANT, eValue AS Number @);
                 HELPSTRING "property CallInfoLong"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_get_CallInfoString(CallInfoString AS VARIANT) AS STRING;
                 HELPSTRING "property CallInfoString"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_put_CallInfoString(CallInfoString AS VARIANT,eValue AS STRING @);
                 HELPSTRING "property CallInfoString"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_get_CallInfoBuffer(CallInfoBuffer AS VARIANT) AS VARIANT;
                 HELPSTRING "property CallInfoBuffer"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_put_CallInfoBuffer(CallInfoBuffer AS VARIANT, eValue AS VARIANT @);
                 HELPSTRING "property CallInfoBuffer"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_GetCallInfoBuffer(CallInfoBuffer AS VARIANT, pdwSize AS NUMBER, ppCallInfoBuffer AS NUMBER) AS VOID
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_SetCallInfoBuffer(CallInfoBuffer AS VARIANT, dwSize AS NUMBER, pCallInfoBuffer AS NUMBER) AS VOID
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_ReleaseUserUserInfo() AS VOID;
                 HELPSTRING "method ReleaseUserUserInfo"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_get_EventFilter(TapiEvent AS VARIANT, lSubEvent AS Number) AS LOGICAL;
                 HELPSTRING "method EventFilter"
    * add user code here
    ENDPROC

    PROCEDURE ITCallInfo2_put_EventFilter(TapiEvent AS VARIANT, lSubEvent AS Number,eValue AS LOGICAL @);
                 HELPSTRING "method EventFilter"
    * add user code here
    ENDPROC

ENDDEFINE


-----------------
Borislav Borissov

Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.



COMPLETE THREAD
FoxPro and TAPI 3 COM Posted by Carlos Alloatti @ 10/24/2008 10:39:44 PM
RE: FoxPro and TAPI 3 COM Posted by Borislav Borissov @ 10/24/2008 11:08:15 PM