Path: utzoo!attcan!uunet!lll-winken!ames!ncar!tank!nucsrl!accuvax.nwu.edu!bob From: bob@accuvax.nwu.edu (Bob Hablutzel) Newsgroups: comp.sys.mac.programmer Subject: Re: SFPGetFile Question Message-ID: <10050062@accuvax.nwu.edu> Date: 8 Jan 89 17:04:34 GMT References: <5959@polya.Stanford.EDU> Organization: Northwestern U, Evanston IL, USA Lines: 21 > I am using my own dlgHook in a SFPGetFile call. I need to access the > vRefNum of the current file being selected in the Standard Open File > Dialog box. I know it's file name from sfReply.fname but > sfReply.vRefNum doesn't seem to be giving me the right information. > How can I get the vRefNum of the current file before the user chooses > "open" or "cancel"? You can get the vRefNum from the global variable SFSaveDisk ($214, word). Note, however, that this is a true vRefNum (actually, it's the negative of a true vRefNum), and not a WDRefNum. To get the folder that the file is in, you have to check another global variable, CurDirStore ($398, long), which contains the current DirID. See the assembly language note on page IM-72 of Inside Mac for more information. >Thanks in advance, >Chih Chao No problem. Bob Hablutzel BOB@NUACC.ACNS.NWU.EDU