Export (0) Print
Expand All

lineInitialize (Windows CE 5.0)

Windows CE 5.0
Send Feedback

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.

ValueDescription
LINEERR_INVALAPPNAMEInvalid application name
LINEERR_OPERATIONFAILEDThe operation failed
LINEERR_INIFILECORRUPTThe INI file is corrupted
LINEERR_RESOURCEUNAVAILThe resource is unavailable
LINEERR_INVALPOINTERInvalid pointer
LINEERR_REINITThe application attempted to initialize TAPI twice.
LINEERR_NODRIVERNo driver was found
LINEERR_NODEVICENo device was found
LINEERR_NOMEMNo memory is available
LINEERR_NOMULTIPLEINSTANCEMultiple 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


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft