Crutch
Well-known member
Right exactly. It’d just be the typical INIT thing as if you were patching a trap and needed to keep the patch around.
- One approach would be to compile the shutdown proc into a separate CODE resource, set the System Heap bit on it (so it’s automatically loaded into the system heap), call GetResource then DetachResource on it, HLock it, dereference it, and pass that pointer to ShutDwnInstall.
- The other (which is probably easier since the Force32 code is probably small) is just keep your whole INIT around in the system heap by calling RecoverHandle then DetachResource on it. This awesome MacTech article talks about the relevant details including how to access your INIT file post-startup so you can access/save settings in the data fork and not worry about preference files: http://preserve.mactech.com/articles/mactech/Vol.05/05.10/INITinC/index.html