{===========================================================================}
{                                                                           }
{                           Dialer+ Open API                                }
{                                                                           }
{                   http://www.piafi.wm.ru/dialerp/                         }
{                   Dialer+ 32bit DLL function Unit                         }
{                                                                           }
{                Copyright (c) 1997-99, Piafi SoftIntl                      }
{                                                                           }
{===========================================================================}
{$H-,I-,A-}
unit DP_INT;

interface

uses
  DP_Uses;

const
  UseConnectName: string = '';

function  dp_GetConnectionCount: integer; stdcall;
function  dp_GetConnectionList( var List: TStringLines): integer; stdcall;
function  dp_LoadConnectionData( Name: string; 
                                 var Data: TConnectionUserData): boolean; stdcall;
function  dp_SaveAsDefaultConnectionData( var Data: TConnectionUserData): boolean; stdcall;
function  dp_GetLoadMsgList( var Str: TStringLines): integer; stdcall;
function  dp_GetLoadMsgCount: integer; stdcall;
function  dp_GetWindowsConnections( var Str: TStringLines): integer; stdcall;
procedure dp_LoadConnectionDefault( var Data: TConnectionUserData;
                                    Name: shortstring); stdcall;
procedure dp_DeleteConnection( vName: string); stdcall;
function  dp_AppendConnection( var Data: TConnectionUserData): boolean; stdcall;
procedure dp_ChangeConnection( vName: string;
                               var Data: TConnectionUserData); stdcall;
procedure dp_GetConnectionStatus( var Data: TConnectionStatus); stdcall;
procedure dp_AssignOutLog( Proc: ROutLogProc); stdcall;
procedure dp_GetProcOutLog( var Proc: ROutLogProc); stdcall;
procedure dp_StartDialer( Name, Mode: shortstring; Sleep: boolean); stdcall;
procedure dp_SendCommand( CMD: word); stdcall;
function  dp_GetCommand: word; stdcall;
function  dp_WaitCommand( CMD: word): word; stdcall;
function  dp_GetEndDial: boolean; stdcall;
procedure dp_GetConnectionInfo( var Data: TConnectionInfo); stdcall;
function  dp_Time2Str( I: cardinal): shortstring; stdcall;
procedure dp_CurrentConnectionData( var Data: TConnectionUserData); stdcall;
procedure dp_SetPath( S: shortstring); stdcall;
procedure dp_ResumeDial; stdcall;
procedure dp_SuspendDial; stdcall;
procedure dp_HangUp; stdcall;
procedure dp_TerminateDial; stdcall;
procedure dp_Wizard( Handle: integer); stdcall;
function  dp_Version: string; stdcall;

implementation

const
  DLL = 'dialerp.dll';

function  dp_GetConnectionCount;          external DLL index 2;
function  dp_GetConnectionList;           external DLL index 3;
function  dp_LoadConnectionData;          external DLL index 4;
function  dp_SaveAsDefaultConnectionData; external DLL index 5;
function  dp_GetLoadMsgList;              external DLL index 6;
function  dp_GetLoadMsgCount;             external DLL index 7;
function  dp_GetWindowsConnections;       external DLL index 8;
procedure dp_LoadConnectionDefault;       external DLL index 9;
procedure dp_DeleteConnection;            external DLL index 10;
function  dp_AppendConnection;            external DLL index 11;
function  dp_ChangeConnection;            external DLL index 12;
function  dp_GetConnectionStatus;         external DLL index 14;
procedure dp_AssignOutLog;                external DLL index 15;
procedure dp_StartDialer;                 external DLL index 16;
procedure dp_GetProcOutLog;               external DLL index 17;
procedure dp_SendCommand;                 external DLL index 18;
function  dp_GetCommand: word;            external DLL index 19;
function  dp_WaitCommand;                 external DLL index 20;
function  dp_GetEndDial;                  external DLL index 21;
procedure dp_GetConnectionInfo;           external DLL index 22;
function  dp_Time2Str;                    external DLL index 23;
procedure dp_CurrentConnectionData;       external DLL index 24;
procedure dp_SetPath;                     external DLL index 25;
procedure dp_ResumeDial;                  external DLL index 26;
procedure dp_SuspendDial;                 external DLL index 27;
procedure dp_HangUp;                      external DLL index 28;
procedure dp_TerminateDial;               external DLL index 29;
procedure dp_Wizard;                      external DLL index 30;
function  dp_Version;                     external DLL index 31;

end.
