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 Reflection
try
{
app.Close(ApplicationCloseOption.CloseNoSave);
}
catch
{
MyReflection.ForceStop(ApplicationInstanceId);
}
Console.ReadLine();
}
}
}