Share via


RasGetEntryProperties

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function retrieves the properties of a phone book entry.

Syntax

DWORD RasGetEntryProperties(
  LPWSTR lpszPhoneBook, 
  LPWSTR szEntry, 
  LPRASENTRY lpbEntry, 
  LPDWORD lpdwEntrySize, 
  LPBYTE lpb, 
  LPDWORD lpdwSize 
);

Parameters

  • lpszPhoneBook
    This parameter is ignored and should be set to NULL. Phone-book entries are stored in the registry rather than in a phone-book file.
  • szEntry
    Pointer to a null-terminated string that contains an existing entry name. If you specify an empty string, "", the function returns default values in the buffers pointed to by the lpbEntry and lpb parameters.
  • lpbEntry
    Pointer to a RASENTRY structure followed by additional bytes for the alternate phone number list, if there is one. The structure receives the connection data associated with the phone-book entry specified by the szEntry parameter. Before calling the function, set the dwSize member of the structure to sizeof(RASENTRY) to identify the version of the structure. Calling RasGetEntryProperties without specifying a RASENTRY structure returns an error.
  • lpdwEntrySize
    Pointer to a variable that that contains the size, in bytes, of the lpbEntry buffer. On return, the function sets this variable to the number of bytes required.
  • lpb
    Long pointer to a buffer that receives device-specific configuration information. This is opaque TAPI device configuration information that you should not manipulate directly. This parameter can be NULL. For more information about TAPI device configuration, see the lineGetDevConfig function in the Microsoft Win32® Telephony (TAPI) Programmer's Reference.
  • lpdwSize
    Long pointer to a variable that that contains the size, in bytes, of the buffer specified by the lpb parameter. On return, the function sets this variable to the number of bytes required. This parameter can be NULL if the lpb parameter s NULL.

    To determine the required buffer size, call RasGetEntryProperties with lpb set to NULL and lpdwSize set to a buffer size such as the 128 bytes required for unimodem. The function returns the required buffer size in lpdwSize.

Return Value

Zero indicates success. ERROR_INVALID_PARAMETER indicates that the function was called with an invalid parameter. ERROR_INVALID_SIZE indicates that the value of the dwSize member of the structure specified in lpbEntry is too small. ERROR_BUFFER_INVALID indicates that the address or buffer specified by lpbEntry is invalid. ERROR_BUFFER_TOO_SMALL indicates that the buffer size indicated in lpdwEntrySize is too small. ERROR_CANNOT_OPEN_PHONEBOOK indicates that the phone book is corrupted or is missing components. ERROR_CANNOT_FIND_PHONEBOOK_ENTRY indicates that the phone-book entry does not exist.

Include Raserror.h for definitions of the RAS error codes.

Note

If the buffer specified in the lpb parameter is too small, RasGetEntryProperties does not return any error. Instead the function assumes that you are trying to determine the size of the buffer and will change the lpdwSize parameter to reflect the number of bytes that are required to return the RASENTRY structure.

Remarks

For Windows CE 2.0 and later, device configuration information can be retrieved by using the lpb and lpdwSize parameters. For Windows CE 1.0 and 1.01, the lpb and lpdwSize parameters are ignored and should be set to NULL.

RasGetEntryProperties can be used to get device specfic configuration information. The proper way to use this API to get that information is to first call the API to determine the buffer size needed and then call again to get the dev config struct.

Requirements

Header ras.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

RasSetEntryProperties
RASENTRY