
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
Hi,
Put as the last thing in main():
{
void *taskDescP = mdlSystem_getCurrMdlDesc ();
char *taskIdP = mdlSystem_getMdlTaskID ( taskDescP );
char unloadString[55];
/* shut down itself */
sprintf ( unloadString, "MDL UNLOAD %s", taskIdP );
mdlInput_sendKeyin ( unloadString, 0, INPUTQ_EOQ, NULL );
}
HTH
/Chris Z.
"Chris Shaffer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> How can I automatically unload an MDL app at the end of its execution?
> Basically, I've got an app that read/writes some data from a file,
> and I'd like it to be unloaded automatically when the main function
> returns.
>
> Thanks.
>
> Chris
| <-- __Chronological__ --> | <-- __Thread__ --> |