Partager via


lineInitialize

This 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 TAPI.

LONG lineInitialize(
  LPHLINEAPP lphLineApp, 
  HINSTANCE hInstance, 
  LINECALLBACK lpfnCallback, 
  LPCWSTR lpszAppName, 
  LPDWORD lpdwNumDevs
);

Parameters

  • lphLineApp
    [out] Pointer to a location that is filled with the application's usage handle for TAPI.
  • hInstance
    [in] Instance handle of the client application or DLL.
  • lpfnCallback
    [in] Pointer to a callback function that is invoked to determine status and events on the line device, addresses, or calls. For more information, see lineCallbackFunc.
  • lpszAppName
    [in] Pointer to a null-terminated string that contains only displayable Unicode 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 data can be useful for call logging purposes. If lpszAppName is NULL, the application's file name is used instead.
  • lpdwNumDevs
    [out] 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

Zero indicates success. A negative error number indicates that an error occurred. The following table shows the return values for this function.

Value Description
LINEERR_INVALAPPNAME Invalid application name
LINEERR_OPERATIONFAILED The operation failed
LINEERR_INIFILECORRUPT The INI file is corrupted
LINEERR_RESOURCEUNAVAIL The resource is unavailable
LINEERR_INVALPOINTER Invalid pointer
LINEERR_REINIT The application attempted to initialize TAPI twice.
LINEERR_NODRIVER No driver was found
LINEERR_NODEVICE No device was found
LINEERR_NOMEM No memory is available
LINEERR_NOMULTIPLEINSTANCE Multiple instances were not found

Remarks

The application can refer to individual line devices by using line device identifiers 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 the lineGetDevCaps function.

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 the lineShutdown function so that memory resources allocated by Tapi.dll can be released if not needed.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Tapi.h.
Link Library: Coredll.lib.

See Also

lineCallbackFunc | lineGetDevCaps | lineShutdown | LINECALLINFO

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.