InfoConnect for Airlines
ForceStop Method
Example 


The application instance returned from the Start() method.
Forces the InfoConnect application instance that matches the instance ID to stop. Use this method only after the Close() method fails.
Syntax
'Declaration
 
Public Shared Sub ForceStop( _
   ByVal instanceId As Guid _
) 
'Usage
 
Dim instanceId As Guid
 
MyReflection.ForceStop(instanceId)
public static void ForceStop( 
   Guid instanceId
)

Parameters

instanceId
The application instance returned from the Start() method.
Exceptions
ExceptionDescription
System.ApplicationExceptionThere is no such application instance ID.
Example
This example shows how to force InfoConnect to close if the Close method fails.
using Attachmate.Reflection.Emulation.IbmHosts;
using Attachmate.Reflection.Framework;
using Attachmate.Reflection.UserInterface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ApplicationInstanceID
{
    class Program
    {
        private Guid applicationInstanceId;

        static public Guid ApplicationInstanceId { get; set; }

        static void Main(string[] args)
        {

            ApplicationInstanceId = MyReflection.Start();

            Application app = MyReflection.CreateApplication();

            //Open sessions and perform tasks...


            //Close InfoConnect             try
            {
                app.Close(ApplicationCloseOption.CloseNoSave);
            }
            catch
            {
                MyReflection.ForceStop(ApplicationInstanceId);
            }


            Console.ReadLine();
        }
    }
}
See Also