Platform SDK: TAPI

TUISPI_lineConfigDialogEdit

The TUISPI_lineConfigDialogEdit function causes the provider of the specified line device to display a modal dialog box as a child window of hwndOwner to allow the user to configure parameters related to the line device. This function makes the TSPI_lineConfigDialogEdit function obsolete in version 2.0 and later (supported in version 1.4 and earlier).

Implementation is optional.

LONG TSPIAPI TUISPI_lineConfigDialogEdit(
  TUISPIDLLCALLBACK lpfnUIDLLCallback,  
  DWORD dwDeviceID,                     
  HWND hwndOwner,                       
  LPCWSTR lpszDeviceClass,              
  LPVOID const lpDeviceConfigIn,        
  DWORD dwSize,                         
  LPVARSTRING lpDeviceConfigOut         
);

Parameters

lpfnUIDLLCallback
Pointer to a function the UI DLL can call to communicate with the service provider DLL to obtain information needed to display the dialog box.
dwDeviceID
The line device to be configured.
hwndOwner
A handle to a window to which the dialog box is to be attached.
lpszDeviceClass
A pointer to a null-terminated Unicode string that identifies a device class name. This device class allows the caller to select a specific subscreen of configuration information applicable to that device class. If this parameter is NULL or points to an empty string, the highest level configuration is selected. The permitted strings are the same as for TSPI_lineGetID.
lpDeviceConfigIn
A pointer to the opaque configuration data structure that was returned by TSPI_lineGetDevConfig (or a previous invocation of TUISPI_lineConfigDialogEdit) in the variable portion of the VARSTRING structure.
dwSize
The number of bytes in the structure pointed to by lpDeviceConfigIn. This value is returned in the dwStringSize member in the VARSTRING structure returned by TSPI_lineGetDevConfig or a previous invocation of TUISPI_lineConfigDialogEdit.
lpDeviceConfigOut
A 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 (or a future invocation of lineConfigDialogEdit), the application should set the dwTotalSize member of this structure to indicate the amount of memory available to TAPI for returning information.

Return Values

Returns zero if the request succeeds or an error number if an error occurs. Possible return values are:

LINEERR_INVALDEVICECLASS, LINEERR_OPERATIONFAILED, LINEERR_INVALPARAM, LINEERR_RESOURCEUNAVAIL, LINEERR_NODRIVER, LINEERR_OPERATIONUNAVAIL, LINEERR_NOMEM.

Remarks

The lpszDeviceClass parameter selects a specific subscreen of configuration information applicable to the device class in which the user is interested; the permitted strings are the same as for TSPI_lineGetID. For example, if the line supports the Comm API, passing comm/datamodem as lpszDeviceClass causes the provider to display the parameters related specifically to Comm (or, at least, start at the corresponding point in a multilevel configuration dialog box chain, so the user doesn't have to "dig" to find the parameters of interest).

The lpszDeviceClass parameter is "tapi/line" , "", or NULL to cause the provider to display the highest level configuration for the line.

The difference between this function and TUISPI_lineConfigDialog is the source of the parameters to edit and the result of the editing. In TUISPI_lineConfigDialog, the parameters edited are those currently in use on the device (or set for use on the next call), and any changes made have (to the maximum extent possible) an immediate impact on any active connection; also, the application must use lineGetDevConfig to fetch the result of parameter changes from TUISPI_lineConfigDialog. With TUISPI_lineConfigDialogEdit, the parameters to edit are passed in from the application, and the results are returned to the application, with no impact on active connections; the results of the editing are returned with this function, and the application does not need to call lineGetDevConfig. Thus, TUISPI_lineConfigDialogEdit permits an application to provide the ability for the user to set up parameters for future calls without having an impact on any active call. However, the output of this function can be passed to TSPI_lineSetDevConfig to affect the current call or next call.

For backward compatibility, this function is not exported by older service providers. TAPI detects this condition and reports LINEERR_OPERATIONUNAVAIL if an application attempts to call this function on an older provider.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 95 or later.
  Version: Requires TAPI 2.0 or later.
  Header: Declared in Tspi.h.

See Also

TSPI_lineGetDevConfig, TSPI_lineGetID, TSPI_lineSetDevConfig, TUISPI_lineConfigDialog, VARSTRING