Platform SDK: TAPI |
The lineAddProvider function installs a new telephony service provider into the telephony system.
LONG WINAPI lineAddProvider( LPCSTR lpszProviderFilename, HWND hwndOwner, LPDWORD lpdwPermanentProviderID );
Returns zero if the request succeeds or a negative error number if an error occurs. Possible return values are:
LINEERR_INIFILECORRUPT, LINEERR_NOMEM, LINEERR_INVALPARAM, LINEERR_NOMULTIPLEINSTANCE, LINEERR_INVALPOINTER, LINEERR_OPERATIONFAILED.
During this function call, TAPI checks to ensure that it can access the service provider by calling its TSPI_providerInstall function; if this is unsuccessful (if the DLL or function cannot be found, or if TSPI_providerInstall returns an error), the function fails and the provider is not added to the telephony system. If this succeeds, and the Win32 Telephony system is active (one or more applications have called lineInitialize or lineInitializeEx), TAPI does not attempt to launch the newly-added service provider. Instead, in order to activate the new service provider, TAPI issues a message to restart Windows. When the activation succeeds, applications are informed of any new devices created by way of LINE_CREATE or PHONE_CREATE messages, or by a LINE_LINEDEVSTATE message requesting reinitialization (if the application does not support the CREATE messages).
This function copies no files—not the service provider DLL itself nor any supporting files; the application managing the addition of the provider must ensure that the provider is installed in a directory where it can be found by TAPI (for example, \WINDOWS, \WINDOWS\SYSTEM, or elsewhere on the path).
Although this is a new function that older applications would not be expected to call, for backward compatibility they should not be prevented from doing so; the function works the same way for all applications.
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later.
Version: Requires TAPI 1.4 or later.
Header: Declared in Tapi.h.
Library: Use Tapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on all platforms.
TAPI 2.2 Reference Overview, Supplementary Line Service Functions, LINE_CREATE, LINE_LINEDEVSTATE, lineInitialize, lineInitializeEx, PHONE_CREATE