The call-back function could be used to ask the user if results are to be saved
before the session ends, etc.. If the call-back function returns zero, the
shut-down is allowed to proceed. Any other value will abort the shut-down and
leave the application running.
Note that if your program allows shut-down to proceed, other applications that
are still running may still elect to abort the shut-down.