RasSetAutodialParamA function (ras.h)

The RasSetAutodialParam function sets the value of an AutoDial parameter.

Syntax

DWORD RasSetAutodialParamA(
  DWORD  ,
  LPVOID ,
  DWORD  
);

Parameters

unnamedParam1

Specifies the AutoDial parameter to set. This parameter can be one of the following values.

Value Meaning
RASADP_DisableConnectionQuery
The lpvValue parameter points to a DWORD value. If this value is zero (the default), AutoDial displays a dialog box to query the user before creating a connection. If this value is one, and the AutoDial database has the phone-book entry to dial, AutoDial creates a connection without displaying the dialog box.
RASADP_LoginSessionDisable
The lpvValue parameter points to a DWORD value. If this value is one, the system disables all AutoDial connections for the current logon session. If this value is zero (the default), AutoDial connections are enabled. The AutoDial system service changes this value to zero when a new user logs on to the workstation.
RASADP_SavedAddressesLimit
The lpvValue parameter points to a DWORD value that indicates the maximum number of addresses that AutoDial stores in the registry. AutoDial first stores addresses that it used to create an AutoDial connection; then it stores addresses that it learned after a RAS connection was created. Addresses written using the RasSetAutodialAddress function are always saved, and are not included in calculating the limit. The default value is 100.
RASADP_FailedConnectionTimeout
The lpvValue parameter points to a DWORD value that indicates a time-out value, in seconds. When an AutoDial connection attempt fails, the AutoDial system service disables subsequent attempts to reach the same address for the time-out period. This prevents AutoDial from displaying multiple connection dialog boxes for the same logical request by an application. The default value is five.
RASADP_ConnectionQueryTimeout
The lpvValue parameter points to a DWORD value that indicates a time-out value, in seconds. Before attempting an AutoDial connection, the system will display a dialog asking the user to confirm that the system should dial. The dialog has a countdown timer that terminates the dialog with a "Do not dial" selection if the user takes no action. The DWORD value pointed to by lpvValue specifies the initial time on this countdown timer.

unnamedParam2

Pointer to a buffer that contains the new value for the specified parameter.

unnamedParam3

Specifies the size, in bytes, of the value in the lpvValue buffer.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is one of the following error codes or a value from Routing and Remote Access Error Codes or Winerror.h.

Value Meaning
ERROR_INVALID_PARAMETER
The dwKey or lpvValue parameter is invalid.
ERROR_INVALID_SIZE
The size specified by the dwcbValue is invalid.

Remarks

Note

The ras.h header defines RasSetAutodialParam as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ras.h
Library Rasapi32.lib
DLL Rasapi32.dll

See also

RasGetAutodialParam

RasSetAutodialAddress

Remote Access Service (RAS) Overview

Remote Access Service Functions