Why could you not do this? The system provides you with a way of calling portcls.sys' handlers if the IRP was not meant for you. The service is PcDispatchIrp. A snippet from the DDK follows, which clearly shows that one can override portclass IRP handlers: Comments The PcInitializeAdapterDriver function loads pointers to handlers for several IRPs into the driver object. An adapter driver can choose to overwrite one or more of the pointers written by PcInitializeAdapterDriver with a pointer to its own IRP handler. If the driver's local IRP handler determines that the IRP should be handled by PortCls instead, the local handler calls PcDispatchIrp to forward the IRP to PortCls. For a code example, see the sb16 sample audio driver in the Windows DDK. ----- Original Message ----- From: <bart@xxxxxxxxxxxxx> To: <wdmaudiodev@xxxxxxxxxxxxx> Sent: Tuesday, April 22, 2003 5:26 AM Subject: [wdmaudiodev] Re: Port Class Mini-ports > > > > You can set your own manager functions in DriverEntry : > > DriverObject->MajorFunction[IRP_MJ_CREATE] = YourOwn; > > DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL]] = YourOwn; > > etc... > > I did it a few times.. > > > That was the 'indecent hacking' I meant :) I don't know it PortCls relies > on the handles it installs itself at this place. You even could 'intercept' > the original PortCls function pointers and calll these when the IOCTL or PNP > is not handled by your own code. But if surprise removal still works properly > after this hacks..... > > Regards, > Bart > ****************** > > WDMAUDIODEV addresses: > Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx > Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe > Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe > Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx > > URL to WDMAUDIODEV page: > http://www.wdmaudiodev.de/ > > ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/