TSPI_providerEnumDevices (Windows Embedded CE 6.0)
1/6/2010
This function is called by TAPI before the TSPI_providerInit function to determine the number of line and phone devices supported by the service provider.
Syntax
LONG TSPIAPI TSPI_providerEnumDevices(
DWORD dwPermanentProviderID,
LPDWORD lpdwNumLines,
LPDWORD lpdwNumPhones,
HPROVIDER hProvider,
LINEEVENT lpfnLineCreateProc,
PHONEEVENT lpfnPhoneCreateProc
);
Parameters
- dwPermanentProviderID
Permanent identifier, unique within the service providers on this system, of the service provider being initialized.
- lpdwNumLines
Pointer to a DWORD-sized memory location into which the service provider must write the number of line devices it is configured to support. TAPI initializes the value to zero, so if the service provider fails to write a different value, the value zero is assumed.
- lpdwNumPhones
Pointer to a DWORD-sized memory location into which the service provider must write the number of phone devices it is configured to support. TAPI initializes the value to zero, so if the service provider fails to write a different value, the value zero is assumed.
- hProvider
Opaque DWORD-sized value that uniquely identifies this instance of this service provider during this execution of the Win32 Telephony environment.
- lpfnLineCreateProc
Pointer to the LINEEVENT callback procedure supplied by TAPI. The service provider uses this function to send LINE_CREATE messages when a new line device needs to be created.
- lpfnPhoneCreateProc
Pointer to the PHONEEVENT callback procedure supplied by TAPI. The service provider uses this function to send PHONE_CREATE messages when a new phone device needs to be created.
Return Value
Returns zero if the request succeeds or an error number if an error occurs. Possible return values include LINEERR_NOMEM and LINEERR_OPERATIONFAILED.
Remarks
In previous versions of TAPI, implementation of this function was optional. Beginning with TAPI 2.0, implementation of this function is mandatory in all service providers. TAPI no longer checks Telephon.ini or the Registry at TAPI startup to determine the initial number of lines and phones supported by a service provider.
A new device can appear prior to the completion of the TSPI_providerInit procedure. TAPI handles properly any _CREATE messages during the provider initialization.
Requirements
Header | tapicomn.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 3.0 and later |
See Also
Reference
TSPI Service Provider Functions
LINE_CREATE (TAPI)
LINEEVENT
PHONEEVENT
TSPI_providerInit