示例#1
0
void TerminateGUI (int rcByGUI)
{
    DestroyDskMsgQueue ();
    DestroyFreeQMSGList ();
    TerminateDesktop ();
    TerminateAccel ();
    TerminateControlClass ();
    TerminateMenu ();
#ifdef _CURSOR_SUPPORT
    TerminateCursor ();
#endif
    TerminateFixStr ();

#ifdef _STAND_ALONE
    SendMessage (HWND_DESKTOP, MSG_ENDSESSION, 0, 0);

    StandAloneCleanup ();
#else
    if (mgIsServer) {
        SendMessage (HWND_DESKTOP, MSG_ENDSESSION, 0, 0);

        /* Cleanup UNIX domain socket and other IPC objects. */
        ServerCleanup ();
    }
    else {
        ClientCleanup ();
    }
#endif
}
void TerminateGUI (int rcByGUI)
{
    /* printf("Quit from MiniGUIMain()\n"); */

    DestroyDskMsgQueue ();
    mg_DestroyFreeQMSGList ();
    mg_TerminateAccel ();
    mg_TerminateControlClass ();

#ifdef _MGHAVE_MENU
    mg_TerminateMenu ();
#endif
#ifdef _MGHAVE_CURSOR
    mg_TerminateCursor ();
#endif
    mg_TerminateMisc ();
    mg_TerminateFixStr ();

#ifdef _MGRM_PROCESSES
    if (mgIsServer) 
#endif
    {
        license_destroy();
    }

#ifdef _MGRM_STANDALONE
    mg_TerminateDesktop ();

    salone_StandAloneCleanup ();
#else
    if (mgIsServer) {
        mg_TerminateDesktop ();

        /* Cleanup UNIX domain socket and other IPC objects. */
        server_ServerCleanup ();
    }
    else {
        client_ClientCleanup ();
    }
#endif
}