Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

URGENT - Using TAPI with Delphi

60 views
Skip to first unread message

Chantal Tremblay

unread,
Dec 6, 1999, 3:00:00 AM12/6/99
to
I found an example to use TAPI with Delphi but I don't know how to
define the function tapiRequestMakeCall? I always have compilation's
error. Do I have to add something in the uses? or a repertory or
anything else????

Here is the example I found in Delphi Developper support's site:

//tapi Errors
const TAPIERR_CONNECTED = 0;
const TAPIERR_DROPPED = -1;
const TAPIERR_NOREQUESTRECIPIENT = -2;
const TAPIERR_REQUESTQUEUEFULL = -3;
const TAPIERR_INVALDESTADDRESS = -4;
const TAPIERR_INVALWINDOWHANDLE = -5;
const TAPIERR_INVALDEVICECLASS = -6;
const TAPIERR_INVALDEVICEID = -7;
const TAPIERR_DEVICECLASSUNAVAIL = -8;
const TAPIERR_DEVICEIDUNAVAIL = -9;
const TAPIERR_DEVICEINUSE = -10;
const TAPIERR_DESTBUSY = -11;
const TAPIERR_DESTNOANSWER = -12;
const TAPIERR_DESTUNAVAIL = -13;
const TAPIERR_UNKNOWNWINHANDLE = -14;
const TAPIERR_UNKNOWNREQUESTID = -15;
const TAPIERR_REQUESTFAILED = -16;
const TAPIERR_REQUESTCANCELLED = -17;
const TAPIERR_INVALPOINTER = -18;

//tapi size constants
const TAPIMAXDESTADDRESSSIZE = 80;
const TAPIMAXAPPNAMESIZE = 40;
const TAPIMAXCALLEDPARTYSIZE = 40;
const TAPIMAXCOMMENTSIZE = 80;
const TAPIMAXDEVICECLASSSIZE = 40;
const TAPIMAXDEVICEIDSIZE = 40;

function tapiRequestMakeCallA(DestAddress : PAnsiChar;
AppName : PAnsiChar;
CalledParty : PAnsiChar;
Comment : PAnsiChar) : LongInt;
stdcall; external 'TAPI32.DLL';

function tapiRequestMakeCallW(DestAddress : PWideChar;
AppName : PWideChar;
CalledParty : PWideChar;
Comment : PWideChar) : LongInt;
stdcall; external 'TAPI32.DLL';

function tapiRequestMakeCall(DestAddress : PChar;
AppName : PChar;
CalledParty : PChar;
Comment : PChar) : LongInt;
stdcall; external 'TAPI32.DLL';

procedure TfrmSelectAppels.A;
var
DestAddress : string;
CalledParty : string;
Comment : string;

begin
DestAddress := '1-555-555-1212';
CalledParty := 'Frank Borland';
Comment := 'Calling Frank';
tapiRequestMakeCall(pChar(DestAddress),
PChar(Application.Title),
pChar(CalledParty),
PChar(Comment));

end;
--
Chantal Tremblay

Patrick

unread,
Dec 6, 1999, 3:00:00 AM12/6/99
to
What kind of compilation errors do you get?

Chantal Tremblay

unread,
Dec 7, 1999, 3:00:00 AM12/7/99
to
I don't have compilation's error anymore but when I execute the code,
with the click on the button, I have the result: -2 which means: No
request recipient. What can I do???????
I can't find any help about this error message of TAPI.

Please help, I need the solution very fast!
Thanks
--
Chantal

Daniel

unread,
Dec 23, 1999, 3:00:00 AM12/23/99
to
Heys, are you using any additional components to program in TAPI in Delphi?

Chantal Tremblay <chantal....@raaq.gouv.qc.ca> wrote in message
news:384D7959...@raaq.gouv.qc.ca...

0 new messages