Article # 483, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
Saving global variables to state file.
Q. I have various global variables. How can I save them to the state file when my application shuts down? A. Intercept MSG_GEN_PROCESS_CLOSE_APPLICATION. Have the message handler copy the global variables to a global memory block and return the handle of that block. The system will automatically save this block to the state file. When the application is resumed, MSG_GEN_PROCESS_OPEN_APPLICATION will provide a memory handle of the additional data block that was saved earlier. Your application can then copy this information back to the global variables.