RasGetEntryPropertiesA function (ras.h)
The RasGetEntryProperties function retrieves the properties of a phone-book entry.
Syntax
DWORD RasGetEntryPropertiesA(
[in] LPCSTR unnamedParam1,
[in] LPCSTR unnamedParam2,
[in, out] LPRASENTRYA unnamedParam3,
[in, out] LPDWORD unnamedParam4,
[out] LPBYTE unnamedParam5,
[in, out] LPDWORD unnamedParam6
);
Parameters
[in] unnamedParam1
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.
[in] unnamedParam2
Pointer to a null-terminated string that specifies an existing entry name. If an empty string is specified, the function returns default values in the buffers pointed to by the lpRasEntry and lpbDeviceInfo parameters.
[in, out] unnamedParam3
Pointer to a RASENTRY structure followed by additional bytes for the alternate phone number list, if there is one.
On output, the structure receives the connection data associated with the phone-book entry specified by the lpszEntry parameter.
On input, set the dwSize member of the structure to sizeof(RASENTRY) to identify the version of the structure.
This parameter can be NULL.
Windows Me/98 and Windows 95 OSR2: The Microsoft Layer for Unicode does not support dwAlternateOffset in RASENTRY.
[in, out] unnamedParam4
Pointer to a variable that, on input, specifies the size, in bytes, of the lpRasEntry buffer.
On output, this variable receives the number of bytes required.
This parameter can be NULL if the lpRasEntry parameter is NULL.
To determine the required buffer size, call RasGetEntryProperties with lpRasEntry set to NULL and *lpdwEntryInfoSize set to zero. The function returns the required buffer size in *lpdwEntryInfoSize.
[out] unnamedParam5
This parameter is no longer used. The calling function should set this parameter to NULL.
Windows Me/98/95: Pointer to a buffer that receives device-specific configuration information. Do not directly manipulate this opaque TAPI device information. For more information about TAPI device configuration, see the lineGetDevConfig function in the TAPI Programmer's Reference in the Platform SDK.
This parameter can be NULL.
[in, out] unnamedParam6
This parameter is unused. The calling function should set this parameter to NULL.
Windows Me/98/95: Pointer to a variable that, on input, specifies the size, in bytes, of the buffer specified by the lpbDeviceInfo parameter.
On output, this variable receives the number of bytes required.
This parameter can be NULL if the lpbDeviceInfo parameter s NULL.
To determine the required buffer size, call RasGetEntryProperties with lpbDeviceInfo set to NULL and *lpdwDeviceInfoSize set to zero. The function returns the required buffer size in *lpdwDeviceInfoSize.
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.
Value | Meaning |
---|---|
|
The function was called with an invalid parameter. |
|
The value of the dwSize member of the lpRasEntry is too small. |
|
The address or buffer specified by lpRasEntry is invalid. |
|
The buffer size indicated in lpdwEntryInfoSize is too small. |
|
The phone-book entry does not exist, or the phone-book file is corrupted and/or has missing components. |
Remarks
Note
The ras.h header defines RasGetEntryProperties as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | ras.h |
Library | Rasapi32.lib |
DLL | Rasapi32.dll |