TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: MIKE RUSKAI
from: Vitus Jensen
date: 1999-10-17 11:35:00
subject: DosDevIOCtl, cat8, f64

Moin MIKE,

14.10.99 19:29, MIKE RUSKAI wrote a message to ALL :

 MR> I'm collecting information on the size of the HPFS directory
 MR> band, with respect to the size of the drive.  To do this, I read
 MR> the Super Block by opening the drive as a file.

 MR> This fails, however, with drives over 2GB in size, since
 MR> DosRead() and cousins can't handle files that size (except
 MR> perhaps on Aurora - I had one person run it successfully on a
 MR> 14GB drive, and am awaiting information on what he's running).

 MR> To get around this, I figure I need to make a call to
 MR> DosDevIOCtl(),
 MR> category 8 (IOCTL_DISK), function 0x64 (DSK_READTRACK).
...

No, you need the following IOCtl:

===============================================
DosRead/Write in direct-access mode will normally fail if the partition is
greater than four gigabytes in size.  If you wish to write an HPFS editor or
other tool, you will need to know the "secret password" that unlocks the big
disks.  After you use DosOpen to get a handle to that volume, use FSCTL
FSC_SECTORIO (0x9014) and in the parameter list, put a pointer to 0xDEADFACE.  
Doing so will put the handle in "sector" mode.  All offsets and sizes will
refer to sectors instead of bytes, allowing you to address 64Gb.   
=================================================

From "Undocumented Features of OS/2" (os2undoc.zip, 48K)

C-x C-s
    Vitus

The Crazy Teaparty: X75 & V90S, 24h, 7d, 52w, +49-5136-893003
--- Sqed/rexx 300:
* Origin: Just say NO! to Micro$oft Windows. (2:2474/424.1)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.