RasGetSubEntryProperties function

The RasGetSubEntryProperties function retrieves information about a subentry for a specified phone-book entry.

Syntax


DWORD RasGetSubEntryProperties(
  _In_     LPCTSTR lpszPhonebook,
  _In_     LPCTSTR lpszEntry,
  _In_     DWORD dwSubEntry,
  _Inout_  LPRASSUBENTRY lpRasSubEntry,
  _Inout_  LPDWORD lpdwcb,
  _In_     LPBYTE lpbDeviceConfig,
  _In_     LPDWORD lpcbDeviceConfig
);

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 the name of an existing entry in the phone book.

dwSubEntry [in]

Specifies the one-based index of the subentry.

lpRasSubEntry [in, out]

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

On output, the structure receives information about the specified subentry.

On input, the dwSize member specifies the size of the structure. The size identifies the version of the structure. Obtain this size using sizeof(RASSUBENTRY).

This parameter can be NULL.

lpdwcb [in, out]

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

On output, the variable receives the number of bytes returned, or the number of bytes required if the buffer is too small.

This parameter can be NULL if lpRasSubEntry is NULL.

lpbDeviceConfig [in]

Pointer to a TAPI device configuration block. This parameter is currently unused. The caller should pass NULL for this parameter. For more information about TAPI device configuration blocks, see the function lineGetDevConfig.

lpcbDeviceConfig [in]

Pointer to a DWORD that specifies the size of the TAPI device configuration block. This parameter is currently unused. The caller should pass NULL for this parameter.

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_BUFFER_INVALID

The address or buffer specified by lpRasSubEntry is invalid.

ERROR_BUFFER_TOO_SMALL

The lpRasSubEntry buffer is too small. The lpdwcb variable receives the required buffer size.

ERROR_CANNOT_OPEN_PHONEBOOK

The phone book is corrupted or is missing components.

ERROR_CANNOT_FIND_PHONEBOOK_ENTRY

The phone-book entry does not exist.

 

Remarks

A RAS phone-book entry can have zero or more subentries, each minimally consisting of a device and a phone number. A phone-book entry with multiple subentries can be configured to dial the first available or all subentries when the entry is dialed.

Use the RasGetEntryProperties function to retrieve a RASENTRY structure containing information about the subentries of a phone-book entry. The dwSubEntries member indicates the number of subentries and the dwDialMode member indicates the dialing configuration.

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

RasGetSubEntryPropertiesW (Unicode) and RasGetSubEntryPropertiesA (ANSI)

See also

Remote Access Service (RAS) Overview
Remote Access Service Functions
RasGetEntryProperties
RASENTRY
RasSetSubEntryProperties
RASSUBENTRY

 

 

Community Additions

ADD
Show:
© 2014 Microsoft