Example #1
0
        public SessIdMessage StopCloseIntercept()
        {
            SessIdMessage msg = null;

            if (this.InterceptIsStarted == true)
            {
                var rc = Ehllapier.StopCloseIntercept(this.SessId);
                if (rc == 0)
                {
                    msg = new SessIdMessage()
                    {
                        SessId  = this.SessId,
                        Message = "Close intercept is stopped."
                    };
                    this.InterceptIsStarted = false;
                }

                else
                {
                    msg = new SessIdMessage()
                    {
                        SessId  = this.SessId,
                        Message = "StopCloseIntercept failed. rc:" + rc
                    };
                }
            }

            return(msg);
        }
Example #2
0
        /// <summary>
        /// If the session display does not contain a signon screen, automatically sign
        /// the session off.
        /// </summary>
        /// <param name="SessId"></param>
        public static SessIdMessage AssureSignedOff(string SessId)
        {
            SessIdMessage msg      = null;
            var           settings = EhllapiSettings.RecallSettings();

            settings.SessId = SessId;

            // make sure the session is active.
            SessionScript.Assure_ClientAccessSession(settings);

            msg = SignonScreen.AssureSignedOff(settings);
            return(msg);
        }
Example #3
0
        public static SessIdMessage AssureSignedOff(EhllapiSettings Settings)
        {
            SessIdMessage msg = null;

            if (SignonScreen.IsScreen(Settings) == false)
            {
                var script = new SessionScript();
                var sess   = new DisplaySession();
                script.Play_Signoff(Settings);
                msg = new SessIdMessage()
                {
                    SessId  = Settings.SessId,
                    Message = "Session signed off"
                };
            }

            return(msg);
        }
Example #4
0
        /// <summary>
        /// Ends the SessId identified display session window.
        /// </summary>
        /// <param name="InSessId"></param>
        public static SessIdMessage StopSession(string SessId)
        {
            SessIdMessage msg = null;

            // pcsStopSession returns FALSE when the method fails. TRUE when it succeeds.
            uint rv = pcsStopSession(SessId[0], 2);

            if (rv == 0)
            {
                msg = new SessIdMessage(SessId, "pcsStopSession failed.");
            }
            else
            {
                msg = new SessIdMessage(SessId, "Session stopped.");
            }

            return(msg);
        }
        public SessIdMessage StopNotification()
        {
            SessIdMessage msg = null;

            if (this.NotificationIsStarted == true)
            {
                string errmsg = null;
                try
                {
                    Ehllapier.StopHostNotification(this.SessId);
                }
                catch (ApplicationException Excp)
                {
                    errmsg = Excp.Message;
                }
                if (errmsg == null)
                {
                    msg = new SessIdMessage()
                    {
                        SessId  = this.SessId,
                        Message = "Host notification is stopped."
                    };
                    this.NotificationIsStarted = false;
                }

                else
                {
                    msg = new SessIdMessage()
                    {
                        SessId  = this.SessId,
                        Message = "StopCapture failed. " + errmsg
                    };
                }
            }

            return(msg);
        }