The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: cakesy on April 25, 2005, 01:49:22 PM

Title: Read sectors in Windows 9x
Post by: cakesy on April 25, 2005, 01:49:22 PM
Hello,
 
    Does anyone know how to do this??

    I am interested in writing a program that access other partitions, such as ext2 from windows me.
   
    Information on how to this on the web has been unhelpful, to say the least.


Thanks,

John
Title: Re: Read sectors in Windows 9x
Post by: AeroASM on April 25, 2005, 01:59:06 PM
You need to write your own Kernel Mode Device Driver. I think you will have to write not only the code to decode the ext2 filesystem but also the code to access the IDE interface becuase I do not think that Windows provides any capability for this.
Title: Re: Read sectors in Windows 9x
Post by: Opcode on April 25, 2005, 02:14:46 PM
Hi cakesy,

IMO, you should not waste you time with windows 9x kernel coding.

There is a open source ext2 driver for windows nt/2k/xp here:
http://ext2fsd.sourceforge.net/projects/projects.htm

Regards,
Opcode
Title: Re: Read sectors in Windows 9x
Post by: cakesy on April 26, 2005, 09:23:31 AM
Hi,

    Thanks for that, it seems like it will be tricky.

    As to opcode, at the moment I am writing it for 9x, so that link doesn't help me, although it is interesting.

Thanks,

John
Title: Re: Read sectors in Windows 9x
Post by: Gustav on May 02, 2005, 09:50:17 AM

Direct HD access for a Win32 program in Win9x is tricky. The DeviceIoControl API doesn't work, you have to write a 32Bit-Dll thunking down to a 16-Bit dll, then use DPMI in this dll for disk access. Don't do that if it isn't absolutely necessary.
Title: Re: Read sectors in Windows 9x
Post by: MichaelW on May 02, 2005, 10:20:04 AM
Under Windows 9x a DOS program can access the HDD directly. If you need to do it from a Windows program, you could call a DOS program to do the actual access. The Windows program could pass data to the DOS program through the command line or through a file, and the DOS program could pass data back
to the Windows program through a file.


Title: Re: Read sectors in Windows 9x
Post by: Farabi on May 08, 2005, 03:38:14 AM
I think I did know it but the code is gone. Try to search it at board.win32asmcommunity.net . It direct access the port, but carefull experimenting with it, it could be dangerous.