Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dialing out
Message
From
23/11/2001 14:18:34
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/11/2001 11:45:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00578109
Message ID:
00585199
Views:
33
>Cetin -
>Once again thanks.
>
>Do I not have to get the address first. I looked it up :
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tapi/callover_8d6b.asp
>
>Unfortunately do not realy understand VB: The code from this page reads as follows:
>
>'pick up the collection of Address objects
>Dim gobjAddress As ITAddress
>Dim objCollAddresses As ITCollection
>Set objCollAddresses = gobjTapi.Addresses
>
>'find address that supports the desired type, nSelectedType
>bFound = False
>For indexAddr = 1 To objCollAddresses.Count
> Set objCrtAddress = objCollAddresses.Item(indexAddr)
> Set objMediaSupport = objCrtAddress
> Set objAddressCapabilities = objCrtAddress
>
> If objMediaSupport.QueryMediaType( nSelectedType )
> bFound = True
> End If
>
> Set objAddressCapabilities = Nothing
> Set objMediaSupport = Nothing
> Set objCrtAddress = Nothing
>
> If bFound = True Then Exit For
>Next indexAddr
>
>Set gobjAddress = objcollAddresses.Item(indexAddr)
>
>'If no errors occurred, gobjAddress is now a usable address.
>
>************
>What would be the equivalent to this in VFP ?
>
>
>How do I close the session created by tapiRequestMakeCall ?
>
>Thanks,
>
>Larry

Larry,
You can find the same under 'Telephony API' (under Platform SDK, Networking...).
I can help you convert that code but my TAPI is no good :
*LOCAL gobjTapi as "TAPI.TAPI.1" && VFP7
LOCAL gobjTapi
gobjTapi = createobject("TAPI.TAPI.1")
gobjTapi.Initialize()

* VFP7 object browser drag&drop
#DEFINE CLSID_String_VideoWindowTerm	"{F7438990-D6EB-11D0-82A6-00AA00B5CA1B}"	
#DEFINE CLSID_String_VideoInputTerminal	"{AAF578EC-DC70-11D0-8ED3-00C04FB6809F}"	
#DEFINE CLSID_String_HandsetTerminal	"{AAF578EB-DC70-11D0-8ED3-00C04FB6809F}"	
#DEFINE CLSID_String_HeadsetTerminal	"{AAF578ED-DC70-11D0-8ED3-00C04FB6809F}"	
#DEFINE CLSID_String_SpeakerphoneTerminal "{AAF578EE-DC70-11D0-8ED3-00C04FB6809F}"	
#DEFINE CLSID_String_MicrophoneTerminal	"{AAF578EF-DC70-11D0-8ED3-00C04FB6809F}"	
#DEFINE CLSID_String_SpeakersTerminal	"{AAF578F0-DC70-11D0-8ED3-00C04FB6809F}"	
#DEFINE CLSID_String_MediaStreamTerminal "{E2F7AEF7-4971-11D1-A671-006097C9A2E8}"	
#DEFINE TAPIPROTOCOL_String_PSTN "{831CE2D6-83B5-11D1-BB5C-00C04FB6809F}"
#DEFINE TAPIPROTOCOL_String_H323 "{831CE2D7-83B5-11D1-BB5C-00C04FB6809F}"
#DEFINE TAPIPROTOCOL_String_Multicast "{831CE2D8-83B5-11D1-BB5C-00C04FB6809F}"
#DEFINE LINEADDRESSTYPE_PHONENUMBER	1	
#DEFINE LINEADDRESSTYPE_SDP	2	
#DEFINE LINEADDRESSTYPE_EMAILNAME	4	
#DEFINE LINEADDRESSTYPE_DOMAINNAME	8	
#DEFINE LINEADDRESSTYPE_IPADDRESS	16	
#DEFINE LINEDIGITMODE_PULSE	1	
#DEFINE LINEDIGITMODE_DTMF	2	
#DEFINE LINEDIGITMODE_DTMFEND	4	
#DEFINE TAPIMEDIATYPE_AUDIO	8	
#DEFINE TAPIMEDIATYPE_VIDEO	32768	
#DEFINE TAPIMEDIATYPE_DATAMODEM	16	
#DEFINE TAPIMEDIATYPE_G3FAX	32	
* VFP7 object browser drag&drop

nSelectedType = TAPIMEDIATYPE_DATAMODEM
*pick up the collection of Address objects
LOCAL gobjAddress
local objCollAddresses
objCollAddresses = gobjTapi.Addresses

*find address that supports the desired type, nSelectedType 
bFound = .f.
For indexAddr = 1 To objCollAddresses.Count
    objCrtAddress = objCollAddresses.Item(indexAddr)
    objMediaSupport = objCrtAddress
    objAddressCapabilities = objCrtAddress

    If objMediaSupport.QueryMediaType( nSelectedType ) 
        bFound = .t.
    EndIf
    
    objAddressCapabilities = .Null.
    objMediaSupport = .Null.
    objCrtAddress = .Null.
    
    If bFound
     EXIT
    endif
endfor

gobjAddress = objcollAddresses.Item(indexAddr)
? bFound
If I were you would quickly upgrade to VFP7 where you can do most of these and more with drag&drop from object browser (as you might have guessed I did for some parts:).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform