From: Alfred Hilscher <Alfred.Hilscher@icn.siemens.de>
Subject: Re: Ada and Hardware
Date: Thu, 10 May 2001 19:24:23 +0200
Date: 2001-05-10T19:24:23+02:00 [thread overview]
Message-ID: <3AFACEC7.C2E67357@icn.siemens.de> (raw)
In-Reply-To: BiwK6.3562$po.600977@news6-win.server.ntlworld.com
Maybe the Windows API calls "CreateFile" and "DeviceIOControl" will be
what you are looking for ? Look for this excerpt from MS-API
dokumentation.
"You can use the CreateFile function to open a disk drive or a partition
on a disk drive. The function returns a handle to the disk device; that
handle can be used with the DeviceIOControl function. The following
requirements must be met in order for such a call to succeed:
� The caller must have administrative privileges for the operation to
succeed on a hard disk drive.
� The lpFileName string should be of the form \\.\PHYSICALDRIVEx to open
the hard disk x. Hard disk numbers start at zero. For example:
String Meaning
\\.\PHYSICALDRIVE2 Obtains a handle to the third physical drive on the
user's computer.
� The lpFileName string should be \\.\x: to open a floppy drive x or a
partition x on a hard disk. For example:
String Meaning
\\.\A: Obtains a handle to drive A on the user's computer.
\\.\C: Obtains a handle to drive C on the user's computer."
"chris.danx" wrote:
>
> Hello folks,
> I'm implementing a program which reads files on a floppy disk which are not
> stored via the fat12 file system. I know this is the most popular format but i
> want a simple contigouous fs for the purposes of booting an OS.
>
> I'm implementing basic routines for the management of the fs at the moment but
> i've been planning ahead and i've encountered a problem. It is necessary to
> access the disk and write the fs to it. I was wondering if anyone knew of any
> Ada packages or techniques for accessing the disk in such a raw manner? I need
> a way to write and read via blocks, sectors, tracks etc on the floppy. I'm
> developing on windows 98 via GNAT.
>
> Thanks,
> Chris Campbell
next prev parent reply other threads:[~2001-05-10 17:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-10 13:02 Ada and Hardware chris.danx
2001-05-10 13:36 ` Ted Dennison
2001-05-10 14:00 ` chris.danx
2001-05-10 14:52 ` Ted Dennison
2001-05-10 18:20 ` chris.danx
2001-05-10 20:01 ` Jerry van Dijk
2001-05-10 20:54 ` chris.danx
2001-05-10 13:54 ` Tarjei T. Jensen
2001-05-10 14:10 ` chris.danx
2001-05-10 14:34 ` Tarjei T. Jensen
2001-05-10 18:28 ` chris.danx
2001-05-14 7:40 ` Kretschmer, Matthias
2001-05-10 17:24 ` Alfred Hilscher [this message]
2001-05-10 20:22 ` Ted Dennison
2001-05-10 23:35 ` Jeff Creem
2001-05-10 23:58 ` Fraser Wilson
2001-05-11 1:54 ` Jeff Creem
2001-05-11 19:13 ` Randy Brukardt
2001-05-14 10:27 ` Alfred Hilscher
2001-05-10 20:53 ` chris.danx
2001-05-11 21:45 ` GNAT for DOS chris.danx
2001-05-13 19:52 ` Ada and Hardware chris.danx
2001-05-14 0:18 ` Jeff Creem
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox