Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!pasteur!ucbvax!decwrl!labrea!polya!kaufman
From: kaufman@polya.STANFORD.EDU (Marc T. Kaufman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Writing resources to a file
Message-ID: <2783@polya.STANFORD.EDU>
Date: 8 May 88 16:46:36 GMT
References: <51379@sun.uucp> <600@kinetics.UUCP>
Reply-To: kaufman@polya.Stanford.EDU (Marc T. Kaufman)
Distribution: na
Organization: Stanford University
Lines: 14

In article <600@kinetics.UUCP> markw@kinetics.UUCP (Mark Wittenberg) writes:

>2.  How do you tell if a resource has already been loaded?  I'd prefer to know
>    without loading it, but I'll settle for just knowing whether or not I
>    should unload it.  It's not sufficient to call SetResLoad(FALSE) before
>    the GetResource, and check to see if the handle was NULL.

Why is this?  (since I seem to remember seeing the technique in some Tech
Note or other).  [actually you look for Handle^ being NIL, not Handle.
If Handle is NIL, there is no such resource.  If Handle^ is NIL, the
resource exists but was not loaded.  If the resource is already loaded,
Handle^ will point to it even if SetResLoad is FALSE -- or so I thought].

Marc Kaufman (kaufman@polya.stanford.edu)