Platform SDK: TAPI

PHONEBUTTONINFO

The PHONEBUTTONINFO structure contains information about a button on a phone device. This structure is used by multiple TAPI and TSPI functions.

typedef struct phonebuttoninfo_tag {
  DWORD  dwTotalSize;
  DWORD  dwNeededSize;
  DWORD  dwUsedSize;
  DWORD  dwButtonMode;
  DWORD  dwButtonFunction;
  DWORD  dwButtonTextSize;
  DWORD  dwButtonTextOffset;
  DWORD  dwDevSpecificSize;
  DWORD  dwDevSpecificOffset;
  DWORD  dwButtonState;
} PHONEBUTTONINFO, FAR *LPPHONEBUTTONINFO; 

Members

dwTotalSize
The total size, in bytes, allocated to this data structure.
dwNeededSize
The size, in bytes, for this data structure that is needed to hold all the returned information.
dwUsedSize
The size, in bytes, of the portion of this data structure that contains useful information.
dwButtonMode
The mode or general usage class of the button. This member uses one of the PHONEBUTTONMODE_ Constants.
dwButtonFunction
The function assigned to the button. This member uses one of the PHONEBUTTONFUNCTION_ Constants.
dwButtonTextSize
dwButtonTextOffset
The size, in bytes, of the variably sized field containing descriptive text for this button, and the offset, in bytes, from the beginning of this data structure. The format of this information is as specified in the dwStringFormat member of the phone's device capabilities.
dwDevSpecificSize
dwDevSpecificOffset
The size, in bytes, of the variably sized device-specific field, and the offset, in bytes, from the beginning of this data structure.
dwButtonState
For the phoneGetButtonInfo function, this field indicates the current state of the button, using the PHONEBUTTONSTATE_ Constants. This field is ignored by the phoneSetButtonInfo function.

Remarks

Device-specific extensions should use the DevSpecific (dwDevSpecificSize and dwDevSpecificOffset) variably sized area of this data structure.

Older applications are compiled without this field in the PHONEBUTTONINFO structure, and using a SIZEOF PHONEBUTTONINFO smaller than the new size. The application passes in a dwAPIVersion parameter with the phoneOpen function, which can be used for guidance by TAPI in handling this situation. If the application passes in a dwTotalSize less than the size of the fixed portion of the structure as defined in the specified dwAPIVersion, PHONEERR_STRUCTURETOOSMALL is returned. If sufficient memory has been allocated by the application, before calling the TSPI_phoneGetButtonInfo function, TAPI sets the dwNeededSize and dwUsedSize members to the fixed size of the structure as it existed in the specified API version.

New service providers (which support the new API version) must examine the API version passed in. If the API version is less than the highest version supported by the provider, the service provider must not fill in fields not supported in older API versions, as these would fall in the variable portion of the older structure.

New applications must be cognizant of the API version negotiated, and not examine the contents of fields in the fixed portion beyond the original end of the fixed portion of the structure for the negotiated API version.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 95 or later.
  Version: Requires TAPI 1.4 or later.
  Header: Declared in Tapi.h.

See Also

phoneGetButtonInfo, phoneSetButtonInfo, TSPI_phoneGetButtonInfo, TSPI_phoneSetButtonInfo, phoneOpen