On 4/11/07, Tom Eckert <teckert@xxxxxxxxxxxxxxxx> wrote:
PortCls registers the standard interfaces and you'll be adding a registration for a custom interface. There is no conflict here as long as your handler passes all messages except the ones for your interface on to PortCls.
Tom, again thank you so much. You just clarified 2 points which I failed to grasp thus far: (1) I can *add* another, custom, interface in AddDevice(). (2) IRP_MJ_DEVICE_CONTROL handler is common to all devices and subdevices in any given driver (Duh! there is only one DriverObject, I should I have seen that). Now that I come to implement these insights, I am facing the following conundrum: IoRegisterDeviceInterface() requires SymbolicLinkName as its 4th parameter. In a generic WDM driver, I would read it from from the device extension that is accessible via the device's FDO (I'm the one who stores it there, first). But where do I get the device's FDO from??? Let me explain: In a generic WDM driver, the first call in AddDevice() would be IoCreateDevice(), which creates the FDO and makes it available to me. But as we said earlier, IoCreateDevice() should not be used in PortCls. This is like catch 22, do you see what I'm missing? I know that I can create my own device extension for each miniport (Topology and WaveCyclic in MSVAD Simple). This is done via the 5th parameter in PcAddAdapterDevice(): ULONG myDeviceExtensionSize = sizeof(MY_DEVICE_EXTENSION) + PORT_CLASS_DEVICE_EXTENSION_SIZE; But that stores the extension for each miniport (of which registration is already been taken care of by PcRegisterSubdevice()) - not for "the device". Once I have a place to store SymbolicLinkName for "the device" custom interface, I think that I have the entire solution (I hope that it is understood why I don't want to use a global). Does this make any sense or am I completely off track here (again)? Thanks, Don ****************** 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.com/