コード例 #1
0
        private static void unload_DLL()
        {
            string emuapi = "emuapi";
            int    hVal   = MySabreAPI.GetModuleHandle(ref emuapi);

            if (hVal != 0)
            {
                while (MySabreAPI.FreeLibrary(hVal))
                {
                }
            }
        }
コード例 #2
0
        private void CloseObjects()
        {
            if (this.InvokeRequired)
            {
                this.Invoke(new SenderInvoker(CloseObjects));
            }
            else
            {
                try
                {
                    int IsDisconnected;
                    mySabreAPI     = null;
                    IsDisconnected = MySabreAPI.clientDisconnect();
                }
                catch { }

                try
                {
                    string emuapi = "emuapi";
                    int    hVal   = MySabreAPI.GetModuleHandle(ref emuapi);
                    if (hVal != 0)
                    {
                        while (MySabreAPI.FreeLibrary(hVal))
                        {
                        }
                    }
                }
                catch {}
                Application.Exit();
                frmLogin frm = (frmLogin)Application.OpenForms["frmLogin"];
                if (frm != null)
                {
                    frm.Dispose();
                }
            }
        }