PC Review


Reply
Thread Tools Rate Thread

AddDevice in Multifunction device

 
 
John
Guest
Posts: n/a
 
      14th Nov 2007
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?


 
Reply With Quote
 
 
 
 
Doron Holan [MSFT]
Guest
Posts: n/a
 
      15th Nov 2007
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

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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?
>
>


 
Reply With Quote
 
John
Guest
Posts: n/a
 
      15th Nov 2007
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


On Wed, 14 Nov 2007 22:43:18 -0800, "Doron Holan [MSFT]"
<(E-Mail Removed)> wrote:

>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

 
Reply With Quote
 
Doron Holan [MSFT]
Guest
Posts: n/a
 
      19th Nov 2007
softice is no longer a supported product, i highly suggest that you move
over to a 2 computer debug setup and use windbg

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
> On Wed, 14 Nov 2007 22:43:18 -0800, "Doron Holan [MSFT]"
> <(E-Mail Removed)> wrote:
>
>>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


 
Reply With Quote
 
John
Guest
Posts: n/a
 
      21st Nov 2007
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.

On Mon, 19 Nov 2007 13:11:51 -0800, "Doron Holan [MSFT]"
<(E-Mail Removed)> wrote:

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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems install multifunction device John Windows XP Drivers 0 14th Nov 2007 12:13 AM
HCT 12.1 on Multifunction device karthikri Windows XP Logo 0 27th Jan 2006 07:01 AM
Networked Multifunction device - Scanner setup =?Utf-8?B?YWxkb2ds?= Windows XP General 2 30th Nov 2005 04:23 AM
hotfix for multifunction device usb GK Windows XP Drivers 1 28th Apr 2004 06:33 PM
Brother Multifunction device does receive fax to PC Rajeev E Windows XP Print / Fax 1 4th Sep 2003 09:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:47 AM.