AddDevice in Multifunction device

  • Thread starter Thread starter John
  • Start date Start date
J

John

I'm still trying to get my device to work on a multifunction device.

I did make some progress because I do get Unknown Device in the Device
Manager List.

But why was AddDevice Called again?

The first time AddDevice is called, I create the primary device. On
StartDevice phase, I load the firmware, and determine if the second
device is installed. If it is, I Create the device using
IoCreateDevice and setting a flag field in the DeviceExtension to
indicate this is a child device.

I am using the examples from the book, "Programming the Microsoft
Windows Driver Model, Second Edition" by Walter Oney.

Any ideas why the AddDevice is being called twice?
 
did you install your driver twice? put a breakpoint on your AddDevice
routine and run !devstack <PDO> with the passed in PDO. this will give you
the device instance path for your AddDevice and will give you a clue as to
why it is called twice.

d
 
I'll give that a try when I can get another computer. I'm using
Softice as my debugger.

My Device ID for the primary channel, for example, is 745. I created a
new one 746 for the dual channel. The PCI Bus controller will only see
the device id 745. Anyway, I added an entry to the INF file for the
746; it didn't do anything, meaning it had an InstallSection but the
InstallSection for the 746 didn't have an entry. The Device Manager
showed the 746 deivce as unknown. When I added the Addservice to the
InstallSection for the 746 device, the AddDevice was called by the
System.

Why would that happen?

How should my INF be written to add the dual device correctly. Both
the primary and secondary channel perform the same task. The primary
channel has the secondary channel memory address.

John
 
softice is no longer a supported product, i highly suggest that you move
over to a 2 computer debug setup and use windbg

d
 
Thanks for the info.

I know Softice is no longer supported. However, Softice still works on
some machines and that is where I do my development. We are not
planning on moving up to Vist any time soon. By the time my employer
decides to move to Vista, I'll be retired.

I did manage to figure out how to get my driver to support dual
function device. I now understand how this stuff (multifunction
device) is supposed to work. Lucky for me that this multifunction
device are the same type of device. I only needed one inf file and one
driver.
 
Back
Top