The lineSetDevConfig function allows the application to restore the configuration of a media stream device on a line device to a setup previously obtained using lineGetDevConfig. 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,
LPCSTR lpszDeviceClass
);
Returns zero if the function succeeds or a negative error number if an error occurs. Possible return values are:
LINEERR_BADDEVICEID, LINEERR_NODRIVER, LINEERR_INVALDEVICECLASS, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALPOINTER, LINEERR_OPERATIONFAILED, LINEERR_INVALPARAM, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALLINESTATE, LINEERR_UNINITIALIZED, LINEERR_NOMEM, LINEERR_NODEVICE.
Call states are device specific.
Typically, an application calls lineGetID to identify the media stream device associated with a line, and then calls lineConfigDialog to allow the user to set up the device configuration. It could then call lineGetDevConfig and save the configuration information in a phone book or other database associated with a particular call destination. 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 lineSetDevConfig, lineConfigDialog, and lineGetDevConfig functions can be used, in that order, to allow the user to view and update the settings.
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.
Version: Use TAPI version 1.4 and later.
Header: Declared in tapi.h.
Import Library: Link with tapi32.lib.
TAPI Reference Overview, Basic Telephony Services Reference, lineConfigDialog, lineGetDevConfig, lineGetID, VARSTRING