Skip to content

Commit

Permalink
Fix for daynix/UsbDk daynix#124, "UsbDk_StartRedirect hangs if no nor…
Browse files Browse the repository at this point in the history
…mal USB driver". Add filter driver to device with no normal USB driver that sets Raw mode.
  • Loading branch information
gwgill committed Oct 25, 2023
1 parent 2233fde commit cd1bd06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion UsbDk/ControlDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ class CUsbDkControlDevice : private CWdfControlDevice, public CAllocatable<USBDK
NTSTATUS AddHideRuleToSet(const USB_DK_HIDE_RULE &UsbDkRule, HideRulesSet &Set);

/* DeviceID + LocationID list of "Function Driver" registry keys */
//typedef CWdmSet<CUsbDkFDriverRule, CLockedAccess, CNonCountingObject> FDriverRulesSet;
typedef CWdmSet<CUsbDkFDriverRule, CLockedAccess, CCountingObject> FDriverRulesSet;
FDriverRulesSet m_FDriversRules;
CString m_RootName;
Expand Down
3 changes: 2 additions & 1 deletion UsbDk/RawFilterStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_HIDER, "%!FUNC! Got Irp 0x%x",irpStac
auto irpStack = IoGetCurrentIrpStackLocation(Irp);
irpStack->Parameters.DeviceCapabilities.Capabilities->RawDeviceOK = 1;
irpStack->Parameters.DeviceCapabilities.Capabilities->Removable = 0;
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_HIDER, "%!FUNC! Set RawDeviceOK");
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_HIDER,
"%!FUNC! Set RawDeviceOK");
return STATUS_SUCCESS;
});
case IRP_MN_QUERY_DEVICE_TEXT:
Expand Down

0 comments on commit cd1bd06

Please sign in to comment.