Compartir a través de


RasGetEntryProperties

This function retrieves the properties of a phone book entry.

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 Values

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.

Remarks

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

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Ras.h.
Link Library: Coredll.lib.

See Also

RasSetEntryProperties | RASENTRY

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.