RE: [COMP] Question for Windows Programmers (Visual C++)

  • From: "Michael V. Franklin" <Slavo@xxxxxxxxxxxx>
  • To: <computers@xxxxxxxxxxxxxx>
  • Date: Wed, 8 Dec 1999 08:22:46 -0000

In C and in Linux, you use the function open("/dev/fd0", O_RDWR) to open the
floppy drive for read and write.  You can use the open() function to open a
file on the disk, but you cannot get to the file allocation table or the
master boot record.  You can only read and write to that file.  In windows,
there is no /dev/fd0 to open.  I don't know what to type in place of
"/dev/fd0" to open the disk.  MSDN says you must use the CreateFile() and
DeviceIoControl() functions to write to the disk, but they only tell how to
open regular files and not the actual device.

MVF

-----Original Message-----
From: weez@xxxxxxxxxxxxxx [mailto:weez@xxxxxxxxxxxxxx]
Sent: Wednesday, December 08, 1999 3:47 PM
To: Avenir Mailing List (E-mail)
Subject: Re: [COMP] Question for Windows Programmers (Visual C++)


> Does anyone know how to write a program that will read and write to
ANYWHERE
> on a floppy or hard disk in Windows NT?
>
> I think it has something to do with the CreateFile() function and the
> DeviceIoControl() function.  Even if you don't know exaclty I would
> appreciate any insight to the problem.

In C?  Can't you just use the standard C "open" syntax?  It escapes me
(it's been like two years), but it doesn't seem like it'd be hard to just
open a file with a particular write mode, unless of course it's vastly
different under NT than regular old windows...


> Attn John:  Yes, I know it's very easy to do in linux, but that is not an
> option here.

Shouldn't be any more difficult under Windows...

John


========================================
Avenir Web's Computers Mailing List

List Modes, Subscription, and General Info:
Go to http://avenir.dhs.org/mailing.html
List Archives: http://avenir.dhs.org/archives/
Administrative Contact: webmaster@xxxxxxxxxxxxxx

Get computer help: http://avenir.dhs.org
========================================

========================================
Avenir Web's Computers Mailing List

List Modes, Subscription, and General Info:
Go to http://avenir.dhs.org/mailing.html
List Archives: http://avenir.dhs.org/archives/
Administrative Contact: webmaster@xxxxxxxxxxxxxx

Get computer help: http://avenir.dhs.org
========================================

Other related posts: