lineInitialize (Windows CE 5.0)
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.
LONGlineInitialize(LPHLINEAPPlphLineApp, HINSTANCEhInstance, LINECALLBACKlpfnCallback, LPCWSTRlpszAppName, LPDWORDlpdwNumDevs);
[out] Pointer to a location that is filled with the application's usage handle for TAPI.
[in] Instance handle of the client application or DLL.
[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.
[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.
[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.
Zero indicates success. A negative error number indicates that an error occurred. The following table shows the return values for this function.
|LINEERR_INVALAPPNAME||Invalid application name|
|LINEERR_OPERATIONFAILED||The operation failed|
|LINEERR_INIFILECORRUPT||The INI file is corrupted|
|LINEERR_RESOURCEUNAVAIL||The resource is unavailable|
|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|
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.
OS Versions: Windows CE 1.0 and later.
Link Library: Coredll.lib.
Send Feedback on this topic to the authors