dolf@uva.UUCP (Dolf Starreveld) (05/12/86)
In my dialoghook function used with SFGetFile, I constantly inspect the fields in the SFReply struct. The filename is always filled in if a file is selected, but the vRefNum always seems to be zero, not, as I expected the vRefNum of the selected file. How do I obtain the correct vRefNum ? -- Dolf Starreveld Computer Science Department, University of Amsterdam Usenet: {seismo, philabs, decvax}!mcvax!dolf@{uva,fvi} Normal mail: Dolf Starreveld Computer Science Department University of Amsterdam Kruislaan 409 NL 1098 SJ Amsterdam The Netherlands
mkg@lzaz.UUCP (M.GOSNELL) (05/17/86)
If you're running MFS, the volume currently being displayed is in the word at $214 in low memory. It's called SFSaveDisk in the suppliments. If you're running HFS, getting the vRefNum is a little more difficult. SFSaveDisk will contain -(vRefNum of the volume) and CurDirStore, a long at $398, contains the WDDirid of the folder that's being displayed. The WDDirid and vRefNum of the volume can be turned into the vRefNum of the folder using PBGetWDInfo. You can force the SF display to start in a given folder by stuffing SFSaveDisk and CurDirStore before calling the SF routine. Marsh Gosnell