有没有这样一个api,能调用windows的电话拨号程序(c:/windows/dialer.exe)而不是拨号网络(100分)

  • 主题发起人 主题发起人 ynfly
  • 开始时间 开始时间
1.用winexec
winexec('c:/windows/dialer.exe',SW_SHOWNORMAL);
2.用shellexecute,要在uses语句种加上shellapi
ShellExecute(Handle, nil, PChar('c:/windows/dialer.exe'), nil, nil, sw_shownormal);
3.用createprocess
参数太多,记不清了.
 
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 callbpno();
var
DestAddress : string;
CalledParty : string;
Comment : string;
begin
DestAddress := '01012345789';
CalledParty := '';
Comment := '';
tapiRequestMakeCall(pChar(DestAddress),
PChar(Application.Title),
pChar(CalledParty),
PChar(Comment));

end;
 
WinExec 运行指定的应用程序
可查看help中的例子
 
同意 boclif ,只不过有现成的TAPI.pas,不需要这么多的引用 如果需要,告所我你的第址
用tapiRequestMakeCall
 
5555555555555555555555555
 
使用Winexec:winexec('c:/windows/dialer.exe',SW_SHOWNORMAL);
注意第二个参数:表示程序的窗口显示类型
 
comfan2001,我可以给我一份TAPI.PAS吗?

我的email是echo.echo@263.net
 
多人接受答案了。
 
后退
顶部