Other Application기동을 클라이언트에서 하도록 수정(Other Application프로그램이 뛰워져 있지 않을경우에)
Other Application기동을 클라이언트에서 하도록 수정(Other Application프로그램이 뛰워져 있지 않을경우에)
____handle_mmm = FindWindow(null, "CONSOLE.TRIS");
if(____handle_mmm==IntPtr.Zero)
{
Console.WriteLine("Time:[" + DateTime.Now.ToString() + "]::" + "FindWindow(CONSOLE.TRIS) FAIL!!, Try Execute CONSOLE.TRIS Application!!");
Process process = Process.Start("____rcv.exe");
DateTime endTime = DateTime.Now.AddMinutes(1);
/*
System.Threading.Thread.Sleep(1000);
____handle_mmm = FindWindow(null, "CONSOLE.TRIS");
if(____handle_mmm==IntPtr.Zero)
{
Console.WriteLine("Time:[" + DateTime.Now.ToString() + "]::" + "FindWindow(CONSOLE.TRIS) FAIL!!, Try Execute CONSOLE.TRIS Application!!");
}
*/
while(true)
{
if((____handle_mmm = FindWindow(null, "CONSOLE.TRIS"))==IntPtr.Zero)
{
System.Threading.Thread.Sleep(10);
}
else break;
if(endTime<DateTime.Now)
{
index=100;
break;
}
}
if(index==100) return;
}
'c# 언어 > 중급과정' 카테고리의 다른 글
tcp:sendfile-server src sample (0) | 2022.04.05 |
---|---|
tcp:sendfile-client src sample (0) | 2022.04.05 |
Console RemoteKey & Tris Server Frm(No Key) (0) | 2022.03.25 |
Data communication between Proesses!! (0) | 2022.03.25 |
SendMessage/FindWindow/Snd/Rcv Str (0) | 2022.03.15 |