Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


running executables in C#

This topic is 5327 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi everyone. i wanted to ask about how to run an executbale from C# using threads. i am develping an application for a pocket pc using the emulator is C# and using the .NET framework. The process class is not supported for windows ce. thanks bob

Share this post

Link to post
Share on other sites
Original post by CoffeeMug

None of those(on the first page, anyway) answers how to do it using the Compact Framework.

How about P/Invoking ShellExecute or CreateProcess? Are those Win32 functions available on CE?

A P/Invoke declaration for ShellExecute looks something like this:

public static extern int CreateProcess( string appName,
string commandLine, IntPtr processAttributes,
IntPtr threadAttributes, bool inheritHandles, int creationFlags,
IntPtr environment, string currentDir, ref STARTUP_INFO si,

[StructLayout ( LayoutKind.Sequential )]
public IntPtr hProcess;
public IntPtr hThread;
public int dwProcessId;
public int dwThreadId;

[StructLayout ( LayoutKind.Sequential )]
public struct STARTUP_INFO
public int cb;
public string reserved;
public string desktop;
public string title;
public int wX;
public int wY;
public int xSize;
public int ySize;
public int xCountChars;
public int yCountChars;
public int fillAttributes;
public int flags;
public short showWindow;
public short cbReserved2;
public byte lpReserved2;
public IntPtr stdInput;
public IntPtr stdOutput;
public IntPtr stdError;

(Yes, I had it readily available. Thanks to Colin, who actually wrote it).

AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!