Path: utzoo!attcan!uunet!samsung!sdd.hp.com!zaphod.mps.ohio-state.edu!swrinde!ucsd!pacbell.com!pacbell!rtech!ingres!seg From: seg@ingres.com (scott e garfinkle) Newsgroups: comp.os.os2.programmer Subject: (P)Dsk functions Message-ID: <1990Oct1.212055.2402@ingres.Ingres.COM> Date: 1 Oct 90 21:20:53 GMT Reply-To: seg@beaver.Ingres.COM (scott e garfinkle) Organization: Ingres Corporation Lines: 22 Can anybody help me with the functions that directly access disk sectors? None of the books I have gives a very good description of how to use them. I need to be able to read and write arbitrary disk sectors. The OS/2 Programmer's Reference refers to the TRACKLAYOUT structure; but it's still not clear to me how to use it. So, the specific questions are: 1. How do I set things up so that I read/write a specific sector, say the disk's boot sector? 2. What are the starting points for the numbering systems? (I am guessing that Heads, Cylinder, and FirstSector start at zero and SectorNumber starts at 1). 3. Is it necessary to do a LOCK[PHYS]DRIVE before any read/writes (it would seem so)? 4. Is it necessary to fill in the TrackTable array for an entire track's worth of sectors? How much of this array *really* has to be filled in? If there is a reference that explains this that I ought to have, please feel free to suggest. -Scott E. Garfinkle Ingres Corp.