Share via


PHONE_CREATE (TSPI) (Windows Embedded CE 6.0)

1/6/2010

This message is sent to the PHONEEVENT callback function to create a new device.

Syntax

PHONE_CREATE
    htPhone = (HTAPIPHONE) 0; 
    dwMsg = (DWORD) PHONE_CREATE; 
    dwParam1 = (DWORD) hProvider; 
    dwParam2 = (DWORD) lpdwDeviceId; 
    dwParam3 = (DWORD) 0;

Parameters

  • htPhone
    Not used.
  • dwMsg
    The value PHONE_CREATE.
  • dwParam2
    Contains a pointer to a device identifier, which TAPI will fill.
  • dwParam3
    Not used.

Return Value

None.

Remarks

This message is sent to the PHONEEVENT callback entry point in TAPI. The service provider receives a pointer to this callback in the TSPI_providerEnumDevices function and in each TSPI_phoneOpen function; the PHONE_CREATE message can be sent to the PHONEEVENT callback function given to any open phone or at startup.

Devices cannot be removed dynamically. If a service provider wants to remove a phone from service, it sends a PHONE_STATE (TSPI) (PHONESTATE_DISCONNECTED) message. It can then refuse (for example, by returning PHONEERR_INVALPHONESTATE) to perform any operation with the device until it returns to service or the provider is shut down and restarted (in which case the device could be not declared in TSPI_providerEnumDevices, effectively removing it from the system).

For backward compatibility, older service providers are not expected to send this message. If they do, the message is treated in the same manner as described above for new service providers.

Requirements

Header tapi.h
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

TSPI Messages
PHONEEVENT
TSPI_phoneOpen
TSPI_providerCreatePhoneDevice
TSPI_providerEnumDevices
TSPI_providerInit
TSPI_providerShutdown
PHONE_STATE (TSPI)