How To Use Int 13h in Windows 95 and Windows 98 (262347)



The information in this article applies to:

  • Microsoft Windows 98 Driver Development Kit (DDK)
  • Microsoft Windows 95 Driver Development Kit (DDK)

This article was previously published under Q262347

SUMMARY

Applications interface with VWIN32 by using the DeviceIoControl function to read/write absolute and physical sectors on floppy and hard disk drives. But reading/writing physical sectors on a hard disk drive will fail because hard disk physical sectors are protected by Windows 95 and Windows 98.

MORE INFORMATION

It is possible to read/write physical sectors on a hard disk from a VxD, by simulating Int 13h. Such a VxD would implement a W32_DEVICE_CONTROL interface for applications to talk to the VxD. The W32_DEVICE_CONTROL handler should do the following:
  1. Allocate V86 memory by using V86MMGR_Allocate_Buffer.
  2. Push_Client_State.
  3. Begin_Nest_V86_Exec.
  4. Pass Int 13h parameters (or Ext Int 13h parameters) in Client_?? registers.
  5. Exec_Int.
  6. End_Nest_Exec.
  7. Pop_Client_State.
  8. Copy the contents from V86 memory to a buffer.
  9. Deallocate V86 memory immediately (step 8 can be done during deallocation).

Modification Type:MinorLast Reviewed:7/13/2004
Keywords:kbhowto KB262347