[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Resource Manager - please help!
In article <jmk3.737605158@crux1.cit.cornell.edu> Jay Krell,
jmk3@crux3.cit.cornell.edu writes:
> Another method, undocumented and not guaranteed is like:
>
> SetCurResourceApp(SetHandleID(0,GetSysBar)) assuming the system menubar
is in
> resources.
Actually, that works if the memory ID passed to MenuStartUp is the same
one the app passed to ResourceStartUp; doesn't matter if the system menu
bar was created from resource templates or not.
The strategy of setting the current resource app to get access to an
application's resource search path and then read its rVersion(1) resource
is a SHAKY to begin with, because there could be extra resource files
open in that path. You might get the rVersion(1) from the wrong file, or
even from Sys.Resources. I don't think there is a guaranteeable way to
find the application's resource fork in there, even if it's open.
I still recommend the method in my previous post--open the application's
resource fork in your own search path (works unless the fork is already
open as read/write).
David A. Lyons, Apple Computer, Inc. | DAL Systems
Apple II System Software Engineer | P.O. Box 875
Internet:dlyons@apple.com | Cupertino, CA 95015-0875
My opinions are my own, not Apple's.