This function returns an opaque data structure object, the contents of which are specific to the line, service provider, and device class. The data structure object stores the current configuration of a media-stream device associated with the line device.
At a Glance
Header file: | Tapi.h |
Windows CE versions: | 1.0 and later |
Syntax
LONG lineGetDevConfig (DWORD dwDeviceID,
LPVARSTRING lpDeviceConfig, LPCTSTR lpszDeviceClass);
Parameters
dwDeviceID
[in] Specifies the line device to be configured.
lpDeviceConfig
[out] Pointer to the memory location of type VARSTRING where the device configuration structure is returned. Upon successful completion of the request, this location is filled with the device configuration. The dwStringFormat member in the VARSTRING structure is set to STRINGFORMAT_BINARY. Prior to calling lineGetDevConfig, the application should set the dwTotalSize member of this structure to indicate the amount of memory available to TAPI for returning data.
lpszDeviceClass
[out] Pointer to a null-terminated string that specifies the device class of the device whose configuration is requested. Valid device class lineGetID strings are the same as those specified for the function.
Return Values
Zero indicates success. A negative error number indicates that an error occurred. Possible error values are as follows:
LINEERR_BADDEVICEID | LINEERR_OPERATIONFAILED |
LINEERR_INVALDEVICECLASS | LINEERR_OPERATIONUNAVAIL |
LINEERR_INVALPOINTER | LINEERR_RESOURCEUNAVAIL |
LINEERR_NODEVICE | LINEERR_STRUCTURETOOSMALL |
LINEERR_NODRIVER | LINEERR_UNINITIALIZED |
LINEERR_NOMEM |
Remarks
For Windows CE, lineGetDevConfig always returns a default configuration for a device. There are two advantages to this behavior. First, if a user chooses the default settings, then an application does not need to store the associated configuration (for example in a connectoid). Second, the lineConfigDialogEdit dialog can be easily made to always come up in the same state.
Call states are device specific.
The lineGetDevConfig function can be used to retrieve a data structure from TAPI that specifies the configuration of a media stream device associated with a particular line device. 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.
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 structure returned by this function cannot be directly accessed or manipulated by the application, but can only be stored intact and later used in lineSetDevConfig to restore the settings. The structure also cannot necessarily be passed to other devices, even of the same device class (although this can work in some instances, it is not guaranteed). An application can use lineConfigDialogEdit to manipulate the configuration.
See Also