VirtualBox

Changeset 57370 in vbox


Ignore:
Timestamp:
Aug 14, 2015 7:41:33 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
102133
Message:

HostOnly/win: Move up NetCfgInstanceId error handling (#7973)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/cfg/VBoxNetCfg.cpp

    r57306 r57370  
    26902690    WCHAR pWCfgGuidString [50];
    26912691    WCHAR DevName[256];
     2692    HKEY hkey = (HKEY)INVALID_HANDLE_VALUE;
    26922693
    26932694    do
     
    27042705        DWORD detailBuf [2048];
    27052706
    2706         HKEY hkey = NULL;
    27072707        DWORD cbSize;
    27082708        DWORD dwValueType;
     
    29902990        }
    29912991
     2992        if (ret != ERROR_SUCCESS)
     2993            SetErrBreak(("Querying NetCfgInstanceId failed (0x%08X)", GetLastError()));
     2994
    29922995        /*
    29932996         * We need to query the device name after we have succeeded in querying its
     
    30213024            }
    30223025        }
    3023         RegCloseKey (hkey);
    3024 
    3025         if (ret != ERROR_SUCCESS)
    3026             SetErrBreak(("Querying NetCfgInstanceId failed (0x%08X)", GetLastError()));
    30273026    }
    30283027    while (0);
     
    30313030     * cleanup
    30323031     */
     3032    if (hkey != INVALID_HANDLE_VALUE)
     3033        RegCloseKey (hkey);
     3034
    30333035    if (pQueueCallbackContext)
    30343036        SetupTermDefaultQueueCallback(pQueueCallbackContext);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette