TAPI functions do return zero if the function succeeds or a negative
error number if an error occurs. Everytime a TAPI function called by hbTapi
Components returned a negative error number, the error is indicated as
a Delphi exception. Read this documentation of a function or property
to be aware of possiblie occuring exceptions (errors).
Some TAPI functions are workin in an asynchronous mater. They return
immideatly with an error or positive result - the request id. The real
result of the fnction is then returned later within a LINE_REPLY message.
When you're using hbTapi Components in an asynchronous manner, you have
to use the LastRequestID
property and the OnTapiReply
event to get the result of an asynchron function. Otherwise an error is
immidiatly indicated as an EhbTapiError exception.
The ErrorCode member holds the numeric value of the error. This uses
one of the LINEERR_ or PHONERR_ constants:
Constant
|
Meaning
|
LINEERR_ADDRESSBLOCKED
|
The specified address is blocked from being dialed on the specified call.
|
LINEERR_ADDRESSBLOCKED
|
The target call address has call blocking enabled.
|
LINEERR_ALLOCATED
|
The line cannot be opened due to a persistent condition, such as that
of a serial port being exclusively opened by another process.
|
LINEERR_BADDEVICEID
|
The specified device identifier or line device identifier (such as in
a dwDeviceID parameter) is invalid or out of range.
|
LINEERR_BEARERMODEUNAVAIL
|
The bearer mode member in LINECALLPARAMS is invalid, the bearer mode
specified in LINECALLPARAMS is not available, or the call's bearer mode
cannot be changed to the specified bearer mode.
|
LINEERR_BILLINGREJECTED
|
The billing mode of the call was rejected.
|
LINEERR_CALLUNAVAIL
|
All call appearances on the specified address are currently in use.
|
LINEERR_COMPLETIONOVERRUN
|
The maximum number of outstanding call completions has been exceeded.
|
LINEERR_CONFERENCEFULL
|
The maximum number of parties for a conference has been reached, or the
requested number of parties cannot be satisfied.
|
LINEERR_DIALBILLING
|
The dialable address parameter contains dialing control characters that
are not processed by the service provider.
|
LINEERR_DIALDIALTONE
|
The dialable address parameter contains dialing control characters that
are not processed by the service provider.
|
LINEERR_DIALPROMPT
|
The dialable address parameter contains dialing control characters that
are not processed by the service provider.
|
LINEERR_DIALQUIET
|
The dialable address parameter contains dialing control characters that
are not processed by the service provider.
|
LINEERR_DIALVOICEDETECT
|
Use of the ":" dial modifier is not supported. This value is
exposed only to applications that negotiate a TAPI version of 2.0 or higher.
|
LINEERR_DISCONNECTED
|
The call has been disconnected. This value is exposed only to applications
that negotiate a TAPI version of 2.2 or higher.
|
LINEERR_INCOMPATIBLEAPIVERSION
|
The application requested a TAPI version or version range that is either
incompatible with, or cannot be supported by, the Telephony API implementation
and the corresponding service provider.
|
LINEERR_INCOMPATIBLEEXTVERSION
|
The application requested an extension version range that is either invalid
or cannot be supported by the corresponding service provider.
|
LINEERR_INIFILECORRUPT
|
The telephon.ini file cannot be read or understood properly by TAPI because
of internal inconsistencies or formatting problems. For example, the [Locations],
[Cards], or [Countries] section of the telephon.ini file may be corrupted
or inconsistent.
|
LINEERR_INUSE
|
The line device is in use and cannot currently be configured, allow a
party to be added, allow a call to be answered, allow a call to be placed,
or allow a call to be transferred.
|
LINEERR_INVALADDRESS
|
A specified address is either invalid or not allowed. If invalid, the
address contains invalid characters or digits, or the destination address
contains dialing control characters (W, @, $, or ?) that are not supported
by the service provider. If not allowed, the specified address is either
not assigned to the specified line or is not valid for address redirection.
|
LINEERR_INVALADDRESSID
|
The specified address identifier is either invalid or out of range.
|
LINEERR_INVALADDRESSMODE
|
The specified address mode is invalid.
|
LINEERR_INVALADDRESSSTATE
|
The specified address state contains one or more bits that are not LINEADDRESSSTATE_
constants.
|
LINEERR_INVALADDRESSTYPE
|
The application referenced an address type that is not valid. This value
is exposed only to applications that negotiate a TAPI version of 3.0 or
higher.
|
LINEERR_INVALAGENTACTIVITY
|
The specified agent activity is not valid.
|
LINEERR_INVALAGENTACTIVITY
|
The application invoking this operation is the target of the indirect
handoff. That is, TAPI has determined that the calling application is
also the highest priority application for the given media type. This value
is exposed only to applications that negotiate a TAPI version of 2.0 or
higher.
|
LINEERR_INVALAGENTGROUP
|
The specified agent group information is not valid or contains errors.
The requested action has not been carried out.
|
LINEERR_INVALAGENTGROUP
|
The application referenced an agent group that is not valid. This value
is exposed only to applications that negotiate a TAPI version of 2.0 or
higher.
|
LINEERR_INVALAGENTID
|
The specified agent identifier is invalid.
|
LINEERR_INVALAGENTID
|
An invalid agent identifier was used. This value is exposed only to applications
that negotiate a TAPI version of 2.0 or higher.
|
LINEERR_INVALAGENTSESSIONSTATE
|
The agent session state is invalid. This value is exposed only to applications
that negotiate a TAPI version of 2.2 or higher.
|
LINEERR_INVALAGENTSKILL
|
The skill group entered is invalid.
|
LINEERR_INVALAGENTSTATE
|
The specified agent state is not valid or contains errors. No changes
have been made to the agent state of the specified address.
|
LINEERR_INVALAGENTSTATE
|
The application referenced an agent state that is not valid. This value
is exposed only to applications that negotiate a TAPI version of 2.0 or
higher.
|
LINEERR_INVALAGENTSUPERVISOR
|
The agent supervisor indicator is invalid.
|
LINEERR_INVALAPPHANDLE
|
The application handle (such as specified by a hLineApp parameter) or
the appliction registration handle is invalid.
|
LINEERR_INVALAPPNAME
|
The specified application name is invalid. If an application name is
specified by the application, it is assumed that the string does not contain
any non-displayable characters, and is zero-terminated.
|
LINEERR_INVALBEARERMODE
|
The specified bearer mode is invalid.
|
LINEERR_INVALCALLCOMPLMODE
|
The specified completion is invalid.
|
LINEERR_INVALCALLHANDLE
|
The specified call handle is not valid. For example, the handle is not
NULL but does not belong to the given line. In some cases, the specified
call device handle is invalid.
|
LINEERR_INVALCALLPARAMS
|
The specified call parameters are invalid.
|
LINEERR_INVALCALLPRIVILEGE
|
The specified call privilege parameter is invalid.
|
LINEERR_INVALCALLSELECT
|
The specified select parameter is invalid.
|
LINEERR_INVALCALLSTATE
|
The current state of a call is not in a valid state for the requested
operation.
|
LINEERR_INVALCALLSTATELIST
|
The specified call state list is invalid.
|
LINEERR_INVALCARD
|
The permanent card identifier specified in dwCard could not be found
in any entry in the [Cards] section in the registry.
|
LINEERR_INVALCOMPLETIONID
|
The completion identifier is invalid.
|
LINEERR_INVALCONFCALLHANDLE
|
The specified call handle for the conference call is invalid or is not
a handle for a conference call.
|
LINEERR_INVALCONSULTCALLHANDLE
|
The specified consultation call handle is invalid.
|
LINEERR_INVALCOUNTRYCODE
|
The specified country code is invalid.
|
LINEERR_INVALDEVICECLASS
|
The line device has no associated device for the given device class,
or the specified line does not support the indicated device class.
|
LINEERR_INVALDEVICEHANDLE
|
The line device handle is invalid.
|
LINEERR_INVALDIALPARAMS
|
The dialing parameters are invalid.
|
LINEERR_INVALDIGITLIST
|
The specified digit list is invalid.
|
LINEERR_INVALDIGITMODE
|
The specified digit mode is invalid.
|
LINEERR_INVALDIGITS
|
The specified termination digits are not valid.
|
LINEERR_INVALEXTVERSION
|
The service provider extension version number is invalid.
|
LINEERR_INVALFEATURE
|
The dwFeature parameter is invalid.
|
LINEERR_INVALFEATURE
|
The application invoked a feature that is not available on this line.
|
LINEERR_INVALGROUPID
|
The specified group identifier is invalid.
|
LINEERR_INVALLINEHANDLE
|
The specified call, device, line device, or line handle is invalid.
|
LINEERR_INVALLINESTATE
|
The device configuration may not be changed in the current line state.
The line may be in use by another application or a dwLineStates parameter
contains one or more bits that are not LINEDEVSTATE_ constants. The LINEERR_INVALLINESTATE
value can also indicate that the device is DISCONNECTED or OUTOFSERVICE.
These states are indicated by setting the bits corresponding to the LINEDEVSTATUSFLAGS_CONNECTED
and LINEDEVSTATUSFLAGS_INSERVICE values to 0 in the dwDevStatusFlags member
of the LINEDEVSTATUS structure returned by the lineGetLineDevStatus function.
|
LINEERR_INVALLOCATION
|
The permanent location identifier specified in dwLocation could not be
found in any entry in the [Locations] section in the registry.
|
LINEERR_INVALMEDIALIST
|
The specified media list is invalid.
|
LINEERR_INVALMEDIAMODE
|
The list of media types (modes) to be monitored contains invalid information,
the specified media type parameter is invalid, or the service provider
does not support the specified media type. The media types supported on
the line are listed in the dwMediaModes member in the LINEDEVCAPS structure.
|
LINEERR_INVALMESSAGEID
|
The number given in dwMessageID is outside the range specified by the
dwNumCompletionMessages member in the LINEADDRESSCAPS structure.
|
LINEERR_INVALPARAM
|
A parameter or structure that a parameter points to contains invalid
information, a country code is invalid, a window handle is invalid, or
the specified forward list parameter contains invalid information.
|
LINEERR_INVALPARKID
|
The park identifier is invalid.
|
LINEERR_INVALPARKMODE
|
The specified park mode is invalid.
|
LINEERR_INVALPASSWORD
|
The specified password is not correct and the requested action has not
been carried out.
|
LINEERR_INVALPASSWORD
|
The application used an invalid password. This value is exposed only
to applications that negotiate a TAPI version of 2.0 or higher.
|
LINEERR_INVALPOINTER
|
One or more of the specified pointer parameters (such as lpCallList, lpdwAPIVersion,
lpExtensionID, lpdwExtVersion, lphIcon, lpLineDevCaps, and lpToneList)
are invalid, or a required pointer to an output parameter is NULL.
|
LINEERR_INVALPRIVSELECT
|
An invalid flag or combination of flags was set for the dwPrivileges
parameter.
|
LINEERR_INVALRATE
|
The specified rate is invalid.
|
LINEERR_INVALREQUESTMODE
|
The LINEREQUESTMODE indicator is invalid.
|
LINEERR_INVALTERMINALID
|
The specified terminal identifier is invalid.
|
LINEERR_INVALTERMINALMODE
|
The specified terminal modes parameter is invalid.
|
LINEERR_INVALTIMEOUT
|
Timeouts are not supported or a value falls outside the valid range specified
in LINEDEVCAPS.
|
LINEERR_INVALTONE
|
The specified custom tone does not represent a valid tone or is made
up of too many frequencies or the specified tone structure does not describe
a valid tone.
|
LINEERR_INVALTONELIST
|
The specified tone list is invalid.
|
LINEERR_INVALTONEMODE
|
The specified tone mode parameter is invalid.
|
LINEERR_INVALTRANSFERMODE
|
The specified transfer mode parameter is invalid.
|
LINEERR_LINEMAPPERFAILED
|
LINEMAPPER was the value passed in the dwDeviceID parameter, but no lines
were found that match the requirements specified in the CallParams parameter.
|
LINEERR_NOCONFERENCE
|
The specified call is not a conference call handle or a participant call.
|
LINEERR_NODEVICE
|
The specified device identifier, which was previously valid, is no longer
accepted because the associated device has been removed from the system
since TAPI was last initialized. Alternately, the line device has no associated
device for the given device class.
|
LINEERR_NODRIVER
|
Either tapiaddr.dll could not be located or the telephone service provider
for the specified device found that one of its components is missing or
corrupt in a way that was not detected at initialization time. The user
should be advised to use the Telephony Control Panel to correct the problem.
|
LINEERR_NOMEM
|
Insufficient memory to perform the operation, or unable to lock memory.
|
LINEERR_NOMULTIPLEINSTANCE
|
A telephony service provider that does not support multiple instances
is listed more than once in the [Providers] section in the registry. The
application should advise the user to use the Telephony Control Panel
to remove the duplicated driver.
|
LINEERR_NOMULTIPLEINSTANCE
|
Multiple instances of this service provider are not allowed.
|
LINEERR_NOREQUEST
|
There currently is no request pending of the indicated mode, or the application
is no longer the highest-priority application for the specified request
mode.
|
LINEERR_NOTOWNER
|
The application does not have owner privilege to the specified call.
|
LINEERR_NOTREGISTERED
|
The application is not registered as a request recipient for the indicated
request mode.
|
LINEERR_OPERATIONFAILED
|
The operation failed for an unspecified or unknown reason.
|
LINEERR_OPERATIONUNAVAIL
|
The operation is not available, such as for the given device or specified
line.
|
LINEERR_RATEUNAVAIL
|
The service provider currently does not have enough bandwidth available
for the specified rate.
|
LINEERR_REINIT
|
If TAPI reinitialization has been requested, for example as a result
of adding or removing a telephony service provider, then lineInitialize,
lineInitializeEx, or lineOpen requests are rejected with this error until
the last application shuts down its usage of the API (using lineShutdown),
at which time the new configuration becomes effective and applications
are once again permitted to call lineInitialize or lineInitializeEx.
|
LINEERR_REINIT
|
The application attempted to initialize TAPI twice.
|
LINEERR_REQUESTOVERRUN
|
More requests are pending than the device can handle.
|
LINEERR_RESOURCEUNAVAIL
|
Insufficient resources to complete the operation. For example, a line
cannot be opened due to a dynamic resource overcommitment.
|
LINEERR_STRUCTURETOOSMALL
|
The dwTotalSize member of a structure does not specify enough memory
to contain the fixed portion of the specified structure.
|
LINEERR_TARGETNOTFOUND
|
A target for the call handoff was not found. This can occur if the named
application did not open the same line with the LINECALLPRIVILEGE_OWNER
bit in the dwPrivileges parameter of lineOpen. Or, in the case of media-mode
handoff, no application has opened the same line with the LINECALLPRIVILEGE_OWNER
bit in the dwPrivileges parameter of lineOpen and with the media type
specified in the dwMediaMode parameter having been specified in the dwMediaModes
parameter of lineOpen.
|
LINEERR_TARGETSELF
|
The application invoking this operation is the target of the indirect
handoff. That is, TAPI has determined that the calling application is
also the highest priority application for the given media type.
|
LINEERR_UNINITIALIZED
|
The operation was invoked before any application called lineInitialize
or lineInitializeEx.
|
LINEERR_USERCANCELLED
|
The user cancelled the call. This value is exposed only to applications
that negotiate a TAPI version of 2.2 or higher.
|
LINEERR_USERUSERINFOTOOBIG
|
The string containing user-user information exceeds the maximum number
of bytes specified in the dwUUIAcceptSize, dwUUIAnswerSize, dwUUIDropSize,
dwUUIMakeCallSize, or dwUUISendUserUserInfoSize member of LINEDEVCAPS,
or the string containing user-user information is too long.
|
Constant |
Meaning |
PHONEERR_ALLOCATED |
The specified resource is already allocated. |
PHONEERR_BADDEVICEID |
The specified device identifier is invalid or out of range. |
PHONEERR_DISCONNECTED |
The call was disconnected. |
PHONEERR_INCOMPATIBLEAPIVERSION |
The application requested an API version or version range that cannot
be supported by the Telephony API implementation or the corresponding
service provider.
|
PHONEERR_INCOMPATIBLEEXTVERSION |
The application requested an extension version or version range that
cannot be supported by the service provider. |
PHONEERR_INIFILECORRUPT |
Because of internal inconsistencies or formatting problems in the Telephon.ini
file, it cannot be read and understood properly by TAPI. |
PHONEERR_INUSE |
The device is currently in use. The device cannot be configured. |
PHONEERR_INVALAPPHANDLE |
The application's specified usage handle or registration handle is invalid.
|
PHONEERR_INVALAPPNAME |
The specified application name is invalid. If an application name is
specified by the application, it is assumed that the string does not contain
any nondisplayable characters and is NULL-terminated. |
PHONEERR_INVALBUTTONLAMPID |
The specified button/lamp identifier is out of range or invalid. |
PHONEERR_INVALBUTTONMODE |
The button mode parameter is invalid. |
PHONEERR_INVALBUTTONSTATE |
The button states parameter is invalid. |
PHONEERR_INVALDATAID |
The specified data identifier is invalid. |
PHONEERR_INVALDEVICECLASS |
The specified phone does not support the indicated device class. |
PHONEERR_INVALEXTVERSION |
The service provider extension version number is invalid. |
PHONEERR_INVALHOOKSWITCHDEV |
The hookswitch device parameter is invalid. |
PHONEERR_INVALHOOKSWITCHMODE |
The hookswitch mode parameter is invalid. |
PHONEERR_INVALLAMPMODE |
The specified lamp mode parameter is invalid. |
PHONEERR_INVALPARAM |
A parameter, such as a row or column value or a window handle, is invalid
or out of range. |
PHONEERR_INVALPHONEHANDLE |
The specified device handle is invalid. |
PHONEERR_INVALPHONESTATE |
The phone device is not in a valid state for the requested operation.
|
PHONEERR_INVALPOINTER |
One or more of the specified pointer parameters are invalid. |
PHONEERR_INVALPRIVILEGE |
The dwPrivilege parameter is invalid. |
PHONEERR_INVALRINGMODE |
The ring mode parameter is invalid. |
PHONEERR_NODEVICE |
The specified device identifier, which was previously valid, is no longer
accepted because the associated device has been removed from the system
since TAPI was last initialized or is corrupt in a way that was not detected
at initialization. |
PHONEERR_NODRIVER |
The telephone service provider for the specified device found that one
of its components is missing or corrupt in a way that was not detected
at initialization time. The user should be advised to use the Telephony
Control Panel to correct the problem. |
PHONEERR_NOMEM |
Insufficient memory to complete the requested operation, or unable to
allocate or lock memory. |
PHONEERR_NOTOWNER |
The application does not have owner privilege to the specified phone
device. |
PHONEERR_OPERATIONFAILED |
The operation failed for an unspecified reason. |
PHONEERR_OPERATIONUNAVAIL |
The operation is not available. |
PHONEERR_REINIT |
If TAPI reinitialization has been requested, for example as a result
of adding or removing a telephony service provider, then phoneInitialize,
phoneInitializeEx or phoneOpen requests are rejected with this error until
the last application shuts down its usage of the API (using phoneShutdown),
at which time the new configuration becomes effective and applications
are once again permitted to call phoneInitialize or phoneInitializeEx.
|
PHONEERR_REQUESTOVERRUN |
The maximum number of outstanding phone requests has been exceeded. |
PHONEERR_RESOURCEUNAVAIL |
The operation cannot be completed because of resource overcommitment.
|
PHONEERR_STRUCTURETOOSMALL |
The specified phone caps structure is too small. |
PHONEERR_UNINITIALIZED |
The operation was invoked before any application called phoneInitialize,
phoneInitializeEx. |
The Message member holds a text with the description of the occured error.
This text can be used to displayed user information and is read from the
TAPI system files.