[comp.sys.mac.programmer] Anyone know anything about CurDirStore ?

omullarney@cs.tcd.ie (Oliver Mullarney - IGSG, TCD) (11/21/88)

In the midst of all this talk about low memory globals and setting the
current/default folder, the LMG CurDirStore has cropped up more than
once.
Can anyone tell me what this is, what it does, what effect it has on the
Finder ?
What is more important, how one can get hold of it from Pascal ?
Sure, I can get to it from C, but I have a feeling that it is going to
fix a tiny little bug in a Pascal Desk Accessory I've had around for some
time, so a Pascal reference would be very useful.

Oliver Mullarney              
Trinity College Dublin, Ireland
e-mail: omullarney@cs.tcd.ieOP

km@cadre.dsl.PITTSBURGH.EDU (Ken Mitchum) (11/29/88)

CurDirStore (Inside Mac vol IV p 72) contains the directory ID of the
the last opened directory. This is NOT a working directory number. You
can obtain the current working directory number by using CurDirStore
plus SFSaveDisk, which contains the negative of the volume reference
number that is current. This also is a true volume reference number,
NOT a working directory number. CurDirStore is a long, while SFSaveDisk
is an int. You can use both as parameters in parameter blocks to various
routines, or use a routine to obtain the working directory reference number
given the volume and directory ID.

These two globals are directly manipulated by the Standard File package
routines. You can easily find out what volume and directory were last
set by the SF dialogs, or change the globals to force a starting
volume and directory before an SF dialog is displayed.

 Ken Mitchum KY3B
 Decision Systems Labs
 University of Pittsburgh
 km@cadre.dsl.pittsburgh.edu