home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!uvaarpa!murdoch!Turing.ORG!bk
- From: bk@Turing.ORG (Brian Knatz)
- Subject: bk asks: File Handle in TP
- Message-ID: <1992Sep7.021438.9222@murdoch.acc.Virginia.EDU>
- Summary: I need a file handle in Turbo Pascal
- Keywords: interrupts, file handle, FileRec.handle
- Sender: Brian Knatz
- Organization: The Turing Project, Charlottesville Virginia.
- Date: Mon, 7 Sep 1992 02:14:38 GMT
- Lines: 35
-
- Described on page 348 of the Turbo Pascal 4.0 manual:
-
- File types are represented as records. Typed files and untyped
- files occupy 128 bytes, which are laid out as follows:
-
- type
- FileRec = record
- Handle : word;
- Mode : word;
- RecSize : word;
- Private : array[1..26] of byte;
- UserData: array[1..16] of byte;
- Name : array[1..79] of char;
- end;{FileRec}
-
- Question:
- If I have a FILE, f, and a FileRec, fr, how do I get them to
- refer to the same file?
- How, given an assigned-and-reset f do I take a look at the its Handle?
-
- I'd like to explore some of DOS's file-related interrupts
- (like interrupt 21,57), but they all want aspects of the
- FileRec I don't know how to access.
-
- Thanks in advance for any help.
-
- bk
- --
-
- ------------------------------------------------------------------------
- Brian Knatz, User Services Programmer "Language is a Virus"
- Academic Computing Center - William S. Burroughs
- University of Virginia - Laurie Anderson
- bk@Turing.ORG "The Truth is a Virus" - H.H.H.
- ------------------------------------------------------------------------
-