Re: IDE - Place Code After WinMain() Call?
- Posted by cklester <cklester at yahoo.com> Jul 03, 2004
- 497 views
Derek Parnell wrote: > > cklester wrote: > > > > Judith, > > > > I thought the "final" section would put code after the WinMain() call... > > How can I put code into the editor that will be called after WinMain() > > finishes? > > > Place the following anywhere in your code. > > function AppEnd(integer pErrCode, sequence pDispMsg, integer pN, integer > pLast) > -- Place any 'final' code here. > return 0 > end function > VOID = attachCleanUp(routine_id("AppEnd")) > > Just before WinMain() ends, all the attached 'cleanup' routines are run. > A cleanup routine is passed a few parameters, but generally if the first > one is zero the application is ending normally, otherwise there has > been fatal error somewhere. > > -- > Derek Parnell > Melbourne, Australia Cool! Thanks, Derek... -=ck "Programming in a state of EUPHORIA."