在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;,并且按照这个进行循环。请指教,谢谢。