Path: utzoo!mnetor!uunet!husc6!hao!ames!ucbcad!ucbvax!hplabs!pyramid!prls!gardner From: gardner@prls.UUCP (Robert Gardner) Newsgroups: comp.sys.mac Subject: Another SFGetFile question Message-ID: <8152@prls.UUCP> Date: 21 Dec 87 20:22:33 GMT References: <2260@chalmers.UUCP> Reply-To: gardner@prls.UUCP (Robert Gardner) Organization: Philips Research Labs, Sunnyvale, California Lines: 20 And now yet another SFGetFile() question! The help I've gotten from the net on all my various and sundry questions has sure been appreciated. I want to filter out all opened files during SFGetFile calls. What seemed easiest was to just check the ioRefNum field of the parameter block against 0, since ioRefNum is supposed to contain a file's reference number if the file is open (interesting, Inside Mac doesn't say what it contains if the file is NOT open...). This works just fine on my Mac+. However, when I try the same procedure on a 64K ROM Mac EVERY file looks open -- i.e. it's ioRefNum field is non-zero. I haven't yet figured out what the field is... haven't had time to configure TMON for that Mac. Well, we haven't yet given up on 64K ROM machines, but worse, if this method fails on 64K ROM machines, will it fail on SE's, Mac II's, or future machines? So, I guess the real question is, is there a foolproof way to tell from within SFGetFile() filters whether or not a given file is already open? Thank you, Robert Gardner