I am working on a usb-multicomport driver which has to support multiple COM
devices. I use activatedevice function for each COM port while initializing.
The problem is that when I call deactivate device for the COM ports with
their respective handles, when multiple usb-4serialport boards are connected,
the subkeys under the active keys for all those COM ports that the device
manager has created get deleted but not the key. The key stays with all the
subkeys deleted.

When ever deactivate device is called I see the following messages in the
debugger.

FSREG: Blocking RegDeleteKey on open key
DEVICE!DeleteActiveKey: RegDeleteKey failed 5

Why aren't the active keys getting deleted.
My driver gets unloaded but still i have the keys in the registry and i get
the above messages during my debugging.

Regards
Muneer