From: Philip.D.Barila@seagate.com Sent: Monday, February 04, 2002 6:41 PM To: NT Developers Interest List Subject: [ntdev] Re: how to In a previous life, I pretty much explored the outer limits of what can and can't be done to access config data from a SCSI miniport driver. Gary is right in that you do get a pointer to a string in FindAdapter. But that is not especially helpful. Mark is right, in that SCSIPORT doesn't have it's own registry key, but *your* driver does, and your driver entry gets a PUNICODE_STRING containing the name of that key, for NT4 and Win2K, anyway. You get a null for that parameter in Win9X, but the registry key is there. All the registry access functions work just fine, though you have to break the pure SCSI miniport model by including NTDDK.h in a separate module from the module that includes miniport.h. This does work for Win9X, you just have to know the path to your key internally, instead of it getting handed to you by the OS. If you are not the boot disk driver, you *may* be able to read and write from files in your DriverEntry or FindAdapter routines, if they are called after the boot driver has initialized enough to support IOs from the IO manager. If you are the boot disk driver, you can't do file IO, as the IO manager will check your init status before calling your StartIo routines, discover you haven't returned from your init, and will fail the CreateFile call. On Win9X, even if you are the boot driver, you can use the extended INT21h interface to do any file access you want. But who would do that? Phil Gary Little @lists.osr.com on 02/04/2002 12:01:38 PM Please respond to "NT Developers Interest List" Sent by: bounce-ntdev-6430@lists.osr.com To: "NT Developers Interest List" cc: Subject: [ntdev] Re: how to You get an ASCII string passed to your FindAdapter that is directly loaded from the registry. You only get one pointer to one REG_SZ value, but you should be able to pretty well put what you want it. Be aware that you also have no RtlXxxx funrions that allow you to manipulate strings. Gary G. Little Broadband Storage, Inc. glittle@broadstor.com glittle@inland.net -----Original Message----- From: Roddy, Mark [mailto:Mark.Roddy@stratus.com] Sent: Monday, February 04, 2002 7:01 AM To: NT Developers Interest List Subject: [ntdev] Re: how to He will have the same problem, as there are no registry reading functions in the scsiport api. I agree that the registry is a better place to store small amounts of configuration information. > -----Original Message----- > From: Ntdev Reader [mailto:ntdevrdr@yahoo.com] > Sent: Monday, February 04, 2002 9:54 AM > To: NT Developers Interest List > Subject: [ntdev] Re: how to > > > As Mark wrote, you can read files. But why do you want a > file? Why is the Registry not good for you? In Windows it is > a custom to store settings in the Registry. There are good > reasons to follow the custom. For example, the user may > backup the Registry and reasonably hope that he backed up all > of the device settings, but your settings will not be backed > up. Also, with the Registry you don't need to worry about how > you name your settings storage - your device will be given a > unique registry key to which you have an easy access from the driver. > > --- konanki sreenivaskumar wrote: > > > > Hi, > > I am writing a SCSI miniport driver in that I want to read a > > config file. How can I do that to read the file. Can I use general > > file calls like open, close for reading the file. > > If it is not possible to use general file calls like > open, close > > etc please tell me how I will be able to read the config file. > > > > thanks and regards > > sreenivas > > > > > > --- > > You are currently subscribed to ntdev as: ntdevrdr@yahoo.com To > > unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com > > > __________________________________________________ > Do You Yahoo!? > Great stuff seeking new owners in Yahoo! Auctions! > http://auctions.yahoo.com > > --- > You are currently subscribed to ntdev as: > Mark.Roddy@stratus.com To unsubscribe send a blank email to > leave-ntdev-247T@lists.osr.com > --- You are currently subscribed to ntdev as: glittle@broadstor.com To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com --- You are currently subscribed to ntdev as: Philip.D.Barila@seagate.com To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com --- You are currently subscribed to ntdev as: GlennEverhart@FirstUSA.com To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com