RasGetEntryProperties function

The RasGetEntryProperties function retrieves the properties of a phone-book entry.

Syntax


DWORD RasGetEntryProperties(
  _In_    LPCTSTR    lpszPhonebook,
  _In_    LPCTSTR    lpszEntry,
  _Inout_ LPRASENTRY lpRasEntry,
  _Inout_ LPDWORD    lpdwEntryInfoSize,
  _Out_   LPBYTE     lpbDeviceInfo,
  _Inout_ LPDWORD    lpdwDeviceInfoSize
);

Parameters

lpszPhonebook [in]

Pointer to a null-terminated string that specifies the full path and file name of a phone-book (PBK) file. If this parameter is NULL, the function uses the current default phone-book file. The default phone-book file is the one selected by the user in the User Preferences property sheet of the Dial-Up Networking dialog box.

Windows Me/98/95:  This parameter should always be NULL. Dial-up networking stores phone-book entries in the registry rather than in a phone-book file.

lpszEntry [in]

Pointer to a null-terminated string that specifies an existing entry name. If an empty string is specified, the function returns default values in the buffers pointed to by the lpRasEntry and lpbDeviceInfo parameters.

lpRasEntry [in, out]

Pointer to a RASENTRY structure followed by additional bytes for the alternate phone number list, if there is one.

On output, the structure receives the connection data associated with the phone-book entry specified by the lpszEntry parameter.

On input, set the dwSize member of the structure to sizeof(RASENTRY) to identify the version of the structure.

This parameter can be NULL.

Windows Me/98 and Windows 95 OSR2:  The Microsoft Layer for Unicode does not support dwAlternateOffset in RASENTRY.

lpdwEntryInfoSize [in, out]

Pointer to a variable that, on input, specifies the size, in bytes, of the lpRasEntry buffer.

On output, this variable receives the number of bytes required.

This parameter can be NULL if the lpRasEntry parameter is NULL.

To determine the required buffer size, call RasGetEntryProperties with lpRasEntry set to NULL and *lpdwEntryInfoSize set to zero. The function returns the required buffer size in *lpdwEntryInfoSize.

lpbDeviceInfo [out]

This parameter is no longer used. The calling function should set this parameter to NULL.

Windows Me/98/95:  Pointer to a buffer that receives device-specific configuration information. Do not directly manipulate this opaque TAPI device information. For more information about TAPI device configuration, see the lineGetDevConfig function in the TAPI Programmer's Reference in the Platform SDK.

This parameter can be NULL.

lpdwDeviceInfoSize [in, out]

This parameter is unused. The calling function should set this parameter to NULL.

Windows Me/98/95:  Pointer to a variable that, on input, specifies the size, in bytes, of the buffer specified by the lpbDeviceInfo parameter.

On output, this variable receives the number of bytes required.

This parameter can be NULL if the lpbDeviceInfo parameter s NULL.

To determine the required buffer size, call RasGetEntryProperties with lpbDeviceInfo set to NULL and *lpdwDeviceInfoSize set to zero. The function returns the required buffer size in *lpdwDeviceInfoSize.

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.

ValueMeaning
ERROR_INVALID_PARAMETER

The function was called with an invalid parameter.

ERROR_INVALID_SIZE

The value of the dwSize member of the lpRasEntry is too small.

ERROR_BUFFER_INVALID

The address or buffer specified by lpRasEntry is invalid.

ERROR_BUFFER_TOO_SMALL

The buffer size indicated in lpdwEntryInfoSize is too small.

ERROR_CANNOT_FIND_PHONEBOOK_ENTRY

The phone-book entry does not exist, or the phone-book file is corrupted and/or has missing components.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ras.h

Library

Rasapi32.lib

DLL

Rasapi32.dll

Unicode and ANSI names

RasGetEntryPropertiesW (Unicode) and RasGetEntryPropertiesA (ANSI)

See also

Remote Access Service (RAS) Overview
Remote Access Service Functions
RASENTRY
RasSetEntryProperties

 

 

Community Additions

ADD
Show: