Share via


TSPI_lineGetIcon (Compact 2013)

3/26/2014

This function retrieves a device-specific icon for a service line to display to the user.

Syntax

LONG TSPIAPI TSPI_lineGetIcon(
  DWORD dwDeviceID, 
  LPCWSTR lpszDeviceClass,  
  LPHICON lphIcon 
);

Parameters

  • dwDeviceID
    Line device whose icon is requested.
  • lpszDeviceClass
    Pointer to a null-terminated Unicode string that identifies a device class name. This device class allows the caller to select an icon specific to that device class. This parameter is optional and can be left NULL, in which case the highest level icon associated with the line device rather than a specified media stream device is selected.

    Permitted strings are the same as for the TSPI_lineGetID function.

  • lphIcon
    Pointer to a memory location in which the handle to the icon is returned.

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 function.

Value

Description

LINEERR_INVALDEVICECLASS

The device class is invalid.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_NOMEM

Not enough memory is available.

LINEERR_RESOURCEUNAVAIL

The resource is unavailable.

LINEERR_OPERATIONUNAVAIL

The operation is unavailable.

Remarks

The provider should return a handle (in the DWORD pointed to by lphIcon) to an icon resource (obtained from the Microsoft® Win32® LoadIcon function) associated with the specified line.

A provider may choose to support many icons (selected by lpszDeviceClass and/or line number), a single icon (such as for the manufacturer, which would be returned for all TSPI_lineGetIcon requests regardless of the lpszDeviceClass selected), or no icons, in which case it sets the DWORD pointed to by lphIcon to NULL. TAPI examines the handle returned by the provider, and if the provider returns NULL, TAPI substitutes a generic Win32 Telephony icon (the generic "line" icon).

Requirements

Header

tspi.h

Library

CellTSP.dll

See Also

Reference

TSPI Line Device Functions
TSPI_lineGetID