Devicecleanup.exe

int RemoveAllNonPresent() HDEVINFO hDevInfo = SetupDiGetClassDevs(NULL, NULL, NULL, DIGCF_ALLCLASSES); if (hDevInfo == INVALID_HANDLE_VALUE) std::wcerr << L"Failed to get device list.\n"; return 1;

void ListDevices() DIGCF_PRESENT); if (hDevInfo == INVALID_HANDLE_VALUE) std::wcerr << L"Failed to get device list. Error: " << GetLastError() << std::endl; return; DeviceCleanup.exe

SP_DEVINFO_DATA devInfoData; devInfoData.cbSize = sizeof(SP_DEVINFO_DATA); DWORD idx = 0; int removed = 0; if (hDevInfo == INVALID_HANDLE_VALUE) std::wcerr &lt