From: "Tony Mason" Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode References: <66sr6v$jfo@news.seed.net.tw> <01bd096d$72d50410$c70aa8c0@thorium_nt> <674m9q$qcn@news.seed.net.tw> <676g18$vs2@news.microsoft.com> <01bd0bcd$e03df540$12185da6@matthews.rmi.net> Subject: Re: What does "filter driver" mean? Date: Fri, 19 Dec 1997 19:14:22 -0500 Lines: 49 Organization: OSR Open Systems Resources, Inc. X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 NNTP-Posting-Host: feanor.osr.com Message-ID: <349b0dde.0@news.osr.com> Path: news.mitre.org!blanket.mitre.org!philabs!newsjunkie.ans.net!news.kc.mmd.com!hay.news.ans.net!news-w.ans.net!newsfeeds.ans.net!streamer1.cleveland.iagnet.net!iagnet.net!news.idt.net!psinntp!news.osr.com!feanor.osr.com Don, For SCSI you just build a filter driver that attaches to the port device, as you suggested. There are two very important caveats: (1) Other drivers (like the class driver) find you only if you are attached BEFORE they start looking for the port device. They call IoGetDeviceObjectPointer (look in class.c) and will use that device object pointer for ALL subsequent calls. If they don't get your filter's device object you won't see the calls. (2) You cannot unload. Given the fact that the class driver now has a pointer to your device object, there's no way for you to keep from having the class driver call your driver. Regards, Tony Tony Mason Consulting Partner OSR Open Systems Resources, Inc. mason@osr.com http://www.osr.com Don Matthews wrote in message <01bd0bcd$e03df540$12185da6@matthews.rmi.net>... >Paul Sanders wrote in article <676g18$vs2@news.microsoft.com>... >> filter drivers call IoAttachDevice to make their connection to the >> 'unsuspecting' lower driver. > >Paul, > >The NT DDK seems to imply that filter drivers can only go >above the class driver, as is the case with the fault-tolerant >filter driver. But what if I want to place a filter driver below >the class drivers, but just above SCSIPORT. How might >I do that? Do I just do an IoAttachDevice to "ScsiX:"? >Are there any other important facts that should be known >up front? > >Thanks, >Don >