Changeset 62715 in vbox for trunk/src/VBox/HostDrivers/VBoxUSB
- Timestamp:
- Jul 29, 2016 9:55:17 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp
r62490 r62715 156 156 void vboxUsbDbgPrintUnicodeString(PUNICODE_STRING pUnicodeString) 157 157 { 158 PWSTR pStr = pUnicodeString->Buffer; 159 for (int i = 0; i < pUnicodeString->Length/2; ++i) 160 { 161 LOG(("%c", *pStr++)); 162 } 158 RT_NOREF1(pUnicodeString); 159 Log(("%.*ls", pUnicodeString->Length / 2, pUnicodeString->Buffer)); 163 160 } 164 161 … … 421 418 static DECLCALLBACK(VOID) vboxUsbObjDevNamePrefixMatcher(PDEVICE_OBJECT pDo, PUNICODE_STRING pName, PVOID pvMatcher) 422 419 { 420 RT_NOREF1(pDo); 423 421 PVBOXUSBOBJNAMEPREFIXMATCHER pData = (PVBOXUSBOBJNAMEPREFIXMATCHER)pvMatcher; 424 422 PUNICODE_STRING pNamePrefix = pData->pNamePrefix; … … 438 436 static DECLCALLBACK(BOOLEAN) vboxUsbObjDevObjSearcherWalker(PDEVICE_OBJECT pTopDo, PDEVICE_OBJECT pCurDo, PVOID pvContext) 439 437 { 438 RT_NOREF1(pTopDo); 440 439 PVBOXUSBOBJDRVOBJSEARCHER pData = (PVBOXUSBOBJDRVOBJSEARCHER)pvContext; 441 440 ASSERT_WARN(!pData->pDevObj, ("non-null dev object (0x%p) on enter", pData->pDevObj)); … … 608 607 } 609 608 #else /* VBOX_USB3PORT */ 609 RT_NOREF1(fFlags); 610 610 PWSTR szwHubList; 611 611 Status = IoGetDeviceInterfaces(&GUID_DEVINTERFACE_USB_HUB, NULL, 0, &szwHubList); … … 655 655 static DECLCALLBACK(BOOLEAN) vboxUsbMonFindHubDrvObjWalker(PFILE_OBJECT pFile, PDEVICE_OBJECT pTopDo, PDEVICE_OBJECT pHubDo, PVOID pvContext) 656 656 { 657 RT_NOREF2(pFile, pTopDo); 657 658 PVBOXUSBMONFINDHUBWALKER pData = (PVBOXUSBMONFINDHUBWALKER)pvContext; 658 659 PDRIVER_OBJECT pDrvObj = pHubDo->DriverObject; … … 673 674 static PDRIVER_OBJECT vboxUsbMonHookFindHubDrvObj() 674 675 { 675 NTSTATUS Status = STATUS_UNSUCCESSFUL;676 676 UNICODE_STRING szStandardHubName; 677 PDRIVER_OBJECT pDrvObj = NULL;678 677 szStandardHubName.Length = 0; 679 678 szStandardHubName.MaximumLength = 0; … … 685 684 vboxUsbMonHubDevWalk(vboxUsbMonFindHubDrvObjWalker, &Data, VBOXUSBMONHUBWALK_F_ALL); 686 685 if (Data.pDrvObj) 687 {688 686 LOG(("returning driver object 0x%p", Data.pDrvObj)); 689 }690 687 else 691 {692 688 WARN(("no hub driver object found!")); 693 }694 689 return Data.pDrvObj; 695 690 } … … 770 765 ASSERT_WARN(Iqrl == PASSIVE_LEVEL, ("irql is not PASSIVE")); 771 766 772 switch (pSl->Parameters.Query DeviceRelations.Type)767 switch (pSl->Parameters.QueryId.IdType) 773 768 { 774 769 case BusQueryInstanceID: … … 899 894 } 900 895 break; 896 897 default: 898 /** @todo r=bird: handle BusQueryContainerID and whatever else we might see */ 899 break; 901 900 } 902 901 } … … 1192 1191 static DECLCALLBACK(BOOLEAN) vboxUsbMonHookDrvObjWalker(PFILE_OBJECT pFile, PDEVICE_OBJECT pTopDo, PDEVICE_OBJECT pHubDo, PVOID pvContext) 1193 1192 { 1193 RT_NOREF3(pFile, pTopDo, pvContext); 1194 1194 PDRIVER_OBJECT pDrvObj = pHubDo->DriverObject; 1195 1195 … … 1519 1519 static NTSTATUS _stdcall VBoxUsbMonCreate(PDEVICE_OBJECT pDevObj, PIRP pIrp) 1520 1520 { 1521 RT_NOREF1(pDevObj); 1521 1522 PIO_STACK_LOCATION pStack = IoGetCurrentIrpStackLocation(pIrp); 1522 1523 PFILE_OBJECT pFileObj = pStack->FileObject; … … 1866 1867 static void _stdcall VBoxUsbMonUnload(PDRIVER_OBJECT pDrvObj) 1867 1868 { 1869 RT_NOREF1(pDrvObj); 1868 1870 LOG(("VBoxUSBMonUnload pDrvObj (0x%p)", pDrvObj)); 1869 1871 … … 1874 1876 UNICODE_STRING DosName; 1875 1877 RtlInitUnicodeString(&DosName, USBMON_DEVICE_NAME_DOS); 1876 NTSTATUS rc =IoDeleteSymbolicLink(&DosName);1878 IoDeleteSymbolicLink(&DosName); 1877 1879 1878 1880 IoDeleteDevice(g_VBoxUsbMonGlobals.pDevObj); … … 1881 1883 PRTLOGGER pLogger = RTLogRelSetDefaultInstance(NULL); 1882 1884 if (pLogger) 1883 {1884 1885 RTLogDestroy(pLogger); 1885 }1886 1886 pLogger = RTLogSetDefaultInstance(NULL); 1887 1887 if (pLogger) 1888 {1889 1888 RTLogDestroy(pLogger); 1890 }1891 1889 } 1892 1890 … … 1904 1902 NTSTATUS _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath) 1905 1903 { 1904 RT_NOREF1(pRegPath); 1906 1905 #ifdef VBOX_USB_WITH_VERBOSE_LOGGING 1907 1906 RTLogGroupSettings(0, "+default.e.l.f.l2.l3");
Note:
See TracChangeset
for help on using the changeset viewer.