Changeset 37038 in vbox for trunk/src/VBox
- Timestamp:
- May 11, 2011 2:57:23 PM (14 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxUSB/win/mon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
r36999 r37038 667 667 for (ULONG k = 0; k < pDevRelations->Count; ++k) 668 668 { 669 Log(("Found existing USB PDO %p\n", pDevRelations->Objects[k])); 669 PDEVICE_OBJECT pDevObj = pDevRelations->Objects[k]; 670 if (!pDevObj->DriverObject 671 || !pDevObj->DriverObject->DriverName.Buffer 672 || !pDevObj->DriverObject->DriverName.Length) 673 { 674 AssertFailed(); 675 continue; 676 } 677 678 bool fIsHub = false; 679 for (int z = 0; z < RT_ELEMENTS(lpszStandardControllerName); ++z) 680 { 681 if (!RtlCompareUnicodeString(&szStandardControllerName[z], &pDevObj->DriverObject->DriverName, TRUE /* case insensitive */)) 682 { 683 fIsHub = true; 684 break; 685 } 686 } 687 688 if (fIsHub) 689 { 690 Log(("Found sub-hub, PDO 0x%p\n", pDevObj)); 691 continue; 692 } 693 694 Log(("Found existing USB PDO 0x%p\n", pDevObj)); 670 695 VBOXUSBFLT_LOCK_ACQUIRE(); 671 PVBOXUSBFLT_DEVICE pDevice = vboxUsbFltDevGetLocked(pDev Relations->Objects[k]);696 PVBOXUSBFLT_DEVICE pDevice = vboxUsbFltDevGetLocked(pDevObj); 672 697 if (pDevice) 673 698 { -
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp
r36998 r37038 647 647 static NTSTATUS vboxUsbMonHookInstall() 648 648 { 649 #ifdef VBOXUSBMON_DBG_NO_PNPHOOK 650 return STATUS_SUCCESS; 651 #else 649 652 return VBoxUsbHookInstall(&g_VBoxUsbMonGlobals.UsbHubPnPHook.Hook); 653 #endif 650 654 } 651 655 652 656 static NTSTATUS vboxUsbMonHookUninstall() 653 657 { 658 #ifdef VBOXUSBMON_DBG_NO_PNPHOOK 659 return STATUS_SUCCESS; 660 #else 654 661 return VBoxUsbHookUninstall(&g_VBoxUsbMonGlobals.UsbHubPnPHook.Hook); 662 #endif 655 663 } 656 664 … … 850 858 static int VBoxUsbMonFltAdd(PVBOXUSBMONCTX pContext, PUSBFILTER pFilter, uintptr_t *pId) 851 859 { 860 #ifdef VBOXUSBMON_DBG_NO_FILTERS 861 static uintptr_t idDummy = 1; 862 *pId = idDummy; 863 ++idDummy; 864 return VINF_SUCCESS; 865 #else 852 866 int rc = VBoxUsbFltAdd(&pContext->FltCtx, pFilter, pId); 853 867 return rc; 868 #endif 854 869 } 855 870 856 871 static int VBoxUsbMonFltRemove(PVBOXUSBMONCTX pContext, uintptr_t uId) 857 872 { 873 #ifdef VBOXUSBMON_DBG_NO_FILTERS 874 return VINF_SUCCESS; 875 #else 858 876 int rc = VBoxUsbFltRemove(&pContext->FltCtx, uId); 859 877 return rc; 878 #endif 860 879 } 861 880 -
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.h
r36968 r37038 23 23 #include <iprt/asm.h> 24 24 #include <VBox/log.h> 25 26 #ifdef DEBUG 27 /* disables filters */ 28 //#define VBOXUSBMON_DBG_NO_FILTERS 29 /* disables pnp hooking */ 30 //#define VBOXUSBMON_DBG_NO_PNPHOOK 31 #endif 25 32 26 33 #include "../cmn/VBoxDrvTool.h"
Note:
See TracChangeset
for help on using the changeset viewer.