Article View: borland.public.cppbuilder.nativeapi
Article #11270Re: Problems getting DISK_GEOMETRY under WinME
From: Remy Lebeau (TeamB)
Date: Sun, 22 Feb 2004 04:00
Date: Sun, 22 Feb 2004 04:00
39 lines
2362 bytes
2362 bytes
"Walt Morrey" <dadinc@bellsouth.net> wrote in message
news:4037b73a$1@newsgroups.borland.com...
> I first tried calling CreateFile within the function, GetDriveGeom,
> using DeviceName. CreateFile failed
You cannot open disk folders when running under Win9x/ME like you can under
WinNT/2K/XP. You must use a separate device driver instead.
> so I put in "\\\\.\\vwin32" instead
That is the correct device driver to use for Win9x/Me.
> That works, and then the call to DeviceIoControl in the line below fails.
You cannot issue IOCTL_DISK_GET_DRIVE_GEOMETRY or other IOCTL commands
directly when running under Win9x/ME. If you look at the documentation, it
even says that only WinNT/2K/XP is supported for that.
For what you ask, you must issue commands to VWIN32 via the
VWIN32_DIOC_DOS_IOCTL command. Please read the following article for more
details:
Calling DeviceIoControl on Windows Me/98/95
http://msdn.microsoft.com/library/en-us/devio/base/calling_deviceiocontrol_on_windows_95_98_me.asp
> How can I get DISK_GEOMETRY information AND, in the future,
> use that information to read and write to a removeable drive
> sector-by-sector (NO FAT, etc, just the minimum info on Sector 0)?
Once you have the above implemented, look at the following articles for the
INT 21H commands that you are asking for:
FAT32 Functions
http://msdn.microsoft.com/library/en-us/win9x/fat32_70z4.asp
Gambit
Technical Details
Message-ID:
<40382779$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4037b73a$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8ef29fec1dea7408 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-21 20:09:27 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4037b73a$1@newsgroups.borland.com> Subject: Re: Problems getting DISK_GEOMETRY under WinME Date: Sat, 21 Feb 2004 20:00:30 -0800 Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.138.253 Message-ID: <40382779$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1077421945 67.22.138.253 (21 Feb 2004 19:52:25 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail