TSPI_phoneGetStatus

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function queries the specified open phone device for its overall status.

Syntax

LONG TSPIAPI TSPI_phoneGetStatus(
  HDRVPHONE hdPhone, 
  LPPHONESTATUS lpPhoneStatus 
);

Parameters

  • hdPhone
    Handle to the phone to be queried.
  • lpPhoneStatus
    Pointer to a variably sized data structure of type PHONESTATUS, into which the service provider writes information about the phone's status. Prior to calling TSPI_phoneGetStatus, the application sets the dwTotalSize member of this structure to indicate the amount of memory available to TAPI for returning information.

Return Value

Returns zero if the function succeeds, or an error number if an error occurs. The following table shows the return values for this method.

Value Description

PHONEERR_INVALPHONEHANDLE

The handle to the phone is invalid.

PHONEERR_OPERATIONFAILED

The operation failed.

PHONEERR_NOMEM

Not enough memory is available.

PHONEERR_OPERATIONUNAVAIL

The operation is unavailable.

PHONEERR_RESOURCEUNAVAIL

The resource is unavailable.

Remarks

The following table indicates which members of the PHONESTATUS data structure are filled in by TAPI and which members are filled in by the service provider. The service provider must not overwrite the values filled in by TAPI.

Member name TAPI Service provider

dwTotalSize

X

 

dwNeededSize

 

X

dwUsedSize

 

X

dwStatusFlags

 

X

dwNumOwners

X

 

dwNumMonitors

X

 

dwRingMode

 

X

dwRingVolume

 

X

dwHandsetHookSwitchMode

 

X

dwHandsetVolume

 

X

dwHandsetGain

 

X

dwSpeakerHookSwitchMode

 

X

dwSpeakerVolume

 

X

dwSpeakerGain

 

X

dwHeadsetHookSwitchMode

 

X

dwHeadsetVolume

 

X

dwHeadsetGain

 

X

dwDisplaySize

 

X

dwDisplayOffset

 

X

dwLampModesSize

 

X

dwLampModesOffset

 

X

dwOwnerNameSize

X

 

dwOwnerNameOffset

X

 

dwDevSpecificSize

 

X

dwDevSpecificOffset

 

X

TAPI can use this function to determine the current state of an open phone device. The status information describes information about the phone device's hookswitch devices, ringer, volume, display, and lamps of the open phone.

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