Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Monthly Seminars at OSR Headquarters

East Coast USA
Windows Internals and SW Drivers, Dulles (Sterling) VA, 13 November 2017

Kernel Debugging & Crash Analysis for Windows, Nashua (Amherst) NH, 4 December 2017

Writing WDF Drivers I: Core Concepts, Nashua (Amherst) NH, 8 January 2018

WDF Drivers II: Advanced Implementation Techniques, Nashua (Amherst) NH, 15 January 2018


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 14  
13 Nov 17 06:55
Thilak Raj
xxxxxx@gmail.com
Join Date: 24 Oct 2017
Posts To This List: 5
Storage lower filter create new SRB and IRP

Hi All, I have a special requirement, where one of my application as the User Mode level keep writing files to my USB device. While the above file copy is in progress, in between a single file copy at the scsi commands level, I would like to send additional diagnostic/vendor specific scsi command (at the scsi command level) using a lower Filter Driver. I am totally a beginner to Windows Driver Development and The help from the community will be highly appreciated. I would also request help from MR Yassir M who has already posted in another thread the similar kind of development. My email id is xxxxx@gmail.com and any help on this topic will be highly appreciated. Thanks, Thilak
  Message 2 of 14  
13 Nov 17 09:39
David Boyce
xxxxxx@becrypt.com
Join Date: 19 Mar 2015
Posts To This List: 70
Storage lower filter create new SRB and IRP

Are you sure you need a filter driver to do this? Have you considered what you can achieve using DeviceIoControl() from an application with control codes IOCTL_SCSI_PASS_THROUGH or IOCTL_SCSI_PASS_THROUGH_DIRECT? -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com Sent: 13 November 2017 11:55 To: Windows System Software Devs Interest List <xxxxx@lists.osr.com> Subject: [ntdev] Storage lower filter create new SRB and IRP Hi All, I have a special requirement, where one of my application as the User Mode level keep writing files to my USB device. While the above file copy is in progress, in between a single file copy at the scsi commands level, I would like to send additional diagnostic/vendor specific scsi command (at the scsi command level) using a lower Filter Driver. I am totally a beginner to Windows Driver Development and The help from the community will be highly appreciated. I would also request help from MR Yassir M who has already posted in another thread the similar kind of development. My email id is xxxxx@gmail.com and any help on this topic will be highly appreciated. Thanks, Thilak --
  Message 3 of 14  
13 Nov 17 21:47
Thilak Raj
xxxxxx@gmail.com
Join Date: 24 Oct 2017
Posts To This List: 5
Storage lower filter create new SRB and IRP

Hi, Thanks for your response. The reason for going ahead with lower filter driver is my windows application is dealing at file system level and I don't have the source code for the same. my WIndows application is keep on writing files to my USB device. When a single file write is happening it is split by driver in to multiple scsi Write(10) commands before sending to the device. For example suppose file x write is being done using 10 Scsi (write 10) commands. I want to send the diagnostic in between after 5th scsi command for this file. Do you think that this can be done by using DeviceIoControl() from an application with control codes IOCTL_SCSI_PASS_THROUGH or IOCTL_SCSI_PASS_THROUGH_DIRECT? Please provide more inputs on the same. Really appreciate your help. Thanks On Mon, Nov 13, 2017 at 8:09 PM, xxxxx@becrypt.com <xxxxx@lists.osr.com> wrote: > Are you sure you need a filter driver to do this? > > Have you considered what you can achieve using DeviceIoControl() from an > application with control codes IOCTL_SCSI_PASS_THROUGH or > IOCTL_SCSI_PASS_THROUGH_DIRECT? > > -----Original Message----- > From: xxxxx@lists.osr.com [mailto:bounce-641554-159614@ > lists.osr.com] On Behalf Of xxxxx@gmail.com > Sent: 13 November 2017 11:55 <...excess quoted lines suppressed...> --
  Message 4 of 14  
13 Nov 17 23:38
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 11654
Storage lower filter create new SRB and IRP

