lineInitialize
The
lineInitialize function is obsolete. It continues to be exported by TAPI.DLL and TAPI32.DLL
for backward compatibility with applications using API versions 0x00010003 and
0x00010004.
Applications using API version 0x00020000 or greater must use
lineInitializeEx instead.
For Windows 95 applications only
The
lineInitialize function initializes the application's use of TAPI.DLL for subsequent use of
the line abstraction. It registers the application's specified notification
mechanism and returns the number of line devices available to the application. A
line device is any device that provides an implementation for the line-prefixed
functions in the Telephony API.
LONG lineInitialize(
LPHLINEAPP lphLineApp,
|
|
HINSTANCE hInstance,
|
|
LINECALLBACK lpfnCallback,
|
|
LPCSTR lpszAppName,
|
|
LPDWORD lpdwNumDevs
|
|
);
|
|
Parameters
lphLineApp
A pointer to a location that is filled with the application's usage handle for
TAPI.
hInstance
The instance handle of the client application or DLL.
lpfnCallback
The address of a callback function that is invoked to determine status and
events on the line device, addresses, or calls. For more information see
lineCallbackFunc.
lpszAppName
A pointer to a NULL-terminated ASCII string that contains only displayable
ASCII characters. If this parameter is not NULL, it contains an
application-supplied name for the application. This name is provided in the
LINECALLINFO structure to indicate, in a user-friendly way, which application originated,
or originally accepted or answered the call. This information can be useful for
call logging purposes. If
lpszAppName is NULL, the application's filename is used instead.
lpdwNumDevs
A pointer to a
DWORD-sized location. Upon successful completion of this request, this location is
filled with the number of line devices available to the application.
Return Values
Returns zero if the request is successful or a negative error number if an
error has occurred. Possible return values are:
LINEERR_INVALAPPNAME, LINEERR_OPERATIONFAILED, LINEERR_INIFILECORRUPT,
LINEERR_RESOURCEUNAVAIL, LINEERR_INVALPOINTER, LINEERR_REINIT, LINEERR_NODRIVER,
LINEERR_NODEVICE, LINEERR_NOMEM, LINEERR_NOMULTIPLEINSTANCE.
Remarks
If LINEERR_REINIT is returned and TAPI reinitialization has been requested
(for example as a result of adding or removing a Telephony service provider), then
lineInitialize requests are rejected with this error until the last application shuts down
its usage of the API (using
lineShutdown). At that time, the new configuration becomes effective and applications are
once again permitted to call
lineInitialize. If the LINEERR_INVALPARAM error value is returned, the specified
hInstance parameter is invalid.
The application can refer to individual line devices by using line device IDs
that range from zero to
dwNumDevs minus one. An application should not assume that these line devices are
capable of anything beyond what is specified by the Basic Telephony subset without
first querying their device capabilities using
lineGetDevCaps and
lineGetAddressCaps.
Applications should not invoke
lineInitialize without subsequently opening a line (at least for monitoring). If the
application is not monitoring and not using any devices, it should call
lineShutdown so that memory resources allocated by TAPI.DLL can be released if unneeded,
and TAPI.DLL itself can be unloaded from memory while not needed.
Another reason for performing a
lineShutdown is that if a user changes the device configuration (adds or removes a line or
phone), there is no way for TAPI to notify an application that has a line or
phone handle open at the time. Once a reconfiguration has taken place, causing a
LINEDEVSTATE_REINIT message to be sent, no applications can open a device
until all applications have performed a
lineShutdown. If any service provider fails to initialize properly, this function fails
and returns the error indicated by the service provider.
On all TAPI platforms,
lineInitialize is equivalent to
lineInitializeEx() using the LINEINITIALIZEEXOPTION_USEHIDDENWINDOW option.
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database