Share via


lineSetDevConfig

This function enables the application to restore the configuration of a media-stream device on a line device to a setup previously obtained using the lineGetDevConfig function. 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.

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

Parameters

  • dwDeviceID
    [in] Specifies the line device to be configured.
  • lpDeviceConfig
    [in] Pointer to the opaque configuration data structure that was returned by lineGetDevConfig in the variable portion of the VARSTRING structure.
  • dwSize
    [in] Specifies the number of bytes in the structure pointed to by lpDeviceConfig. This value is returned in the dwStringSize member in the VARSTRING structure 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 lineGetID function.

Return Values

Zero indicates success. A negative error number indicates that an error occurred. Possible error values are as follows:

LINEERR_BADDEVICEID LINEERR_NODEVICE
LINEERR_NODRIVER LINEERR_NOMEM
LINEERR_INVALDEVICECLASS LINEERR_OPERATIONFAILED
LINEERR_INVALLINESTATE LINEERR_OPERATIONUNAVAIL
LINEERR_INVALPARAM LINEERR_RESOURCEUNAVAIL
LINEERR_INVALPOINTER LINEERR_UNINITIALIZED

Remarks

Call states are device specific.

Typically, an application calls lineGetID to identify the media stream device associated with a line, and then calls lineConfigDialogEdit to enable the user to change the device configuration and affect the current call or next call with those changes by passing the output of lineConfigDialogEdit to lineSetDevConfig. When the user wants to call the same destination again, this lineSetDevConfig function 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.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Tapi.h   Coredll.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

lineGetDevConfig, lineGetID, lineConfigDialogEdit, VARSTRING

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.