G
Guest
hi
I wrote a class like this.......in my application.
public class cls
{
[DllImport("some.dll")]
[return : MarshalAs(UnmanagedType.Bool)]
public static extern bool myApp
(
[MarshalAs(UnmanagedType.LPStr)] ref string aa,
[MarshalAs(UnmanagedType.LPStr)] ref string bb,
[MarshalAs(UnmanagedType.I4)] ref int ProcessID,
[MarshalAs(UnmanagedType.I8)] ref long handle
);
public static int StartmyApp(string aa,string bb)/*this is function which calls the myapp*/
{
int processID = 0;
long handle = 0;
try
{
if(myApp(ref aa,ref bb,ref processID,ref handle))
{
nothing;
}
}
catch{ MessageBox.Show("Error in launching ");}
return processID;
}//end of function
}//end of cls class
problem description: myApp() is a function in a DLL which in turn starts a exe, myApp() function returns two values, they are processID and Handle of the exe or process started by that function.
Now i got to use the status of the process started by the above myApp() function, there are many places in my application where i need the status of the process whether the process is running or dead?.
How do i get the current status of the process at any time with latest information(live or dead)?
Hi tom walker and Willy Denoyette, have u got the clear picture of my problem
-------need HELP!
--------seash
I wrote a class like this.......in my application.
public class cls
{
[DllImport("some.dll")]
[return : MarshalAs(UnmanagedType.Bool)]
public static extern bool myApp
(
[MarshalAs(UnmanagedType.LPStr)] ref string aa,
[MarshalAs(UnmanagedType.LPStr)] ref string bb,
[MarshalAs(UnmanagedType.I4)] ref int ProcessID,
[MarshalAs(UnmanagedType.I8)] ref long handle
);
public static int StartmyApp(string aa,string bb)/*this is function which calls the myapp*/
{
int processID = 0;
long handle = 0;
try
{
if(myApp(ref aa,ref bb,ref processID,ref handle))
{
nothing;
}
}
catch{ MessageBox.Show("Error in launching ");}
return processID;
}//end of function
}//end of cls class
problem description: myApp() is a function in a DLL which in turn starts a exe, myApp() function returns two values, they are processID and Handle of the exe or process started by that function.
Now i got to use the status of the process started by the above myApp() function, there are many places in my application where i need the status of the process whether the process is running or dead?.
How do i get the current status of the process at any time with latest information(live or dead)?
Hi tom walker and Willy Denoyette, have u got the clear picture of my problem
-------need HELP!
--------seash