Ejemplo n.º 1
0
        public static void StartHostIntercept(this CloseInterceptItem SessionItem, IntPtr hWnd)
        {
            if (SessionItem.HostInterceptIsStarted == true)
            {
                throw new ApplicationException("Host notification is already started.");
            }

            var taskId = Ehllapier.StartHostNotification(SessionItem.SessId, hWnd);

            if (taskId != 0)
            {
                SessionItem.HostTaskId             = taskId;
                SessionItem.HostInterceptIsStarted = true;
            }
        }
 public void StartNotification(IntPtr hRequestWnd)
 {
     try
     {
         var taskId = Ehllapier.StartHostNotification(this.SessId, hRequestWnd);
         this.NotificationIsStarted = true;
         this.ErrorText             = null;
         this.TaskId = taskId;
     }
     catch (ApplicationException Excp)
     {
         this.NotificationIsStarted = false;
         this.ErrorText             = Excp.Message;
     }
 }