This function retrieves the properties of a phone book entry.
At a Glance
Header file: | Ras.h |
Windows CE versions: | 1.0 and later |
Syntax
DWORD RasGetEntryProperties(LPWSTR lpszPhoneBook,
LPWSTR szEntry, LPBYTE 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. This parameter can be NULL.
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 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 zero. 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.
Remarks
For Windows CE version 1.0 and 1.01, the lpb and lpdwSize parameters are ignored and should be set to NULL. To retrieve device specific configuration information use the RasGetEntryDevConfig function.
For Windows CE version 2.0 and later, device configuration information can be retrieved by using the lpb and lpdwSize parameters.
Windows CE does not use the alternate phone number list.
See Also