1. Euphoria Telephony

Remeber my post about TAPI? It works!

Here's a small example to dial a phone number using your modem.

-- ***CODE START*** --

-- Phone dialer example
-- Daniel Berstein 6/4/98
-- danielberstein at usa.net

-- This program calls Windows Dialer for performing the operation.
-- In order to use the program you must install DIALER.EXE, which
-- is part of Windows 95.

include dll.e
include machine.e
include get.e

atom tapi, phone, app
atom MakeCall
atom flag
sequence number

-- Open telephony DLL
tapi = open_dll("tapi32.dll")

-- We're going to use 'Assisted Telephony', heres the only
-- function we need:
MakeCall = define_c_func(tapi,"tapiRequestMakeCall",
     {C_POINTER,C_POINTER,C_POINTER,C_POINTER},C_UINT)

-- Number to dial?
puts(1,"Phone number to dial? ")
number = gets(0)

-- Allocate phone number
phone = allocate_string(number)

-- Go for it!
flag = c_func(MakeCall,{phone,NULL,NULL,NULL})

-- ***CODE END*** --

TAPI provides much more complex telephony operation than just use an
external dialer program. I hope to have soon a 100% Euphoria dialer.

Rob: The ability to load DLL's is the best! Everyday I find something new I
*can* do with *ease* in Euphoria. Euphoria has now (under WinTel at least)
unlimited power.


Regards,
    Daniel Berstein.

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu