Xref: utzoo comp.sys.mac.programmer:13132 comp.sys.mac:50513 Path: utzoo!attcan!uunet!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!apple!amdahl!twg.com!lefty From: lefty@twg.com (David N. Schlesinger) Newsgroups: comp.sys.mac.programmer,comp.sys.mac Subject: Re: Finding the current position of an open file--again Message-ID: <205@gollum.twg.com> Date: 12 Mar 90 21:22:49 GMT Sender: news@twg.com Organization: The Wollongong Group Lines: 21 References:<5743.25f51321@george.uh.edu> <5753.25f634f1@george.uh.edu> In article <5753.25f634f1@george.uh.edu> mike@george.uh.edu (Mike Frederick) writes: > I have trapped a READ (xA002), and I can see the paramBlock with the > ioRefNum in it. Using only MacBugs, how can I get to the file mark? I see > something called a File Control Block which is kept in memory for each open > file, and it a field called fcbCrPs which is described as "mark". Is this > what I want, and how do I get to the correct FCB from the paramBlock? Yes, the fcbCrPs field _is_ what you want. To find the appropriate FCB, take the ioRefNum from the parameter block and add it to the address stored at the low-memory global FCBsPtr (at location 0x34E). This will get you a pointer to the appropriate FCB. Hope this helps, Lefty |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| | David N. Schlesinger || "When I have nothing to say, | | The Wollongong Group || my lips are sealed; | | Internet: Lefty@twg.com || say something once, | | POTS: 415/962-7219 || why say it again?" -- David Byrne | |<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>|