Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!blkcat!f421.n109.z1.fidonet.org!Ken.Knight From: Ken.Knight@f421.n109.z1.fidonet.org (Ken Knight) Newsgroups: comp.sys.mac.programmer Subject: System/App resource files Message-ID: <3541.27C202A9@blkcat.fidonet.org> Date: 20 Feb 91 01:58:33 GMT Sender: ufgate@blkcat.fidonet.org (newsout1.26) Organization: FidoNet node 1:109/421 - The Twilight Clone, Paul Heller Lines: 29 I have an application that I am working on that opens up specified resource forks. The user determines, via an SFGetFile, what file to open and then work on. Now, normally, the sequence of events is: Get user input (file from SFGetFile()); Do work on the resource file (we open it with an HOpenResFile() call after determining the dirID of the file specified); Do a CloseResFile() when all done. Normally, that works fine. However, if the user chooses to work on the System file or application itself things go haywire. The problem is that you DO NOT want to CloseResFile() though two particular resource files. I want the application to check to see if the user has selelcted the system/application and then only do an UpdateResFile() on them. However, it appears that HOpenResFile() creates a NEW ference number for already open files and so I can't just check to see if the reference number returned matches either the system's refNum (held in the system global SysMap) or matches the one for the application (obtained via a call to CurResFile() at startup). What should I try next? ** Ken ** -- Ken Knight, Ken.Knight@f421.n109.z1.fidonet.org via The Black Cat's Shack's FidoNet<->Usenet Gateway blkcat.fidonet.org and Fidonet 1:109/401