• Hello, Guest! Welcome back, and be sure to check out this post for more info about the recent service interruption and migration.

Force32 Feature Request


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
It shouldn’t fight with anything, you’re just allocating a block in the system heap. By the way the above-linked article is, I think, the best article MacTech ever published. Absolutely packed with everything you need to know about writing INITs.


Well-known member
This awesome MacTech article talks about the relevant details...

That's the article I was trying to remember where I'd seen. Thankyou!

Also this seems an appropriate point in general to say thanks for all the help—your ambient presence and your replies to me and other people have all been really useful in helping me get back into programming for the classic Mac, and at a deeper and better level than I did when I was a teenager and trying to do it :).


Well-known member
Why thank you! And I should add that I’ve very much enjoyed your contributions to the forums also - making it a more engaging and intersting place. I consider myself very fortunate to be able to engage in fun discussions on Mac Toolbox programming 30something years after I first became obsessed with it as a kid, and have this terrific community to thank for that.