The RasGetEntryDevConfig function retrieves the device information saved by the last successful call to the RasSetEntryDevConfig function.
DWORD RasGetEntryDevConfig(LPCTSTR lpszPhoneBook, LPCTSTR szEntry, LPDWORD pdwDeviceID, LPDWORD pdwSize, LPVARSTRING pDeviceConfig);
Header file: | Afdfunc.h |
Module: | Ras |
Platforms: | H/PC |
Windows CE versions: | 1.0 and later |
If the function succeeds, the return value is zero. If the function fails, the return value will be set to an error value:
In Windows CE version 2.0 the RasGetEntryProperty function supports the same functionality as the RasGetEntryDevConfig function. An application should use the RasGetEntryProperties function to retrieve device information.
An example of how to use the RasGetEntryDevConfig function follows:
DWORD dwDeviceID;
LPVARSTRING pDeviceConfig;
DWORD dwSize;
TCHAR szBuf[50];
dwSize = 0;
if (RasGetEntryDevConfig (NULL, EntryName, &dwDeviceID,
&dwSize, NULL)) {
OutputDebugString(TEXT("\r\nError getting device info size\r\n"));
return;
}
pDeviceConfig = LocalAlloc (LPTR, dwSize);
if (RasGetEntryDevConfig (NULL, EntryName, &dwDeviceID,
&dwSize, pDeviceConfig)) {
OutputDebugString(TEXT("\r\nError getting device info size\r\n"));
return;
} else {
wsprintf(szBuf, TEXT("dwDeviceID=%d\r\n"), dwDeviceID);
OutputDebugString(szBuf);
if (pDeviceConfig) {
wsprintf(szBuf, TEXT("Have a device config at: 0x%X\r\n"),
pDeviceConfig));
OutputDebugString(szBuf);
LocalFree(pDeviceConfig);
}
}