Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function is called by TAPI before the TSPI_providerInitfunction 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 LINEEVENTcallback procedure supplied by TAPI. The service provider uses this function to send LINE_CREATEmessages when a new line device needs to be created.
- lpfnPhoneCreateProc
-
Pointer to the PHONEEVENTcallback procedure supplied by TAPI. The service provider uses this function to send PHONE_CREATEmessages 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_providerInitprocedure. 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 |
Windows Mobile | Windows Mobile Version 5.0 and later |