With all due respect, your requirement sounds crazy. On Nov 13, 2017, at 6:46 PM, xxxxx@gmail.com <xxxxx@lists.osr.com> = wrote: >=20 > Thanks for your response. The reason for going ahead with lower = filter driver is my windows application is dealing at file system level = and I don't have the source code for the same. The same what? You're trying to interfere with an application that you = don't own? > my WIndows application is keep on writing files to my USB device. = When a single file write is happening it is split by driver in to = multiple scsi Write(10) commands before sending to the device. Right, as required by the spec. > For example suppose file x write is being done using 10 Scsi (write = 10) commands. I want to send the diagnostic in between after 5th scsi = command for this file. Why? What do you hope to learn? This is is the part that seems crazy. = What do you hope to accomplish? For performance reasons, those write = commands are all stacked up and submitted at once. If you require the = device to block after every 5 block writes, your performance will go = into the toilet. > Do you think that this can be done by using DeviceIoControl() from an = application with control codes IOCTL_SCSI_PASS_THROUGH or = IOCTL_SCSI_PASS_THROUGH_DIRECT? The application that is doing the writing certainly could. Write a = chunk, submit an ioctl, write a chunk, submit an ioctl. However, if you = can't modify the application, then it can't be done at a user-mode = level. > Please provide more inputs on the same. The same what? =E2=80=94=20 Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 5 of 14  
14 Nov 17 14:07
Chris Aseltine
xxxxxx@gmail.com
Join Date: 23 Sep 2006
Posts To This List: 1224
Storage lower filter create new SRB and IRP

Tim Roberts wrote: >> Please provide more inputs on the same. > > The same what? I believe this is a "subcontinental" figure of speech, as in, "please guide me in the same"...
  Message 6 of 14  
14 Nov 17 14:26
anton bassov
xxxxxx@hotmail.com
Join Date: 16 Jul 2006
Posts To This List: 4398
Storage lower filter create new SRB and IRP

> With all due respect, your requirement sounds crazy. Well, we were all inexperienced once,right..... Anton Bassov
  Message 7 of 14  
14 Nov 17 22:10
Thilak Raj
xxxxxx@gmail.com
Join Date: 24 Oct 2017
Posts To This List: 5
Storage lower filter create new SRB and IRP

> For example suppose file x write is being done using 10 Scsi (write = 10) commands. I want to send the diagnostic in between after 5th scsi = command for this file. Tom -> Why? What do you hope to learn? This is is the part that seems crazy. = What do you hope to accomplish? For performance reasons, those write = commands are all stacked up and submitted at once. If you require the = device to block after every 5 block writes, your performance will go = into the toilet. Hi Tom, This requirement is mainly for testing/debug purpose and performance degradation is not an issue and it is already considered. The main use of this requirement is, for example due to some device firmware issue file write got stuck after transferring 5 scsi write(10) blocks and file write is not completed. In this case if we would have sent Diagnostic, the reply from Diagnostic (device data) will help FW engineers to debug device issue. Main idea behind this requirement is for USB FW debugging purpose in case if some read/write operation got stuck in between. Thanks, Thilak
  Message 8 of 14  
14 Nov 17 23:53
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 11654
Storage lower filter create new SRB and IRP

On Nov 14, 2017, at 7:09 PM, xxxxx@gmail.com <xxxxx@lists.osr.com> = wrote: >=20 >> For example suppose file x write is being done using 10 Scsi (write =3D= 10) commands. I want to send the diagnostic in between after 5th scsi =3D= command for this file.=20 >=20 > Hi Tom, Tim. > This requirement is mainly for testing/debug purpose and performance = degradation is not an issue and it is already considered. >=20 > The main use of this requirement is, for example due to some device = firmware issue file write got stuck after transferring 5 scsi write(10) = blocks and file write is not completed. In this case if we would have = sent Diagnostic, the reply from Diagnostic (device data) will help FW = engineers to debug device issue. Main idea behind this requirement is = for USB FW debugging purpose in case if some read/write operation got = stuck in between. If the write stalls, couldn't you submit the diagnostic request from a = user-mode app at any time after the stall? Alternatively, couldn't you write a short app to simulate the failing = transaction and then request the diagnostic? =E2=80=94=20 Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 9 of 14  
15 Nov 17 11:01
Mark Roddy
xxxxxx@gmail.com
Join Date: 25 Feb 2000
Posts To This List: 4019
Storage lower filter create new SRB and IRP

If you don't care about which file is doing the write, then yes you can create an SRB IRP in your filter driver to emit the diagnostic SRB for every 5th SRB Write operation your filter observes. Use the disk driver sample code to learn how to construct an SRB IRP. Mark Roddy On Tue, Nov 14, 2017 at 10:09 PM, xxxxx@gmail.com <xxxxx@lists.osr.com> wrote: > > For example suppose file x write is being done using 10 Scsi (write = > 10) commands. I want to send the diagnostic in between after 5th scsi = > command for this file. > > Tom -> Why? What do you hope to learn? This is is the part that seems > crazy. = What do you hope to accomplish? For performance reasons, those > write = commands are all stacked up and submitted at once. If you require > the = device to block after every 5 block writes, your performance will go > = into the toilet. > <...excess quoted lines suppressed...> --
  Message 10 of 14  
