Compartilhar via


TSPI_providerEnumDevices (Windows CE 5.0)

Send Feedback

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.

LONG TSPIAPI TSPI_providerEnumDevices(DWORDdwPermanentProviderID,LPDWORDlpdwNumLines,LPDWORDlpdwNumPhones,HPROVIDERhProvider,LINEEVENTlpfnLineCreateProc,PHONEEVENTlpfnPhoneCreateProc);

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 Values

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

OS Versions: Windows CE 3.0 and later.
Header: Tapicomn.h.
Link Library: Coredll.lib.

See Also

LINE_CREATE | LINEEVENT | PHONEEVENT | TSPI_providerInit

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.