Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | daniel-mar | 1 | |
2 | ViaThinkSoft CallLib (MakeCall.dll) API |
||
3 | ======================================= |
||
4 | |||
5 | The CallLib API is a minimal API for making calls over the TAPI line. |
||
6 | It contains only two functions which are described below: |
||
7 | |||
8 | GetTapiDevices |
||
9 | ============== |
||
10 | |||
11 | Delphi: function GetTapiDevices(buf: PAnsiChar): integer; stdcall; |
||
12 | C++: int __stdcall GetTapiDevices(AnsiChar* buf); |
||
13 | |||
14 | GetTapiDevices lists all available TAPI devices. |
||
15 | |||
16 | If buf is NULL, the result of the function is the number of bytes required to fill the buffer. |
||
17 | |||
18 | If buf is not NULL, the names of the TAPI devices, separated by CR LF, with appended NUL |
||
19 | character is written into buf, and the number of bytes written is returned. |
||
20 | |||
21 | If the result is -1, an error occured. |
||
22 | |||
23 | MakeCall |
||
24 | ======== |
||
25 | |||
26 | Delphi: function MakeCall(phoneNumber: PAnsiChar; deviceId: integer): integer; stdcall; |
||
27 | C++: int __stdcall MakeCall(AnsiChar* phoneNumber, int deviceId); |
||
28 | |||
29 | MakeCall requests the telephone to make a call. |
||
30 | |||
31 | phoneNumber is the number to be called. It should only contain numbers. |
||
32 | |||
33 | deviceId is the index of the TAPI device, as listed in GetTapiDevices. |
||
34 | |||
35 | If the result is 0, everything is OK. If the result is below 0, an error occured. |
||
36 | -1 usually means that the TAPI device cannot be found. |
||
37 | -2 usually means that the headset / telephone receiver is active and therefore the line is busy. |