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 function enables the application to set the configuration of a media-stream device on a line device to a setup previously obtained using the lineGetDevConfigor lineConfigDialogEditfunction. For example, the contents of this structure could specify data rate, character format, modulation schemes, and error control protocol settings for a datamodem media device associated with the line.

Syntax

LONG lineSetDevConfig(
  DWORD 
dwDeviceID, 
  LPVOID const 
lpDeviceConfig, 
  DWORD 
dwSize, 
  LPCTSTR 
lpszDeviceClass
);

Parameters

dwDeviceID

[in] Line device to be configured.

lpDeviceConfig

[in] Pointer to the opaque configuration data structure that was returned by the lineGetDevConfigfunction in the variable portion of the VARSTRINGstructure.

dwSize

[in] Number of bytes in the structure pointed to by lpDeviceConfig. This value is returned in the dwStringSizemember in the VARSTRINGstructure returned by lineGetDevConfig.

lpszDeviceClass

[in] Pointer to a null-terminated string that specifies the device class of the device whose configuration is to be set. Valid device class strings are the same as those specified for the lineGetIDfunction.

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_BADDEVICEID

The device id is incorrect.

LINEERR_INVALDEVICECLASS

The device class is invalid.

LINEERR_INVALLINESTATE

The line state is invalid.

LINEERR_INVALPARAM

The parameter is invalid.

LINEERR_INVALPOINTER

The pointer is invalid.

LINEERR_NODRIVER

The driver was not found.

LINEERR_NODEVICE

The device was not found.

LINEERR_NOMEM

Not enough memory is available.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_OPERATIONUNAVAIL

The operation is unavailable.

LINEERR_RESOURCEUNAVAIL

The resource is unavailable.

LINEERR_UNINITIALIZED

A parameter was uninitialized.

Remarks

Typically, an application calls the lineGetIDfunction to identify the media stream device associated with a line, and then calls lineConfigDialogEditto enable the user to change the device configuration and affect the current call or next call with those changes by passing the output of lineConfigDialogEditto lineSetDevConfig. When the user wants to call the same destination again, this lineSetDevConfigfunction can be used to restore the configuration settings selected by the user.

The exact format of the data contained within the structure is specific to the line and media stream API (device class), is undocumented, and is undefined. The application must treat it as opaque and not manipulate the contents directly. Generally, the structure can be sent using this function only to the same device from which it was obtained. Certain telephony service providers may, however, permit structures to be interchanged between identical devices (that is, multiple ports on the same multiport modem card). Such interchangeability is not guaranteed in any way, even for devices of the same device class.

Some service providers may permit the configuration to be set while a call is active, and others may not.

The lineSetDevConfigfunction returns LINEERR_OPERATIONFAILED if the protocol type, data compression and header compression values in CELLGPRSCONNECTIONINFOstructure are set CELLDEVCONFIG_GPRSPROTOCOL_UNKNOWN and CELLDEVCONFIG_GPRSCOMPRESSION_UNKNOWN.

Requirements

Header tapi.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also