lineSetAppPriorityA function (tapi.h)

The lineSetAppPriority function enables an application to set its priority in the handoff priority list for a particular media type or Assisted Telephony request mode, or to remove itself from the priority list.

Syntax

LONG lineSetAppPriorityA(
  LPCSTR            lpszAppFilename,
  DWORD             dwMediaMode,
  LPLINEEXTENSIONID lpExtensionID,
  DWORD             dwRequestMode,
  LPCSTR            lpszExtensionName,
  DWORD             dwPriority
);

Parameters

lpszAppFilename

A pointer to a string that contains the application executable module filename, without the directory data. In TAPI version 2.0 or later, the parameter can specify a filename in either long or 8.3 filename format.

dwMediaMode

A media type for which the priority of the application is to be set. The value can be one or more of the LINEMEDIAMODE constants. The value zero should be used to set the application priority for Assisted Telephony requests.

lpExtensionID

A pointer to a structure of type LINEEXTENSIONID. This parameter is ignored.

dwRequestMode

The conditions for this parameter are, if the dwMediaMode parameter is zero, this parameter specifies the Assisted Telephony request mode for which priority is to be set. It must be LINEREQUESTMODE_MAKECALL. This parameter is ignored if dwMediaMode is nonzero.

lpszExtensionName

This parameter is ignored.

dwPriority

A parameter that indicates a new priority for the application. If the value 0 is passed, the application is removed from the priority list for the specified media or request mode; if it was not already present, no error is generated. If the value 1 is passed, the application is inserted as the highest-priority application for the media or request mode; it is removed from a lower-priority position, if already in the list. Any other value generates an error.

Return value

Returns zero if the request succeeds or a negative error number if an error occurs. Possible return values are:

LINEERR_INIFILECORRUPT, LINEERR_INVALREQUESTMODE, LINEERR_INVALAPPNAME, LINEERR_NOMEM, LINEERR_INVALMEDIAMODE, LINEERR_OPERATIONFAILED, LINEERR_INVALPARAM, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALPOINTER.

Remarks

If LINEERR_INVALMEDIAMODE is returned, the value specified in dwMediaMode is not zero and not one of the LINEMEDIAMODE_ Constants.

This function updates the stored priority list. If the telephony system is initialized, it also sets the current, active priorities for applications then running; the new priority is used on the next incoming call or lineHandoff based on media type.

The Priorities set with lineSetAppPriority will persist across restarts of the system or restarts of tapisrv. The lineOpen function opens the line with no specified call priorities. By default, the highest priority application will be the one that first called lineOpen.

Note

The tapi.h header defines lineSetAppPriority as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

   
Target Platform Windows
Header tapi.h
Library Tapi32.lib
DLL Tapi32.dll

See also

LINEEXTENSIONID

Supplementary Line Service Functions

TAPI 2.2 Reference Overview

lineHandoff