RasGetAutodialAddress

[New - Windows NT]

The RasGetAutodialAddress function retrieves information about all the AutoDial entries associated with a network address in the AutoDial mapping database.

DWORD RasGetAutodialAddress(

LPTSTR lpszAddress, // pointer to a network address string
LPDWORD lpdwReserved, // reserved; must be NULL
LPRASAUTODIALENTRY lpAutoDialEntries, // pointer to buffer for AutoDial entry data
LPDWORD lpdwcbAutoDialEntries, // pointer to size, in bytes, of buffer
LPDWORD lpdwcAutoDialEntries // pointer to number of entries returned
);  

Parameters

lpszAddress

Pointer to a null-terminated string that specifies the address for which information is requested. This can be an IP address ("127.95.1.4"), Internet host name ("www.microsoft.com"), or NetBIOS name ("products1").

lpdwReserved

Reserved; must be NULL.

lpAutoDialEntries

Pointer to a buffer that receives an array of RASAUTODIALENTRY structures, one for each AutoDial entry associated with the address specified by the lpszAddress parameter. Before calling RasGetAutodialAddress, set the dwSize member of the first RASAUTODIALENTRY structure in the buffer to sizeof(RASAUTODIALENTRY) to identify the version of the structure.

If lpAutoDialEntries is NULL, RasGetAutodialAddress sets the lpdwcbAutoDialEntries and lpdwcAutoDialEntries parameters to indicate the required buffer size, in bytes, and the number of AutoDial entries.

lpdwcbAutoDialEntries

Pointer to a variable that contains the size, in bytes, of the lpAutoDialEntries buffer. On return, the function sets this variable to the number of bytes returned, or the number of bytes required if the buffer is too small.

lpdwcAutoDialEntries

Pointer to a variable that receives the number of structure elements returned in the lpAutoDialEntries buffer.

Return Values

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_XXX_NOT_FOUND The address was not found in the mapping database.
ERROR_INVALID_SIZE The dwSize member of the RASAUTODIALENTRY structure is an invalid value.
ERROR_INVALID_PARAMETER The lpszAddress, lpdwcbAutoDialEntries, or lpdwcAutoDialEntries parameter was NULL.

See Also

RASAUTODIALENTRY, RasEnumAutodialAddresses, RasSetAutodialAddress