Prev: WLK 1.4 (QFE 002) pnpdtest surprise removal failed when restarting KMDF USB device on windows XP
Next: Which Enhanced USB Controller port is a device connected to?
From: Tim Newsham on 10 Sep 2009 19:06 I have an audio driver I wrote that has a corresponding inf file. I am now in the process of splitting up the driver into two drivers -- one that acts as a bus that notices attaches and detaches of the other driver. I'm having some serious problems figuring out how to write an INF file for this. - can I share a single INF file for these or do they have to be separate inf files? - what is the appropriate class to choose? Should the whole thing be marked "MEDIA" because the bus loads and unloads media files, or should the bus device be marked something else (SYSTEM?) - I tried putting them together in a single inf file (under the class MEDIA) by adding another device in the device section, with its own inst section that has AddReg and CopyFiles and also a Services section. When I tried to use devcon to load my bus driver, this failed to load. Is this because the MEDIA class has additional requirements? I got a different error when I switched to SYSTEM. I couldnt make heads or tails of either error. media: "[CtlInst] skipped (DNF_BAD_DRIVER) system: "The installation failed because a function driver was not specified for this device instance." It seems to me that there are different requirements for the INF files for different classes. Is this documented in the WinDDK somewhere? What are the requirements for each class? -Tim
From: Tim Roberts on 12 Sep 2009 00:06 Tim Newsham <tim.newsham(a)gmail.com> wrote: > >I have an audio driver I wrote that has a corresponding inf file. I >am now in the process of splitting up the driver into two drivers -- >one that acts as a bus that notices attaches and detaches of the other >driver. I'm having some serious problems figuring out how to write an >INF file for this. > > - can I share a single INF file for these or do they have to be >separate inf files? Separate. One driver is Media class, and the other one isn't. A single INF can only hold a single class. > - what is the appropriate class to choose? Should the whole thing >be marked "MEDIA" because the bus loads and unloads media files, or >should the bus device be marked something else (SYSTEM?) The bus driver should probably in your own invented class, as I suggested on ntdev today. > - I tried putting them together in a single inf file (under the >class MEDIA) by adding another device in the device section, with its >own inst section that has AddReg and CopyFiles and also a Services >section. When I tried to use devcon to load my bus driver, this >failed to load. Is this because the MEDIA class has additional >requirements? I got a different error when I switched to SYSTEM. I >couldnt make heads or tails of either error. How did you load it with devcon? I thought your lower bus driver was going to be mounted for a PCI device. In that case, you would load it by plugging in the PCI device. The bus driver would expose its own PDO, and that will trigger loading the upper driver. >It seems to me that there are different requirements for the INF files >for different classes. Is this documented in the WinDDK somewhere? >What are the requirements for each class? A few classes have unique requirements, usually in the registry. For the most part, you'll find this out when you need it, when you have a device of a particular kind. If you have a net card, you need a network class driver. If you have and audio device or a video device, you need media class. If you have a keyboard, you need HID class. If you have a device that doesn't obviously fit into any of the classes you know, then you just make up a new class. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: Tim Newsham on 12 Sep 2009 00:24
> > - I tried putting them together in a single inf file (under the > >class MEDIA) by adding another device in the device section, with its > >own inst section that has AddReg and CopyFiles and also a Services > >section. When I tried to use devcon to load my bus driver, this > >failed to load. Is this because the MEDIA class has additional > >requirements? I got a different error when I switched to SYSTEM. I > >couldnt make heads or tails of either error. > > How did you load it with devcon? I thought your lower bus driver was going > to be mounted for a PCI device. In that case, you would load it by > plugging in the PCI device. The bus driver would expose its own PDO, and > that will trigger loading the upper driver. I couldnt find an error in my inf file (even using the perl inf file checking tool) but I ended up rewriting it again and it worked the second time.. go figure.. Currently still using single inf file but I'll definitely be splitting it up into diff files and a diff class, as you suggested. > Tim Roberts, t...(a)probo.com > Providenza & Boekelheide, Inc. -TimN |