WinUsb and eject icon

We have developed an Infineon FX3 based firmware to communicate with a Windows application via WinUsb.
We have full control over the firmware and the application.
The device is recognized properly and the communication works as expected.
However, the device is shown as removable and there is an eject icon for it which we need to get rid of.
Up to my knowledge setting the the DEVPKEY_Device_SafeRemovalRequired and simmilar in the DEVICE_CAPABILITIES to disable this is the responsibility of the driver i.e. winusb.sys.
However, in the case of Win USB this needs to bee derived from either the .inf file or the descriptors sent by the firmware.
Has anyone managed to suppress this icon in this scenario?
Tia,
Roland

Very good question. It seems (from some time with Google) that setting the old and yet semi-documented "RemovalPolicy" and "SafeRemovalRequired" registry keys will NOT get you what you need.

It does seem like it should be possible to set the DEVPKEY_Device_xxx things via the INF (there are doc references to being able to set FriendlyName this way). But, quite frankly, I don't know how to do it.

I'm hoping somebody here can explain it, and if possible, in a generic way, particularly now that co-installers are deprecated. Can DEVPKEY_Device_xxx values be set from the INF?

Maybe Mr. @Zac_Lockard knows and will tell us? He's the expert on all things INF related!

Many DEVPKEYs are composite properties, so internally we're running code when you query them and they can't be set directly. SafeRemovalRequired is one such property, and the logic is explained in the remarks here.

The official settable-from-an-INF properties have an HKR-based registry value mapping listed as "special" in the AddReg docs, but I can see that this list isn't complete (FriendlyName isn't there?). We don't technically support other properties.

In theory I think you could set DEVPKEY_Device_SafeRemovalOverride via AddProperty directive by specifying the GUID/PID, but I haven't tried it myself for this particular value.

1 Like

THAT's an excellent suggestion. I didn't think of that.

Thank you, Mr. @Zac_Lockard... we always appreciate your willingness to help the community.

2 Likes