다음을 통해 공유


lineSetNumRings (Compact 2013)

3/26/2014

This function sets the number of rings that must occur before an incoming call is answered. This function can be used to implement a toll-saver-style function. It allows multiple independent applications to each register the number of rings. The function lineSetNumRings returns the minimum number of rings requested. It can be used by the application that answers incoming calls to determine the number of rings it should wait before answering the call.

Syntax

LONG WINAPI lineSetNumRings(
  HLINE hLine, 
  DWORD dwAddressID, 
  DWORD dwNumRings
);

Parameters

  • hLine
    Handle to the open line device.
  • dwAddressID
    Address on the line device. An address identifier is permanently associated with an address; the identifier remains constant across operating system upgrades.
  • dwNumRings
    Number of rings before a call should be answered in order to honor the toll-saver requests from all applications.

Return Value

Zero indicates success. A negative error number indicates that an error occurred. The following table shows the return values for this function.

Value

Description

LINEERR_INVALLINEHANDLE

The line handle is invalid.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_INVALADDRESSID

The address id is invalid.

LINEERR_UNINITIALIZED

The parameter is uninitialized.

LINEERR_NOMEM

Not enough memory is available.

LINEERR_RESOURCEUNAVAIL

The resource is unavailable.

Remarks

The lineGetNumRings and lineSetNumRings functions, when used in combination, provide a mechanism to support the implementation of toll-saver features across multiple independent applications. If no application ever calls lineSetNumRings, lineGetNumRings returns 0xFFFFFFFF.

If call classification is performed by TAPI by means of answering incoming calls of unknown media type and filtering the media stream, TAPI honors this number as well.

Note

This operation is purely informational and does not affect the state of any calls on the line device.

Requirements

Header

tapi.h

Library

TAPI32.dll

See Also

Reference

TAPI Line Device Functions
lineGetNumRings
LINE_CALLSTATE (TAPI)
LINE_LINEDEVSTATE (TAPI)