VirtualBox

Ignore:
Timestamp:
Sep 30, 2019 10:03:16 AM (5 years ago)
Author:
vboxsync
Message:

USB/win: Log an error to Event Viewer if INTERNAL_IOCTL_PROXY_STARTUP fails to find the passed-in PDO.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp

    r80941 r81070  
    733733 * @param   cbDumpData     Number of bytes at pDumpData.
    734734 * @param   pDumpData      Pointer to data that will be added to the message (see 'details' tab).
     735 *
     736 * NB: We only use IoLogMsg.dll as the message file, limiting
     737 * ErrCode to status codes and messages defined in ntiologc.h
    735738 */
    736739static void vboxUsbMonLogError(NTSTATUS ErrCode, NTSTATUS ReturnedStatus, ULONG uErrId, USHORT cbDumpData, PVOID pDumpData)
     
    13311334            }
    13321335
    1333             pOut->u.hDev = VBoxUsbFltProxyStarted(pOut->u.pPDO);
     1336            PDEVICE_OBJECT pDevObj = pOut->u.pPDO;
     1337            pOut->u.hDev = VBoxUsbFltProxyStarted(pDevObj);
     1338
     1339            /* If we couldn't find the PDO in our list, that's a real problem and
     1340             * the capturing will not really work. Log an error.
     1341             */
     1342            if (!pOut->u.hDev)
     1343                vboxUsbMonLogError(IO_ERR_DRIVER_ERROR, STATUS_SUCCESS, 2, sizeof("INTERNAL_IOCTL_PROXY_STARTUP"), "INTERNAL_IOCTL_PROXY_STARTUP");
     1344
    13341345            ASSERT_WARN(pOut->u.hDev, ("zero hDev"));
    13351346            ASSERT_WARN(Status == STATUS_SUCCESS, ("unexpected status, 0x%x", Status));
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