The RasSetAutodialAddress function can add an address to the AutoDial mapping database. Alternatively, the function can delete or modify the data associated with an existing address in the database.
DWORD RasSetAutodialAddress(
LPCTSTR lpszAddress, // pointer to a network address string
DWORD dwReserved, // reserved; must be zero
LPRASAUTODIALENTRY lpAutoDialEntries,
// pointer to buffer containing
// AutoDial entry data
DWORD dwcbAutoDialEntries, // size, in bytes, of the buffer
DWORD dwcAutoDialEntries // number of entries in the buffer
);
If the function succeeds, the return value is zero.
If the function fails, the return value is one of the following error codes.
Value | Meaning |
---|---|
ERROR_INVALID_SIZE | The dwSize member of the RASAUTODIALENTRY structure is an invalid value. |
ERROR_INVALID_PARAMETER | The lpszAddress parameter was NULL. |
An address in the AutoDial mapping database can have any number of associated RASAUTODIALENTRY entries. Each entry specifies AutoDial information for a particular TAPI dialing location.
If the address specified by the lpszAddress parameter is an existing address in the database and the lpAutoDialEntries parameter is not NULL, the RasSetAutodialAddress function modifies the set of AutoDial entries associated with the address. If an entry in the lpAutoDialEntries array specifies a dialing location for which the address already has an entry, the function replaces the existing entry with the new entry. Otherwise, the function simply adds the lpAutoDialEntries entries to the set of entries for the address.
If the lpszAddress address exists in the database and lpAutoDialEntries is NULL and dwcbAutodialEntries is zero, RasSetAutodialAddress deletes the address from the database.
If the lpszAddress address does not exist in the database, RasSetAutodialAddress adds the address to the database. The lpAutoDialEntries parameter specifies the AutoDial entries to associate with the new address.
Windows NT: Requires version 4.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in ras.h.
Import Library: Use rasapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Remote Access Service Overview, RAS Server Administration Functions, RASAUTODIALENTRY, RasEnumAutodialAddresses, RasGetAutodialAddress