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