TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: VITUS JENSEN
from: MIKE RUSKAI
date: 1999-10-19 07:34:00
subject: DosDevIOCtl, cat8, f64

Some senseless babbling from Vitus Jensen to Mike Ruskai
on 10-17-99  11:35 about DosDevIOCtl, cat8, f64...

 VJ> Moin MIKE,

 VJ> 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).
 VJ> ...

 VJ> No, you need the following IOCtl:

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

Interesting.  I've already figured it out using DosDevIOCtl(), though the
above might prove useful in the future.

Is that to say that DosSetFilePtr() will also treat parameters as sector
offsets?

Mike Ruskai
thannymeister@yahoo.com


... Keep your OS/2 system healthy by practicing safe REXX.

___ Blue Wave/QWK v2.20
--- Platinum Xpress/Win/Wildcat5! v3.0pr2
* Origin: FIDO QWK MAIL & MORE! WWW.DOCSPLACE.ORG (1:3603/140)

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™.