From - Wed Oct 15 07:39:52 1997 Path: news.mitre.org!blanket.mitre.org!news.tufts.edu!cam-news-feed5.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!news.maxwell.syr.edu!news-peer.sprintlink.net!news.sprintlink.net!Sprint!newsfeed.internetmci.com!192.48.96.126!in2.uu.net!lard.ftp.com!not-for-mail From: Slava Monich Newsgroups: comp.os.ms-windows.programmer.networks,comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.win32.programmer.kernel,microsoft.public.win32.programmer.networks Subject: Re: IOCTLs within NDIS miniport Date: Tue, 14 Oct 1997 17:24:17 -0400 Organization: FTP Software, Inc. Lines: 38 Message-ID: <3443E301.A00F8CC@ftp.com> References: <01bcd4f7$6b9b9420$0a00000a@peterg.sj.znet.com> <343E3C96.7BC95D4A@ftp.com> <01bcd7f7$bfde92a0$fbb262c7@dcxsys02> <34438782.9D46AAAF@ftp.com> <01bcd8c8$4d90df10$d0b262c7@dcxsys02> NNTP-Posting-Host: smonich-3.ftp.com Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.03 [en] (WinNT; U) To: Dave Davis Xref: news.mitre.org comp.os.ms-windows.programmer.networks:11100 comp.os.ms-windows.programmer.nt.kernel-mode:4162 Dave Davis wrote: > > > > > You don't have to create a new device in order to send io requests. > > > I hook the IRP_MJ_DEVICE_CONTROL function and any io's that do not > > > have my CTL_CODE I send to the old handler. (And there are some.) > > > The device I open is the NDIS device. (e.x. "NE20003") > > > > What do you mean "hook the IRP_MJ_DEVICE_CONTROL function"? Modify > > someone else's DRIVER_OBJECT? I wouldn't like this kind of solution... > > No, I don't modify someone else's DRIVER_OBJECT. > Oh, I just realized what you mean. It's NDIS who's modifying *your* DRIVER_OBJECT, not you. I just looked at it with SoftIce and found what you already know - that NDIS is using miniport's DRIVER_OBJECT to create the devices and it sticks his functions into your DEVICE_OBJECT. That means they are bad guys not you. Sorry :-) > I still don't see why you feel a new device object is necessary. It may > make things pretty, but, the real issue is replacing the > IRP_MJ_DEVICE_CONTROL function. Well, now it makes better sense to me. Still, having a device with a predifined name is a little bit more convinient - names of the NDIS devices depend in the number/order of the net cards in you machine. The app will need to read the right name from the registry. Other than that, there's no difference. The other thing is that you don't have control over NDIS. It does create a device for you today, it may stop doing so tomorrow. They are changing NDIS quite frequently without even telling anyone. Don't know about you, I've got some new info from this coversation. Thanks, -Slava