lineSetAppPriority

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

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

Parameters

lpszAppFilename
A pointer to a string containing the application executable module filename (without directory information). In TAPI version 2.0 or later, the parameter can specify a filename in either long or 8.3 filename format.
dwMediaMode
The media mode for which the priority of the application is to be set. The value can be one of the LINEMEDIAMODE_ constants; only a single bit may be on. 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
If the dwMediaMode parameter is zero, this parameter specifies the Assisted Telephony request mode for which priority is to be set. It must be either LINEREQUESTMODE_MAKECALL or LINEREQUESTMODE_MEDIACALL. This parameter is ignored if dwMediaMode is nonzero.
lpszExtensionName
This parameter is ignored.
dwPriority
The 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 already not 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 (and removed from a lower-priority position, if it was already in the list). Any other value generates an error.

Return Values

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 a LINEMEDIAMODE_ constant, or more than one bit is on in the parameter value.

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

Although this is a new function which older applications would not be expected to call, for backward compatibility they should not be prevented from doing so. The function works the same way for all applications.

QuickInfo

  Version: Use TAPI version 1.4 and later.
  Header: Declared in tapi.h.
  Import Library: Link with tapi32.lib.

See Also

TAPI Reference Overview, Supplementary Line Services Functions, LINEEXTENSIONID, lineHandoff