Does anybody please know of any documentation on the direct disk Interupts 25h and 26h under windows, i know they can be used because they are mentioned in the MSDN library, but all the documentations seems to of been removed in favour of the the FAT direct disk access interupts.
This wouldn't be a problem normaly but the drive i am trying to acess is not in FAT format.
Thanks :)
Sorry, even in 16 bit protected mode Windows programs, interrupts 25h and 26h fail.
"Microsoft implies from their Developer's Notes that most of the DOS services will work ok when called from a Windows program running in 16 bit protected mode.
"Those specifically not supported in protected mode, and which will fail, are:
"INT 20h Terminate Program
"INT 25h Absolute disk read
"INT 26h Absolute disk write"
...
This was quoted from the book "Windows Assembly Language and Systems Programming", by Barry Kauler. You'll have to find a different way to access the hard drive. Under Windows NT, it doesn't seem too hard...just open the hard drive as a file:
Drive80 db "\\.\PHYSICALDRIVE0",0
invoke CreateFile,addr Drive80, GENERIC_READ or GENERIC_WRITE, FILE_SHARE_READ or FILE_SHARE_WRITE, NULL, OPEN_EXISTING, NULL, NULL
Then you have to use DeviceIOControl, not ReadFile, but all this is covered in the Windows API. As for in Windows 9x, I'm not entirely sure. I think the best way would be to create a V86 mode and run these interrupts. Of course, this is all speculation, really, as I've never tried to do it. :)
Thanks for the help aye, i took these equates information from the msdn library about 3 days ago allowing Win32 apps to indirectly access Disk Interrupts using the VWin32.Vxd, i
thought this might be of intrest... Look up VWin32.Vxd in the msdn delvelopers library
VWIN32_DIOC_DOS_DRIVEINFO equ 6 ;Performs Interrupt 21h Function 730X commands. This value is supported in Windows 95 OEM Service Release 2 and later.
VWIN32_DIOC_DOS_INT13 equ 4 ;Performs Interrupt 13h commands
VWIN32_DIOC_DOS_INT25 equ 2 ;Performs the Absolute Disk Read command (Interrupt 25h)
VWIN32_DIOC_DOS_INT26 equ 3 ;Performs the Absolute Disk Write command (Interrupt 25h)
VWIN32_DIOC_DOS_IOCTL equ 1 ;Performs the specified MS-DOS device I/O control function (Interrupt 21h Function 4400h through 4411h)