- IOCtl Problem.
- Posted by Rushikesh Patil on August 31st, 2003
Hello,
I am writing a driver to create a virtual disk partition using some RAM.
Driver is installed properly and a symblic link at \DosDevice\F: is created.
But when I start using this partition I get an error message,
"F:\ is not accessible
Incorrect function."
After debugging through the code I found that my DispatchIOCtl() is getting
following IOCtl's calls repetedly,
IOCtl command = 0x00074804 IOCTL_STORAGE_MEDIA_REMOVAL
IOCtl command = 0x00070024 IOCTL_DISK_IS_WRITABLE
IOCtl command = 0x00070000 IOCTL_DISK_GET_DRIVE_GEOMETRY
IOCtl command = 0x0007405C Unknown IOCTL
IOCtl command = 0x00074804 IOCTL_STORAGE_MEDIA_REMOVAL
I tried to find out the command using CTL_CODE of ntdddisk.h, but getting
Function value 0x0017 which does not exist.
I am not able to figure out what's the flaw here?
Could you please let me know what is going wrong here.
Thanks in Advance,
~rushikesh.
--
----------------------------------------
Rushikesh Patil.
Persistent Systems Pvt. Ltd.
cell: +(91)98226-39056
http://www.rushikeshpatil.8m.com
----------------------------------------
- Posted by Tim Roberts on September 1st, 2003
"Rushikesh Patil" <rushikesh_patil@persistent.co.in> wrote:
What DDK are you using? The Windows 2000 and above DDKs include this:
#define IOCTL_DISK_GET_LENGTH_INFO CTL_CODE(IOCTL_DISK_BASE,
0x0017, METHOD_BUFFERED, FILE_READ_ACCESS)
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
- Posted by Rushikesh Patil on September 1st, 2003
Thanks Tim giving me quite a lot helpful hint on this.
I am using XP DDK and it does not have this IOCtl
IOCTL_DISK_GET_LENGTH_INFO, but its DDK documentation is showing help on
this IOCtl.
I guess still I can use this thing after defining my own macro
IOCTL_DISK_GET_LENGTH_INFO for this value.
Thanks,
~ rushikesh
--
----------------------------------------
Rushikesh Patil.
Persistent Systems Pvt. Ltd.
cell: +(91)98226-39056
http://www.rushikeshpatil.8m.com
----------------------------------------
"Tim Roberts" <timr@probo.com> wrote in message
news
3k5lvc5hg9qib78cirmjpfdok6a28ckjd@4ax.com...