![]() ![]() ![]() ![]() ![]() |
Q: My installer requires some custom code built into an included code resource. This code worked fine with InstallerMaker 3.x, but now my included code resources are no longer working correctly and frequently cause errors. What happened? A: The current build of InstallerMaker now forces you to deal explicitly with the A4 register upon entry and exit of the Code Resource. In older versions, you could get away with not setting up the A4 register if you used certain compilers.However, generally speaking, this is poor programming technique. We do include a header file call "A4Globals.h" with InstallerMaker that contains macros for all the procedures you will need to set up and restore A4 in your code resource. Basically you include "A4Globals.h" in your source code. Then declare a local 'long' (or Pascal "long integer"). I'll call this long "world" Then call MAIN_SETUP_GLOBALS(world); upon entering the code resource and MAIN_RESTORE_GLOBALS(world); So your function in 'C' might look something like this: #include "A4Globals.h" pascal short main(void) { long world; short result; MAIN_SETUP_GLOBALS(world); result = Your_Code_Here(); // Note we don't return until *after* this macro!! MAIN_RESTORE_GLOBALS(world); return result; }
|
||||||||||||||||||||||
Products | Support | Company Info | Site Map | Home Downloads | Updates | Products | Register |
|||||||||||||||||||||||
Copyright 1997, 1998 Aladdin Systems, Inc. Questions? Send us a note. Modified 3/12/98 FxD Webworks |