다음을 통해 공유


lineSetAppPriority (Compact 2013)

3/26/2014

This function allows 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 WINAPI lineSetAppPriority(
  LPCSTR lpszAppFilename,
  DWORD dwMediaMode,
  LPLINEEXTENSIONID lpExtensionID,
  DWORD dwRequestMode,
  LPCSTR lpszExtensionName,
  DWORD dwPriority 
);

Parameters

  • lpszAppFilename
    Pointer to a string containing the application executable module file name (without directory information). In TAPI 2.0 or later, the parameter can specify a file name in either long or 8.3 file name format.
  • dwMediaMode
    Media type 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
    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
    New priority for the application. If the value zero 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 one 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 Value

Returns zero if the request succeeds or a negative error number if an error occurs. The following table shows the return values for this function.

Value

Description

LINEERR_INIFILECORRUPT

The INI file is corrupted.

LINEERR_INVALREQUESTMODE

The request mode is invalid.

LINEERR_INVALAPPNAME

The application name is invalid.

LINEERR_NOMEM

Not enough memory is available.

LINEERR_INVALMEDIAMODE

The media mode value is invalid.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_INVALPARAM

The parameter is invalid.

LINEERR_RESOURCEUNAVAIL

The resources are unavailable.

LINEERR_INVALPOINTER

The pointer is invalid.

Remarks

If LINEERR_INVALMEDIAMODE is returned, the value specified in dwMediaMode is not zero and not one of the LINEMEDIAMODE constants, 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 type.

Although this is a new function that 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.

Note

When an application is set to the highest priority by calling lineSetAppPriority with dwPriority set to 1, the phone will not ring for incoming calls while this application is running.

Requirements

Header

tapi.h

Library

TAPI32.dll

See Also

Reference

TAPI Line Device Functions
lineHandoff