3331475701a5b12f98b3cfea07d5dca60072530fvboxsync * NetFltUninstall - VBoxNetFlt uninstaller command line tool
c7814cf6e1240a519cbec0441e033d0e2470ed00vboxsync * Copyright (C) 2008-2011 Oracle Corporation
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync * available from http://www.virtualbox.org. This file is free software;
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync * you can redistribute it and/or modify it under the terms of the GNU
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync * General Public License (GPL) as published by the Free Software
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync hr = VBoxNetCfgWinQueryINetCfg(&pnc, TRUE, VBOX_NETCFG_APP_NAME, 10000, &lpszLockedBy);
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync wprintf(L"error uninstalling VBoxNetFlt (0x%x)\n", hr);
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync else if(hr == NETCFG_E_NO_WRITE_LOCK && lpszLockedBy)
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync if(i < VBOX_NETFLT_RETRIES && !wcscmp(lpszLockedBy, L"6to4svc.dll"))
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync wprintf(L"6to4svc.dll is holding the lock, retrying %d out of %d\n", ++i, VBOX_NETFLT_RETRIES);
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync wprintf(L"Error: write lock is owned by another application (%s), close the application and retry uninstalling\n", lpszLockedBy);
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync wprintf(L"Error getting the INetCfg interface (0x%x)\n", hr);
3331475701a5b12f98b3cfea07d5dca60072530fvboxsync } while(true);