Reading/Writing directly to/from a device in MSWindows

From: Benjamin de Waal (yttrium_at_optusnet.com.au)
Date: 02/28/05


Date: Mon, 28 Feb 2005 20:42:25 +1100

Hey all,
  I'm trying to figure out how to directly write to a device in Windows.
Basically, what I'm wanting to do is create an image of a device
(specifically, a CompactFlash card that uses a filesystem Windows doesn't
recognise), store it as a file, modify it and dump it back to the card.
  Currently, in version 0.001 of my program, I'm just calling "dd for
Windows" using ShellExecute - this works perfectly, but obviously this isn't
exactly acceptable for the final product! (and in the kludgy way I've done
it, it locks the whole program and I can't implement a progress bar etc etc)

  I'm HOPING it's as easy as using fopen and just treating it like a file
from then on (that'll my Unix background speaking)...

  If it makes a difference, I'm using Visual C++ 6 and this is an MFC app,
but whether the solution is MFC or otherwise, I'm really not fussy!

  Any help (be they code snippets or even just pointers to documentation)
would be much appreciated.

Regards,
Ben de Waal.

-- 
"When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl."


Relevant Pages

  • Opening/Running files through python
    ... Hey guys, hope you can help me here. ... I am running in windows and I am trying to open a file via python. ... I'm not wanting to read a file, I just want to open it. ...
    (comp.lang.python)
  • Re: Reading/Writing directly to/from a device in MSWindows
    ... Benjamin de Waal wrote: ... > I'm trying to figure out how to directly write to a device in Windows. ... what I'm wanting to do is create an image of a device ... a CompactFlash card that uses a filesystem Windows doesn't ...
    (comp.lang.cpp)
  • urgent: compactflash card error
    ... Compactflash card, but Windows keeps saying please enter a disk into drive ...
    (microsoft.public.windowsxp.photos)
  • The predecessor upon Joey
    ... from the accommodation. ... the windows often represent ... Hey, deaths like at all fresh ships, unless they're obliged. ... Wail prosecutes the trunks thus, ...
    (sci.crypt)
  • Re: all elder hollow pickles seemingly hate as the filthy papers pull
    ... Hey, it hates a tree too cheap over her ... the noisy teacher may attack more windows. ... She wants to kick wet jackets beneath Doris's ...
    (rec.pets.cats.anecdotes)