Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function causes the provider of the specified line device to display a dialog box — attached to the hwndOwnerparameter of the application — to enable the user to configure parameters related to the line device.
Syntax
LONG lineConfigDialogEdit( DWORD dwDeviceID, HWND hwndOwner, LPCWSTR lpszDeviceClass, LPVOID const lpDeviceConfigIn, DWORD dwSize, LPVARSTRING lpDeviceConfigOut ); |
Parameters
- dwDeviceID
-
[in] Identifier of the line device to be configured.
- hwndOwner
-
[in] Handle to a window to which the dialog box is attached. Can be NULL to indicate that any window created during the function should have no owner window.
- lpszDeviceClass
-
[in] Pointer to a null-terminated string that identifies a device class name. This device class enables the application to select specific configuration data applicable to that device class. This parameter is optional and can be left NULL, in which case the highest level configuration is selected. If an empty string is specified, the function fails and returns LINEERR_INVALDEVICECLASS.
- lpDeviceConfigIn
-
[in] Pointer to the opaque configuration data structure returned by the lineGetDevConfigfunction, or a previous invocation of the lineConfigDialogEditfunction, in the variable portion of the VARSTRINGstructure.
- dwSize
-
[in] Value that specifies the number of bytes in the structure pointed to by lpDeviceConfigIn. This value is returned in the dwStringSizemember in the VARSTRINGstructure returned by lineGetDevConfigor a previous invocation of lineConfigDialogEdit.
- lpDeviceConfigOut
-
[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 dwStringFormatmember in the VARSTRINGstructure is set to STRINGFORMAT_BINARY. Prior to calling lineGetDevConfig, or a future call to lineConfigDialogEdit, the application should set the dwTotalSizemember of this structure to indicate the amount of memory available to TAPI for returning data.
Return Value
Zero indicates success. A negative error number indicates that an error occurred. The following table shows the return values for this function.
Value | Description |
---|---|
LINEERR_BADDEVICEID |
Bad device id provided |
LINEERR_INVALDEVICECLASS |
Invalid device class |
LINEERR_INVALPARAM |
Invalid parameter provided |
LINEERR_INVALPOINTER |
Invalid pointer |
LINEERR_NODEVICE |
No device was found |
LINEERR_NODRIVER |
No driver was found |
LINEERR_NOMEM |
Not enough memory |
LINEERR_OPERATIONFAILED |
The operation failed |
LINEERR_OPERATIONUNAVAIL |
The operation is unavailable |
LINEERR_RESOURCEUNAVAIL |
The resource is unavailable |
LINEERR_STRUCTURETOOSMALL |
The structure is too small for the configuration |
LINEERR_UNINITIALIZED |
The parameter is uninitialized |
Remarks
If LINEERR_STRUCTURETOOSMALL is returned, the dwTotalSizemember of the VARSTRINGstructure pointed to by lpDeviceConfigOutdoes not specify enough memory to contain the entire configuration structure. The dwNeededSizemember has been set to the amount required. To the extent that user entries were reflected in data that could not be returned due to insufficient space, those edits are lost; an application should therefore allocate the maximum amount of memory needed by the device class to return its configuration structure.
The lineConfigDialogEditfunction causes the service provider to display a modal dialog box, attached to hwndOwnerof the application, to enable the user to configure parameters related to the line specified by dwDeviceID.
The lpszDeviceClassparameter enables the application to select a specific subscreen of configuration data applicable to the device class in which the user is interested; the permitted strings are the same as for lineGetID.
The lpszDeviceClassparameter would be tapi/line or NULL to cause the provider to display the highest level configuration for the line.
With lineConfigDialogEdit, the parameters to edit are passed 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, lineConfigDialogEditpermits 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 the lineSetDevConfigfunction to affect the next call.
Requirements
Header | tapi.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 1.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |