⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dialerplus.~pas

📁 一个拔号程序, developed in delphi
💻 ~PAS
字号:
{ TDialer component for Borland DELPHI, Version 1.00.
     Freeware.
  Original code by Artchil Gogava, ArGo Software Design, Toronto, Canada.
October 1995.
     Internet: 75231.330@compuserve.com
     www     : http://www.icacomp.com/customers/agogava
  Changes for Borland DELPHI 2.0 made by:
     Ruud Overdijk, Kwarts produkties, Hilversum, The Netherlands, April 1996.
     Internet : roverdyk@worldaccess.nl
     Compuserve :  71613,1733

  Changes for bi-language support (both english and dutch)
     Ruud Bijvank, Visual Solutions, Dordrecht, The Netherlands, June 1996.
     Compuserve : 100425,3165

  Changes for French, Italian, Spanish languages support June 30 1999
     by Bernard Lepr阾re
     email : bernard.lepretre@wanadoo.fr}

unit dialerPlus;

interface

uses
  Windows, SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics,
  Controls, Forms, Dialogs;
type
  TMode =(mDirect,mTapi);
  TComPort = (dpCOM1,dpCOM2,dpCOM3,dpCOM4);
  TLanguage = (dlEnglish, dlDutch, dlGerman, dlFrench, dlItalian, dlSpanish);
  TDialer = class(TComponent)
  private
    { Private declarations }
    FComPort : TComPort;
    FNumberToDial : string;
    FConfirm : boolean;
    FMethod : String;
    FLanguage : TLanguage;
    FMode : TMode;

  protected
    { Protected declarations }
  public
    { Public declarations }

    Function Execute :String;
  published
    property ComPort : TComPort read FComPort
                 write FComPort;
    property Confirm : boolean read FConfirm
                 write FConfirm;
    property NumberToDial : string read FNumberToDial
                 write FNumberToDial;
    property Language : TLanguage Read FLanguage
                 write FLanguage;
    property DialCommand : string read FMethod
                 write FMethod;
    property Mode : Tmode read FMode
                 write FMode;

    { Published declarations }
  end;

procedure Register;
function tapiRequestMakeCall(pDestAddress,pAppName,pCalledParty,pComment: PChar): LongInt; stdcall;

implementation
function tapiRequestMakeCall(pDestAddress,pAppName,pCalledParty,pComment: PChar): LongInt; stdcall; external 'TAPI32.DLL';
const
TAPIERR_CONNECTED=0;
TAPIERR_NOREQUESTRECIPIENT=-2;
TAPIERR_REQUESTQUEUEFULL=-3;
TAPIERR_INVALDESTADDRESS=-4;
TAPIMAXDESTADDRESSSIZE=80;



procedure Register;
begin
  RegisterComponents('Samples', [TDialer]);
end;

function TDialer.Execute :String;
var
  ErrorCode:LongInt;
  szNR          : Array[0..TAPIMAXDESTADDRESSSIZE] of Char;
  sText         : String;
  s		: string;
  hCommFile 	: THandle;
  Status 	: LongBool;
  NumberWritten	: DWORD;
  SMessage      : string;
  DialCommand :PChar;
  HangUpCommand: PChar;

  begin
if Fmode=mDirect then begin
  if FConfirm then
  begin
  Case FLanguage of
  dlEnglish:     SMessage := 'About to dial the number '+FNumberToDial+'. Are you sure?';
  dlDutch:       SMessage := 'Weet u zeker dat u nummer '+FNumberToDial+' wilt kiezen ?';
  dlGerman:      SMessage := 'Wollen Sie die Nummer '+FNumberToDial+' w鋒len ?';
  dlFrench:      SMessage := 'Composer le num閞o ' +FNumberToDial+' ?';
  dlItalian:	 SMessage := 'Comporre il numero ' +FNumberToDial+' ?';
  dlSpanish:     SMessage := '

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -