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.

OSR Seminars


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 4  
10 Aug 18 10:58
Alexey Yerakhavets
xxxxxx@gmail.com
Join Date: 19 Feb 2018
Posts To This List: 7
Need help with usb filter driver

I've used this article (http://www.osronline.com/article.cfm?article=446) as an example to create the upper filter driver for a disk device for my usb flash. And now I need to access the sector before the first partition and put a verification signature there. But I do not know how. I will be glad to any help. I tried to use this request IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, but I got an error code ntstatus.h -1073741808
  Message 2 of 4  
10 Aug 18 12:57
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 12028
Need help with usb filter driver

xxxxx@gmail.com wrote: > I've used this article (http://www.osronline.com/article.cfm?article=446) as an example to create the upper filter driver for a disk device for my usb flash. And now I need to access the sector before the first partition and put a verification signature there. But I do not know how. I will be glad to any help. I tried to use this request IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, but I got an error code ntstatus.h -1073741808 Have you ever in your life seen a status code printed as a signed decimal value?  They are unsigned hex values, always.  That's C0000010, which is STATUS_INVALID_DEVICE_REQUEST. Did your filter allocate space to make sure there IS a sector before the first partition?  If not, how do you know it is available for you to write? Where are you in the stack?  Specifically, what device did you filter?  Remember the disk stack has disk drivers, volume drivers, partition drivers, file system drivers, etc.  Your addressing and your interface options all depend on where you are in the stack.  IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS is recognized by partition drivers, like opening the device \\.\C: . -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 3 of 4  
12 Aug 18 07:41
Alexey Yerakhavets
xxxxxx@gmail.com
Join Date: 19 Feb 2018
Posts To This List: 7
Need help with usb filter driver

Hello, Tim. I'm developing drivers for the first time, so, really, my knowledge is not enough. I work with usb flash. To install the driver, I use the addfilter application, in the SetupDiGetClassDevs function I use the classguid GUID_DEVINTERFACE_DISK. Maybe it's worth reading the MBR, and based on it determine whether there is a free sector before the first partition? Or maybe another way? How can I find out where I'm on the stack?
  Message 4 of 4  
13 Aug 18 16:22
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 12028
Need help with usb filter driver

xxxxx@gmail.com wrote: > Hello, Tim. I'm developing drivers for the first time, so, really, my knowledge is not enough. I work with usb flash. To install the driver, I use the addfilter application, in the SetupDiGetClassDevs function I use the classguid GUID_DEVINTERFACE_DISK. Maybe it's worth reading the MBR, and based on it determine whether there is a free sector before the first partition? Or maybe another way? How can I find out where I'm on the stack? This is a tricky area to play around with as a beginner.  The disk stack is complicated, with a lot of different players making a lot of assumptions.  You don't want to do anything, for example, that renders your device unreadable on systems without your driver. I don't know the disk stack well enough to advise you on where to find a private data space for your driver.  Hopefully, someone else here will respond. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
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 18:45.


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