Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This procedure tells the service provider the new set of media types to detect for the indicated line (replacing any previous set). It also sets the initial set of media types that should be monitored for on subsequent calls (inbound or outbound) on this line.

Syntax

LONG TSPIAPI TSPI_lineSetDefaultMediaDetection(
  HDRVLINE 
hdLine, 
  DWORD 
dwMediaModes 
);

Parameters

hdLine

Handle to the line to have media monitoring set.

dwMediaModes

Media types of interest to TAPI. This parameter uses one of the LINEMEDIAMODEconstants.

Return Value

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

Value Description

LINEERR_INVALLINEHANDLE

The handle to the line is invalid.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_INVALMEDIAMODE

The media mode is invalid.

LINEERR_RESOURCEUNAVAIL

The resource is unavailable.

LINEERR_NOMEM

Not enough memory is available.

LINEERR_NODRIVER

The driver cannot be found.

LINEERR_OPERATIONUNAVAIL

 

Remarks

TAPI typically calls this function to update the set of detected media types for the line to the union of all modes selected by all outstanding lineOpens whenever a line is Opened or Closed at the TAPI level. A lineOpenfunction call attempt is rejected if media detection is rejected. A single call to this procedure is typically the result of a lineOpencall that does not specify the device identifier LINEMAPPER. The device identifier LINEMAPPER is never used at the TSPI level.

TAPI must compute the union of media types desired by all clients and pass the result to this function. The service provider uses the set passed to this function by TAPI. TAPI ensures that the dwMediaModesparameter has at least one bit set and that no reserved bits are set. The service provider must perform any further validity checks on the media types, such as checking whether any media types are indeed supported by the service provider. The union of all media types can be the value zero if the applications that have the line open are all either monitors or not interested in handling incoming calls.

There is no directly corresponding function at the TAPI level. This procedure corresponds to the "request media types" implied for the specific line by the lineOpenprocedure when it is called with the specific device identifier (other than LINEMAPPER).

Requirements

Header tapicomn.h
Library coredll.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

TSPI_lineClose