Path: 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 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