RES: Make Floppy Image

That’s quite easy and can be made even in user mode.
But I can only give you some tips, I don’t have any docs about this.

DWORD dwBytes;
HANDLE hVolume;
BYTE Buffer[512]; //-f–> This array must be made of 512 bytes

hVolume = CreateFile(“\\.\A:”,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
0,
NULL);

ReadFile(hVolume, //-f–> Just one read, cuz is only a
demostration.
Buffer, // You must read/write while is not
EOF.
sizeof(Buffer),
&dwBytes,
NULL);

CloseHandle(hVolume);

Have fun,
Fernando Roberto da Silva.

-----Mensagem original-----
De: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Em nome de Shadow
Enviada em: quarta-feira, 19 de julho de 2006 09:41
Para: Windows System Software Devs Interest List
Assunto: [ntdev] Make Floppy Image

Can anyone advice some resources(docs or sourcecodes) about creating
an image of a floppy disk?

Tnx.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Great.
Thanks alot.

That’s quite easy and can be made even in user mode.
But I can only give you some tips, I don’t have any docs about this.

DWORD dwBytes;
HANDLE hVolume;
BYTE Buffer[512]; //-f–> This array must be made of 512 bytes

hVolume = CreateFile(“\\.\A:”,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
0,
NULL);

ReadFile(hVolume, //-f–> Just one read, cuz is only a
demostration.
Buffer, // You must read/write while is not
EOF.
sizeof(Buffer),
&dwBytes,
NULL);

CloseHandle(hVolume);