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


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 2  
16 Feb 02 11:20
ntdev member 4653
xxxxxx@mclean.sparta.com
Join Date:
Posts To This List: 3
writing to PhysicalDriveX

I have a requirement to do raw reads and writes to a physical drive at the kernel level. I am opening a handle to the drives using ZwCreateFile by passing in "\DosDevices\PhysicalDriveX" where "X" is "0", "1", etc. I can successfully open and read a drive using this technigue, but my ZwCreateFile call always fails when I attempt to open the drive for writing. The error returned varies between "STATUS_INVALID_PARAMETER", "STATUS_ACCESS_DENIED", and "STATUS_OBJECT_NAME_NOT_FOUND" depending on how I have the parameters set. Has anyone tried this and can provide me with the proper function syntax. Thanks in advance, Craig Denbrook Sparta, Inc. --- You are currently subscribed to ntdev as: $subst('Recip.EmailAddr') To unsubscribe send a blank email to leave-ntdev-$subst('Recip.MemberIDChar')@lists.osr.com
  Message 2 of 2  
16 Feb 02 13:42
ntdev member 6069
xxxxxx@backmagic.de
Join Date:
Posts To This List: 109
writing to PhysicalDriveX

Craig, you wrote on Saturday, February 16, 2002, 12:19:29: cmsc> I have a requirement to do raw reads and writes to a physical cmsc> drive at the kernel level. I am opening a handle to the drives cmsc> using ZwCreateFile by passing in "\DosDevices\PhysicalDriveX" cmsc> where "X" is "0", "1", etc. I can successfully open and read a cmsc> drive using this technigue, but my ZwCreateFile call always fails cmsc> when I attempt to open the drive for writing. The error returned cmsc> varies between "STATUS_INVALID_PARAMETER", "STATUS_ACCESS_DENIED", cmsc> and "STATUS_OBJECT_NAME_NOT_FOUND" depending on how I have the cmsc> parameters set. Has anyone tried this and can provide me with the cmsc> proper function syntax. Make sure you have the sharing options set to FILE_SHARE_READ|FILE_SHARE_WRITE. Ralf. --- You are currently subscribed to ntdev as: $subst('Recip.EmailAddr') To unsubscribe send a blank email to leave-ntdev-$subst('Recip.MemberIDChar')@lists.osr.com
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 07:52.


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