lineGetDevConfig

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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.


LONG WINAPI lineGetDevConfig(
  DWORD dwDeviceID,
  LPVARSTRING lpDeviceConfig,
  LPCSTR lpszDeviceClass 
);

dwDeviceID

Line device to be configured.

lpDeviceConfig

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 information.

lpszDeviceClass

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.

Returns zero if the function succeeds or a negative error number if an error occurs. The following table shows the return values for this function.

Value Description

LINEERR_BADDEVICEID

The device identifier is incorrect.

LINEERR_NODRIVER

The driver was not found.

LINEERR_INVALDEVICECLASS

The device class is invalid.

LINEERR_OPERATIONUNAVAIL

The operation is unavailable.

LINEERR_INVALPOINTER

The pointer is invalid.

LINEERR_RESOURCEUNAVAIL

The resources are unavailable.

LINEERR_STRUCTURETOOSMALL

The structure is too small.

LINEERR_OPERATIONFAILED

The operation failed.

LINEERR_NOMEM

Not enough memory is available.

LINEERR_UNINITIALIZED

A parameter is uninitialized.

LINEERR_NODEVICE

The device was not found.

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.

Typically, an application calls lineGetID to identify the media stream device associated with a line, and then calls the lineConfigDialog function 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 later wishes to call the same destination again, the lineSetDevConfig function can be used to restore the configuration settings selected by the user. The functions lineSetDevConfig, lineConfigDialog, and lineGetDevConfig 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 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).

In Windows Embedded CE, the lineGetDevConfig function for a unimodem line device returns the default DevConfig. This saves memory space. If the DevConfig in use is the same as the default, it does not need to be stored.

Aa917568.note(en-us,MSDN.10).gifNote:
This function is for TAPI version 2.0 and later.

Headertapi.h
Librarycoredll.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show: