VirtualBox

Changeset 59797 in vbox for trunk


Ignore:
Timestamp:
Feb 24, 2016 1:55:10 PM (9 years ago)
Author:
vboxsync
Message:

BugReportTool(bugref:8169): USB device tree, device list, filter list, progress reporting, VBoxNetLwf events

Location:
trunk/src/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBugReport/Makefile.kmk

    r59500 r59797  
    2525# VBoxBugReport_DEFS      += \
    2626        VBOX_WATCHDOG_GLOBAL_PERFCOL VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
    27  VBoxBugReport_DEFS.win   = _WIN32_WINNT=0x0500
     27 VBoxBugReport_DEFS.win   = _WIN32_WINNT=0x0501
    2828 VBoxBugReport_SOURCES    = \
    2929        VBoxBugReport.cpp
  • trunk/src/VBox/Frontends/VBoxBugReport/VBoxBugReport.cpp

    r59637 r59797  
    142142BugReport::~BugReport()
    143143{
     144    for (int i = 0; i < m_Items.size(); ++i)
     145    {
     146        delete m_Items[i];
     147    }
    144148    RTStrFree(m_pszFileName);
     149}
     150
     151int BugReport::getItemCount(void)
     152{
     153    return (int)m_Items.size();
     154}
     155
     156void BugReport::addItem(BugReportItem* item)
     157{
     158    if (item)
     159        m_Items.append(item);
     160}
     161
     162void BugReport::process(void)
     163{
     164    for (int i = 0; i < m_Items.size(); ++i)
     165    {
     166        BugReportItem *pItem = m_Items[i];
     167        RTPrintf("%3u%% - collecting %s...\n", i * 100 / m_Items.size(), pItem->getTitle());
     168        processItem(pItem);
     169    }
     170    RTPrintf("100%% - compressing...\n\n");
    145171}
    146172
     
    284310}
    285311
    286 int BugReportText::addItem(BugReportItem* item)
    287 {
    288     if (!item)
    289         return VERR_INVALID_PARAMETER;
    290 
     312void BugReportText::processItem(BugReportItem* item)
     313{
    291314    int cb = RTStrmPrintf(m_StrmTxt, "[ %s ] -------------------------------------------\n", item->getTitle());
    292315    if (!cb)
     
    321344
    322345    handleRtError(RTStrmPutCh(m_StrmTxt, '\n'), "Write failure");
    323 
    324     delete item;
    325 
    326     return rc;
    327346}
    328347
     
    359378}
    360379
    361 int BugReportTarGzip::addItem(BugReportItem* item)
    362 {
    363     if (!item)
    364         return VERR_INVALID_PARAMETER;
    365 
     380void BugReportTarGzip::processItem(BugReportItem* item)
     381{
    366382    handleRtError(RTTarFileOpen(m_hTar, &m_hTarFile, item->getTitle(),
    367383                                RTFILE_O_CREATE | RTFILE_O_WRITE | RTFILE_O_DENY_NONE),
     
    400416        m_hTarFile = NIL_RTTARFILE;
    401417    }
    402 
    403     delete item;
    404 
    405     return rc;
    406418}
    407419
     
    443455    report->addItem(new BugReportFile(PathJoin(pszHome, "VBoxSVC.log.1"), "VBoxSVC.log.1"));
    444456    report->addItem(new BugReportFile(PathJoin(pszHome, "VirtualBox.xml"), "VirtualBox.xml"));
     457    report->addItem(new BugReportCommand("HostUsbDevices", g_pszVBoxManage, "list", "usbhost", NULL));
     458    report->addItem(new BugReportCommand("HostUsbFilters", g_pszVBoxManage, "list", "usbfilters", NULL));
    445459    for (MachineInfoList::iterator it = machines.begin(); it != machines.end(); ++it)
    446460    {
     
    626640            pReport = new BugReportTarGzip(pszOutputFile);
    627641        createBugReport(pReport, homeDir, list);
     642        pReport->process();
    628643        pReport->complete();
    629644        RTPrintf("Report was written to '%s'\n", pszOutputFile);
  • trunk/src/VBox/Frontends/VBoxBugReport/VBoxBugReport.h

    r59637 r59797  
    3535#include <iprt/tar.h>
    3636#include <iprt/vfs.h>
     37#include <iprt/cpp/list.h>
    3738
    3839#ifdef RT_OS_WINDOWS
     
    106107    BugReport(const char *pszFileName);
    107108    virtual ~BugReport();
    108     virtual int addItem(BugReportItem* item) = 0;
     109
     110    void addItem(BugReportItem* item);
     111    int  getItemCount(void);
     112    void process();
     113
     114    virtual void processItem(BugReportItem* item) = 0;
    109115    virtual void complete(void) = 0;
     116
    110117protected:
    111118    char *m_pszFileName;
     119    RTCList<BugReportItem*> m_Items;
    112120};
    113121
     
    141149    BugReportText(const char *pszFileName);
    142150    virtual ~BugReportText();
    143     virtual int addItem(BugReportItem* item);
     151    virtual void processItem(BugReportItem* item);
    144152    virtual void complete(void) {};
    145153private:
     
    155163    BugReportTarGzip(const char *pszFileName);
    156164    virtual ~BugReportTarGzip();
    157     virtual int addItem(BugReportItem* item);
     165    virtual void processItem(BugReportItem* item);
    158166    virtual void complete(void);
    159167private:
     
    185193};
    186194
     195
    187196/*
    188197 * BugReportFile adds a file as an item to a report.
  • trunk/src/VBox/Frontends/VBoxBugReport/VBoxBugReportWin.cpp

    r59629 r59797  
    2525
    2626#include <netcfgx.h>
     27#include <setupapi.h>
     28#include <initguid.h>
    2729#include <devguid.h>
    28 
     30#include <usbiodef.h>
     31#include <usbioctl.h>
    2932
    3033#define ReleaseAndReset(obj) \
     
    217220}
    218221
     222
     223class ErrorHandler
     224{
     225public:
     226    ErrorHandler(const char *pszFunction, int iLine)
     227        : m_function(pszFunction), m_line(iLine) {};
     228    void handleWinError(DWORD uError, const char *pszMsgFmt, ...)
     229        {
     230            if (uError != ERROR_SUCCESS)
     231            {
     232                va_list va;
     233                va_start(va, pszMsgFmt);
     234                RTCString msgArgs(pszMsgFmt, va);
     235                va_end(va);
     236                LPSTR pBuf = NULL;
     237                DWORD cb = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
     238                                          NULL, uError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&pBuf, 0, NULL);
     239                RTCStringFmt msg("%s at %s(%d): err=%u %s", msgArgs.c_str(), m_function, m_line, uError, pBuf);
     240                LocalFree(pBuf);
     241                throw RTCError(msg.c_str());
     242            }
     243        };
     244private:
     245    const char *m_function;
     246    int m_line;
     247};
     248#define handleWinError ErrorHandler(__FUNCTION__, __LINE__).handleWinError
     249
     250
     251class BugReportUsbTreeWin : public BugReportStream
     252{
     253public:
     254    BugReportUsbTreeWin();
     255    virtual ~BugReportUsbTreeWin();
     256    virtual PRTSTREAM getStream(void) { enumerate(); return BugReportStream::getStream(); };
     257private:
     258    class AutoHandle {
     259    public:
     260        AutoHandle(HANDLE h) { m_h = h; };
     261        ~AutoHandle() { close(); };
     262        bool isValid() { return m_h != INVALID_HANDLE_VALUE; };
     263        operator HANDLE() { return m_h; };
     264        void close(void) { if (isValid()) { CloseHandle(m_h); m_h = INVALID_HANDLE_VALUE; } };
     265    private:
     266        HANDLE m_h;
     267    };
     268    void enumerate();
     269
     270    void enumerateController(PSP_DEVINFO_DATA pInfoData, PSP_DEVICE_INTERFACE_DATA pInterfaceData);
     271    void enumerateHub(RTCString strFullName, RTCString strPrefix);
     272    void enumeratePorts(HANDLE hHub, unsigned cPorts, RTCString strPrefix);
     273    PBYTE getDeviceRegistryProperty(HDEVINFO hDev, PSP_DEVINFO_DATA pInfoData, DWORD uProperty,
     274                                    DWORD uExpectedType, PDWORD puSize);
     275    RTCString getDeviceRegistryPropertyString(HDEVINFO hDev, PSP_DEVINFO_DATA pInfoData, DWORD uProperty);
     276
     277    RTCString getDeviceDescByDriverName(RTCString strDrvName);
     278    RTCString getDriverKeyName(HANDLE hHub, int iPort);
     279    RTCString getExternalHubName(HANDLE hHub, int iPort);
     280
     281    HDEVINFO m_hDevInfo;
     282    PSP_DEVICE_INTERFACE_DETAIL_DATA m_pDetailData;
     283    HANDLE m_hHostCtrlDev;
     284};
     285
     286BugReportUsbTreeWin::BugReportUsbTreeWin() : BugReportStream("HostUsbTree")
     287{
     288    m_hDevInfo = INVALID_HANDLE_VALUE;
     289    m_pDetailData = NULL;
     290    m_hHostCtrlDev = INVALID_HANDLE_VALUE;
     291}
     292
     293BugReportUsbTreeWin::~BugReportUsbTreeWin()
     294{
     295    if (m_hHostCtrlDev != INVALID_HANDLE_VALUE)
     296        CloseHandle(m_hHostCtrlDev);
     297    if (m_pDetailData)
     298        RTMemFree(m_pDetailData);
     299    if (m_hDevInfo != INVALID_HANDLE_VALUE)
     300        SetupDiDestroyDeviceInfoList(m_hDevInfo);
     301}
     302
     303
     304PBYTE BugReportUsbTreeWin::getDeviceRegistryProperty(HDEVINFO hDev,
     305                                                     PSP_DEVINFO_DATA pInfoData,
     306                                                     DWORD uProperty,
     307                                                     DWORD uExpectedType,
     308                                                     PDWORD puSize)
     309{
     310    DWORD uActualType, cbNeeded = 0;
     311    if (!SetupDiGetDeviceRegistryProperty(hDev, pInfoData, uProperty, &uActualType,
     312                                          NULL, 0, &cbNeeded)
     313        && GetLastError() != ERROR_INSUFFICIENT_BUFFER)
     314    {
     315        if (GetLastError() == ERROR_INVALID_DATA)
     316            return NULL;
     317        handleWinError(GetLastError(), "SetupDiGetDeviceRegistryProperty(0x%x) failed", uProperty);
     318    }
     319    if (uExpectedType != REG_NONE && uActualType != uExpectedType)
     320        throw RTCError(RTCStringFmt("SetupDiGetDeviceRegistryProperty(0x%x) returned type %d instead of %d",
     321                                    uActualType, uExpectedType).c_str());   
     322    PBYTE pBuffer = (PBYTE)RTMemAlloc(cbNeeded);
     323    if (!pBuffer)
     324        throw RTCError(RTCStringFmt("Failed to allocate %u bytes", cbNeeded).c_str());
     325    if (!SetupDiGetDeviceRegistryProperty(hDev, pInfoData, uProperty, NULL,
     326                                          pBuffer, cbNeeded, &cbNeeded))
     327    {
     328        DWORD dwErr = GetLastError();
     329        RTMemFree(pBuffer);
     330        pBuffer = NULL;
     331        handleWinError(dwErr, "SetupDiGetDeviceRegistryProperty(0x%x) failed", uProperty);
     332    }
     333    if (puSize)
     334        *puSize = cbNeeded;
     335
     336    return pBuffer;
     337}
     338
     339RTCString BugReportUsbTreeWin::getDeviceRegistryPropertyString(HDEVINFO hDev, PSP_DEVINFO_DATA pInfoData, DWORD uProperty)
     340{
     341    DWORD cbString = 0;
     342    PWSTR pUnicodeString = (PWSTR)getDeviceRegistryProperty(hDev, pInfoData, uProperty, REG_SZ, NULL);
     343
     344    if (!pUnicodeString)
     345        return RTCString();
     346
     347    RTCStringFmt utf8string("%ls", pUnicodeString);
     348    RTMemFree(pUnicodeString);
     349    return utf8string;
     350}
     351
     352
     353RTCString BugReportUsbTreeWin::getDeviceDescByDriverName(RTCString strDrvName)
     354{
     355    DWORD dwErr;
     356    SP_DEVINFO_DATA devInfoData;
     357    HDEVINFO hDevInfo = SetupDiGetClassDevs(NULL, NULL, NULL, DIGCF_ALLCLASSES | DIGCF_PRESENT);
     358
     359    if (hDevInfo == INVALID_HANDLE_VALUE)
     360        handleWinError(GetLastError(), "SetupDiGetClassDevs failed");
     361
     362    bool fFound = false;
     363    devInfoData.cbSize = sizeof(devInfoData);
     364    for (int i = 0; SetupDiEnumDeviceInfo(hDevInfo, i, &devInfoData); ++i)
     365    {
     366        if (getDeviceRegistryPropertyString(hDevInfo, &devInfoData, SPDRP_DRIVER).equals(strDrvName))
     367        {
     368            fFound = true;
     369            break;
     370        }
     371    }
     372    if (!fFound)
     373    {
     374        dwErr = GetLastError();
     375        SetupDiDestroyDeviceInfoList(hDevInfo);
     376        handleWinError(dwErr, "SetupDiEnumDeviceInfo failed");
     377    }
     378
     379    RTCString strDesc = getDeviceRegistryPropertyString(hDevInfo, &devInfoData, SPDRP_DEVICEDESC);
     380    SetupDiDestroyDeviceInfoList(hDevInfo);
     381    return strDesc;
     382}
     383
     384
     385RTCString BugReportUsbTreeWin::getDriverKeyName(HANDLE hHub, int iPort)
     386{
     387    USB_NODE_CONNECTION_DRIVERKEY_NAME name;
     388    ULONG cbNeeded = 0;
     389
     390    name.ConnectionIndex = iPort;
     391    if (!DeviceIoControl(hHub, IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME,
     392                         &name, sizeof(name), &name, sizeof(name), &cbNeeded, NULL))
     393        handleWinError(GetLastError(), "DeviceIoControl(IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME) failed");
     394    cbNeeded = name.ActualLength;
     395    PUSB_NODE_CONNECTION_DRIVERKEY_NAME pName = (PUSB_NODE_CONNECTION_DRIVERKEY_NAME)RTMemAlloc(cbNeeded);
     396    if (!pName)
     397        throw RTCError(RTCStringFmt("Failed to allocate %u bytes", cbNeeded).c_str());
     398    pName->ConnectionIndex = iPort;
     399    if (!DeviceIoControl(hHub, IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME,
     400                         pName, cbNeeded, pName, cbNeeded, &cbNeeded, NULL))
     401    {
     402        DWORD dwErr = GetLastError();
     403        RTMemFree(pName);
     404        handleWinError(dwErr, "DeviceIoControl(IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME) failed");
     405    }
     406    RTCStringFmt strName("%ls", pName->DriverKeyName);
     407    RTMemFree(pName);
     408    return strName;
     409}
     410   
     411
     412RTCString BugReportUsbTreeWin::getExternalHubName(HANDLE hHub, int iPort)
     413{
     414    USB_NODE_CONNECTION_NAME name;
     415    ULONG cbNeeded = 0;
     416
     417    name.ConnectionIndex = iPort;
     418    if (!DeviceIoControl(hHub, IOCTL_USB_GET_NODE_CONNECTION_NAME,
     419                         &name, sizeof(name), &name, sizeof(name), &cbNeeded, NULL))
     420        handleWinError(GetLastError(), "DeviceIoControl(IOCTL_USB_GET_NODE_CONNECTION_NAME) failed");
     421    cbNeeded = name.ActualLength;
     422    PUSB_NODE_CONNECTION_NAME pName = (PUSB_NODE_CONNECTION_NAME)RTMemAlloc(cbNeeded);
     423    if (!pName)
     424        throw RTCError(RTCStringFmt("Failed to allocate %u bytes", cbNeeded).c_str());
     425    pName->ConnectionIndex = iPort;
     426    if (!DeviceIoControl(hHub, IOCTL_USB_GET_NODE_CONNECTION_NAME,
     427                         pName, cbNeeded, pName, cbNeeded, &cbNeeded, NULL))
     428    {
     429        DWORD dwErr = GetLastError();
     430        RTMemFree(pName);
     431        handleWinError(dwErr, "DeviceIoControl(IOCTL_USB_GET_NODE_CONNECTION_NAME) failed");
     432    }
     433    RTCStringFmt strName("%ls", pName->NodeName);
     434    RTMemFree(pName);
     435    return strName;
     436}
     437
     438
     439void BugReportUsbTreeWin::enumeratePorts(HANDLE hHub, unsigned cPorts, RTCString strPrefix)
     440{
     441    DWORD cbInfo = sizeof(USB_NODE_CONNECTION_INFORMATION_EX) + 30 * sizeof(USB_PIPE_INFO);
     442    PUSB_NODE_CONNECTION_INFORMATION_EX pInfo = (PUSB_NODE_CONNECTION_INFORMATION_EX)RTMemAlloc(cbInfo);
     443    if (!pInfo)
     444        throw RTCError(RTCStringFmt("Failed to allocate %u bytes", cbInfo).c_str());
     445    for (unsigned i = 1; i <= cPorts; ++i)
     446    {
     447        pInfo->ConnectionIndex = i;
     448        if (!DeviceIoControl(hHub, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX,
     449                             pInfo, cbInfo, pInfo, cbInfo, &cbInfo, NULL))
     450        {
     451            DWORD dwErr = GetLastError();
     452            RTMemFree(pInfo);
     453            handleWinError(dwErr, "DeviceIoControl(IOCTL_USB_GET_NODE_CONNECTION_INFORMATION) failed");
     454        }
     455        if (pInfo->ConnectionStatus == NoDeviceConnected)
     456            printf("%s[Port %d]\n", strPrefix.c_str(), i);
     457        else
     458        {
     459            RTCString strName = getDeviceDescByDriverName(getDriverKeyName(hHub, i));
     460            printf("%s[Port %d] %s\n", strPrefix.c_str(), i, strName.c_str());
     461            if (pInfo->DeviceIsHub)
     462                enumerateHub(getExternalHubName(hHub, i), strPrefix + "   ");
     463        }
     464    }
     465    RTMemFree(pInfo);
     466}
     467
     468void BugReportUsbTreeWin::enumerateHub(RTCString strFullName, RTCString strPrefix)
     469{
     470    AutoHandle hHubDev(CreateFileA(RTCString("\\\\.\\").append(strFullName).c_str(),
     471                                   GENERIC_WRITE, FILE_SHARE_WRITE,
     472                                   NULL, OPEN_EXISTING, 0, NULL));
     473    if (!hHubDev.isValid())
     474        handleWinError(GetLastError(), "CreateFile(%s) failed", strFullName.c_str());
     475    ULONG cb;
     476    USB_NODE_INFORMATION hubInfo;
     477    if (!DeviceIoControl(hHubDev,
     478                         IOCTL_USB_GET_NODE_INFORMATION,
     479                         &hubInfo,
     480                         sizeof(USB_NODE_INFORMATION),
     481                         &hubInfo,
     482                         sizeof(USB_NODE_INFORMATION),
     483                         &cb,
     484                         NULL))
     485        handleWinError(GetLastError(), "DeviceIoControl(IOCTL_USB_GET_NODE_INFORMATION) failed");
     486    enumeratePorts(hHubDev, hubInfo.u.HubInformation.HubDescriptor.bNumberOfPorts, strPrefix);
     487}
     488
     489void BugReportUsbTreeWin::enumerateController(PSP_DEVINFO_DATA pInfoData, PSP_DEVICE_INTERFACE_DATA pInterfaceData)
     490{
     491    RTCString strCtrlDesc = getDeviceRegistryPropertyString(m_hDevInfo, pInfoData, SPDRP_DEVICEDESC);
     492    printf("%s\n", strCtrlDesc.c_str());
     493
     494    ULONG cbNeeded;
     495    USB_ROOT_HUB_NAME rootHub;
     496    /* Find out the name length first */
     497    if (!DeviceIoControl(m_hHostCtrlDev, IOCTL_USB_GET_ROOT_HUB_NAME, NULL, 0,
     498                         &rootHub, sizeof(rootHub),
     499                         &cbNeeded, NULL))
     500        handleWinError(GetLastError(), "DeviceIoControl(IOCTL_USB_GET_ROOT_HUB_NAME) failed");
     501    cbNeeded = rootHub.ActualLength;
     502    PUSB_ROOT_HUB_NAME pUnicodeName = (PUSB_ROOT_HUB_NAME)RTMemAlloc(cbNeeded);
     503    if (!pUnicodeName)
     504        throw RTCError(RTCStringFmt("Failed to allocate %u bytes", cbNeeded).c_str());
     505
     506    if (!DeviceIoControl(m_hHostCtrlDev, IOCTL_USB_GET_ROOT_HUB_NAME, NULL, 0,
     507                         pUnicodeName, cbNeeded,
     508                         &cbNeeded, NULL))
     509    {
     510        DWORD dwErr = GetLastError();
     511        RTMemFree(pUnicodeName);
     512        handleWinError(dwErr, "DeviceIoControl(IOCTL_USB_GET_ROOT_HUB_NAME) failed");
     513    }
     514
     515    RTCStringFmt strRootHubName("%ls", pUnicodeName->RootHubName);
     516    RTMemFree(pUnicodeName);
     517    printf("   Root Hub\n");
     518    enumerateHub(strRootHubName, "      ");
     519}
     520
     521void BugReportUsbTreeWin::enumerate()
     522{
     523    m_hDevInfo = SetupDiGetClassDevs((LPGUID)&GUID_DEVINTERFACE_USB_HOST_CONTROLLER, NULL, NULL,
     524                                     DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
     525    if (m_hDevInfo == INVALID_HANDLE_VALUE)
     526        handleWinError(GetLastError(), "SetupDiGetClassDevs(GUID_DEVINTERFACE_USB_HOST_CONTROLLER) failed");
     527
     528    SP_DEVINFO_DATA deviceInfoData;
     529    deviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
     530    for (int i = 0; SetupDiEnumDeviceInfo(m_hDevInfo, i, &deviceInfoData); ++i)
     531    {
     532        SP_DEVICE_INTERFACE_DATA deviceInterfaceData;
     533        deviceInterfaceData.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
     534        if (!SetupDiEnumDeviceInterfaces(m_hDevInfo, 0, (LPGUID)&GUID_DEVINTERFACE_USB_HOST_CONTROLLER,
     535                                         i, &deviceInterfaceData))
     536            handleWinError(GetLastError(), "SetupDiEnumDeviceInterfaces(GUID_DEVINTERFACE_USB_HOST_CONTROLLER) failed");
     537
     538        ULONG cbNeeded = 0;
     539        if (!SetupDiGetDeviceInterfaceDetail(m_hDevInfo, &deviceInterfaceData, NULL, 0, &cbNeeded, NULL)
     540            && GetLastError() != ERROR_INSUFFICIENT_BUFFER)
     541            handleWinError(GetLastError(), "SetupDiGetDeviceInterfaceDetail failed");
     542
     543        m_pDetailData = (PSP_DEVICE_INTERFACE_DETAIL_DATA)RTMemAlloc(cbNeeded);
     544        if (!m_pDetailData)
     545            throw RTCError(RTCStringFmt("Failed to allocate %u bytes", cbNeeded).c_str());
     546
     547        m_pDetailData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
     548        if (!SetupDiGetDeviceInterfaceDetail(m_hDevInfo, &deviceInterfaceData, m_pDetailData, cbNeeded, &cbNeeded, NULL))
     549            handleWinError(GetLastError(), "SetupDiGetDeviceInterfaceDetail failed");
     550
     551        m_hHostCtrlDev = CreateFile(m_pDetailData->DevicePath, GENERIC_WRITE, FILE_SHARE_WRITE,
     552                                    NULL, OPEN_EXISTING, 0, NULL);
     553        if (m_hHostCtrlDev == INVALID_HANDLE_VALUE)
     554            handleWinError(GetLastError(), "CreateFile(%ls) failed", m_pDetailData);
     555
     556        enumerateController(&deviceInfoData, &deviceInterfaceData);
     557    }
     558}
     559
     560
    219561void createBugReportOsSpecific(BugReport* report, const char *pszHome)
    220562{
     
    232574    RTCStringFmt WinSysDir("%ls/System32", szWinDir);
    233575    report->addItem(new BugReportCommand("SystemEvents", PathJoin(WinSysDir.c_str(), "wevtutil.exe"),
    234                                          "qe", "System", "/f:text",
    235                                          "/q:*[System[Provider[@Name='VBoxUSBMon']]]", NULL));
     576                                         "qe", "System",
     577                                         "/q:*[System[Provider[@Name='VBoxUSBMon' or @Name='VBoxNetLwf']]]", NULL));
    236578    report->addItem(new BugReportCommand("UpdateHistory", PathJoin(WinSysDir.c_str(), "wbem/wmic.exe"),
    237579                                         "qfe", "list", "brief", NULL));
    238580    report->addItem(new BugReportCommand("DriverServices", PathJoin(WinSysDir.c_str(), "sc.exe"),
    239581                                         "query", "type=", "driver", "state=", "all", NULL));
    240 }
     582    report->addItem(new BugReportUsbTreeWin);
     583}
  • trunk/src/VBox/Runtime/VBox/log-vbox.cpp

    r59636 r59797  
    478478# endif
    479479# if defined(DEBUG_aleksey)  /* Guest ring-0 as well */
    480         RTLogGroupSettings(pLogger, "net_flt_drv.e.l.f.l3.l4.l5 +net_adp_drv.e.l.f.l3.l4.l5");
     480        //RTLogGroupSettings(pLogger, "net_flt_drv.e.l.f.l3.l4.l5 +net_adp_drv.e.l.f.l3.l4.l5");
     481        RTLogGroupSettings(pLogger, "net_flt_drv.e.f.l5");
    481482        RTLogFlags(pLogger, "enabled unbuffered");
    482483        pLogger->fDestFlags |= RTLOGDEST_DEBUGGER | RTLOGDEST_STDOUT;
Note: See TracChangeset for help on using the changeset viewer.

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