CreateProcess

  • Thread starter Thread starter Harry Simpson
  • Start date Start date
H

Harry Simpson

I've found references to the OpennetCF CreateProcess but it is off a
namespce that I don't have in my version (latest) of OpenNETCF.

Where is
OpenNETCF .WinAPI .Core .CreateProcess

And can this be used on Mobile device apps?



TIA

Harry
 
Thanks Arun,

No I need to execute wceload from a PocketPC app on the device.
CreateProcess("\\windows\\wceload.exe","\"\Storage Card\\Profile.cpf"")

But the sample code I found uses OpenNETCF.WinAPI.Core which I don't
have......

Harry


CreateProcess("wceload.exe", ""
Is not Process class under System.Diagnostics serving your intend?
 
Right, so what's wrong with the System.Diagnostics.Process class? We
removed CreateProcess because it's a pure duplication and is unnecessary.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
Nothing! the name sounded like info pull rather than process execute so I
didn't think that's what I needed.
I'll check it out. Appreciate the help Chris and Arun.

Harry
 
hi to all
i think you want run a program for that i write code c#

add to the library

using System.Runtime.InteropServices;

and create class

public class ProcessInfo
{
public IntPtr hProcess;
public IntPtr hThread;
public Int32 ProcessId;
public Int32 ThreadId;
}
//after class write this code
[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, IntPtr lpsiStartInfo,
ProcessInfo pi);

//and so this code

private void button1_Click(object sender, EventArgs e)
{
ProcessInfo pi = new ProcessInfo();
CreateProcess("your.exe"," cmdLine", IntPtr.Zero,
IntPtr.Zero,
0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, pi);
}

///note your exe must be in the windows folder

Good Luck
Araz Mustafa
Baku/Azerbaijan
 
Back
Top