Platform SDK: RAS/Routing and RAS

RasGetSubEntryProperties

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

DWORD RasGetSubEntryProperties(
  LPCTSTR lpszPhonebook,   // pointer to full path and file name of 
                           //  phone-book file
  LPCTSTR lpszEntry,       // pointer to an entry name
  DWORD dwSubEntry,        // index of the subentry
  LPRASSUBENTRY lpRasSubEntry,
                           // pointer to structure that receives 
                           //  information about subentry
  LPDWORD lpdwcb,          // size, in bytes, of the structure
  LPBYTE lpbDeviceConfig,  // pointer to TAPI device configuration 
  LPDWORD lpcbDeviceConfig // pointer to size of device configuration
);

Parameters

lpszPhonebook
Windows NT/2000: 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.
lpszEntry
Pointer to a null-terminated string containing the name of an existing entry in the phone book.
dwSubEntry
Specifies the one-based index of the subentry.
lpRasSubEntry
Pointer to a RASSUBENTRY structure followed by additional bytes for the alternate phone number list, if there is one. The structure receives the information about the specified subentry. Before calling the function, set the dwSize member of the structure to sizeof(RASSUBENTRY) to identify the version of the structure. This parameter can be NULL.
lpdwcb
Pointer to a variable that contains the size, in bytes, of the lpRasSubEntry 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. This parameter can be NULL if lpRasSubEntry is NULL.
lpbDeviceConfig
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
Pointer to a DWORD to receive the size of the TAPI device configuration block. This parameter is currently unused. The caller should pass NULL for this parameter.

Return Values

If the function succeeds, the return value is zero.

If the function fails, the return value can be one of the following error codes.

Value Meaning
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

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Unsupported.
  Header: Declared in Ras.h.
  Library: Use Rasapi32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

See Also

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