Hi,
I have an old MDL program that I am upgrading to C++. It is a small utility program that loads, runs and is then unloaded using mdlSystem_exit (0,1). In C++ that function call causes Microstation to crash.
Checking the Help I see that that function is obsolete and I should use the standard exit() function instead. Unfortunately when I use exit(EXIT_SUCCESS) Microstation exits completely instead of just unloading the app.
Is there another way to just unload the app?
TIA
Dan
Unknown said:Is there another way to just unload the app?
My apps. always have an exit command, which does this...
mdlDialog_cmdNumberQueue (FALSE, CMD_MDL_UNLOAD, mdlSystem_getCurrTaskID (), TRUE);
When you queue an unload command, your app. will have an orderly shutdown rather than an abrupt exit. For example, your OnUnload event handler will be called, giving you an opportunity to save settings or data before the app. finally quits.
Regards, Jon Summers LA Solutions
Answer Verified By: Daniel MacNeil