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. |
This function changes the call's media as stored in the call's LINECALLINFOstructure.
Syntax
LONG TSPIAPI TSPI_lineSetMediaMode( HDRVCALL hdCall, DWORD dwMediaMode ); |
Parameters
- hdCall
-
Handle to the call undergoing a change in media type. The call state of hdCallcan be any state.
- dwMediaMode
-
New media types for the call. As long as the LINEMEDIAMODE_UNKNOWN media type flag is set, multiple other media type flags can be set as well. This is used to identify a call's media type as not fully determined, but narrowed down to one of just a small set of specified media types. If the LINEMEDIAMODE_UNKNOWN flag is not set, only a single media type can be specified. This parameter uses one (or more) 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_INVALCALLHANDLE |
The handle to the call is invalid. |
LINEERR_OPERATIONUNAVAIL |
The operation is unavailable. |
LINEERR_INVALMEDIAMODE |
The media mode is invalid. |
LINEERR_OPERATIONFAILED |
The operation failed. |
LINEERR_NOMEM |
Not enough memory is available. |
LINEERR_RESOURCEUNAVAIL |
The resource is unavailable. |
Remarks
Other than changing the call's media as stored in the call's LINECALLINFOstructure, this procedure is simply advisory in the sense that it indicates an expected media change that is about to occur, rather than forcing a specific change to the call. Typical usage is to set a call's media type to a specific known media type, or to exclude possible media types as long as the call's media type is not fully known (the UNKNOWN media type flag is set).
TAPI makes the following guarantees regarding the passed media type: (1) there is at least one bit set, (2) there are no reserved bits set, and (3) if more than one bit is set, "Unknown" is also 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.
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 |