B
Ben
Hello,
I'm trying, via my code in C#, to start an extern application. I've
tried to following code without success :
public struct ProcessInfo
{
public IntPtr hProcess;
public IntPtr hThread;
public Int32 ProcessId;
public Int32 ThreadId;
}
[DllImport("CoreDll.DLL", SetLastError=true)]
private extern static int CreateProcess(String imageName, String
cmdLine,
IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, Int32
boolInheritHandles,
Int32 dwCreationFlags, IntPtr lpEnvironment, IntPtr lpszCurrentDir,
byte [] si, ProcessInfo pi );
ProcessInfo pi = new ProcessInfo();
byte [] si = new byte[128];
int process = CreateProcess("", @"\Windows\TheApplication.exe",
IntPtr.Zero,
IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, si, pi);
I end up with a NotSupportedException.
Thanks for all the hints you could give me...
I'm trying, via my code in C#, to start an extern application. I've
tried to following code without success :
public struct ProcessInfo
{
public IntPtr hProcess;
public IntPtr hThread;
public Int32 ProcessId;
public Int32 ThreadId;
}
[DllImport("CoreDll.DLL", SetLastError=true)]
private extern static int CreateProcess(String imageName, String
cmdLine,
IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, Int32
boolInheritHandles,
Int32 dwCreationFlags, IntPtr lpEnvironment, IntPtr lpszCurrentDir,
byte [] si, ProcessInfo pi );
ProcessInfo pi = new ProcessInfo();
byte [] si = new byte[128];
int process = CreateProcess("", @"\Windows\TheApplication.exe",
IntPtr.Zero,
IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, si, pi);
I end up with a NotSupportedException.
Thanks for all the hints you could give me...