🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #1550

Re: (P)Dsk functions

#1550
From: Keith Mund
Date: Thu, 04 Oct 1990 06:58
17 lines
1269 bytes
In article <> seg@beaver.Ingres.COM (scott e garfinkle) writes:
>Can anybody help me with the functions that directly access disk sectors?

Try using DosOpen. The parameter fsOpenMode needs to have the 
OPEN_FLAGS_DASD value included. Just open the drive name, like "C:" instead
of a filename. I played with it and got it to work with little problem. The
boot drive is locked in some manner, so writing could be an issue unless
you boot from floppy. The big benefit here is that normal DosRead/Write/Seek
will work. No fancy programming required. No need for GURUs anymore.

You can also use the DosDevIOCtl function to actually have to worry about
all the stuff you want to bother with. In some situations this could be
a requirement, like recovering a damaged disk, copyprotection, etc.

P97 of OS/2 Programmer's Rev. Vulume 3 talks about OPEN_FLAGS_DASD.

Keith Mund
Technical Details
Message-ID: <1338@ashtate.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!hacgate!ashtate!keithm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!hacgate!ashtate!keithm
From: keithm@ashtate.UUCP (Keith Mund)
Newsgroups: comp.os.os2.programmer
Subject: Re: (P)Dsk functions
Message-ID: <1338@ashtate.UUCP>
Date: 4 Oct 90 06:58:01 GMT
Reply-To: keithm@ashtate.UUCP (Keith Mund)
Organization: Ashton-Tate, Torrance, CA
Lines: 17