Re: IDE - Place Code After WinMain() Call?

new topic     » goto parent     » topic index » view thread      » older message » newer message

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."

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu