{++ BUILD Version: 0000 // Increment this if a change has global effects
The Telephony API is jointly copyrighted by Intel and Microsoft. You are
granted a royalty free worldwide, unlimited license to make copies, and use
the API/SPI for making applications/drivers that interface with the
specification provided that this paragraph and the Intel/Microsoft copyright
statement is maintained as is in the text and source code files.
Copyright 1995-96 Microsoft, all rights reserved.
Portions copyright 1992, 1993 Intel/Microsoft, all rights reserved.
Module Name:
tapi.h
Notes:
Additions to the Telephony Application Programming Interface (TAPI) since
version 1.0 are noted by version number (e.g. "TAPI v1.4").
--}
{ Converted to Delphi by Davide Moretti <dave@rimini.com> }
{
-- TAPI VERSION INFO -- TAPI VERSION INFO -- TAPI VERSION INFO --
-- TAPI VERSION INFO -- TAPI VERSION INFO -- TAPI VERSION INFO --
-- TAPI VERSION INFO -- TAPI VERSION INFO -- TAPI VERSION INFO --
To build a 32bit TAPI 1.4 application remove the $DEFINE TAPI20 below
}
{$IFDEF TAPI20}
{
These constants are mutually exclusive - there's no way to specify more
than one at a time (and it doesn't make sense, either) so they're
ordinal rather than bits.
}
LINEINITIALIZEEXOPTION_USEHIDDENWINDOW = $00000001; { TAPI v2.0 }
LINEINITIALIZEEXOPTION_USEEVENT = $00000002; { TAPI v2.0 }
LINEINITIALIZEEXOPTION_USECOMPLETIONPORT = $00000003; { TAPI v2.0 }
{$ENDIF}
LINELOCATIONOPTION_PULSEDIAL = $00000001; { TAPI v1.4 }
function lineGetAddressCaps(
hLineApp: THLineApp;
dwDeviceID: Longint;
dwAddressID: Longint;
dwAPIVersion: Longint;
dwExtVersion: Longint;
var lpAddressCaps: TLineAddressCaps): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetAddressCapsA(
hLineApp: THLineApp;
dwDeviceID: Longint;
dwAddressID: Longint;
dwAPIVersion: Longint;
dwExtVersion: Longint;
var lpAddressCaps: TLineAddressCaps): Longint; stdcall;
function lineGetAddressCapsW(
hLineApp: THLineApp;
dwDeviceID: Longint;
dwAddressID: Longint;
dwAPIVersion: Longint;
dwExtVersion: Longint;
var lpAddressCaps: TLineAddressCaps): Longint; stdcall;
{$ENDIF}
function lineGetAddressID(
hLine: THLine;
var lpdwAddressID: Longint;
dwAddressMode: Longint;
lpsAddress: PChar;
dwSize: Longint): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetAddressIDA(
hLine: THLine;
var lpdwAddressID: Longint;
dwAddressMode: Longint;
lpsAddress: PChar;
dwSize: Longint): Longint; stdcall;
function lineGetAddressIDW(
hLine: THLine;
var lpdwAddressID: Longint;
dwAddressMode: Longint;
lpsAddress: PWideChar;
dwSize: Longint): Longint; stdcall;
{$ENDIF}
function lineGetAddressStatus(
hLine: THLine;
dwAddressID: Longint;
var lpAddressStatus: TLineAddressStatus): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetAddressStatusA(
hLine: THLine;
dwAddressID: Longint;
var lpAddressStatus: TLineAddressStatus): Longint; stdcall;
function lineGetAddressStatusW(
hLine: THLine;
dwAddressID: Longint;
var lpAddressStatus: TLineAddressStatus): Longint; stdcall;
{$ENDIF}
{$IFDEF TAPI20}
function lineGetAgentActivityList( { TAPI v2.0 }
hLine: THLine;
dwAddressID: Longint;
var lpAgentActivityList: TLineAgentActivityList): Longint; stdcall;
function lineGetAgentActivityListA( { TAPI v2.0 }
hLine: THLine;
dwAddressID: Longint;
var lpAgentActivityList: TLineAgentActivityList): Longint; stdcall;
function lineGetAgentActivityListW( { TAPI v2.0 }
hLine: THLine;
dwAddressID: Longint;
var lpAgentActivityList: TLineAgentActivityList): Longint; stdcall;
function lineGetAgentCaps( { TAPI v2.0 }
hLineApp: THLineApp;
dwDeviceID: Longint;
dwAddressID: Longint;
dwAppAPIVersion: Longint;
var lpAgentCaps: TLineAgentCaps): Longint; stdcall;
function lineGetAgentCapsA( { TAPI v2.0 }
hLineApp: THLineApp;
dwDeviceID: Longint;
dwAddressID: Longint;
dwAppAPIVersion: Longint;
var lpAgentCaps: TLineAgentCaps): Longint; stdcall;
function lineGetAgentCapsW( { TAPI v2.0 }
hLineApp: THLineApp;
dwDeviceID: Longint;
dwAddressID: Longint;
dwAppAPIVersion: Longint;
var lpAgentCaps: TLineAgentCaps): Longint; stdcall;
function lineGetAgentGroupList( { TAPI v2.0 }
hLine: THLine;
dwAddressID: Longint;
var lpAgentGroupList: TLineAgentGroupList): Longint; stdcall;
function lineGetAgentGroupListA( { TAPI v2.0 }
hLine: THLine;
dwAddressID: Longint;
var lpAgentGroupList: TLineAgentGroupList): Longint; stdcall;
function lineGetAgentGroupListW( { TAPI v2.0 }
hLine: THLine;
dwAddressID: Longint;
var lpAgentGroupList: TLineAgentGroupList): Longint; stdcall;
function lineGetAgentStatus( { TAPI v2.0 }
hLine: THLine;
dwAddressID: Longint;
var lpAgentStatus: TLineAgentStatus): Longint; stdcall;
function lineGetAgentStatusA( { TAPI v2.0 }
hLine: THLine;
dwAddressID: Longint;
var lpAgentStatus: TLineAgentStatus): Longint; stdcall;
function lineGetAgentStatusW( { TAPI v2.0 }
hLine: THLine;
dwAddressID: Longint;
var lpAgentStatus: TLineAgentStatus): Longint; stdcall;
{$ENDIF}
function lineGetAppPriority( { TAPI v1.4 }
lpszAppFilename: PChar;
dwMediaMode: Longint;
lpExtensionID: LPLineExtensionID;
dwRequestMode: Longint;
lpExtensionName: LPVarString;
var lpdwPriority: Longint): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetAppPriorityA( { TAPI v1.4 }
lpszAppFilename: PChar;
dwMediaMode: Longint;
lpExtensionID: LPLineExtensionID;
dwRequestMode: Longint;
lpExtensionName: LPVarString;
var lpdwPriority: Longint): Longint; stdcall;
function lineGetAppPriorityW( { TAPI v1.4 }
lpszAppFilename: PWideChar;
dwMediaMode: Longint;
lpExtensionID: LPLineExtensionID;
dwRequestMode: Longint;
lpExtensionName: LPVarString;
var lpdwPriority: Longint): Longint; stdcall;
{$ENDIF}
function lineGetCallInfo(
hCall: THCall;
var lpCallInfo: TLineCallInfo): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetCallInfoA(
hCall: THCall;
var lpCallInfo: TLineCallInfo): Longint; stdcall;
function lineGetCallInfoW(
hCall: THCall;
var lpCallInfo: TLineCallInfo): Longint; stdcall;
{$ENDIF}
function lineGetCallStatus(
hCall: THCall;
var lpCallStatus: TLineCallStatus): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
function lineGetConfRelatedCalls(
hCall: THCall;
var lpCallList: TLineCallList): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
function lineGetCountry( { TAPI v1.4 }
dwCountryID: Longint;
dwAPIVersion: Longint;
var lpLineCountryList: TLineCountryList): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetCountryA( { TAPI v1.4 }
dwCountryID: Longint;
dwAPIVersion: Longint;
var lpLineCountryList: TLineCountryList): Longint; stdcall;
function lineGetCountryW( { TAPI v1.4 }
dwCountryID: Longint;
dwAPIVersion: Longint;
var lpLineCountryList: TLineCountryList): Longint; stdcall;
{$ENDIF}
function lineGetDevCaps(
hLineApp: THLineApp;
dwDeviceID: Longint;
dwAPIVersion: Longint;
dwExtVersion: Longint;
var lpLineDevCaps: TLineDevCaps): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetDevCapsA(
hLineApp: THLineApp;
dwDeviceID: Longint;
dwAPIVersion: Longint;
dwExtVersion: Longint;
var lpLineDevCaps: TLineDevCaps): Longint; stdcall;
function lineGetDevCapsW(
hLineApp: THLineApp;
dwDeviceID: Longint;
dwAPIVersion: Longint;
dwExtVersion: Longint;
var lpLineDevCaps: TLineDevCaps): Longint; stdcall;
{$ENDIF}
function lineGetDevConfig(
dwDeviceID: Longint;
var lpDeviceConfig: TVarString;
lpszDeviceClass: PChar): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetDevConfigA(
dwDeviceID: Longint;
var lpDeviceConfig: TVarString;
lpszDeviceClass: PChar): Longint; stdcall;
function lineGetDevConfigW(
dwDeviceID: Longint;
var lpDeviceConfig: TVarString;
lpszDeviceClass: PWideChar): Longint; stdcall;
{$ENDIF}
function lineGetNewCalls(
hLine: THLine;
dwAddressID: Longint;
dwSelect: Longint;
var lpCallList: TLineCallList): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
function lineGetIcon(
dwDeviceID: Longint;
lpszDeviceClass: PChar;
var lphIcon: HIcon): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetIconA(
dwDeviceID: Longint;
lpszDeviceClass: PChar;
var lphIcon: HIcon): Longint; stdcall;
function lineGetIconW(
dwDeviceID: Longint;
lpszDeviceClass: PWideChar;
var lphIcon: HIcon): Longint; stdcall;
{$ENDIF}
function lineGetID(
hLine: THLine;
dwAddressID: Longint;
hCall: THCall;
dwSelect: Longint;
var lpDeviceID: TVarString;
lpszDeviceClass: PChar): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetIDA(
hLine: THLine;
dwAddressID: Longint;
hCall: THCall;
dwSelect: Longint;
var lpDeviceID: TVarString;
lpszDeviceClass: PChar): Longint; stdcall;
function lineGetIDW(
hLine: THLine;
dwAddressID: Longint;
hCall: THCall;
dwSelect: Longint;
var lpDeviceID: TVarString;
lpszDeviceClass: PWideChar): Longint; stdcall;
{$ENDIF}
function lineGetLineDevStatus(
hLine: THLine;
var lpLineDevStatus: TLineDevStatus): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetLineDevStatusA(
hLine: THLine;
var lpLineDevStatus: TLineDevStatus): Longint; stdcall;
function lineGetLineDevStatusW(
hLine: THLine;
var lpLineDevStatus: TLineDevStatus): Longint; stdcall;
{$ENDIF}
{$IFDEF TAPI20}
function lineGetMessage( { TAPI v2.0 }
hLineApp: THLineApp;
var lpMessage: TLineMessage;
dwTimeout: Longint): Longint; stdcall;
{$ENDIF}
function lineGetNumRings(
hLine: THLine;
dwAddressID: Longint;
var lpdwNumRings: Longint): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
function lineGetProviderList( { TAPI v1.4 }
dwAPIVersion: Longint;
var lpProviderList: TLineProviderList): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineGetProviderListA(
dwAPIVersion: Longint;
var lpProviderList: TLineProviderList): Longint; stdcall;
function lineGetProviderListW(
dwAPIVersion: Longint;
var lpProviderList: TLineProviderList): Longint; stdcall;
{$ENDIF}
function lineHold(
hCall: THCall): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
function lineInitialize(
var lphLineApp: THLineApp;
hInstance: HInst;
lpfnCallback: TLineCallback;
lpszAppName: PChar;
var lpdwNumDevs: Longint): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF TAPI20}
function lineInitializeEx( { TAPI v2.0 }
var lphLineApp: THLineApp;
hInstance: HInst;
lpfnCallback: TLineCallback;
lpszFriendlyAppName: PChar;
var lpdwNumDevs: Longint;
var lpdwAPIVersion: Longint;
var lpLineInitializeExParams: TLineInitializeExParams): Longint; stdcall;
function lineInitializeExA( { TAPI v2.0 }
var lphLineApp: THLineApp;
hInstance: HInst;
lpfnCallback: TLineCallback;
lpszFriendlyAppName: PChar;
var lpdwNumDevs: Longint;
var lpdwAPIVersion: Longint;
var lpLineInitializeExParams: TLineInitializeExParams): Longint; stdcall;
function lineInitializeExW( { TAPI v2.0 }
var lphLineApp: THLineApp;
hInstance: HInst;
lpfnCallback: TLineCallback;
lpszFriendlyAppName: PWideChar;
var lpdwNumDevs: Longint;
var lpdwAPIVersion: Longint;
var lpLineInitializeExParams: TLineInitializeExParams): Longint; stdcall;
{$ENDIF}
function lineMakeCall(
hLine: THLine;
var lphCall: THCall;
lpszDestAddress: PChar;
dwCountryCode: Longint;
lpCallParams: LPLineCallParams): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function lineMakeCallA(
hLine: THLine;
var lphCall: THCall;
lpszDestAddress: PChar;
dwCountryCode: Longint;
lpCallParams: LPLineCallParams): Longint; stdcall;
function lineMakeCallW(
hLine: THLine;
var lphCall: THCall;
lpszDestAddress: PWideChar;
dwCountryCode: Longint;
lpCallParams: LPLineCallParams): Longint; stdcall;
{$ENDIF}
function phoneGetIcon(
dwDeviceID: Longint;
lpszDeviceClass: PChar;
var lphIcon: HIcon): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function phoneGetIconA(
dwDeviceID: Longint;
lpszDeviceClass: PChar;
var lphIcon: HIcon): Longint; stdcall;
function phoneGetIconW(
dwDeviceID: Longint;
lpszDeviceClass: PWideChar;
var lphIcon: HIcon): Longint; stdcall;
{$ENDIF}
function phoneGetID(
hPhone: THPhone;
var lpDeviceID: TVarString;
lpszDeviceClass: PChar): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function phoneGetIDA(
hPhone: THPhone;
var lpDeviceID: TVarString;
lpszDeviceClass: PChar): Longint; stdcall;
function phoneGetIDW(
hPhone: THPhone;
var lpDeviceID: TVarString;
lpszDeviceClass: PWideChar): Longint; stdcall;
{$ENDIF}
function phoneGetLamp(
hPhone: THPhone;
dwButtonLampID: Longint;
var lpdwLampMode: Longint): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF TAPI20}
function phoneGetMessage( { TAPI v2.0 }
hPhoneApp: THPhoneApp;
var lpMessage: TPhoneMessage;
dwTimeout: Longint): Longint; stdcall;
{$ENDIF}
function phoneGetRing(
hPhone: THPhone;
var lpdwRingMode: Longint;
var lpdwVolume: Longint): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
function phoneGetStatus(
hPhone: THPhone;
var lpPhoneStatus: TPhoneStatus): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF WIN32}
function phoneGetStatusA(
hPhone: THPhone;
var lpPhoneStatus: TPhoneStatus): Longint; stdcall;
function phoneGetStatusW(
hPhone: THPhone;
var lpPhoneStatus: TPhoneStatus): Longint; stdcall;
{$ENDIF}
function phoneGetStatusMessages(
hPhone: THPhone;
var lpdwPhoneStates: Longint;
var lpdwButtonModes: Longint;
var lpdwButtonStates: Longint): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
function phoneGetVolume(
hPhone: THPhone;
dwHookSwitchDev: Longint;
var lpdwVolume: Longint): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
function phoneInitialize(
var lphPhoneApp: THPhoneApp;
hInstance: HInst;
lpfnCallback: TPhoneCallback;
lpszAppName: PChar;
var lpdwNumDevs: Longint): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
{$IFDEF TAPI20}
function phoneInitializeEx( { TAPI v2.0 }
var lphPhoneApp: THPhoneApp;
hInstance: HInst;
lpfnCallback: TPhoneCallback;
lpszFriendlyAppName: PChar;
var lpdwNumDevs: Longint;
var lpdwAPIVersion: Longint;
var lpPhoneInitializeExParams: TPhoneInitializeExParams): Longint; stdcall;
function phoneInitializeExA( { TAPI v2.0 }
var lphPhoneApp: THPhoneApp;
hInstance: HInst;
lpfnCallback: TPhoneCallback;
lpszFriendlyAppName: PChar;
var lpdwNumDevs: Longint;
var lpdwAPIVersion: Longint;
var lpPhoneInitializeExParams: TPhoneInitializeExParams): Longint; stdcall;
function phoneInitializeExW( { TAPI v2.0 }
var lphPhoneApp: THPhoneApp;
hInstance: HInst;
lpfnCallback: TPhoneCallback;
lpszFriendlyAppName: PWideChar;
var lpdwNumDevs: Longint;
var lpdwAPIVersion: Longint;
var lpPhoneInitializeExParams: TPhoneInitializeExParams): Longint; stdcall;
{$ENDIF}
function phoneNegotiateAPIVersion(
hPhoneApp: THPhoneApp;
dwDeviceID: Longint;
dwAPILowVersion: Longint;
dwAPIHighVersion: Longint;
var lpdwAPIVersion: Longint;
var lpExtensionID: TPhoneExtensionID): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
function phoneNegotiateExtVersion(
hPhoneApp: THPhoneApp;
dwDeviceID: Longint;
dwAPIVersion: Longint;
dwExtLowVersion: Longint;
dwExtHighVersion: Longint;
var lpdwExtVersion: Longint): Longint;
{$IFDEF WIN32}
stdcall;
{$ENDIF}
TAPIERROR_FORMATMESSAGE - macro to convert a TAPI error constant
into a constant that FormatMessage will accept
TAPIERR : Negative numbers and 0
Map to : strip off high WORD
Example: 0xFFFFFFFF (-1) becomes 0x0000FFFF
LINEERR : Start at 0x80000000
Map to : strip off 0x80000000 and add 0xE000
Example: 0x80000004 becomes 0x0000E004
PHONEERR: Start at 0x90000000
Map to : strip off 0x90000000 and add 0xF000
Example: 0x9000000A becomes 0x0000F00A
pseudocode:
if (__ErrCode__ is a TAPIERR)
strip off high word
else if (__ErrCode__ is a PHONEERR)
strip off 0x90000000
add 0xE000
else
strip off 0x80000000
add 0xF000
*)
function TAPIERROR_FORMATMESSAGE (ErrCode: Longint): Longint;
implementation
{$IFDEF WIN32}
function lineAccept; external 'Tapi32.dll' name 'lineAccept';
function lineAddProvider; external 'Tapi32.dll' name 'lineAddProvider';
function lineAddProviderA; external 'Tapi32.dll' name 'lineAddProvider';
function lineAddProviderW; external 'Tapi32.dll' name 'lineAddProviderW';
function lineAddToConference; external 'Tapi32.dll' name 'lineAddToConference';
{$IFDEF TAPI20}
function lineAgentSpecific; external 'Tapi32.dll' name 'lineAgentSpecific';
{$ENDIF}
function lineAnswer; external 'Tapi32.dll' name 'lineAnswer';
function lineBlindTransfer; external 'Tapi32.dll' name 'lineBlindTransfer';
function lineBlindTransferA; external 'Tapi32.dll' name 'lineBlindTransfer';
function lineBlindTransferW; external 'Tapi32.dll' name 'lineBlindTransferW';
function lineClose; external 'Tapi32.dll' name 'lineClose';
function lineCompleteCall; external 'Tapi32.dll' name 'lineCompleteCall';
function lineCompleteTransfer; external 'Tapi32.dll' name 'lineCompleteTransfer';
function lineConfigDialog; external 'Tapi32.dll' name 'lineConfigDialog';
function lineConfigDialogA; external 'Tapi32.dll' name 'lineConfigDialog';
function lineConfigDialogW; external 'Tapi32.dll' name 'lineConfigDialogW';
function lineConfigDialogEdit; external 'Tapi32.dll' name 'lineConfigDialogEdit';
function lineConfigDialogEditA; external 'Tapi32.dll' name 'lineConfigDialogEdit';
function lineConfigDialogEditW; external 'Tapi32.dll' name 'lineConfigDialogEditW';
function lineConfigProvider; external 'Tapi32.dll' name 'lineConfigProvider';
function lineDeallocateCall; external 'Tapi32.dll' name 'lineDeallocateCall';
function lineDevSpecific; external 'Tapi32.dll' name 'lineDevSpecific';
function lineDevSpecificFeature; external 'Tapi32.dll' name 'lineDevSpecificFeature';
function lineDial; external 'Tapi32.dll' name 'lineDial';
function lineDialA; external 'Tapi32.dll' name 'lineDial';
function lineDialW; external 'Tapi32.dll' name 'lineDialW';
function lineDrop; external 'Tapi32.dll' name 'lineDrop';
function lineForward; external 'Tapi32.dll' name 'lineForward';
function lineForwardA; external 'Tapi32.dll' name 'lineForward';
function lineForwardW; external 'Tapi32.dll' name 'lineForwardW';
function lineGatherDigits; external 'Tapi32.dll' name 'lineGatherDigits';
function lineGatherDigitsA; external 'Tapi32.dll' name 'lineGatherDigits';
function lineGatherDigitsW; external 'Tapi32.dll' name 'lineGatherDigitsW';
function lineGenerateDigits; external 'Tapi32.dll' name 'lineGenerateDigits';
function lineGenerateDigitsA; external 'Tapi32.dll' name 'lineGenerateDigits';
function lineGenerateDigitsW; external 'Tapi32.dll' name 'lineGenerateDigitsW';
function lineGenerateTone; external 'Tapi32.dll' name 'lineGenerateTone';
function lineGetAddressCaps; external 'Tapi32.dll' name 'lineGetAddressCaps';
function lineGetAddressCapsA; external 'Tapi32.dll' name 'lineGetAddressCaps';
function lineGetAddressCapsW; external 'Tapi32.dll' name 'lineGetAddressCapsW';
function lineGetAddressID; external 'Tapi32.dll' name 'lineGetAddressID';
function lineGetAddressIDA; external 'Tapi32.dll' name 'lineGetAddressID';
function lineGetAddressIDW; external 'Tapi32.dll' name 'lineGetAddressIDW';
function lineGetAddressStatus; external 'Tapi32.dll' name 'lineGetAddressStatus';
function lineGetAddressStatusA; external 'Tapi32.dll' name 'lineGetAddressStatus';
function lineGetAddressStatusW; external 'Tapi32.dll' name 'lineGetAddressStatusW';
{$IFDEF TAPI20}
function lineGetAgentStatus; external 'Tapi32.dll' name 'lineGetAgentStatus';
function lineGetAgentStatusA; external 'Tapi32.dll' name 'lineGetAgentStatus';
function lineGetAgentStatusW; external 'Tapi32.dll' name 'lineGetAgentStatusW';
function lineGetAgentGroupList; external 'Tapi32.dll' name 'lineGetAgentGroupList';
function lineGetAgentGroupListA; external 'Tapi32.dll' name 'lineGetAgentGroupList';
function lineGetAgentGroupListW; external 'Tapi32.dll' name 'lineGetAgentGroupListW';
function lineGetAgentCaps; external 'Tapi32.dll' name 'lineGetAgentCaps';
function lineGetAgentCapsA; external 'Tapi32.dll' name 'lineGetAgentCaps';
function lineGetAgentCapsW; external 'Tapi32.dll' name 'lineGetAgentCapsW';
function lineGetAgentActivityList; external 'Tapi32.dll' name 'lineGetAgentActivityList';
function lineGetAgentActivityListA; external 'Tapi32.dll' name 'lineGetAgentActivityList';
function lineGetAgentActivityListW; external 'Tapi32.dll' name 'lineGetAgentActivityListW';
{$ENDIF}
function lineGetAppPriority; external 'Tapi32.dll' name 'lineGetAppPriority';
function lineGetAppPriorityA; external 'Tapi32.dll' name 'lineGetAppPriority';
function lineGetAppPriorityW; external 'Tapi32.dll' name 'lineGetAppPriorityW';
function lineGetCallInfo; external 'Tapi32.dll' name 'lineGetCallInfo';
function lineGetCallInfoA; external 'Tapi32.dll' name 'lineGetCallInfo';
function lineGetCallInfoW; external 'Tapi32.dll' name 'lineGetCallInfoW';
function lineGetCallStatus; external 'Tapi32.dll' name 'lineGetCallStatus';
function lineGetConfRelatedCalls; external 'Tapi32.dll' name 'lineGetConfRelatedCalls';
function lineGetCountry; external 'Tapi32.dll' name 'lineGetCountry';
function lineGetCountryA; external 'Tapi32.dll' name 'lineGetCountry';
function lineGetCountryW; external 'Tapi32.dll' name 'lineGetCountryW';
function lineGetDevCaps; external 'Tapi32.dll' name 'lineGetDevCaps';
function lineGetDevCapsA; external 'Tapi32.dll' name 'lineGetDevCaps';
function lineGetDevCapsW; external 'Tapi32.dll' name 'lineGetDevCapsW';
function lineGetDevConfig; external 'Tapi32.dll' name 'lineGetDevConfig';
function lineGetDevConfigA; external 'Tapi32.dll' name 'lineGetDevConfig';
function lineGetDevConfigW; external 'Tapi32.dll' name 'lineGetDevConfigW';
function lineGetNewCalls; external 'Tapi32.dll' name 'lineGetNewCalls';
function lineGetIcon; external 'Tapi32.dll' name 'lineGetIcon';
function lineGetIconA; external 'Tapi32.dll' name 'lineGetIcon';
function lineGetIconW; external 'Tapi32.dll' name 'lineGetIconW';
function lineGetID; external 'Tapi32.dll' name 'lineGetID';
function lineGetIDA; external 'Tapi32.dll' name 'lineGetID';
function lineGetIDW; external 'Tapi32.dll' name 'lineGetIDW';
function lineGetLineDevStatus; external 'Tapi32.dll' name 'lineGetLineDevStatus';
function lineGetLineDevStatusA; external 'Tapi32.dll' name 'lineGetLineDevStatus';
function lineGetLineDevStatusW; external 'Tapi32.dll' name 'lineGetLineDevStatusW';
{$IFDEF TAPI20}
function lineGetMessage; external 'Tapi32.dll' name 'lineGetMessage';
{$ENDIF}
function lineGetNumRings; external 'Tapi32.dll' name 'lineGetNumRings';
function lineGetProviderList; external 'Tapi32.dll' name 'lineGetProviderList';
function lineGetProviderListA; external 'Tapi32.dll' name 'lineGetProviderList';
function lineGetProviderListW; external 'Tapi32.dll' name 'lineGetProviderListW';
function lineGetRequest; external 'Tapi32.dll' name 'lineGetRequest';
function lineGetRequestA; external 'Tapi32.dll' name 'lineGetRequest';
function lineGetRequestW; external 'Tapi32.dll' name 'lineGetRequestW';
function lineGetStatusMessages; external 'Tapi32.dll' name 'lineGetStatusMessages';
function lineGetTranslateCaps; external 'Tapi32.dll' name 'lineGetTranslateCaps';
function lineGetTranslateCapsA; external 'Tapi32.dll' name 'lineGetTranslateCaps';
function lineGetTranslateCapsW; external 'Tapi32.dll' name 'lineGetTranslateCapsW';
function lineHandoff; external 'Tapi32.dll' name 'lineHandoff';
function lineHandoffA; external 'Tapi32.dll' name 'lineHandoff';
function lineHandoffW; external 'Tapi32.dll' name 'lineHandoffW';
function lineHold; external 'Tapi32.dll' name 'lineHold';
function lineInitialize; external 'Tapi32.dll' name 'lineInitialize';
{$IFDEF TAPI20}
function lineInitializeEx; external 'Tapi32.dll' name 'lineInitializeEx';
function lineInitializeExA; external 'Tapi32.dll' name 'lineInitializeEx';
function lineInitializeExW; external 'Tapi32.dll' name 'lineInitializeExW';
{$ENDIF}
function lineMakeCall; external 'Tapi32.dll' name 'lineMakeCall';
function lineMakeCallA; external 'Tapi32.dll' name 'lineMakeCall';
function lineMakeCallW; external 'Tapi32.dll' name 'lineMakeCallW';
function lineMonitorDigits; external 'Tapi32.dll' name 'lineMonitorDigits';
function lineMonitorMedia; external 'Tapi32.dll' name 'lineMonitorMedia';
function lineMonitorTones; external 'Tapi32.dll' name 'lineMonitorTones';
function lineNegotiateAPIVersion; external 'Tapi32.dll' name 'lineNegotiateAPIVersion';
function lineNegotiateExtVersion; external 'Tapi32.dll' name 'lineNegotiateExtVersion';
function lineOpen; external 'Tapi32.dll' name 'lineOpen';
function lineOpenA; external 'Tapi32.dll' name 'lineOpen';
function lineOpenW; external 'Tapi32.dll' name 'lineOpenW';
function linePark; external 'Tapi32.dll' name 'linePark';
function lineParkA; external 'Tapi32.dll' name 'linePark';
function lineParkW; external 'Tapi32.dll' name 'lineParkW';
function linePickup; external 'Tapi32.dll' name 'linePickup';
function linePickupA; external 'Tapi32.dll' name 'linePickup';
function linePickupW; external 'Tapi32.dll' name 'linePickupW';
function linePrepareAddToConference; external 'Tapi32.dll' name 'linePrepareAddToConference';
function linePrepareAddToConferenceA; external 'Tapi32.dll' name 'linePrepareAddToConference';
function linePrepareAddToConferenceW; external 'Tapi32.dll' name 'linePrepareAddToConferenceW';
{$IFDEF TAPI20}
function lineProxyMessage; external 'Tapi32.dll' name 'lineProxyMessage';
function lineProxyResponse; external 'Tapi32.dll' name 'lineProxyResponse';
{$ENDIF}
function lineRedirect; external 'Tapi32.dll' name 'lineRedirect';
function lineRedirectA; external 'Tapi32.dll' name 'lineRedirect';
function lineRedirectW; external 'Tapi32.dll' name 'lineRedirectW';
function lineRegisterRequestRecipient; external 'Tapi32.dll' name 'lineRegisterRequestRecipient';
function lineReleaseUserUserInfo; external 'Tapi32.dll' name 'lineReleaseUserUserInfo';
function lineRemoveFromConference; external 'Tapi32.dll' name 'lineRemoveFromConference';
function lineRemoveProvider; external 'Tapi32.dll' name 'lineRemoveProvider';
function lineSecureCall; external 'Tapi32.dll' name 'lineSecureCall';
function lineSendUserUserInfo; external 'Tapi32.dll' name 'lineSendUserUserInfo';
{$IFDEF TAPI20}
function lineSetAgentActivity; external 'Tapi32.dll' name 'lineSetAgentActivity';
function lineSetAgentGroup; external 'Tapi32.dll' name 'lineSetAgentGroup';
function lineSetAgentState; external 'Tapi32.dll' name 'lineSetAgentState';
{$ENDIF}
function lineSetAppPriority; external 'Tapi32.dll' name 'lineSetAppPriority';
function lineSetAppPriorityA; external 'Tapi32.dll' name 'lineSetAppPriority';
function lineSetAppPriorityW; external 'Tapi32.dll' name 'lineSetAppPriorityW';
function lineSetAppSpecific; external 'Tapi32.dll' name 'lineSetAppSpecific';
{$IFDEF TAPI20}
function lineSetCallData; external 'Tapi32.dll' name 'lineSetCallData';
{$ENDIF}
function lineSetCallParams; external 'Tapi32.dll' name 'lineSetCallParams';
function lineSetCallPrivilege; external 'Tapi32.dll' name 'lineSetCallPrivilege';
{$IFDEF TAPI20}
function lineSetCallQualityOfService; external 'Tapi32.dll' name 'lineSetCallQualityOfService';
function lineSetCallTreatment; external 'Tapi32.dll' name 'lineSetCallTreatment';
{$ENDIF}
function lineSetCurrentLocation; external 'Tapi32.dll' name 'lineSetCurrentLocation';
function lineSetDevConfig; external 'Tapi32.dll' name 'lineSetDevConfig';
function lineSetDevConfigA; external 'Tapi32.dll' name 'lineSetDevConfig';
function lineSetDevConfigW; external 'Tapi32.dll' name 'lineSetDevConfigW';
{$IFDEF TAPI20}
function lineSetLineDevStatus; external 'Tapi32.dll' name 'lineSetLineDevStatus';
{$ENDIF}
function lineSetMediaControl; external 'Tapi32.dll' name 'lineSetMediaControl';
function lineSetMediaMode; external 'Tapi32.dll' name 'lineSetMediaMode';
function lineSetNumRings; external 'Tapi32.dll' name 'lineSetNumRings';
function lineSetStatusMessages; external 'Tapi32.dll' name 'lineSetStatusMessages';
function lineSetTerminal; external 'Tapi32.dll' name 'lineSetTerminal';
function lineSetTollList; external 'Tapi32.dll' name 'lineSetTollList';
function lineSetTollListA; external 'Tapi32.dll' name 'lineSetTollList';
function lineSetTollListW; external 'Tapi32.dll' name 'lineSetTollListW';
function lineSetupConference; external 'Tapi32.dll' name 'lineSetupConference';
function lineSetupConferenceA; external 'Tapi32.dll' name 'lineSetupConference';
function lineSetupConferenceW; external 'Tapi32.dll' name 'lineSetupConferenceW';
function lineSetupTransfer; external 'Tapi32.dll' name 'lineSetupTransfer';
function lineSetupTransferA; external 'Tapi32.dll' name 'lineSetupTransfer';
function lineSetupTransferW; external 'Tapi32.dll' name 'lineSetupTransferW';
function lineShutdown; external 'Tapi32.dll' name 'lineShutdown';
function lineSwapHold; external 'Tapi32.dll' name 'lineSwapHold';
function lineTranslateAddress; external 'Tapi32.dll' name 'lineTranslateAddress';
function lineTranslateAddressA; external 'Tapi32.dll' name 'lineTranslateAddress';
function lineTranslateAddressW; external 'Tapi32.dll' name 'lineTranslateAddressW';
function lineTranslateDialog; external 'Tapi32.dll' name 'lineTranslateDialog';
function lineTranslateDialogA; external 'Tapi32.dll' name 'lineTranslateDialog';
function lineTranslateDialogW; external 'Tapi32.dll' name 'lineTranslateDialogW';
function lineUncompleteCall; external 'Tapi32.dll' name 'lineUncompleteCall';
function lineUnhold; external 'Tapi32.dll' name 'lineUnhold';
function lineUnpark; external 'Tapi32.dll' name 'lineUnpark';
function lineUnparkA; external 'Tapi32.dll' name 'lineUnpark';
function lineUnparkW; external 'Tapi32.dll' name 'lineUnparkW';
function phoneClose; external 'Tapi32.dll' name 'phoneClose';
function phoneConfigDialog; external 'Tapi32.dll' name 'phoneConfigDialog';
function phoneConfigDialogA; external 'Tapi32.dll' name 'phoneConfigDialog';
function phoneConfigDialogW; external 'Tapi32.dll' name 'phoneConfigDialogW';
function phoneDevSpecific; external 'Tapi32.dll' name 'phoneDevSpecific';
function phoneGetButtonInfo; external 'Tapi32.dll' name 'phoneGetButtonInfo';
function phoneGetButtonInfoA; external 'Tapi32.dll' name 'phoneGetButtonInfo';
function phoneGetButtonInfoW; external 'Tapi32.dll' name 'phoneGetButtonInfoW';
function phoneGetData; external 'Tapi32.dll' name 'phoneGetData';
function phoneGetDevCaps; external 'Tapi32.dll' name 'phoneGetDevCaps';
function phoneGetDevCapsA; external 'Tapi32.dll' name 'phoneGetDevCaps';
function phoneGetDevCapsW; external 'Tapi32.dll' name 'phoneGetDevCapsW';
function phoneGetDisplay; external 'Tapi32.dll' name 'phoneGetDisplay';
function phoneGetGain; external 'Tapi32.dll' name 'phoneGetGain';
function phoneGetHookSwitch; external 'Tapi32.dll' name 'phoneGetHookSwitch';
function phoneGetIcon; external 'Tapi32.dll' name 'phoneGetIcon';
function phoneGetIconA; external 'Tapi32.dll' name 'phoneGetIcon';
function phoneGetIconW; external 'Tapi32.dll' name 'phoneGetIconW';
function phoneGetID; external 'Tapi32.dll' name 'phoneGetID';
function phoneGetIDA; external 'Tapi32.dll' name 'phoneGetID';
function phoneGetIDW; external 'Tapi32.dll' name 'phoneGetIDW';
function phoneGetLamp; external 'Tapi32.dll' name 'phoneGetLamp';
{$IFDEF TAPI20}
function phoneGetMessage; external 'Tapi32.dll' name 'phoneGetMessage';
{$ENDIF}
function phoneGetRing; external 'Tapi32.dll' name 'phoneGetRing';
function phoneGetStatus; external 'Tapi32.dll' name 'phoneGetStatus';
function phoneGetStatusA; external 'Tapi32.dll' name 'phoneGetStatus';
function phoneGetStatusW; external 'Tapi32.dll' name 'phoneGetStatusW';
function phoneGetStatusMessages; external 'Tapi32.dll' name 'phoneGetStatusMessages';
function phoneGetVolume; external 'Tapi32.dll' name 'phoneGetVolume';
function phoneInitialize; external 'Tapi32.dll' name 'phoneInitialize';
{$IFDEF TAPI20}
function phoneInitializeEx; external 'Tapi32.dll' name 'phoneInitializeEx';
function phoneInitializeExA; external 'Tapi32.dll' name 'phoneInitializeEx';
function phoneInitializeExW; external 'Tapi32.dll' name 'phoneInitializeExW';
{$ENDIF}
function phoneNegotiateAPIVersion; external 'Tapi32.dll' name 'phoneNegotiateAPIVersion';
function phoneNegotiateExtVersion; external 'Tapi32.dll' name 'phoneNegotiateExtVersion';
function phoneOpen; external 'Tapi32.dll' name 'phoneOpen';
function phoneSetButtonInfo; external 'Tapi32.dll' name 'phoneSetButtonInfo';
function phoneSetButtonInfoA; external 'Tapi32.dll' name 'phoneSetButtonInfo';
function phoneSetButtonInfoW; external 'Tapi32.dll' name 'phoneSetButtonInfoW';
function phoneSetData; external 'Tapi32.dll' name 'phoneSetData';
function phoneSetDisplay; external 'Tapi32.dll' name 'phoneSetDisplay';
function phoneSetGain; external 'Tapi32.dll' name 'phoneSetGain';
function phoneSetHookSwitch; external 'Tapi32.dll' name 'phoneSetHookSwitch';
function phoneSetLamp; external 'Tapi32.dll' name 'phoneSetLamp';
function phoneSetRing; external 'Tapi32.dll' name 'phoneSetRing';
function phoneSetStatusMessages; external 'Tapi32.dll' name 'phoneSetStatusMessages';
function phoneSetVolume; external 'Tapi32.dll' name 'phoneSetVolume';
function phoneShutdown; external 'Tapi32.dll' name 'phoneShutdown';
function tapiGetLocationInfo; external 'Tapi32.dll' name 'tapiGetLocationInfo';
function tapiGetLocationInfoA; external 'Tapi32.dll' name 'tapiGetLocationInfo';
function tapiGetLocationInfoW; external 'Tapi32.dll' name 'tapiGetLocationInfoW';
function tapiRequestDrop; external 'Tapi32.dll' name 'tapiRequestDrop';
function tapiRequestMakeCall; external 'Tapi32.dll' name 'tapiRequestMakeCall';
function tapiRequestMakeCallA; external 'Tapi32.dll' name 'tapiRequestMakeCall';
function tapiRequestMakeCallW; external 'Tapi32.dll' name 'tapiRequestMakeCallW';
function tapiRequestMediaCall; external 'Tapi32.dll' name 'tapiRequestMediaCall';
function tapiRequestMediaCallA; external 'Tapi32.dll' name 'tapiRequestMediaCall';
function tapiRequestMediaCallW; external 'Tapi32.dll' name 'tapiRequestMediaCallW';
{$ELSE}
function tapiRequestMakeCall; external 'TAPI' index 28;
function tapiRequestMediaCall; external 'TAPI' index 101;
function tapiRequestDrop; external 'TAPI' index 112;
function lineRegisterRequestRecipient; external 'TAPI' index 10;
function tapiGetLocationInfo; external 'TAPI' index 85;
function lineSetCurrentLocation; external 'TAPI' index 81;
function lineSetTollList; external 'TAPI' index 3;
function lineTranslateAddress; external 'TAPI' index 19;
function lineGetTranslateCaps; external 'TAPI' index 100;
function lineAccept; external 'TAPI' index 82;
function lineAddToConference; external 'TAPI' index 47;
function lineAnswer; external 'TAPI' index 103;
function lineBlindTransfer; external 'TAPI' index 25;
function lineClose; external 'TAPI' index 78;
function lineCompleteCall; external 'TAPI' index 76;
function lineCompleteTransfer; external 'TAPI' index 73;
function lineConfigDialog; external 'TAPI' index 12;
function lineConfigDialogEdit; external 'TAPI' index 135;
function lineDeallocateCall; external 'TAPI' index 111;
function lineDevSpecific; external 'TAPI' index 21;
function lineDevSpecificFeature; external 'TAPI' index 22;
function lineDial; external 'TAPI' index 29;
function lineDrop; external 'TAPI' index 23;
function lineForward; external 'TAPI' index 87;
function lineGatherDigits; external 'TAPI' index 52;
function lineGenerateDigits; external 'TAPI' index 105;
function lineGenerateTone; external 'TAPI' index 80;
function lineGetAddressCaps; external 'TAPI' index 71;
function lineGetAddressID; external 'TAPI' index 104;
function lineGetAddressStatus; external 'TAPI' index 60;
function lineGetCallInfo; external 'TAPI' index 97;
function lineGetCallStatus; external 'TAPI' index 94;
function lineGetConfRelatedCalls; external 'TAPI' index 72;
function lineGetDevCaps; external 'TAPI' index 116;
function lineGetDevConfig; external 'TAPI' index 79;
function lineGetNewCalls; external 'TAPI' index 34;
function lineGetIcon; external 'TAPI' index 53;
function lineGetID; external 'TAPI' index 40;
function lineGetLineDevStatus; external 'TAPI' index 49;
function lineGetNumRings; external 'TAPI' index 62;
function lineGetRequest; external 'TAPI' index 86;
function lineGetStatusMessages; external 'TAPI' index 45;
function lineHandoff; external 'TAPI' index 11;
function lineHold; external 'TAPI' index 6;
function lineInitialize; external 'TAPI' index 33;
function lineMakeCall; external 'TAPI' index 32;
function lineMonitorDigits; external 'TAPI' index 24;
function lineMonitorMedia; external 'TAPI' index 15;
function lineMonitorTones; external 'TAPI' index 31;
function lineNegotiateAPIVersion; external 'TAPI' index 64;
function lineNegotiateExtVersion; external 'TAPI' index 17;
function lineOpen; external 'TAPI' index 46;
function linePark; external 'TAPI' index 5;
function linePickup; external 'TAPI' index 102;
function linePrepareAddToConference; external 'TAPI' index 50;
function lineRedirect; external 'TAPI' index 38;
function lineRemoveFromConference; external 'TAPI' index 43;
function lineSecureCall; external 'TAPI' index 57;
function lineSendUserUserInfo; external 'TAPI' index 63;
function lineSetAppSpecific; external 'TAPI' index 88;
function lineSetCallParams; external 'TAPI' index 2;
function lineSetCallPrivilege; external 'TAPI' index 95;
function lineSetDevConfig; external 'TAPI' index 107;
function lineSetMediaControl; external 'TAPI' index 37;
function lineSetMediaMode; external 'TAPI' index 115;
function lineSetNumRings; external 'TAPI' index 61;
function lineSetStatusMessages; external 'TAPI' index 44;
function lineSetTerminal; external 'TAPI' index 108;
function lineSetupConference; external 'TAPI' index 48;
function lineSetupTransfer; external 'TAPI' index 65;
function lineShutdown; external 'TAPI' index 8;
function lineSwapHold; external 'TAPI' index 109;
function lineUncompleteCall; external 'TAPI' index 41;
function lineUnhold; external 'TAPI' index 113;
function lineUnpark; external 'TAPI' index 77;
function lineReleaseUserUserInfo; external 'TAPI' index 139;
function phoneClose; external 'TAPI' index 119;
function phoneConfigDialog; external 'TAPI' index 16;
function phoneDevSpecific; external 'TAPI' index 9;
function phoneGetButtonInfo; external 'TAPI' index 4;
function phoneGetData; external 'TAPI' index 93;
function phoneGetDevCaps; external 'TAPI' index 114;
function phoneGetDisplay; external 'TAPI' index 83;
function phoneGetGain; external 'TAPI' index 68;
function phoneGetHookSwitch; external 'TAPI' index 27;
function phoneGetIcon; external 'TAPI' index 74;
function phoneGetID; external 'TAPI' index 106;
function phoneGetLamp; external 'TAPI' index 117;
function phoneGetRing; external 'TAPI' index 70;
function phoneGetStatus; external 'TAPI' index 39;
function phoneGetStatusMessages; external 'TAPI' index 55;
function phoneGetVolume; external 'TAPI' index 59;
function phoneInitialize; external 'TAPI' index 35;
function phoneNegotiateAPIVersion; external 'TAPI' index 7;
function phoneNegotiateExtVersion; external 'TAPI' index 14;
function phoneOpen; external 'TAPI' index 89;
function phoneSetButtonInfo; external 'TAPI' index 42;
function phoneSetData; external 'TAPI' index 92;
function phoneSetDisplay; external 'TAPI' index 98;
function phoneSetGain; external 'TAPI' index 67;
function phoneSetHookSwitch; external 'TAPI' index 51;
function phoneSetLamp; external 'TAPI' index 118;
function phoneSetRing; external 'TAPI' index 69;
function phoneSetStatusMessages; external 'TAPI' index 56;
function phoneSetVolume; external 'TAPI' index 54;
function phoneShutdown; external 'TAPI' index 26;
function lineTranslateDialog; external 'TAPI' index 13;
function lineGetCountry; external 'TAPI' index 143;
function lineGetAppPriority; external 'TAPI' index 58;
function lineSetAppPriority; external 'TAPI' index 66;
function lineAddProvider; external 'TAPI' index 141;
function lineConfigProvider; external 'TAPI' index 75;
function lineRemoveProvider; external 'TAPI' index 142;
function lineGetProviderList; external 'TAPI' index 129;
{$ENDIF}
function TAPIERROR_FORMATMESSAGE (ErrCode: Longint): Longint;
begin
if ErrCode > $FFFF0000 then
Result := ErrCode and $FFFF
else if ErrCode and $10000000 <> 0 then
Result := ErrCode - $90000000 + $F000
else
Result := ErrCode - $80000000 + $F000;
end;