15 Nov 17 21:34
Thilak Raj
xxxxxx@gmail.com
Join Date: 24 Oct 2017
Posts To This List: 5
Storage lower filter create new SRB and IRP

Hi Mark Roddy, Thanks a lot for the information. Yes we don't care about which file is doing write. Could you please guide me on where to get disk driver sample code and how to build the driver code and constructing an SRB IRP.. I am sorry for asking upto this level. Because I am totally new to Driver development. My email id is thilakcitatgmailcom. I have used at for @. Thanks, Thilak On Wed, Nov 15, 2017 at 9:30 PM, xxxxx@gmail.com <xxxxx@lists.osr.com > wrote: > If you don't care about which file is doing the write, then yes you can > create an SRB IRP in your filter driver to emit the diagnostic SRB for > every 5th SRB Write operation your filter observes. Use the disk driver > sample code to learn how to construct an SRB IRP. > > Mark Roddy > > On Tue, Nov 14, 2017 at 10:09 PM, xxxxx@gmail.com <xxxxx@lists.osr.com > > wrote: <...excess quoted lines suppressed...> --
  Message 11 of 14  
16 Nov 17 09:30
Mark Roddy
xxxxxx@gmail.com
Join Date: 25 Feb 2000
Posts To This List: 4019
Storage lower filter create new SRB and IRP

On github here: https://github.com/Microsoft/Windows-driver-samples/tree/master/storage/class Mark Roddy On Wed, Nov 15, 2017 at 9:33 PM, xxxxx@gmail.com <xxxxx@lists.osr.com> wrote: > Hi Mark Roddy, > > Thanks a lot for the information. Yes we don't care about which file is > doing write. Could you please guide me on where to get disk driver sample > code and how to build the driver code and constructing an SRB IRP.. I am > sorry for asking upto this level. Because I am totally new to Driver > development. > > My email id is thilakcitatgmailcom. I have used at for @. > <...excess quoted lines suppressed...> --
  Message 12 of 14  
17 Nov 17 01:44
Thilak Raj
xxxxxx@gmail.com
Join Date: 24 Oct 2017
Posts To This List: 5
Storage lower filter create new SRB and IRP

Hi, Thanks a lot Mark Roddy.. I want to build this sample driver in Windows 7 OS 64 bit systems with WDK 7.1. Whatever has been explained in the github Readme page is for Windows 10, WDK 10 etc. Kindly help me on how to build this driver sample code in Windows 7 Os 64 bit System, with WDK 7.1 Thanks, Thilak On Thu, Nov 16, 2017 at 7:59 PM, xxxxx@gmail.com <xxxxx@lists.osr.com > wrote: > On github here: https://github.com/Microsoft/Windows-driver- > samples/tree/master/storage/class > > > Mark Roddy > > On Wed, Nov 15, 2017 at 9:33 PM, xxxxx@gmail.com <xxxxx@lists.osr.com> > wrote: > <...excess quoted lines suppressed...> --
  Message 13 of 14  
17 Nov 17 13:59
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 11654
Storage lower filter create new SRB and IRP

xxxxx@gmail.com wrote: > > Thanks a lot Mark Roddy.. I want to build this sample driver in > Windows 7 OS 64 bit systems with WDK 7.1.  Whatever has been explained > in the github Readme page is for Windows 10, WDK 10 etc. > > Kindly help me on how to build this driver sample code in Windows 7 Os > 64 bit System, with WDK 7.1 This post annoys me, because it tells me you have not even tried one little bit to solve your problem on your own. The storage\class sample is INCLUDED in the 7.1 WDK. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 14 of 14  
17 Nov 17 20:49
Rabish Kumar
xxxxxx@gmail.com
Join Date: 14 Jan 2013
Posts To This List: 76
Storage lower filter create new SRB and IRP

Hi Thilak, With every WDK there are sample given by Microsoft when you install WDK 7.1 (https://www.microsoft.com/en-in/download/details.aspx?id=11800) here is ISO. Before sending basic question you should atleast try by yourself. If you are so new ask your management to take training on Windows device Driver (however scope is getting very limited), otherwise switch the job to new (machine Learning, NLP or something) Regards, Rabish On Fri, Nov 17, 2017 at 12:13 PM, xxxxx@gmail.com <xxxxx@lists.osr.com> wrote: > Hi, > > Thanks a lot Mark Roddy.. I want to build this sample driver in Windows 7 > OS 64 bit systems with WDK 7.1. Whatever has been explained in the github > Readme page is for Windows 10, WDK 10 etc. > > Kindly help me on how to build this driver sample code in Windows 7 Os 64 > bit System, with WDK 7.1 > > Thanks, <...excess quoted lines suppressed...> --
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 00:36.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license