[MyCRW_AddReg] HKR,,DeviceType,0x10001,0x00000007 ; FILE_DEVICE_DISK HKR,,DeviceCharacteristics,0x10001,0x00000100 ; FILE_REMOVABLE_MEDIA

Here’s a detailed guide and discussion post tailored for someone developing or using a .

bcdedit /set testsigning on bcdedit /set nointegritychecks on

[MyCRW_Install] Include=usb.inf Needs=USB.Install AddReg=MyCRW_AddReg CopyFiles=MyCRW_CopyFiles

[ServiceInstall] DisplayName=%ServiceName% ServiceType=1 StartType=0 ErrorControl=1 ServiceBinary=%12%\MyDriver.sys NTSTATUS EvtDevicePrepareHardware( WDFDEVICE Device, WDFCMRESLIST ResourcesRaw, WDFCMRESLIST ResourcesTranslated ) PDEVICE_CONTEXT pContext = GetDeviceContext(Device); WDF_USB_DEVICE_CREATE_CONFIG usbConfig; WDF_USB_DEVICE_CREATE_CONFIG_INIT(&usbConfig, USBD_CLIENT_CONTRACT_VERSION_602); return WdfUsbTargetDeviceCreate(Device, &usbConfig, &pContext->UsbDevice);

[MyCRW_CopyFiles] MyDriver.sys

// Read from card via USB 2.0 bulk endpoint NTSTATUS ReadCardBlock(PDEVICE_CONTEXT pContext, UCHAR* Buffer, ULONG Length) WDF_USB_CONTROL_SETUP_PACKET control; WDF_USB_CONTROL_SETUP_PACKET_INIT_CLASS(&control, BMREQUEST_HOST_TO_DEVICE, BMREQUEST_TO_INTERFACE, 0xFF, // SCSI READ(10) or vendor command 0, 0); return WdfUsbTargetDeviceSendControlTransferSynchronously(...);

Get-PnpDeviceProperty -InstanceId "USB\VID_05E3..." -KeyName "DEVPKEY_Device_RemovalPolicy" Set-PnpDeviceProperty -InstanceId "USB\VID_05E3..." -KeyName "DEVPKEY_Device_RemovalPolicy" -Value 2 If you don't need to write a driver from scratch:

Enable test signing (temporary):

[Standard.NTamd64] %DeviceDesc%=MyCRW_Install, USB\VID_05E3&PID_0760 ; Example GL823K

[DestinationDirs] DefaultDestDir=12 ; %windir%\system32\drivers

wpr -start WdfTrace <reproduce issue> wpr -stop trace.etl

You can use this as a forum post (e.g., for Stack Overflow, Reddit r/windowsdev, or a tech blog). Posted by: [Your Name] Platform: Windows 11 Pro (Build 22621) Device: Generic USB 2.0 Multi-Card Reader (SD/MMC/MS/xD) 1. Background I’m working with a USB 2.0-based Card Reader Writer (CRW) device. Under Windows 10, the inbox driver ( USBSTOR.SYS + WUDFRd.sys ) works fine. However, Windows 11 has introduced stricter driver signing, power management changes, and removal of legacy bus drivers.

Shop is in view mode
View full version of the site
Sklep internetowy Shoper.pl