hi,guys: I don't know if it is proper to ask such a question here. I'm sorry if I break some rules.
why IOCTL_DISK_GET_DRIVE_GEOMETRY_EX fail in windows 2000 and succeed in windows xp and greater version?
or how can I get a disk(whatever,ATA,SCSI,USB )'s real size(including additional sectors) in a easy way in windows 2000, just like there is such a function,
__int 64GetDiskRealSize(HANDLE hDisk);
Could anybody help me? Waiting for reply. Thank you!
http://msdn.microsoft.com/en-us/library/aa365171(VS.85).aspx IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
Minimum supported client Windows XP Minimum supported server Windows Server 2003
Ever heard of MSDN? It is quite useful.
Date: Wed, 10 Dec 2008 22:17:21 +0800 From: piziyi@gmail.com To: ros-dev@reactos.org Subject: [ros-dev] why IOCTL_DISK_GET_DRIVE_GEOMETRY_EX failed in windows 2000?
hi,guys: I don't know if it is proper to ask such a question here. I'm sorry if I break some rules.
why IOCTL_DISK_GET_DRIVE_GEOMETRY_EX fail in windows 2000 and succeed in windows xp and greater version?
or how can I get a disk(whatever,ATA,SCSI,USB )'s real size(including additional sectors) in a easy way in windows 2000, just like there is such a function,
__int 64GetDiskRealSize(HANDLE hDisk);
Could anybody help me? Waiting for reply. Thank you! _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QB...
I'm not asking a official document to tell me, hi dude, Minimum supported client of IOCTL_DISK_GET_DRIVE_GEOMETRY_EX is Windows XP, it is not supported by W2k, I asked the question here because I wanna to know the fundamental "why". Still thank you,friend!
"I wanna to know the fundamental "why"."
...because the IOCTL isn't implemented?
"or how can I get a disk(whatever,ATA,SCSI,USB )'s real size(including additional sectors) in a easy way in windows 2000, just like there is such a function,"
Sorry, I don't know.
Date: Wed, 10 Dec 2008 23:58:53 +0800 From: piziyi@gmail.com To: ros-dev@reactos.org Subject: Re: [ros-dev] why IOCTL_DISK_GET_DRIVE_GEOMETRY_EX failed in windows 2000?
I'm not asking a official document to tell me, hi dude, Minimum supported client of IOCTL_DISK_GET_DRIVE_GEOMETRY_EX is Windows XP, it is not supported by W2k, I asked the question here because I wanna to know the fundamental "why".
Still thank you,friend! _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.a...
Try to look at this tool, "dd for Windows" here : http://www.chrysocome.net/dd
The source code is availabe (GPL). You can find in the HTML webpage this information about getting the "real" size :
Using --size
Traditionally when using dd, if you wanted to copy an entire device,
you did not specify a block count and dd would read until it reached the end of the device. If you tried to read past the end of the device, the data up to the end of the device would be returned and if you kept reading you would get an error message. Windows however does not always do this so --size will tell dd to figure out the size of the device and make sure it does not read past that point. This is important for USB sticks which stop working if you read past the end of them. This is not on by default because getting the correct size of the device is not always possible. Some devices also keep returning bogus data past the end of the device without returning a suitable error code
Hope this helps. Sincerely, TheProphet.
I'm not asking a official document to tell me, hi dude, Minimum supported client of IOCTL_DISK_GET_DRIVE_GEOMETRY_EX is Windows XP, it is not supported by W2k, I asked the question here because I wanna to know the fundamental "why". Still thank you,friend!
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Jack Yi wrote:
I'm not asking a official document to tell me, hi dude, Minimum supported client of IOCTL_DISK_GET_DRIVE_GEOMETRY_EX is Windows XP, it is not supported by W2k, I asked the question here because I wanna to know the fundamental "why".
Because Windows XP is not Windows 2000. Just like Windows 2000 doesn't have themes but Windows XP does. Why?
The question is why you need IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, when Windows 2000 implements IOCTL_DISK_GET_DRIVE_GEOMETRY, which is largely identical except for (surprise surprise) features implemented in Windows XP
and you probably really want to use IOCTL_DISK_GET_DRIVE_GEOMETRY instead, anyway