在MSDN中查找RasEnumEntries函数,在Res中有一个例子。
截取其中一段,如下:
DWORD dwCb = sizeof(RASENTRYNAME);
DWORD dwErr = ERROR_SUCCESS;
DWORD dwRetries = 5;
DWORD dwEntries = 0;
RASENTRYNAME* lpRasEntryName = NULL; //
// Loop through in case the information from RAS changes between calls.
//
while (dwRetries--)
{
//
// If the memory is allocated, free it.
//
if (NULL != lpRasEntryName)
{
HeapFree(GetProcessHeap(), 0, lpRasEntryName);
lpRasEntryName = NULL;
}
........................
为什么 DWORD dwRetries = 5;,并且按照这个进行循环。请指教,谢谢。
截取其中一段,如下:
DWORD dwCb = sizeof(RASENTRYNAME);
DWORD dwErr = ERROR_SUCCESS;
DWORD dwRetries = 5;
DWORD dwEntries = 0;
RASENTRYNAME* lpRasEntryName = NULL; //
// Loop through in case the information from RAS changes between calls.
//
while (dwRetries--)
{
//
// If the memory is allocated, free it.
//
if (NULL != lpRasEntryName)
{
HeapFree(GetProcessHeap(), 0, lpRasEntryName);
lpRasEntryName = NULL;
}
........................
为什么 DWORD dwRetries = 5;,并且按照这个进行循环。请指教,谢谢。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货