TSPI.pas
上传用户:smiteryang
上传日期:2015-03-11
资源大小:87k
文件大小:60k
源码类别:

TAPI编程

开发平台:

Delphi

  1. {******************************************************************}
  2. {                                                                  }
  3. {       Borland Delphi Runtime Library                             }
  4. {       Telephony SPI interface unit                               }
  5. {                                                                  }
  6. { Portions created by Microsoft are                                }
  7. { Copyright (C) 1995-1999 Microsoft Corporation.                   }
  8. { All Rights Reserved.                                             }
  9. {                                                                  }
  10. { The original file is: tspi.h, released  March 1999.              }
  11. { The original Pascal code is: TSPI.pas, released 28 Dec 1999.     }
  12. { The initial developer of the Pascal code is Marcel van Brakel    }
  13. { (brakelm@bart.nl).                                               }
  14. {     }
  15. { Portions created by Marcel van Brakel are    }
  16. { Copyright (C) 1999-2000 Marcel van Brakel.       }
  17. {                                                                  }
  18. { Contributor(s): Alan C. Moore (ACMDOC@aol.com)                   }
  19. {                 Rudy Velthuis (rvelthuis@gmx.de)                 }
  20. {                                                                  }
  21. { Obtained through:                                                }
  22. { Joint Endeavour of Delphi Innovators (Project JEDI)              }
  23. {                                                                  }
  24. { You may retrieve the latest version of this file at the Project  }
  25. { JEDI home page, located at http://delphi-jedi.org                }
  26. {                                                                  }
  27. { The contents of this file are used with permission, subject to   }
  28. { the Mozilla Public License Version 1.1 (the "License"); you may  }
  29. { not use this file except in compliance with the License. You may }
  30. { obtain a copy of the License at                                  }
  31. { http://www.mozilla.org/NPL/NPL-1_1Final.html                     }
  32. {                                                                  }
  33. { Software distributed under the License is distributed on an      }
  34. { "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or   }
  35. { implied. See the License for the specific language governing     }
  36. { rights and limitations under the License.                        }
  37. {                                                                  }
  38. {******************************************************************}
  39. unit TSPI;
  40. {$WEAKPACKAGEUNIT}
  41. interface
  42. {$HPPEMIT '#include <windows.h>'}
  43. {$HPPEMIT '#include "tapi.h"'}
  44. {$HPPEMIT '#if WIN32'}
  45. {$HPPEMIT '#if TAPI_CURRENT_VERSION < 0x00020000'}
  46. {$HPPEMIT '#error Building a 32bit 1.3 or 1.4 service provider isn't supported'}
  47. {$HPPEMIT '#endif'}
  48. {$HPPEMIT '#endif'}
  49. uses
  50.   Windows, Tapi;
  51. // The  Telephony  API  is jointly copyrighted by Intel and Microsoft.  You are
  52. // granted  a royalty free worldwide, unlimited license to make copies, and use
  53. // the API/SPI for making applications/drivers  that  interface  with  the
  54. // specification provided that this paragraph and the Intel/Microsoft copyright
  55. // statement is maintained as is in the text and source code files.
  56. // Copyright (c) 1992-1998  Microsoft Corporation
  57. // Portions copyright 1992, 1993 Intel/Microsoft, all rights reserved.
  58. {$INCLUDE TAPI.INC}
  59. {$IFDEF WIN32}
  60. {$IFNDEF TAPI20}
  61. #error Building a 32bit 1.3 or 1.4 service provider is not supported.
  62. {$ENDIF}
  63. {$ENDIF}
  64. // tspi.h  is  only  of  use  in  conjunction  with tapi.h.  Very few types are
  65. // defined  in  tspi.h.   Most  types of procedure formal parameters are simply
  66. // passed through from corresponding procedures in tapi.h.  A working knowledge
  67. // of the TAPI interface is required for an understanding of this interface.
  68. type
  69.   PHDRVCALL = ^HDRVCALL;
  70.   HDRVCALL__ = packed record
  71.     unused: Longint;
  72.   end;
  73.   {$EXTERNALSYM HDRVCALL__}
  74.   HDRVCALL = HDRVCALL__;
  75.   {$EXTERNALSYM HDRVCALL}
  76.   PHDRVLLINE= ^HDRVLINE;
  77.   HDRVLINE__ = packed record
  78.     unused: Longint;
  79.   end;
  80.   {$EXTERNALSYM HDRVLINE__}
  81.   HDRVLINE = HDRVLINE__;
  82.   {$EXTERNALSYM HDRVLINE}
  83.   PHDRVPHONE = ^HDRVPHONE;
  84.   HDRVPHONE__ = packed record
  85.     unused: Longint;
  86.   end;
  87.   {$EXTERNALSYM HDRVPHONE__}
  88.   HDRVPHONE = HDRVPHONE__;
  89.   {$EXTERNALSYM HDRVPHONE}
  90.   PHDRVDIALOGINSTANCE = ^HDRVDIALOGINSTANCE;
  91.   HDRVDIALOGINSTANCE__ = packed record
  92.     unused: Longint;
  93.   end;
  94.   {$EXTERNALSYM HDRVDIALOGINSTANCE__}
  95.   HDRVDIALOGINSTANCE = HDRVDIALOGINSTANCE__;
  96.   {$EXTERNALSYM HDRVDIALOGINSTANCE}
  97.   PHDRVMSPLINE = ^HDRVMSPLINE;
  98.   HDRVMSPLINE__ = packed record
  99.     unused: Longint;
  100.   end;
  101.   {$EXTERNALSYM HDRVMSPLINE__}
  102.   HDRVMSPLINE = HDRVMSPLINE__;
  103.   {$EXTERNALSYM HDRVMSPLINE}
  104.   PHTAPICALL = ^HTAPICALL;
  105.   HTAPICALL__ = packed record
  106.     unused: Longint;
  107.   end;
  108.   {$EXTERNALSYM HTAPICALL__}
  109.   HTAPICALL = HTAPICALL__;
  110.   {$EXTERNALSYM HTAPICALL}
  111.   PHTAPILINE = ^HTAPILINE;
  112.   HTAPILINE__ = packed record
  113.     unused: Longint;
  114.   end;
  115.   {$EXTERNALSYM HTAPILINE__}
  116.   HTAPILINE = HTAPILINE__;
  117.   {$EXTERNALSYM HTAPILINE}
  118.   PHTAPIPHONE = ^HTAPIPHONE;
  119.   HTAPIPHONE__ = packed record
  120.     unused: Longint;
  121.   end;
  122.   {$EXTERNALSYM HTAPIPHONE__}
  123.   HTAPIPHONE = HTAPIPHONE__;
  124.   {$EXTERNALSYM HTAPIPHONE}
  125.   PHTAPIDIALOGINSTANCE = ^HTAPIDIALOGINSTANCE;
  126.   HTAPIDIALOGINSTANCE__ = packed record
  127.     unused: Longint;
  128.   end;
  129.   {$EXTERNALSYM HTAPIDIALOGINSTANCE__}
  130.   HTAPIDIALOGINSTANCE = HTAPIDIALOGINSTANCE__;
  131.   {$EXTERNALSYM HTAPIDIALOGINSTANCE}
  132.   PHTAPIMSPLINE = ^HTAPIMSPLINE;
  133.   HTAPIMSPLINE__ = packed record
  134.     unused: Longint;
  135.   end;
  136.   {$EXTERNALSYM HTAPIMSPLINE__}
  137.   HTAPIMSPLINE = HTAPIMSPLINE__;
  138.   {$EXTERNALSYM HTAPIMSPLINE}
  139.   PHPROVIDER = ^HPROVIDER;
  140.   HPROVIDER__ = packed record
  141.     unused: Longint;
  142.   end;
  143.   {$EXTERNALSYM HPROVIDER__}
  144.   HPROVIDER = HPROVIDER__;
  145.   {$EXTERNALSYM HPROVIDER}
  146.   TDrvRequestID = DWORD;
  147.   DRV_REQUESTID = DWORD;
  148.   {$EXTERNALSYM DRV_REQUESTID}
  149.   ASYNC_COMPLETION = procedure(dwRequestID: TDrvRequestID;
  150.     lResult: Longint); stdcall;
  151.   {$EXTERNALSYM ASYNC_COMPLETION}
  152.   TASyncCompletion = ASYNC_COMPLETION;
  153.   LINEEVENT = procedure(htLine: HTAPILINE; htCall: HTAPICALL; dwMsg, dwParam1,
  154.     dwParam2, dwParam3: DWORD_PTR) stdcall;
  155.   {$EXTERNALSYM LINEEVENT}
  156.   TLineEvent = LINEEVENT;
  157.   PHONEEVENT = procedure(htPhone: HTAPIPHONE; dwMsg: DWORD; dwParam1, dwParam2,
  158.     dwParam3: DWORD_PTR) stdcall;
  159.   {$EXTERNALSYM PHONEEVENT}
  160.   TPhoneEvent = PHONEEVENT;
  161.   TUISPIDLLCALLBACK = function(dwObjectID, dwObjectType: DWORD;
  162.     lpParams: Pointer; dwSize: DWORD): Longint stdcall;
  163.   {$EXTERNALSYM TUISPIDLLCALLBACK}
  164.   TTUISpiDllCallback = TUISPIDLLCALLBACK;
  165. {$IFDEF TAPI20}
  166.   PTUISpiCreateDialogInstanceParams = ^TTUISpiCreateDialogInstanceParams;
  167.   tuispicreatedialoginstanceparams_tag = packed record
  168.     dwRequestID: TDrvRequestID;
  169.     hdDlgInst: HDRVDIALOGINSTANCE;
  170.     htDlgInst: HTAPIDIALOGINSTANCE;
  171.     lpszUIDLLName: LPCWSTR;
  172.     lpParams: Pointer;
  173.     dwSize: DWORD;
  174.   end;
  175.   {$EXTERNALSYM tuispicreatedialoginstanceparams_tag}
  176.   TTUISpiCreateDialogInstanceParams = tuispicreatedialoginstanceparams_tag;
  177.   TUISPICREATEDIALOGINSTANCEPARAMS = tuispicreatedialoginstanceparams_tag;
  178.   {$EXTERNALSYM TUISPICREATEDIALOGINSTANCEPARAMS}
  179. {$ENDIF}
  180. {$IFDEF TAPI30}
  181. const
  182.   LINEQOSSTRUCT_KEY = DWORD(1280398155); // DWORD('LQSK')
  183.   {$EXTERNALSYM LINEQOSSTRUCT_KEY}
  184. type
  185.   PLineQosServiceLevel = ^TLineQosServiceLevel;
  186.   LINEQOSSERVICELEVEL_tag = packed record
  187.     dwMediaMode: DWORD;
  188.     dwQOSServiceLevel: DWORD;
  189.   end;
  190.   {$EXTERNALSYM LINEQOSSERVICELEVEL_tag}
  191.   TLineQosServiceLevel = LINEQOSSERVICELEVEL_tag;
  192.   PLineCallQosInfo = ^TLineCallQosInfo;
  193.   LINECALLQOSINFO_tag = packed record
  194.     dwKey: DWORD;
  195.     dwTotalSize: DWORD;
  196.     dwQOSRequestType: DWORD;
  197.     case Longint of
  198.     0: (SetQosServiceLevel: packed record
  199.           dwNumServiceLevelEntries: DWORD;
  200.           LineQOSServiceLevel: array[0..0] of TLineQosServiceLevel;
  201.         end;);
  202.   end;
  203.   {$EXTERNALSYM LINECALLQOSINFO_tag}
  204.   TLineCallQosInfo = LINECALLQOSINFO_tag;
  205. // {831CE2D6-83B5-11d1-BB5C-00C04FB6809F}
  206. // EXTERN_C const CLSID TAPIPROTOCOL_PSTN;
  207. // {831CE2D7-83B5-11d1-BB5C-00C04FB6809F}
  208. // EXTERN_C const CLSID TAPIPROTOCOL_H323;
  209. // {831CE2D8-83B5-11d1-BB5C-00C04FB6809F}
  210. // EXTERN_C const CLSID TAPIPROTOCOL_Multicast;
  211. {$ENDIF}
  212. const
  213.   TSPI_MESSAGE_BASE = 500; // Lowest-numbered TSPI-specific message ID number
  214.   {$EXTERNALSYM TSPI_MESSAGE_BASE}
  215.   LINE_NEWCALL                = TSPI_MESSAGE_BASE + 0;
  216.   {$EXTERNALSYM LINE_NEWCALL}
  217.   LINE_CALLDEVSPECIFIC        = TSPI_MESSAGE_BASE + 1;
  218.   {$EXTERNALSYM LINE_CALLDEVSPECIFIC}
  219.   LINE_CALLDEVSPECIFICFEATURE = TSPI_MESSAGE_BASE + 2;
  220.   {$EXTERNALSYM LINE_CALLDEVSPECIFICFEATURE}
  221. {$IFDEF TAPI20}
  222.   LINE_CREATEDIALOGINSTANCE   = TSPI_MESSAGE_BASE + 3;          // TSPI v2.0
  223.   {$EXTERNALSYM LINE_CREATEDIALOGINSTANCE}
  224.   LINE_SENDDIALOGINSTANCEDATA = TSPI_MESSAGE_BASE + 4;          // TSPI v2.0
  225.   {$EXTERNALSYM LINE_SENDDIALOGINSTANCEDATA}
  226. {$ENDIF}
  227. {$IFDEF TAPI30}
  228.   LINE_SENDMSPDATA            = TSPI_MESSAGE_BASE + 5;          // TSPI v3.0
  229.   {$EXTERNALSYM LINE_SENDMSPDATA}
  230.   LINE_QOSINFO                = TSPI_MESSAGE_BASE + 6;          // TSPI v3.0
  231.   {$EXTERNALSYM LINE_QOSINFO}
  232. {$ENDIF}
  233. {$IFDEF TAPI20}
  234.   LINETSPIOPTION_NONREENTRANT = $00000001;                      // TSPI v2.0
  235.   {$EXTERNALSYM LINETSPIOPTION_NONREENTRANT}
  236. {$ENDIF}
  237. {$IFDEF TAPI20}
  238.   TUISPIDLL_OBJECT_LINEID         = 1;                          // TSPI v2.0
  239.   {$EXTERNALSYM TUISPIDLL_OBJECT_LINEID}
  240.   TUISPIDLL_OBJECT_PHONEID        = 2;                          // TSPI v2.0
  241.   {$EXTERNALSYM TUISPIDLL_OBJECT_PHONEID}
  242.   TUISPIDLL_OBJECT_PROVIDERID     = 3;                          // TSPI v2.0
  243.   {$EXTERNALSYM TUISPIDLL_OBJECT_PROVIDERID}
  244.   TUISPIDLL_OBJECT_DIALOGINSTANCE = 4;                          // TSPI v2.0
  245.   {$EXTERNALSYM TUISPIDLL_OBJECT_DIALOGINSTANCE}
  246. {$ENDIF}
  247. {$IFDEF TAPI30}
  248.   PRIVATEOBJECT_NONE              = $00000001;                  // TSPI v3.0
  249.   {$EXTERNALSYM PRIVATEOBJECT_NONE}
  250.   PRIVATEOBJECT_CALLID            = $00000002;                  // TSPI v3.0
  251.   {$EXTERNALSYM PRIVATEOBJECT_CALLID}
  252.   PRIVATEOBJECT_LINE              = $00000003;                  // TSPI v3.0
  253.   {$EXTERNALSYM PRIVATEOBJECT_LINE}
  254.   PRIVATEOBJECT_CALL              = $00000004;                  // TSPI v3.0
  255.   {$EXTERNALSYM PRIVATEOBJECT_CALL}
  256.   PRIVATEOBJECT_PHONE             = $00000005;                  // TSPI v3.0
  257.   {$EXTERNALSYM PRIVATEOBJECT_PHONE}
  258.   PRIVATEOBJECT_ADDRESS           = $00000006;                  // TSPI v3.0
  259.   {$EXTERNALSYM PRIVATEOBJECT_ADDRESS}
  260.   LINEQOSREQUESTTYPE_SERVICELEVEL = $00000001;                  // TSPI v3.0
  261.   {$EXTERNALSYM LINEQOSREQUESTTYPE_SERVICELEVEL}
  262.   LINEQOSSERVICELEVEL_NEEDED      = $00000001;                  // TSPI v3.0
  263.   {$EXTERNALSYM LINEQOSSERVICELEVEL_NEEDED}
  264.   LINEQOSSERVICELEVEL_IFAVAILABLE = $00000002;                  // TSPI v3.0
  265.   {$EXTERNALSYM LINEQOSSERVICELEVEL_IFAVAILABLE}
  266.   LINEQOSSERVICELEVEL_BESTEFFORT  = $00000003;                  // TSPI v3.0
  267.   {$EXTERNALSYM LINEQOSSERVICELEVEL_BESTEFFORT}
  268.   LINEEQOSINFO_NOQOS              = $00000001;                  // TSPI v3.0
  269.   {$EXTERNALSYM LINEEQOSINFO_NOQOS}
  270.   LINEEQOSINFO_ADMISSIONFAILURE   = $00000002;                  // TSPI v3.0
  271.   {$EXTERNALSYM LINEEQOSINFO_ADMISSIONFAILURE}
  272.   LINEEQOSINFO_POLICYFAILURE      = $00000003;                  // TSPI v3.0
  273.   {$EXTERNALSYM LINEEQOSINFO_POLICYFAILURE}
  274.   LINEEQOSINFO_GENERICERROR       = $00000004;                  // TSPI v3.0
  275.   {$EXTERNALSYM LINEEQOSINFO_GENERICERROR}
  276. {$ENDIF}
  277. //
  278. // The following function prototypes pertain
  279. // to a service provider's core module
  280. //
  281. function TSPI_lineAccept(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  282.   lpsUserUserInfo: LPCSTR; dwSize: DWORD): Longint; stdcall;
  283. {$EXTERNALSYM TSPI_lineAccept}
  284. function TSPI_lineAddToConference(dwRequestID: TDrvRequestID;
  285.     hdConfCall, hdConsultCall: HDRVCALL): Longint; stdcall;
  286. {$EXTERNALSYM TSPI_lineAddToConference}
  287. function TSPI_lineAnswer(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  288.     lpsUserUserInfo: LPCSTR; dwSize: DWORD): Longint; stdcall;
  289. {$EXTERNALSYM TSPI_lineAnswer}
  290. {$IFDEF TAPI20}
  291. function TSPI_lineBlindTransfer(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  292.   lpszDestAddress: LPCWSTR; dwCountryCode: DWORD): Longint; stdcall;
  293. {$EXTERNALSYM TSPI_lineBlindTransfer}
  294. {$ELSE}
  295. function TSPI_lineBlindTransfer(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  296.   lpszDestAddress: LPCSTR; dwCountryCode: DWORD): Longint; stdcall;
  297. {$EXTERNALSYM TSPI_lineBlindTransfer}
  298. {$ENDIF}
  299. function TSPI_lineClose(hdLine: HDRVLINE): Longint; stdcall;
  300. {$EXTERNALSYM TSPI_lineClose}
  301. function TSPI_lineCloseCall(hdCall: HDRVCALL): Longint; stdcall;
  302. {$EXTERNALSYM TSPI_lineCloseCall}
  303. function TSPI_lineCompleteCall(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  304.   var dwCompletionID: DWORD;
  305.   dwCompletionMode, dwMessageID: DWORD): Longint; stdcall;
  306. {$EXTERNALSYM TSPI_lineCompleteCall}
  307. function TSPI_lineCompleteTransfer(dwRequestID: TDrvRequestID; hdCall,
  308.   hdConsultCall: HDRVCALL; htConfCall: HTAPICALL; lphdConfCall: PHDRVCALL;
  309.   dwTransferMode: DWORD): Longint; stdcall;
  310. {$EXTERNALSYM TSPI_lineCompleteTransfer}
  311. function TSPI_lineConditionalMediaDetection(hdLine: HDRVLINE; dwMediaModes: DWORD;
  312.   lcpCallParams: PLineCallParams): Longint; stdcall;
  313. {$EXTERNALSYM TSPI_lineConditionalMediaDetection}
  314. function TSPI_lineDevSpecific(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  315.   dwAddressID: DWORD; hdCall: HDRVCALL; lpParams: Pointer;
  316.   dwSize: DWORD): Longint; stdcall;
  317. {$EXTERNALSYM TSPI_lineDevSpecific}
  318. function TSPI_lineDevSpecificFeature(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  319.   dwFeature: DWORD; lpParams: Pointer; dwSize: DWORD): Longint; stdcall;
  320. {$EXTERNALSYM TSPI_lineDevSpecificFeature}
  321. {$IFDEF TAPI20}
  322. function TSPI_lineDial(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  323.   lpszDestAddress: LPCWSTR; dwCountryCode: DWORD): Longint; stdcall;
  324. {$EXTERNALSYM TSPI_lineDial}
  325. {$ELSE}
  326. function TSPI_lineDial(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  327.   lpszDestAddress: LPCSTR; dwCountryCode: DWORD): Longint; stdcall;
  328. {$ENDIF}
  329. function TSPI_lineDrop(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  330.   lpsUserUserInfo: LPCSTR; dwSize: DWORD): Longint; stdcall;
  331. {$EXTERNALSYM TSPI_lineDrop}
  332. function TSPI_lineDropOnClose(hdCall: HDRVCALL): Longint; stdcall; // TSPI v1.4
  333. {$EXTERNALSYM TSPI_lineDropOnClose}
  334. function TSPI_lineDropNoOwner(hdCall: HDRVCALL): LongInt; stdcall; //TSPI v1.4
  335. {$EXTERNALSYM TSPI_lineDropNoOwner}
  336. function TSPI_lineForward(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  337.   bAllAddresses, dwAddressID: DWORD; lflForwardList: PLineForwardList;
  338.   dwNumRingsNoAnswer: DWORD; htConsultCall: HTAPICALL; var hdConsultCall: HDRVCALL;
  339.   lcpCallParams: PLineCallParams): Longint; stdcall;
  340. {$EXTERNALSYM TSPI_lineForward}
  341. {$IFDEF TAPI20}
  342. function TSPI_lineGatherDigits(hdCall: HDRVCALL; dwEndToEndID, dwDigitModes: DWORD;
  343.   lpsDigits: LPWSTR; dwNumDigits: DWORD; lpszTerminationDigits: LPCWSTR;
  344.   dwFirstDigitTimeout, dwInterDigitTimeout: DWORD): Longint; stdcall;
  345. {$EXTERNALSYM TSPI_lineGatherDigits}
  346. {$ELSE}
  347. function TSPI_lineGatherDigits(hdCall: HDRVCALL; dwEndToEndID, dwDigitModes: DWORD;
  348.   lpsDigits: LPSTR; dwNumDigits: DWORD; lpszTerminationDigits: LPCSTR;
  349.   dwFirstDigitTimeout, dwInterDigitTimeout: DWORD): Longint; stdcall;
  350. {$EXTERNALSYM TSPI_lineGatherDigits}
  351. {$ENDIF}
  352. {$IFDEF TAPI20}
  353. function TSPI_lineGenerateDigits(hdCall: HDRVCALL; dwEndToEndID, dwDigitMode: DWORD;
  354.   lpszDigits: LPCWSTR; dwDuration: DWORD): Longint; stdcall;
  355. {$EXTERNALSYM TSPI_lineGenerateDigits}
  356. {$ELSE}
  357. function TSPI_lineGenerateDigits(hdCall: HDRVCALL; dwEndToEndID, dwDigitMode: DWORD;
  358.   lpszDigits: LPCSTR; dwDuration: DWORD): Longint; stdcall;
  359. {$EXTERNALSYM TSPI_lineGenerateDigits}
  360. {$ENDIF}
  361. function TSPI_lineGenerateTone(hdCall: HDRVCALL; dwEndToEndID, dwToneMode,
  362.   dwDuration, dwNumTones: DWORD; lgtTones: PLineGenerateTone): Longint; stdcall;
  363. {$EXTERNALSYM TSPI_lineGenerateTone}
  364. function TSPI_lineGetAddressCaps(dwDeviceID, dwAddressID, dwTSPIVersion,
  365.   dwExtVersion: DWORD; lpAddressCaps: PLineAddressCaps): Longint; stdcall;
  366. {$EXTERNALSYM TSPI_lineGetAddressCaps}
  367. {$IFDEF TAPI20}
  368. function TSPI_lineGetAddressID(hdLine: HDRVLINE; var dwAddressID: DWORD;
  369.   dwAddressMode: DWORD; lpsAddress: LPCWSTR; dwSize: DWORD): Longint; stdcall;
  370. {$EXTERNALSYM TSPI_lineGetAddressID}
  371. {$ELSE}
  372. function TSPI_lineGetAddressID(hdLine: HDRVLINE; var dwAddressID: DWORD;
  373.   dwAddressMode: DWORD; lpsAddress: LPCSTR; dwSize: DWORD): Longint; stdcall;
  374. {$EXTERNALSYM TSPI_lineGetAddressID}
  375. {$ENDIF}
  376. function TSPI_lineGetAddressStatus(hdLine: HDRVLINE; dwAddressID: DWORD;
  377.   lasAddressStatus: PLineAddressStatus): Longint; stdcall;
  378. {$EXTERNALSYM TSPI_lineGetAddressStatus}
  379. function TSPI_lineGetCallAddressID(hdCall: HDRVCALL;
  380.   var dwAddressID: DWORD): Longint; stdcall;
  381. {$EXTERNALSYM TSPI_lineGetCallAddressID}
  382. {$IFDEF TAPI30}
  383. function TSPI_lineGetCallHubTracking(hdLine: HDRVLINE;
  384.   pTrackingInfo: PLineCallHubTrackingInfo): Longint; stdcall; // TSPI v3.0
  385. {$EXTERNALSYM TSPI_lineGetCallHubTracking}
  386. {$ENDIF}
  387. {$IFDEF TAPI30}
  388. function TSPI_lineGetCallIDs(hdCall: HDRVCALL; lpdwAddressID, lpdwCallID,
  389.   lpdwRelatedCallID: LPDWORD): Longint; stdcall; // TSPI v3.0
  390. {$EXTERNALSYM TSPI_lineGetCallIDs}
  391. {$ENDIF}
  392. function TSPI_lineGetCallInfo(hdCall: HDRVCALL;
  393.   lciCallInfo: PLineCallInfo): Longint; stdcall;
  394. {$EXTERNALSYM TSPI_lineGetCallInfo}
  395. function TSPI_lineGetCallStatus(hdCall: HDRVCALL;
  396.   lcsCallStatus: PLineCallStatus): Longint; stdcall;
  397. {$EXTERNALSYM TSPI_lineGetCallStatus}
  398. function TSPI_lineGetDevCaps(dwDeviceID, dwTSPIVersion, dwExtVersion: DWORD;
  399.   lpLineDevCaps: PLineDevCaps): Longint; stdcall;
  400. {$EXTERNALSYM TSPI_lineGetDevCaps}
  401. {$IFDEF TAPI20}
  402. function TSPI_lineGetDevConfig(dwDeviceID: DWORD; lpDeviceConfig: PVarString;
  403.   lpszDeviceClass: LPCWSTR): Longint; stdcall;
  404. {$EXTERNALSYM TSPI_lineGetDevConfig}
  405. {$ELSE}
  406. function TSPI_lineGetDevConfig(dwDeviceID: DWORD; lpDeviceConfig: PVarString;
  407.   lpszDeviceClass: LPCSTR): Longint; stdcall;
  408. {$EXTERNALSYM TSPI_lineGetDevConfig}
  409. {$ENDIF}
  410. function TSPI_lineGetExtensionID(dwDeviceID, dwTSPIVersion: DWORD;
  411.   var lpExtensionID: TLineExtensionID): Longint; stdcall;
  412. {$EXTERNALSYM TSPI_lineGetExtensionID}
  413. {$IFDEF TAPI20}
  414. function TSPI_lineGetIcon(dwDeviceID: DWORD; lpszDeviceClass: LPCWSTR;
  415.   var hIcon: HIcon): Longint; stdcall;
  416. {$EXTERNALSYM TSPI_lineGetIcon}
  417. {$ELSE}
  418. function TSPI_lineGetIcon(dwDeviceID: DWORD; lpszDeviceClass: LPCSTR;
  419.   var hIcon: HIcon): Longint; stdcall;
  420. {$EXTERNALSYM TSPI_lineGetIcon}
  421. {$ENDIF}
  422. {$IFDEF TAPI20}
  423. function TSPI_lineGetID(hdLine: HDRVLINE; dwAddressID: DWORD; hdCall: HDRVCALL;
  424.   dwSelect: DWORD; lpDeviceID: PVarString; lpszDeviceClass: LPCWSTR;
  425.   hTargetProcess: THandle): Longint; stdcall;
  426. {$EXTERNALSYM TSPI_lineGetID}
  427. {$ELSE}
  428. function TSPI_lineGetID(hdLine: HDRVLINE; dwAddressID: DWORD; hdCall: HDRVCALL;
  429.   dwSelect: DWORD; lpDeviceID: PVarString; lpszDeviceClass: LPCSTR;
  430.   hTargetProcess: THandle): Longint; stdcall;
  431. {$EXTERNALSYM TSPI_lineGetID}
  432. {$ENDIF}
  433. function TSPI_lineGetLineDevStatus(hdLine: HDRVLINE;
  434.   ldsLineDevStatus: PLineDevStatus): Longint; stdcall;
  435. {$EXTERNALSYM TSPI_lineGetLineDevStatus}
  436. function TSPI_lineGetNumAddressIDs(hdLine: HDRVLINE;
  437.   var dwNumAddressIDs: DWORD): Longint; stdcall;
  438. {$EXTERNALSYM TSPI_lineGetNumAddressIDs}
  439. function TSPI_lineHold(dwRequestID: TDrvRequestID;
  440.   hdCall: HDRVCALL): Longint; stdcall;
  441. {$EXTERNALSYM TSPI_lineHold}
  442. {$IFDEF TAPI20}
  443. function TSPI_lineMakeCall(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  444.   htCall: HTAPICALL; lphdCall: PHDRVCALL; lpszDestAddress: LPCWSTR;
  445.   dwCountryCode: DWORD; lpcCallParams: PLineCallParams): Longint; stdcall;
  446. {$EXTERNALSYM TSPI_lineMakeCall}
  447. {$ELSE}
  448. function TSPI_lineMakeCall(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  449.   htCall: HTAPICALL; lphdCall: PHDRVCALL; lpszDestAddress: LPCSTR;
  450.   dwCountryCode: DWORD; lpcCallParams: PLineCallParams): Longint; stdcall;
  451. {$EXTERNALSYM TSPI_lineMakeCall}
  452. {$ENDIF}
  453. function TSPI_lineMonitorDigits(hdCall: HDRVCALL;
  454.   dwDigitModes: DWORD): Longint; stdcall;
  455. {$EXTERNALSYM TSPI_lineMonitorDigits}
  456. function TSPI_lineMonitorMedia(hdCall: HDRVCALL;
  457.   dwMediaModes: DWORD): Longint; stdcall;
  458. {$EXTERNALSYM TSPI_lineMonitorMedia}
  459. function TSPI_lineMonitorTones(hdCall: HDRVCALL; dwToneListID: DWORD;
  460.   lmtToneList: PLineMonitorTone; dwNumEntries: DWORD): Longint; stdcall;
  461. {$EXTERNALSYM TSPI_lineMonitorTones}
  462. function TSPI_lineNegotiateExtVersion(dwDeviceID, dwTSPIVersion, dwLowVersion,
  463.   dwHighVersion: DWORD; var dwExtVersion: DWORD): Longint; stdcall;
  464. {$EXTERNALSYM TSPI_lineNegotiateExtVersion}
  465. function TSPI_lineNegotiateTSPIVersion(dwDeviceID, dwLowVersion,
  466.   dwHighVersion: DWORD; var dwTSPIVersion: DWORD): Longint; stdcall;
  467. {$EXTERNALSYM TSPI_lineNegotiateTSPIVersion}
  468. function TSPI_lineOpen(dwDeviceID: DWORD; htLine: HTAPILINE; var hdLine: HDRVLINE;
  469.   dwTSPIVersion: DWORD; lpfnEventProc: TLineEvent): Longint; stdcall;
  470. {$EXTERNALSYM TSPI_lineOpen}
  471. {$IFDEF TAPI20}
  472. function TSPI_linePark(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  473.   dwParkMode: DWORD; lpszDirAddress: LPCWSTR;
  474.   lpNonDirAddress: PVarString): Longint; stdcall;
  475. {$EXTERNALSYM TSPI_linePark}
  476. {$ELSE}
  477. function TSPI_linePark(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  478.   dwParkMode: DWORD; lpszDirAddress: LPCSTR;
  479.   lpNonDirAddress: PVarString): Longint; stdcall;
  480. {$EXTERNALSYM TSPI_linePark}
  481. {$ENDIF}
  482. {$IFDEF TAPI20}
  483. function TSPI_linePickup(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  484.   dwAddressID: DWORD; htCall: HTAPICALL; var hdCall: HDRVCALL;
  485.   lpszDestAddress, lpszGroupID: LPCWSTR): Longint; stdcall;
  486. {$EXTERNALSYM TSPI_linePickup}
  487. {$ELSE}
  488. function TSPI_linePickup(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  489.   dwAddressID: DWORD; htCall: HTAPICALL; var hdCall: HDRVCALL;
  490.   lpszDestAddress, lpszGroupID: LPCSTR): Longint; stdcall;
  491. {$EXTERNALSYM TSPI_linePickup}
  492. {$ENDIF}
  493. function TSPI_linePrepareAddToConference(dwRequestID: TDrvRequestID;
  494.   hdConfCall: HDRVCALL; htConsultCall: HTAPICALL; lphdConsultCall: PHDRVCALL;
  495.   lpcCallParams: PLineCallParams): Longint; stdcall;
  496. {$EXTERNALSYM TSPI_linePrepareAddToConference}
  497. {$IFDEF TAPI20}
  498. function TSPI_lineRedirect(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  499.   lpszDestAddress: LPCWSTR; dwCountryCode: DWORD): Longint; stdcall;
  500. {$EXTERNALSYM TSPI_lineRedirect}
  501. {$ELSE}
  502. function TSPI_lineRedirect(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  503.   lpszDestAddress: LPCSTR; dwCountryCode: DWORD): Longint; stdcall;
  504. {$EXTERNALSYM TSPI_lineRedirect}
  505. {$ENDIF}
  506. function TSPI_lineReleaseUserUserInfo(dwRequestID: TDrvRequestID;
  507.   hdCall: HDRVCALL): Longint; stdcall; //TSPI v1.4
  508. {$EXTERNALSYM TSPI_lineReleaseUserUserInfo}
  509. function TSPI_lineRemoveFromConference(dwRequestID: TDrvRequestID;
  510.   hdCall: HDRVCALL): Longint; stdcall;
  511. {$EXTERNALSYM TSPI_lineRemoveFromConference}
  512. function TSPI_lineSecureCall(dwRequestID: TDrvRequestID;
  513.   hdCall: HDRVCALL): Longint; stdcall;
  514. {$EXTERNALSYM TSPI_lineSecureCall}
  515. function TSPI_lineSelectExtVersion(hdLine: HDRVLINE;
  516.   dwExtVersion: DWORD): Longint; stdcall;
  517. {$EXTERNALSYM TSPI_lineSelectExtVersion}
  518. function TSPI_lineSendUserUserInfo(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  519.   lpsUserUserInfo: LPCSTR; dwSize: DWORD): Longint; stdcall;
  520. {$EXTERNALSYM TSPI_lineSendUserUserInfo}
  521. function TSPI_lineSetAppSpecific(hdCall: HDRVCALL;
  522.   dwAppSpecific: DWORD): Longint; stdcall;
  523. {$EXTERNALSYM TSPI_lineSetAppSpecific}
  524. {$IFDEF TAPI20}
  525. function TSPI_lineSetCallData(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  526.   lpCallData: Pointer; dwSize: DWORD): Longint; stdcall;
  527. {$EXTERNALSYM TSPI_lineSetCallData}
  528. {$ENDIF}
  529. {$IFDEF TAPI30}
  530. function TSPI_lineSetCallHubTracking(hdLine: HDRVLINE;
  531.   lpTrackingInfo: PLineCallHubTrackingInfo): Longint; stdcall; // TSPI v3.0
  532. {$EXTERNALSYM TSPI_lineSetCallHubTracking}
  533. {$ENDIF}
  534. function TSPI_lineSetCallParams(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  535.   dwBearerMode, dwMinRate, dwMaxRate: DWORD;
  536.   ldpDialParams: PLineDialParams): Longint; stdcall;
  537. {$EXTERNALSYM TSPI_lineSetCallParams}
  538. {$IFDEF TAPI20}
  539. function TSPI_lineSetCallQualityOfService(dwRequestID: TDrvRequestID;
  540.   hdCall: HDRVCALL; lpSendingFlowspec: Pointer; dwSendingFlowspecSize: DWORD;
  541.   lpReceivingFlowspec: Pointer; dwReceivingFlowspecSize: DWORD): Longint; stdcall;
  542.   // TSPI v2.0
  543. {$EXTERNALSYM TSPI_lineSetCallQualityOfService}
  544. function TSPI_lineSetCallTreatment(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  545.   dwTreatment: DWORD): Longint; stdcall; // TSPI v2.0
  546. {$EXTERNALSYM TSPI_lineSetCallTreatment}
  547. {$ENDIF}
  548. function TSPI_lineSetCurrentLocation(dwLocation: DWORD): Longint; stdcall; // TSPI v1.4
  549. {$EXTERNALSYM TSPI_lineSetCurrentLocation}
  550. function TSPI_lineSetDefaultMediaDetection(hdLine: HDRVLINE;
  551.   wMediaModes: DWORD): Longint; stdcall;
  552. {$EXTERNALSYM TSPI_lineSetDefaultMediaDetection}
  553. {$IFDEF TAPI20}
  554. function TSPI_lineSetDevConfig(dwDeviceID: DWORD; lpDeviceConfig: Pointer;
  555.   dwSize: DWORD; lpszDeviceClass: LPCWSTR): Longint; stdcall;
  556. {$EXTERNALSYM TSPI_lineSetDevConfig}
  557. {$ELSE}
  558. function TSPI_lineSetDevConfig(dwDeviceID: DWORD; lpDeviceConfig: Pointer;
  559.   dwSize: DWORD; lpszDeviceClass: LPCSTR): Longint; stdcall;
  560. {$EXTERNALSYM TSPI_lineSetDevConfig}
  561. {$ENDIF}
  562. {$IFDEF TAPI20}
  563. function TSPI_lineSetLineDevStatus(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  564.   dwStatusToChange, fStatus: DWORD): Longint; stdcall; // TSPI v2.0
  565. {$EXTERNALSYM TSPI_lineSetLineDevStatus}
  566. {$ENDIF}
  567. function TSPI_lineSetMediaControl(hdLine: HDRVLINE; dwAddressID: DWORD;
  568.   hdCall: HDRVCALL; dwSelect: DWORD; lmcdDigitList: PLineMediaControlDigit;
  569.   dwDigitNumEntries: DWORD; lmcmMediaList: PLineMediaControlMedia;
  570.   dwMediaNumEntries: DWORD; lmctToneList: PLineMediaControlTone;
  571.   dwToneNumEntries: DWORD; lmccsCallStateList: PLineMediaControlCallState;
  572.   dwCallStateNumEntries: DWORD): Longint; stdcall;
  573. {$EXTERNALSYM TSPI_lineSetMediaControl}
  574. function TSPI_lineSetMediaMode(hdCall: HDRVCALL;
  575.   dwMediaMode: DWORD): Longint; stdcall;
  576. {$EXTERNALSYM TSPI_lineSetMediaMode}
  577. function TSPI_lineSetStatusMessages(hdLine: HDRVLINE; dwLineStates,
  578.   dwAddressStates: DWORD): Longint; stdcall;
  579. {$EXTERNALSYM TSPI_lineSetStatusMessages}
  580. function TSPI_lineSetTerminal(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  581.   dwAddressID: DWORD; hdCall: HDRVCALL; dwSelect, dwTerminalModes, dwTerminalID,
  582.   bEnable: DWORD): Longint; stdcall;
  583. {$EXTERNALSYM TSPI_lineSetTerminal}
  584. function TSPI_lineSetupConference(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  585.   hdLine: HDRVLINE; htConfCall: HTAPICALL; lphdConfCall: PHDRVCALL;
  586.   htConsultCall: HTAPICALL; lphdConsultCall: PHDRVCALL; dwNumParties: DWORD;
  587.   lcpCallParams: PLineCallParams): Longint; stdcall;
  588. {$EXTERNALSYM TSPI_lineSetupConference}
  589. function TSPI_lineSetupTransfer(dwRequestID: TDrvRequestID; hdCall: HDRVCALL;
  590.   htConsultCall: HTAPICALL; lphdConsultCall: PHDRVCALL;
  591.   lcpCallParams: PLineCallParams): Longint; stdcall;
  592. {$EXTERNALSYM TSPI_lineSetupTransfer}
  593. function TSPI_lineSwapHold(dwRequestID: TDrvRequestID; hdActiveCall,
  594.   hdHeldCall: HDRVCALL): Longint; stdcall;
  595. {$EXTERNALSYM TSPI_lineSwapHold}
  596. function TSPI_lineUncompleteCall(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  597.   dwCompletionID: DWORD): Longint; stdcall;
  598. {$EXTERNALSYM TSPI_lineUncompleteCall}
  599. function TSPI_lineUnhold(dwRequestID: TDrvRequestID;
  600.   hdCall: HDRVCALL): Longint; stdcall;
  601. {$EXTERNALSYM TSPI_lineUnhold}
  602. {$IFDEF TAPI20}
  603. function TSPI_lineUnpark(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  604.   dwAddressID: DWORD; htCall: HTAPICALL; lphdCall: PHDRVCALL;
  605.   lpszDestAddress: LPCWSTR): Longint; stdcall;
  606. {$EXTERNALSYM TSPI_lineUnpark}
  607. {$ELSE}
  608. function TSPI_lineUnpark(dwRequestID: TDrvRequestID; hdLine: HDRVLINE;
  609.   dwAddressID: DWORD; htCall: HTAPICALL; lphdCall: PHDRVCALL;
  610.   lpszDestAddress: LPCSTR): Longint; stdcall;
  611. {$EXTERNALSYM TSPI_lineUnpark}
  612. {$ENDIF}
  613. function TSPI_phoneClose(hdPhone: HDRVPHONE): Longint; stdcall;
  614. {$EXTERNALSYM TSPI_phoneClose}
  615. function TSPI_phoneDevSpecific(dwRequestID: TDrvRequestID; hdPhone: HDRVPHONE;
  616.   lpParams: Pointer; dwSize: DWORD): Longint; stdcall;
  617. {$EXTERNALSYM TSPI_phoneDevSpecific}
  618. function TSPI_phoneGetButtonInfo(hdPhone: HDRVPHONE; dwButtonLampID: DWORD;
  619.   pbiButtonInfo: PPhoneButtonInfo): Longint; stdcall;
  620. {$EXTERNALSYM TSPI_phoneGetButtonInfo}
  621. function TSPI_phoneGetData(hdPhone: HDRVPHONE; dwDataID: DWORD; lpData: Pointer;
  622.   dwSize: DWORD): Longint; stdcall;
  623. {$EXTERNALSYM TSPI_phoneGetData}
  624. function TSPI_phoneGetDevCaps(dwDeviceID, dwTSPIVersion, dwExtVersion: DWORD;
  625.   pcPhoneCaps: PPhoneCaps): Longint; stdcall;
  626. {$EXTERNALSYM TSPI_phoneGetDevCaps}
  627. function TSPI_phoneGetDisplay(hdPhone: HDRVPHONE;
  628.   lpDisplay: PVarString): Longint; stdcall;
  629. {$EXTERNALSYM TSPI_phoneGetDisplay}
  630. function TSPI_phoneGetExtensionID(dwDeviceID, dwTSPIVersion: DWORD;
  631.   var lpExtensionID: TPhoneExtensionID): Longint; stdcall;
  632. {$EXTERNALSYM TSPI_phoneGetExtensionID}
  633. function TSPI_phoneGetGain(hdPhone: HDRVPHONE; dwHookSwitchDev: DWORD;
  634.   var dwGain: DWORD): Longint; stdcall;
  635. {$EXTERNALSYM TSPI_phoneGetGain}
  636. function TSPI_phoneGetHookSwitch(hdPhone: HDRVPHONE;
  637.   var dwHookSwitchDevs: DWORD): Longint; stdcall;
  638. {$EXTERNALSYM TSPI_phoneGetHookSwitch}
  639. {$IFDEF TAPI20}
  640. function TSPI_phoneGetIcon(dwDeviceID: DWORD; lpszDeviceClass: LPCWSTR;
  641.   var hIcon: HICON): Longint; stdcall;
  642. {$EXTERNALSYM TSPI_phoneGetIcon}
  643. {$ELSE}
  644. function TSPI_phoneGetIcon(dwDeviceID: DWORD; lpszDeviceClass: LPCSTR;
  645.   var hIcon: HICON): Longint; stdcall;
  646. {$EXTERNALSYM TSPI_phoneGetIcon}
  647. {$ENDIF}
  648. {$IFDEF TAPI20}
  649. function TSPI_phoneGetID(hdPhone: HDRVPHONE; lpDeviceID: PVarString;
  650.   lpszDeviceClass: LPCWSTR; hTargetProcess: THandle): Longint; stdcall; {// TSPI v2.0}
  651. {$EXTERNALSYM TSPI_phoneGetID}
  652. {$ELSE}
  653. function TSPI_phoneGetID(hdPhone: HDRVPHONE; lpDeviceID: PVarString;
  654.   lpszDeviceClass: LPCSTR; hTargetProcess: THandle): Longint; stdcall; {// TSPI v2.0}
  655. {$EXTERNALSYM TSPI_phoneGetID}
  656. {$ENDIF}
  657. function TSPI_phoneGetLamp(hdPhone: HDRVPHONE; dwButtonLampID: DWORD;
  658.   var dwLampMode: DWORD): Longint; stdcall;
  659. {$EXTERNALSYM TSPI_phoneGetLamp}
  660. function TSPI_phoneGetRing(hdPhone: HDRVPHONE; var dwRingMode,
  661.   dwVolume: DWORD): Longint; stdcall;
  662. {$EXTERNALSYM TSPI_phoneGetRing}
  663. function TSPI_phoneGetStatus(hdPhone: HDRVPHONE;
  664.   psPhoneStatus: PPhoneStatus): Longint; stdcall;
  665. {$EXTERNALSYM TSPI_phoneGetStatus}
  666. function TSPI_phoneGetVolume(hdPhone: HDRVPHONE; dwHookSwitchDev: DWORD;
  667.   var dwVolume: DWORD): Longint; stdcall;
  668. {$EXTERNALSYM TSPI_phoneGetVolume}
  669. function TSPI_phoneNegotiateExtVersion(dwDeviceID, dwTSPIVersion, dwLowVersion,
  670.   dwHighVersion: DWORD; var dwExtVersion: DWORD): Longint; stdcall;
  671. {$EXTERNALSYM TSPI_phoneNegotiateExtVersion}
  672. function TSPI_phoneNegotiateTSPIVersion(dwDeviceID, dwLowVersion,
  673.   dwHighVersion: DWORD; var dwTSPIVersion: DWORD): Longint; stdcall;
  674. {$EXTERNALSYM TSPI_phoneNegotiateTSPIVersion}
  675. function TSPI_phoneOpen(dwDeviceID: DWORD; htPhone: HTAPIPHONE;
  676.   var hdPhone: HDRVPHONE; dwTSPIVersion: DWORD;
  677.   lpfnEventProc: TPhoneEvent): Longint; stdcall;
  678. {$EXTERNALSYM TSPI_phoneOpen}
  679. function TSPI_phoneSelectExtVersion(hdPhone: HDRVPHONE;
  680.   dwExtVersion: DWORD): Longint; stdcall;
  681. {$EXTERNALSYM TSPI_phoneSelectExtVersion}
  682. function TSPI_phoneSetButtonInfo(dwRequestID: TDrvRequestID; hdPhone: HDRVPHONE;
  683.   dwButtonLampID: DWORD; pbiButtonInfo: PPhoneButtonInfo): Longint; stdcall;
  684. {$EXTERNALSYM TSPI_phoneSetButtonInfo}
  685. function TSPI_phoneSetData(dwRequestID: TDrvRequestID; hdPhone: HDRVPHONE;
  686.   dwDataID: DWORD; lpData: Pointer; dwSize: DWORD): Longint; stdcall;
  687. {$EXTERNALSYM TSPI_phoneSetData}
  688. {$IFDEF TAPI20}
  689. function TSPI_phoneSetDisplay(dwRequestID: TDrvRequestID; hdPhone: HDRVPHONE;
  690.   dwRow, dwColumn: DWORD; lpsDisplay: LPCWSTR; dwSize: DWORD): Longint; stdcall;
  691. {$EXTERNALSYM TSPI_phoneSetDisplay}
  692. {$ELSE}
  693. function TSPI_phoneSetDisplay(dwRequestID: TDrvRequestID; hdPhone: HDRVPHONE;
  694.   dwRow, dwColumn: DWORD; lpsDisplay: LPCSTR; dwSize: DWORD): Longint; stdcall;
  695. {$EXTERNALSYM TSPI_phoneSetDisplay}
  696. {$ENDIF}
  697. function TSPI_phoneSetGain(dwRequestID: TDrvRequestID; hdPhone: HDRVPHONE;
  698.   dwHookSwitchDev, dwGain: DWORD): Longint; stdcall;
  699. {$EXTERNALSYM TSPI_phoneSetGain}
  700. function TSPI_phoneSetHookSwitch(dwRequestID: TDrvRequestID; hdPhone: HDRVPHONE;
  701.   dwHookSwitchDevs, dwHookSwitchMode: DWORD): Longint; stdcall;
  702. {$EXTERNALSYM TSPI_phoneSetHookSwitch}
  703. function TSPI_phoneSetLamp(dwRequestID: TDrvRequestID; hdPhone: HDRVPHONE;
  704.   dwButtonLampID, dwLampMode: DWORD): Longint; stdcall;
  705. {$EXTERNALSYM TSPI_phoneSetLamp}
  706. function TSPI_phoneSetRing(dwRequestID: TDrvRequestID; hdPhone: HDRVPHONE;
  707.   dwRingMode, dwVolume: DWORD): Longint; stdcall;
  708. {$EXTERNALSYM TSPI_phoneSetRing}
  709. function TSPI_phoneSetStatusMessages(hdPhone: HDRVPHONE; dwPhoneStates,
  710.   dwButtonModes, dwButtonStates: DWORD): Longint; stdcall;
  711. {$EXTERNALSYM TSPI_phoneSetStatusMessages}
  712. function TSPI_phoneSetVolume(dwRequestID: TDrvRequestID; hdPhone: HDRVPHONE;
  713.   dwHookSwitchDev, dwVolume: DWORD): Longint; stdcall;
  714. {$EXTERNALSYM TSPI_phoneSetVolume}
  715. function TSPI_providerConfig(hwndOwner: HWND;
  716.   dwPermanentProviderID: DWORD): Longint; stdcall;
  717. {$EXTERNALSYM TSPI_providerConfig}
  718. function TSPI_providerCreateLineDevice(dwTempID,
  719.   dwDeviceID: DWORD): Longint; stdcall; // TSPI v1.4
  720. {$EXTERNALSYM TSPI_providerCreateLineDevice}
  721. function TSPI_providerCreatePhoneDevice(dwTempID,
  722.   dwDeviceID: DWORD): Longint; stdcall; // TSPI v1.4
  723. {$EXTERNALSYM TSPI_providerCreatePhoneDevice}
  724. function TSPI_providerEnumDevices(dwPermanentProviderID: DWORD; lpdwNumLines,
  725.   lpdwNumPhones: LPDWORD; hProvider: HPROVIDER; lpfnLineCreateProc: TLineEvent;
  726.   lpfnPhoneCreateProc: TPhoneEvent): Longint; stdcall; // TSPI v1.4
  727. {$EXTERNALSYM TSPI_providerEnumDevices}
  728. {$IFDEF TAPI20}
  729. function TSPI_providerFreeDialogInstance(hdDlgInst: HDRVDIALOGINSTANCE): Longint; stdcall; // TSPI v2.0
  730. {$EXTERNALSYM TSPI_providerFreeDialogInstance}
  731. function TSPI_providerGenericDialogData(dwObjectID, dwObjectType: DWORD;
  732.   lpParams: Pointer; dwSize: DWORD): Longint; stdcall; // TSPI v2.0
  733. {$EXTERNALSYM TSPI_providerGenericDialogData}
  734. {$ENDIF}
  735. function TSPI_providerInit(dwTSPIVersion, dwPermanentProviderID,
  736.   dwLineDeviceIDBase, dwPhoneDeviceIDBase, dwNumLines, dwNumPhones: DWORD;
  737. {$IFDEF TAPI20}
  738.   lpfnCompletionProc: TASyncCompletion; var lpdwTSPIOptions: DWORD): Longint; stdcall;
  739. {$ELSE}
  740.   lpfnCompletionProc: TASyncCompletion): Longint;  stdcall;
  741. {$ENDIF}
  742. {$EXTERNALSYM TSPI_providerInit}
  743. function TSPI_providerInstall(hwndOwner: HWND;
  744.   dwPermanentProviderID: DWORD): Longint; stdcall;
  745. {$EXTERNALSYM TSPI_providerInstall}
  746. function TSPI_providerRemove(hwndOwner: HWND;
  747.   dwPermanentProviderID: DWORD): Longint; stdcall;
  748. {$EXTERNALSYM TSPI_providerRemove}
  749. {$IFDEF TAPI20}
  750. function TSPI_providerShutdown(dwTSPIVersion,
  751.   dwPermanentProviderID: DWORD): Longint; stdcall; // TSPI v2.0
  752. {$ELSE}
  753. function TSPI_providerShutdown(dwTSPIVersion: DWORD): Longint; stdcall; // TSPI v2.0
  754. {$ENDIF}
  755. {$EXTERNALSYM TSPI_providerShutdown}
  756. {$IFDEF TAPI20}
  757. function TSPI_providerUIIdentify(lpszUIDLLName: LPWSTR): Longint; stdcall; // TSPI v2.0
  758. {$EXTERNALSYM TSPI_providerUIIdentify}
  759. {$ENDIF}
  760. {$IFDEF TAPI30}
  761. function TSPI_lineMSPIdentify(dwDeviceID: DWORD; pCLSID: PGUID): Longint; stdcall;
  762. {$EXTERNALSYM TSPI_lineMSPIdentify}
  763. function TSPI_lineCloseMSPInstance(hdMSPLine: HDRVMSPLINE): Longint; stdcall;
  764. {$EXTERNALSYM TSPI_lineCloseMSPInstance}
  765. function TSPI_lineReceiveMSPData(hdLine: HDRVLINE; hdCall: HDRVCALL;
  766.   hdMSPLine: HDRVMSPLINE; pBuffer: Pointer; dwSize: DWORD): Longint; stdcall;
  767. {$EXTERNALSYM TSPI_lineReceiveMSPData}
  768. {$ENDIF}
  769. {$IFDEF TAPI20}
  770. //
  771. // The following function prototypes pertain
  772. // to a service provider's UI module
  773. //
  774. function TUISPI_lineConfigDialog(lpfnUIDLLCallback: TTUISpiDllCallback;
  775.   dwDeviceID: DWORD; hwndOwner: HWND;
  776.   lpszDeviceClass: LPCWSTR): Longint; stdcall; // TSPI v2.0
  777. {$EXTERNALSYM TUISPI_lineConfigDialog}
  778. function TUISPI_lineConfigDialogEdit(lpfnUIDLLCallback: TTUISpiDllCallback;
  779.   dwDeviceID: DWORD; hwndOwner: HWND; lpszDeviceClass: LPCWSTR;
  780.   lpDeviceConfigIn: Pointer; dwSize: DWORD;
  781.   lpDeviceConfigOut: PVarString): Longint; stdcall; // TSPI v2.0
  782. {$EXTERNALSYM TUISPI_lineConfigDialogEdit}
  783. function TUISPI_phoneConfigDialog(lpfnUIDLLCallback: TUISpiDllCallback;
  784.   dwDeviceID: DWORD; hwndOwner: HWND;
  785.   lpszDeviceClass: LPCWSTR): Longint; stdcall; // TSPI v2.0
  786. {$EXTERNALSYM TUISPI_phoneConfigDialog}
  787. function TUISPI_providerConfig(lpfnUIDLLCallback:  TUISpiDllCallback;
  788.   hwndOwner: HWND; dwPermanentProviderID: DWORD): Longint; stdcall; // TSPI v2.0
  789. {$EXTERNALSYM TUISPI_providerConfig}
  790. function TUISPI_providerGenericDialog(lpfnUIDLLCallback: TUISpiDllCallback;
  791.   htDlgInst: HTapiDialogInstance; lpParams: Pointer; dwSize: DWORD;
  792.   hEvent: THandle): Longint;  stdcall; // TSPI v2.0
  793. {$EXTERNALSYM TUISPI_providerGenericDialog}
  794. function TUISPI_providerGenericDialogData(htDlgInst: HTapiDialogInstance;
  795.   lpParams: Pointer; dwSize: DWORD): Longint; stdcall; // TSPI v2.0
  796. {$EXTERNALSYM TUISPI_providerGenericDialogData}
  797. function TUISPI_providerInstall(lpfnUIDLLCallback: TUISpiDllCallback;
  798.   hwndOwner: HWND;
  799.   dwPermanentProviderID: DWORD): Longint; stdcall; // TSPI v2.0
  800. {$EXTERNALSYM TUISPI_providerInstall}
  801. function TUISPI_providerRemove(lpfnUIDLLCallback: TUISpiDllCallback;
  802.   hwndOwner: HWND; dwPermanentProviderID: DWORD): Longint; stdcall; // TSPI v2.0
  803. {$EXTERNALSYM TUISPI_providerRemove}
  804. {$ELSE}
  805. //
  806. // The following were obsoleted by the above (but are needed to build 1.4 SPs)
  807. //
  808. function TSPI_lineConfigDialog(dwDeviceID: DWORD; hwndOwner: HWND;
  809.   lpszDeviceClass: LPCSTR): Longint; stdcall;
  810. {$EXTERNALSYM TSPI_lineConfigDialog}
  811. function TSPI_lineConfigDialogEdit(dwDeviceID: DWORD; hwndOwner: HWND;
  812.   lpszDeviceClass: LPCSTR; const lpDeviceConfigIn: Pointer; dwSize: DWORD;
  813.   lpDeviceConfigOut: PVarString): Longint; stdcall;
  814. {$EXTERNALSYM TSPI_lineConfigDialogEdit}
  815. function TSPI_phoneConfigDialog(dwDeviceID: DWORD; hwndOwner: HWND;
  816.   lpszDeviceClass: LPCSTR): Longint; stdcall;
  817. {$EXTERNALSYM TSPI_phoneConfigDialog}
  818. {$ENDIF}
  819. {$IFNDEF TAPI20}
  820. //
  821. // The following macros are the ordinal numbers of the exported tspi functions
  822. //
  823. const
  824.   TSPI_PROC_BASE = 500;
  825.   {$EXTERNALSYM TSPI_PROC_BASE}
  826.   TSPI_LINEACCEPT                    = (TSPI_PROC_BASE + 0);
  827.   {$EXTERNALSYM TSPI_LINEACCEPT}
  828.   TSPI_LINEADDTOCONFERENCE           = (TSPI_PROC_BASE + 1);
  829.   {$EXTERNALSYM TSPI_LINEADDTOCONFERENCE}
  830.   TSPI_LINEANSWER                    = (TSPI_PROC_BASE + 2);
  831.   {$EXTERNALSYM TSPI_LINEANSWER}
  832.   TSPI_LINEBLINDTRANSFER             = (TSPI_PROC_BASE + 3);
  833.   {$EXTERNALSYM TSPI_LINEBLINDTRANSFER}
  834.   TSPI_LINECLOSE                     = (TSPI_PROC_BASE + 4);
  835.   {$EXTERNALSYM TSPI_LINECLOSE}
  836.   TSPI_LINECLOSECALL                 = (TSPI_PROC_BASE + 5);
  837.   {$EXTERNALSYM TSPI_LINECLOSECALL}
  838.   TSPI_LINECOMPLETECALL              = (TSPI_PROC_BASE + 6);
  839.   {$EXTERNALSYM TSPI_LINECOMPLETECALL}
  840.   TSPI_LINECOMPLETETRANSFER          = (TSPI_PROC_BASE + 7);
  841.   {$EXTERNALSYM TSPI_LINECOMPLETETRANSFER}
  842.   TSPI_LINECONDITIONALMEDIADETECTION = (TSPI_PROC_BASE + 8);
  843.   {$EXTERNALSYM TSPI_LINECONDITIONALMEDIADETECTION}
  844.   TSPI_LINECONFIGDIALOG              = (TSPI_PROC_BASE + 9);
  845.   {$EXTERNALSYM TSPI_LINECONFIGDIALOG}
  846.   TSPI_LINEDEVSPECIFIC               = (TSPI_PROC_BASE + 10);
  847.   {$EXTERNALSYM TSPI_LINEDEVSPECIFIC}
  848.   TSPI_LINEDEVSPECIFICFEATURE        = (TSPI_PROC_BASE + 11);
  849.   {$EXTERNALSYM TSPI_LINEDEVSPECIFICFEATURE}
  850.   TSPI_LINEDIAL                      = (TSPI_PROC_BASE + 12);
  851.   {$EXTERNALSYM TSPI_LINEDIAL}
  852.   TSPI_LINEDROP                      = (TSPI_PROC_BASE + 13);
  853.   {$EXTERNALSYM TSPI_LINEDROP}
  854.   TSPI_LINEFORWARD                   = (TSPI_PROC_BASE + 14);
  855.   {$EXTERNALSYM TSPI_LINEFORWARD}
  856.   TSPI_LINEGATHERDIGITS              = (TSPI_PROC_BASE + 15);
  857.   {$EXTERNALSYM TSPI_LINEGATHERDIGITS}
  858.   TSPI_LINEGENERATEDIGITS            = (TSPI_PROC_BASE + 16);
  859.   {$EXTERNALSYM TSPI_LINEGENERATEDIGITS}
  860.   TSPI_LINEGENERATETONE              = (TSPI_PROC_BASE + 17);
  861.   {$EXTERNALSYM TSPI_LINEGENERATETONE}
  862.   TSPI_LINEGETADDRESSCAPS            = (TSPI_PROC_BASE + 18);
  863.   {$EXTERNALSYM TSPI_LINEGETADDRESSCAPS}
  864.   TSPI_LINEGETADDRESSID              = (TSPI_PROC_BASE + 19);
  865.   {$EXTERNALSYM TSPI_LINEGETADDRESSID}
  866.   TSPI_LINEGETADDRESSSTATUS          = (TSPI_PROC_BASE + 20);
  867.   {$EXTERNALSYM TSPI_LINEGETADDRESSSTATUS}
  868.   TSPI_LINEGETCALLADDRESSID          = (TSPI_PROC_BASE + 21);
  869.   {$EXTERNALSYM TSPI_LINEGETCALLADDRESSID}
  870.   TSPI_LINEGETCALLINFO               = (TSPI_PROC_BASE + 22);
  871.   {$EXTERNALSYM TSPI_LINEGETCALLINFO}
  872.   TSPI_LINEGETCALLSTATUS             = (TSPI_PROC_BASE + 23);
  873.   {$EXTERNALSYM TSPI_LINEGETCALLSTATUS}
  874.   TSPI_LINEGETDEVCAPS                = (TSPI_PROC_BASE + 24);
  875.   {$EXTERNALSYM TSPI_LINEGETDEVCAPS}
  876.   TSPI_LINEGETDEVCONFIG              = (TSPI_PROC_BASE + 25);
  877.   {$EXTERNALSYM TSPI_LINEGETDEVCONFIG}
  878.   TSPI_LINEGETEXTENSIONID            = (TSPI_PROC_BASE + 26);
  879.   {$EXTERNALSYM TSPI_LINEGETEXTENSIONID}
  880.   TSPI_LINEGETICON                   = (TSPI_PROC_BASE + 27);
  881.   {$EXTERNALSYM TSPI_LINEGETICON}
  882.   TSPI_LINEGETID                     = (TSPI_PROC_BASE + 28);
  883.   {$EXTERNALSYM TSPI_LINEGETID}
  884.   TSPI_LINEGETLINEDEVSTATUS          = (TSPI_PROC_BASE + 29);
  885.   {$EXTERNALSYM TSPI_LINEGETLINEDEVSTATUS}
  886.   TSPI_LINEGETNUMADDRESSIDS          = (TSPI_PROC_BASE + 30);
  887.   {$EXTERNALSYM TSPI_LINEGETNUMADDRESSIDS}
  888.   TSPI_LINEHOLD                      = (TSPI_PROC_BASE + 31);
  889.   {$EXTERNALSYM TSPI_LINEHOLD}
  890.   TSPI_LINEMAKECALL                  = (TSPI_PROC_BASE + 32);
  891.   {$EXTERNALSYM TSPI_LINEMAKECALL}
  892.   TSPI_LINEMONITORDIGITS             = (TSPI_PROC_BASE + 33);
  893.   {$EXTERNALSYM TSPI_LINEMONITORDIGITS}
  894.   TSPI_LINEMONITORMEDIA              = (TSPI_PROC_BASE + 34);
  895.   {$EXTERNALSYM TSPI_LINEMONITORMEDIA}
  896.   TSPI_LINEMONITORTONES              = (TSPI_PROC_BASE + 35);
  897.   {$EXTERNALSYM TSPI_LINEMONITORTONES}
  898.   TSPI_LINENEGOTIATEEXTVERSION       = (TSPI_PROC_BASE + 36);
  899.   {$EXTERNALSYM TSPI_LINENEGOTIATEEXTVERSION}
  900.   TSPI_LINENEGOTIATETSPIVERSION      = (TSPI_PROC_BASE + 37);
  901.   {$EXTERNALSYM TSPI_LINENEGOTIATETSPIVERSION}
  902.   TSPI_LINEOPEN                      = (TSPI_PROC_BASE + 38);
  903.   {$EXTERNALSYM TSPI_LINEOPEN}
  904.   TSPI_LINEPARK                      = (TSPI_PROC_BASE + 39);
  905.   {$EXTERNALSYM TSPI_LINEPARK}
  906.   TSPI_LINEPICKUP                    = (TSPI_PROC_BASE + 40);
  907.   {$EXTERNALSYM TSPI_LINEPICKUP}
  908.   TSPI_LINEPREPAREADDTOCONFERENCE    = (TSPI_PROC_BASE + 41);
  909.   {$EXTERNALSYM TSPI_LINEPREPAREADDTOCONFERENCE}
  910.   TSPI_LINEREDIRECT                  = (TSPI_PROC_BASE + 42);
  911.   {$EXTERNALSYM TSPI_LINEREDIRECT}
  912.   TSPI_LINEREMOVEFROMCONFERENCE      = (TSPI_PROC_BASE + 43);
  913.   {$EXTERNALSYM TSPI_LINEREMOVEFROMCONFERENCE}
  914.   TSPI_LINESECURECALL                = (TSPI_PROC_BASE + 44);
  915.   {$EXTERNALSYM TSPI_LINESECURECALL}
  916.   TSPI_LINESELECTEXTVERSION          = (TSPI_PROC_BASE + 45);
  917.   {$EXTERNALSYM TSPI_LINESELECTEXTVERSION}
  918.   TSPI_LINESENDUSERUSERINFO          = (TSPI_PROC_BASE + 46);
  919.   {$EXTERNALSYM TSPI_LINESENDUSERUSERINFO}
  920.   TSPI_LINESETAPPSPECIFIC            = (TSPI_PROC_BASE + 47);
  921.   {$EXTERNALSYM TSPI_LINESETAPPSPECIFIC}
  922.   TSPI_LINESETCALLPARAMS             = (TSPI_PROC_BASE + 48);
  923.   {$EXTERNALSYM TSPI_LINESETCALLPARAMS}
  924.   TSPI_LINESETDEFAULTMEDIADETECTION  = (TSPI_PROC_BASE + 49);
  925.   {$EXTERNALSYM TSPI_LINESETDEFAULTMEDIADETECTION}
  926.   TSPI_LINESETDEVCONFIG              = (TSPI_PROC_BASE + 50);
  927.   {$EXTERNALSYM TSPI_LINESETDEVCONFIG}
  928.   TSPI_LINESETMEDIACONTROL           = (TSPI_PROC_BASE + 51);
  929.   {$EXTERNALSYM TSPI_LINESETMEDIACONTROL}
  930.   TSPI_LINESETMEDIAMODE              = (TSPI_PROC_BASE + 52);
  931.   {$EXTERNALSYM TSPI_LINESETMEDIAMODE}
  932.   TSPI_LINESETSTATUSMESSAGES         = (TSPI_PROC_BASE + 53);
  933.   {$EXTERNALSYM TSPI_LINESETSTATUSMESSAGES}
  934.   TSPI_LINESETTERMINAL               = (TSPI_PROC_BASE + 54);
  935.   {$EXTERNALSYM TSPI_LINESETTERMINAL}
  936.   TSPI_LINESETUPCONFERENCE           = (TSPI_PROC_BASE + 55);
  937.   {$EXTERNALSYM TSPI_LINESETUPCONFERENCE}
  938.   TSPI_LINESETUPTRANSFER             = (TSPI_PROC_BASE + 56);
  939.   {$EXTERNALSYM TSPI_LINESETUPTRANSFER}
  940.   TSPI_LINESWAPHOLD                  = (TSPI_PROC_BASE + 57);
  941.   {$EXTERNALSYM TSPI_LINESWAPHOLD}
  942.   TSPI_LINEUNCOMPLETECALL            = (TSPI_PROC_BASE + 58);
  943.   {$EXTERNALSYM TSPI_LINEUNCOMPLETECALL}
  944.   TSPI_LINEUNHOLD                    = (TSPI_PROC_BASE + 59);
  945.   {$EXTERNALSYM TSPI_LINEUNHOLD}
  946.   TSPI_LINEUNPARK                    = (TSPI_PROC_BASE + 60);
  947.   {$EXTERNALSYM TSPI_LINEUNPARK}
  948.   TSPI_PHONECLOSE                    = (TSPI_PROC_BASE + 61);
  949.   {$EXTERNALSYM TSPI_PHONECLOSE}
  950.   TSPI_PHONECONFIGDIALOG             = (TSPI_PROC_BASE + 62);
  951.   {$EXTERNALSYM TSPI_PHONECONFIGDIALOG}
  952.   TSPI_PHONEDEVSPECIFIC              = (TSPI_PROC_BASE + 63);
  953.   {$EXTERNALSYM TSPI_PHONEDEVSPECIFIC}
  954.   TSPI_PHONEGETBUTTONINFO            = (TSPI_PROC_BASE + 64);
  955.   {$EXTERNALSYM TSPI_PHONEGETBUTTONINFO}
  956.   TSPI_PHONEGETDATA                  = (TSPI_PROC_BASE + 65);
  957.   {$EXTERNALSYM TSPI_PHONEGETDATA}
  958.   TSPI_PHONEGETDEVCAPS               = (TSPI_PROC_BASE + 66);
  959.   {$EXTERNALSYM TSPI_PHONEGETDEVCAPS}
  960.   TSPI_PHONEGETDISPLAY               = (TSPI_PROC_BASE + 67);
  961.   {$EXTERNALSYM TSPI_PHONEGETDISPLAY}
  962.   TSPI_PHONEGETEXTENSIONID           = (TSPI_PROC_BASE + 68);
  963.   {$EXTERNALSYM TSPI_PHONEGETEXTENSIONID}
  964.   TSPI_PHONEGETGAIN                  = (TSPI_PROC_BASE + 69);
  965.   {$EXTERNALSYM TSPI_PHONEGETGAIN}
  966.   TSPI_PHONEGETHOOKSWITCH            = (TSPI_PROC_BASE + 70);
  967.   {$EXTERNALSYM TSPI_PHONEGETHOOKSWITCH}
  968.   TSPI_PHONEGETICON                  = (TSPI_PROC_BASE + 71);
  969.   {$EXTERNALSYM TSPI_PHONEGETICON}
  970.   TSPI_PHONEGETID                    = (TSPI_PROC_BASE + 72);
  971.   {$EXTERNALSYM TSPI_PHONEGETID}
  972.   TSPI_PHONEGETLAMP                  = (TSPI_PROC_BASE + 73);
  973.   {$EXTERNALSYM TSPI_PHONEGETLAMP}
  974.   TSPI_PHONEGETRING                  = (TSPI_PROC_BASE + 74);
  975.   {$EXTERNALSYM TSPI_PHONEGETRING}
  976.   TSPI_PHONEGETSTATUS                = (TSPI_PROC_BASE + 75);
  977.   {$EXTERNALSYM TSPI_PHONEGETSTATUS}
  978.   TSPI_PHONEGETVOLUME                = (TSPI_PROC_BASE + 76);
  979.   {$EXTERNALSYM TSPI_PHONEGETVOLUME}
  980.   TSPI_PHONENEGOTIATEEXTVERSION      = (TSPI_PROC_BASE + 77);
  981.   {$EXTERNALSYM TSPI_PHONENEGOTIATEEXTVERSION}
  982.   TSPI_PHONENEGOTIATETSPIVERSION     = (TSPI_PROC_BASE + 78);
  983.   {$EXTERNALSYM TSPI_PHONENEGOTIATETSPIVERSION}
  984.   TSPI_PHONEOPEN                     = (TSPI_PROC_BASE + 79);
  985.   {$EXTERNALSYM TSPI_PHONEOPEN}
  986.   TSPI_PHONESELECTEXTVERSION         = (TSPI_PROC_BASE + 80);
  987.   {$EXTERNALSYM TSPI_PHONESELECTEXTVERSION}
  988.   TSPI_PHONESETBUTTONINFO            = (TSPI_PROC_BASE + 81);
  989.   {$EXTERNALSYM TSPI_PHONESETBUTTONINFO}
  990.   TSPI_PHONESETDATA                  = (TSPI_PROC_BASE + 82);
  991.   {$EXTERNALSYM TSPI_PHONESETDATA}
  992.   TSPI_PHONESETDISPLAY               = (TSPI_PROC_BASE + 83);
  993.   {$EXTERNALSYM TSPI_PHONESETDISPLAY}
  994.   TSPI_PHONESETGAIN                  = (TSPI_PROC_BASE + 84);
  995.   {$EXTERNALSYM TSPI_PHONESETGAIN}
  996.   TSPI_PHONESETHOOKSWITCH            = (TSPI_PROC_BASE + 85);
  997.   {$EXTERNALSYM TSPI_PHONESETHOOKSWITCH}
  998.   TSPI_PHONESETLAMP                  = (TSPI_PROC_BASE + 86);
  999.   {$EXTERNALSYM TSPI_PHONESETLAMP}
  1000.   TSPI_PHONESETRING                  = (TSPI_PROC_BASE + 87);
  1001.   {$EXTERNALSYM TSPI_PHONESETRING}
  1002.   TSPI_PHONESETSTATUSMESSAGES        = (TSPI_PROC_BASE + 88);
  1003.   {$EXTERNALSYM TSPI_PHONESETSTATUSMESSAGES}
  1004.   TSPI_PHONESETVOLUME                = (TSPI_PROC_BASE + 89);
  1005.   {$EXTERNALSYM TSPI_PHONESETVOLUME}
  1006.   TSPI_PROVIDERCONFIG                = (TSPI_PROC_BASE + 90);
  1007.   {$EXTERNALSYM TSPI_PROVIDERCONFIG}
  1008.   TSPI_PROVIDERINIT                  = (TSPI_PROC_BASE + 91);
  1009.   {$EXTERNALSYM TSPI_PROVIDERINIT}
  1010.   TSPI_PROVIDERINSTALL               = (TSPI_PROC_BASE + 92);
  1011.   {$EXTERNALSYM TSPI_PROVIDERINSTALL}
  1012.   TSPI_PROVIDERREMOVE                = (TSPI_PROC_BASE + 93);
  1013.   {$EXTERNALSYM TSPI_PROVIDERREMOVE}
  1014.   TSPI_PROVIDERSHUTDOWN              = (TSPI_PROC_BASE + 94);
  1015.   {$EXTERNALSYM TSPI_PROVIDERSHUTDOWN}
  1016.   TSPI_PROVIDERENUMDEVICES           = (TSPI_PROC_BASE + 95); // TSPI v1.4
  1017.   {$EXTERNALSYM TSPI_PROVIDERENUMDEVICES}
  1018.   TSPI_LINEDROPONCLOSE               = (TSPI_PROC_BASE + 96); // TSPI v1.4
  1019.   {$EXTERNALSYM TSPI_LINEDROPONCLOSE}
  1020.   TSPI_LINEDROPNOOWNER               = (TSPI_PROC_BASE + 97); // TSPI v1.4
  1021.   {$EXTERNALSYM TSPI_LINEDROPNOOWNER}
  1022.   TSPI_PROVIDERCREATELINEDEVICE      = (TSPI_PROC_BASE + 98); // TSPI v1.4
  1023.   {$EXTERNALSYM TSPI_PROVIDERCREATELINEDEVICE}
  1024.   TSPI_PROVIDERCREATEPHONEDEVICE     = (TSPI_PROC_BASE + 99); // TSPI v1.4
  1025.   {$EXTERNALSYM TSPI_PROVIDERCREATEPHONEDEVICE}
  1026.   TSPI_LINESETCURRENTLOCATION        = (TSPI_PROC_BASE + 100); // TSPI v1.4
  1027.   {$EXTERNALSYM TSPI_LINESETCURRENTLOCATION}
  1028.   TSPI_LINECONFIGDIALOGEDIT          = (TSPI_PROC_BASE + 101); // TSPI v1.4
  1029.   {$EXTERNALSYM TSPI_LINECONFIGDIALOGEDIT}
  1030.   TSPI_LINERELEASEUSERUSERINFO       = (TSPI_PROC_BASE + 102); // TSPI v1.4
  1031.   {$EXTERNALSYM TSPI_LINERELEASEUSERUSERINFO}
  1032.   TSPI_LINEGETCALLID                 = (TSPI_PROC_BASE + 103); // TSPI v3.0
  1033.   {$EXTERNALSYM TSPI_LINEGETCALLID}
  1034.   TSPI_LINEGETCALLHUBTRACKING        = (TSPI_PROC_BASE + 104); // TSPI v3.0
  1035.   {$EXTERNALSYM TSPI_LINEGETCALLHUBTRACKING}
  1036.   TSPI_LINESETCALLHUBTRACKING        = (TSPI_PROC_BASE + 105); // TSPI v3.0
  1037.   {$EXTERNALSYM TSPI_LINESETCALLHUBTRACKING}
  1038.   TSPI_LINERECEIVEMSPDATA            = (TSPI_PROC_BASE + 106); // TSPI v3.0
  1039.   {$EXTERNALSYM TSPI_LINERECEIVEMSPDATA}
  1040.   TSPI_LINEMSPIDENTIFY               = (TSPI_PROC_BASE + 107); // TSPI v3.0
  1041.   {$EXTERNALSYM TSPI_LINEMSPIDENTIFY}
  1042.   TSPI_LINECREATEMSPINSTANCE         = (TSPI_PROC_BASE + 108); // TSPI v3.0
  1043.   {$EXTERNALSYM TSPI_LINECREATEMSPINSTANCE}
  1044.   TSPI_LINECLOSEMSPINSTANCE          = (TSPI_PROC_BASE + 109); // TSPI v3.0
  1045.   {$EXTERNALSYM TSPI_LINECLOSEMSPINSTANCE}
  1046. {$ENDIF}
  1047. implementation
  1048. const
  1049.   TSpiDll = 'tspi.dll';
  1050. function TSPI_lineAccept; external TSpiDll name 'TSPI_lineAccept';
  1051. function TSPI_lineAddToConference; external TSpiDll name 'TSPI_lineAddToConference';
  1052. function TSPI_lineAnswer; external TSpiDll name 'TSPI_lineAnswer';
  1053. function TSPI_lineBlindTransfer; external TSpiDll name 'TSPI_lineBlindTransfer';
  1054. function TSPI_lineClose; external TSpiDll name 'TSPI_lineClose';
  1055. function TSPI_lineCloseCall; external TSpiDll name 'TSPI_lineCloseCall';
  1056. function TSPI_lineCompleteCall; external TSpiDll name 'TSPI_lineCompleteCall';
  1057. function TSPI_lineCompleteTransfer; external TSpiDll name 'TSPI_lineCompleteTransfer';
  1058. function TSPI_lineConditionalMediaDetection; external TSpiDll name 'TSPI_lineConditionalMediaDetection';
  1059. function TSPI_lineDevSpecific; external TSpiDll name 'TSPI_lineDevSpecific';
  1060. function TSPI_lineDevSpecificFeature; external TSpiDll name 'TSPI_lineDevSpecificFeature';
  1061. function TSPI_lineDial; external TSpiDll name 'TSPI_lineDial';
  1062. function TSPI_lineDrop; external TSpiDll name 'TSPI_lineDrop';
  1063. function TSPI_lineDropOnClose; external TSpiDll name 'TSPI_lineDropOnClose';
  1064. function TSPI_lineDropNoOwner; external TSpiDll name 'TSPI_lineDropNoOwner';
  1065. function TSPI_lineForward; external TSpiDll name 'TSPI_lineForward';
  1066. function TSPI_lineGatherDigits; external TSpiDll name 'TSPI_lineGatherDigits';
  1067. function TSPI_lineGenerateDigits; external TSpiDll name 'TSPI_lineGenerateDigits';
  1068. function TSPI_lineGenerateTone; external TSpiDll name 'TSPI_lineGenerateTone';
  1069. function TSPI_lineGetAddressCaps; external TSpiDll name 'TSPI_lineGetAddressCaps';
  1070. function TSPI_lineGetAddressID; external TSpiDll name 'TSPI_lineGetAddressID';
  1071. function TSPI_lineGetAddressStatus; external TSpiDll name 'TSPI_lineGetAddressStatus';
  1072. function TSPI_lineGetCallAddressID; external TSpiDll name 'TSPI_lineGetCallAddressID';
  1073. {$IFDEF TAPI30}
  1074. function TSPI_lineGetCallHubTracking; external TspiDll name 'TSPI_lineGetCallHubTracking';
  1075. function TSPI_lineGetCallIDs; external TspiDll name 'TSPI_lineGetCallIDs';
  1076. {$ENDIF}
  1077. function TSPI_lineGetCallInfo; external TSpiDll name 'TSPI_lineGetCallInfo';
  1078. function TSPI_lineGetCallStatus; external TSpiDll name 'TSPI_lineGetCallStatus';
  1079. function TSPI_lineGetDevCaps; external TSpiDll name 'TSPI_lineGetDevCaps';
  1080. function TSPI_lineGetDevConfig; external TSpiDll name 'TSPI_lineGetDevConfig';
  1081. function TSPI_lineGetExtensionID; external TSpiDll name 'TSPI_lineGetExtensionID';
  1082. function TSPI_lineGetIcon; external TSpiDll name 'TSPI_lineGetIcon';
  1083. function TSPI_lineGetID; external TSpiDll name 'TSPI_lineGetID';
  1084. function TSPI_lineGetLineDevStatus; external TSpiDll name 'TSPI_lineGetLineDevStatus';
  1085. function TSPI_lineGetNumAddressIDs; external TSpiDll name 'TSPI_lineGetNumAddressIDs';
  1086. function TSPI_lineHold; external TSpiDll name 'TSPI_lineHold';
  1087. function TSPI_lineMakeCall; external TSpiDll name 'TSPI_lineMakeCall';
  1088. function TSPI_lineMonitorDigits; external TSpiDll name 'TSPI_lineMonitorDigits';
  1089. function TSPI_lineMonitorMedia; external TSpiDll name 'TSPI_lineMonitorMedia';
  1090. function TSPI_lineMonitorTones; external TSpiDll name 'TSPI_lineMonitorTones';
  1091. function TSPI_lineNegotiateExtVersion; external TSpiDll name 'TSPI_lineNegotiateExtVersion';
  1092. function TSPI_lineNegotiateTSPIVersion; external TSpiDll name 'TSPI_lineNegotiateTSPIVersion';
  1093. function TSPI_lineOpen; external TSpiDll name 'TSPI_lineOpen';
  1094. function TSPI_linePark; external TSpiDll name 'TSPI_linePark';
  1095. function TSPI_linePickup; external TSpiDll name 'TSPI_linePickup';
  1096. function TSPI_linePrepareAddToConference; external TSpiDll name 'TSPI_linePrepareAddToConference';
  1097. function TSPI_lineRedirect; external TSpiDll name 'TSPI_lineRedirect';
  1098. function TSPI_lineReleaseUserUserInfo; external TSpiDll name 'TSPI_lineReleaseUserUserInfo';
  1099. function TSPI_lineRemoveFromConference; external TSpiDll name 'TSPI_lineRemoveFromConference';
  1100. function TSPI_lineSecureCall; external TSpiDll name 'TSPI_lineSecureCall';
  1101. function TSPI_lineSelectExtVersion; external TSpiDll name 'TSPI_lineSelectExtVersion';
  1102. function TSPI_lineSendUserUserInfo; external TSpiDll name 'TSPI_lineSendUserUserInfo';
  1103. function TSPI_lineSetAppSpecific; external TSpiDll name 'TSPI_lineSetAppSpecific';
  1104. function TSPI_lineSetCallParams; external TSpiDll name 'TSPI_lineSetCallParams';
  1105. function TSPI_lineSetCurrentLocation; external TSpiDll name 'TSPI_lineSetCurrentLocation';
  1106. function TSPI_lineSetDefaultMediaDetection; external TSpiDll name 'TSPI_lineSetDefaultMediaDetection';
  1107. function TSPI_lineSetDevConfig; external TSpiDll name 'TSPI_lineSetDevConfig';
  1108. function TSPI_lineSetMediaControl; external TSpiDll name 'TSPI_lineSetMediaControl';
  1109. function TSPI_lineSetMediaMode; external TSpiDll name 'TSPI_lineSetMediaMode';
  1110. function TSPI_lineSetStatusMessages; external TSpiDll name 'TSPI_lineSetStatusMessages';
  1111. function TSPI_lineSetTerminal; external TSpiDll name 'TSPI_lineSetTerminal';
  1112. function TSPI_lineSetupConference; external TSpiDll name 'TSPI_lineSetupConference';
  1113. function TSPI_lineSetupTransfer; external TSpiDll name 'TSPI_lineSetupTransfer';
  1114. function TSPI_lineSwapHold; external TSpiDll name 'TSPI_lineSwapHold';
  1115. function TSPI_lineUncompleteCall; external TSpiDll name 'TSPI_lineUncompleteCall';
  1116. function TSPI_lineUnhold; external TSpiDll name 'TSPI_lineUnhold';
  1117. function TSPI_lineUnpark; external TSpiDll name 'TSPI_lineUnpark';
  1118. function TSPI_phoneClose; external TSpiDll name 'TSPI_phoneClose';
  1119. function TSPI_phoneDevSpecific; external TSpiDll name 'TSPI_phoneDevSpecific';
  1120. function TSPI_phoneGetButtonInfo; external TSpiDll name 'TSPI_phoneGetButtonInfo';
  1121. function TSPI_phoneGetData; external TSpiDll name 'TSPI_phoneGetData';
  1122. function TSPI_phoneGetDevCaps; external TSpiDll name 'TSPI_phoneGetDevCaps';
  1123. function TSPI_phoneGetDisplay; external TSpiDll name 'TSPI_phoneGetDisplay';
  1124. function TSPI_phoneGetExtensionID; external TSpiDll name 'TSPI_phoneGetExtensionID';
  1125. function TSPI_phoneGetGain; external TSpiDll name 'TSPI_phoneGetGain';
  1126. function TSPI_phoneGetHookSwitch; external TSpiDll name 'TSPI_phoneGetHookSwitch';
  1127. function TSPI_phoneGetIcon; external TSpiDll name 'TSPI_phoneGetIcon';
  1128. function TSPI_phoneGetID; external TSpiDll name 'TSPI_phoneGetID';
  1129. function TSPI_phoneGetLamp; external TSpiDll name 'TSPI_phoneGetLamp';
  1130. function TSPI_phoneGetRing; external TSpiDll name 'TSPI_phoneGetRing';
  1131. function TSPI_phoneGetStatus; external TSpiDll name 'TSPI_phoneGetStatus';
  1132. function TSPI_phoneGetVolume; external TSpiDll name 'TSPI_phoneGetVolume';
  1133. function TSPI_phoneNegotiateExtVersion; external TSpiDll name 'TSPI_phoneNegotiateExtVersion';
  1134. function TSPI_phoneNegotiateTSPIVersion; external TSpiDll name 'TSPI_phoneNegotiateTSPIVersion';
  1135. function TSPI_phoneOpen; external TSpiDll name 'TSPI_phoneOpen';
  1136. function TSPI_phoneSelectExtVersion; external TSpiDll name 'TSPI_phoneSelectExtVersion';
  1137. function TSPI_phoneSetButtonInfo; external TSpiDll name 'TSPI_phoneSetButtonInfo';
  1138. function TSPI_phoneSetData; external TSpiDll name 'TSPI_phoneSetData';
  1139. function TSPI_phoneSetDisplay; external TSpiDll name 'TSPI_phoneSetDisplay';
  1140. function TSPI_phoneSetGain; external TSpiDll name 'TSPI_phoneSetGain';
  1141. function TSPI_phoneSetHookSwitch; external TSpiDll name 'TSPI_phoneSetHookSwitch';
  1142. function TSPI_phoneSetLamp; external TSpiDll name 'TSPI_phoneSetLamp';
  1143. function TSPI_phoneSetRing; external TSpiDll name 'TSPI_phoneSetRing';
  1144. function TSPI_phoneSetStatusMessages; external TSpiDll name 'TSPI_phoneSetStatusMessages';
  1145. function TSPI_phoneSetVolume; external TSpiDll name 'TSPI_phoneSetVolume';
  1146. function TSPI_providerConfig; external TSpiDll name 'TSPI_providerConfig';
  1147. function TSPI_providerCreateLineDevice; external TSpiDll name 'TSPI_providerCreateLineDevice';
  1148. function TSPI_providerCreatePhoneDevice; external TSpiDll name 'TSPI_providerCreatePhoneDevice';
  1149. function TSPI_providerEnumDevices; external TSpiDll name 'TSPI_providerEnumDevices';
  1150. function TSPI_providerInit; external TSpiDll name 'TSPI_providerInit';
  1151. function TSPI_providerInstall; external TSpiDll name 'TSPI_providerInstall';
  1152. function TSPI_providerRemove; external TSpiDll name 'TSPI_providerRemove';
  1153. function TSPI_providerShutdown; external TSpiDll name 'TSPI_providerShutdown';
  1154. {$IFDEF TAPI20}
  1155. function TSPI_lineSetCallData; external TSpiDll name 'TSPI_lineSetCallData';
  1156. {$ENDIF}
  1157. {$IFDEF TAPI30}
  1158. function TSPI_lineSetCallHubTracking; external TspiDll name 'TSPI_lineSetCallHubTracking';
  1159. {$ENDIF}
  1160. {$IFDEF TAPI20}
  1161. function TSPI_lineSetCallQualityOfService; external TSpiDll name 'TSPI_lineSetCallQualityOfService';
  1162. function TSPI_lineSetCallTreatment; external TSpiDll name 'TSPI_lineSetCallTreatment';
  1163. function TSPI_lineSetLineDevStatus; external TSpiDll name 'TSPI_lineSetLineDevStatus';
  1164. {$ENDIF}
  1165. {$IFDEF TAPI20}
  1166. function TSPI_providerFreeDialogInstance; external TSpiDll name 'TSPI_providerFreeDialogInstance';
  1167. function TSPI_providerGenericDialogData; external TSpiDll name 'TSPI_providerGenericDialogData';
  1168. function TSPI_providerUIIdentify; external TSpiDll name 'TSPI_providerUIIdentify';
  1169. {$ENDIF}
  1170. {$IFDEF TAPI30}
  1171. function TSPI_lineMSPIdentify; external TspiDll name 'TSPI_lineMSPIdentify';
  1172. function TSPI_lineCloseMSPInstance; external TspiDll name 'TSPI_lineCloseMSPInstance';
  1173. function TSPI_lineReceiveMSPData; external TspiDll name 'TSPI_lineReceiveMSPData';
  1174. {$ENDIF}
  1175. {$IFDEF TAPI20}
  1176. function TUISPI_lineConfigDialog; external TSpiDll name 'TUISPI_lineConfigDialog';
  1177. function TUISPI_lineConfigDialogEdit; external TSpiDll name 'TUISPI_lineConfigDialogEdit';
  1178. function TUISPI_phoneConfigDialog; external TSpiDll name 'TUISPI_phoneConfigDialog';
  1179. function TUISPI_providerConfig; external TSpiDll name 'TUISPI_providerConfig';
  1180. function TUISPI_providerGenericDialog; external TSpiDll name 'TUISPI_providerGenericDialog';
  1181. function TUISPI_providerGenericDialogData; external TSpiDll name 'TUISPI_providerGenericDialogData';
  1182. function TUISPI_providerInstall; external TSpiDll name 'TUISPI_providerInstall';
  1183. function TUISPI_providerRemove; external TSpiDll name 'TUISPI_providerRemove';
  1184. {$ELSE}
  1185. function TUISPI_lineConfigDialog; external TSpiDll name 'TUISPI_lineConfigDialog';
  1186. function TUISPI_lineConfigDialogEdit; external TSpiDll name 'TUISPI_lineConfigDialogEdit';
  1187. function TUISPI_phoneConfigDialog; external TSpiDll name 'TUISPI_phoneConfigDialog';
  1188. {$ENDIF}
  1189. end.