lineSetAppPriority  7E1FOV 

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 API versions 0x00020000 and greater, 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 may be one of the LINEMEDIAMODE_ constants; only a single bit may be on. The value 0 should be used to set the application priority for Assisted Telephony requests.

lpExtensionID

A pointer to structure of type LINEEXTENSIONID1YD1HF. This parameter is ignored.

dwRequestMode

If the dwMediaMode parameter is 0, 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 non-zero.

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 is successful or a negative error number if an error has occurred. 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 0 and not a LINEMEDIAMODE_ constant, or more than one bit is on in the parameter value.

This function updates to stored priority list. If the telephony system is initialized, it also sets the current, active priorities for applications then running; the new priority will be 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 will work the same way for all applications.

See Also

LINEEXTENSIONID, lineHandoff