Problem starting a hid mini driver

Hi All,
we are writing a mini driver to interact with a device
connected to usb port.The USB Mini Driver gets loaded fine
.AddDevice,IRP_MN_START_DEVICE are also called.
But in an effort to make the same driver as a HID Mini Driver,We are
calling HidRegisterMiniDriver from Driver Entry.

When we connect the device to the USB port,AddDevice gets called but
then in the Minor Irp we get the control code
reserved for system use.

This IRP is followed by a IRP_MN_START_DEVICE but then i also
receive an IRP_REMOVE_DEVICE and immediately after that
my mini driver is getting unloaded.

I would be glad to welcome any suggestions.

Thanks in Advance,

Best Regards,

This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.

You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)