View Full Version : Raw disk writing in Windows98

May 7th, 2011, 02:39
Hello, I want to program software protection and can't find any suitable info about raw physical disk reading/writing in Win98 SE. I found something like this:

DeviceIoControl(hDev, VWIN32_DIOC_DOS_INT25, &reg, sizeof(reg), &reg, sizeof(reg), &cb, 0);
DeviceIoControl(hDev, VWIN32_DIOC_DOS_INT26, &reg, sizeof(reg), &reg, sizeof(reg), &cb, 0);
DeviceIoControl(hDev, VWIN32_DIOC_DOS_DRIVEINFO, &reg, sizeof(reg), &reg, sizeof(reg), &cb, 0);

... but it works only for reading logical disks. I need writing to physical device. Can someone provide info or links? Sorry for bad english.

May 7th, 2011, 10:00
int 13 is a good start -- http://www.ctyme.com/intr/int-13.htm

May 7th, 2011, 17:36
Yes int 13h is easy way out In general you would do read/write by means of io ports and all needed commands you can find at http://www.t10.org/ (SCSI) and http://www.t13.org/ (ATA). Also you will need PCI specification which is not free(http://www.pcisig.com) but google can help to find some version, to see what ports you have to use, and if it's SCSI or IDE bus, and what set of commands to send

Hope this helps