wince下使用C#打开一个外部程序
2013-05-17 15:36
316 查看
以打开一个IE为例,介绍如何在WinCE下使用C#来打开一个外部文件:
using System.Runtime.InteropServices; [DllImport("coredll.Dll", EntryPoint="CreateProcess", SetLastError=true)] extern static int CreateProcess(string strImageName, string strCmdLine, IntPtr pProcessAttributes, IntPtr pThreadAttributes, int bInheritsHandle, int dwCreationFlags, IntPtr pEnvironment, IntPtr pCurrentDir, IntPtr bArray, ProcessInfo oProc); public class ProcessInfo { public Int32 hProcess; public Int32 hThread; public Int32 ProcessID; public Int32 ThreadID; } private void button_Click(object sender, System.EventArgs e) { ProcessInfo pi = new ProcessInfo(); CreateProcess("\\windows\\iesample.exe", "\\HardDisk\\Readme.htm", IntPtr.Zero, IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, pi); }
相关文章推荐
- 在WinCE下使用C#来打开一个外部程序
- 在WinCE下使用C#来打开一个外部程序
- wince下使用C#打开一个外部程序
- WinCE下使用C#来打开一个外部文件
- WinCE下使用C#来打开一个外部文件:
- 背水一战 Windows 10 (98) - 关联启动: 使用外部程序打开一个文件, 使用外部程序打开一个 Uri
- 与众不同 windows phone (38) - 8.0 关联启动: 使用外部程序打开一个文件或URI, 关联指定的文件类型或协议
- WinCE C#程序,控制启动时仅仅能启动一个程序,使用相互排斥量来实现,该实现方法測试通过
- 重新想象 Windows 8 Store Apps (33) - 关联启动: 使用外部程序打开一个文件或uri, 关联指定的文件类型或协议
- 重新想象 Windows 8 Store Apps (33) - 关联启动: 使用外部程序打开一个文件或uri, 关联指定的文件类型或协议
- 与众不同 windows phone (38) - 8.0 关联启动: 使用外部程序打开一个文件或URI, 关联指定的文件类型或协议
- wince程序 中使用Listview显示图标问题 (C#)
- 使用C#编写的一个定时关机程序
- Delphi使用系统默认程序打开外部文件
- C#使用Process类调用外部exe程序
- 使用C#编写的一个定时关机程序
- c# 程序只能运行一次(多次运行只能打开同一个程序) 并激活第一个实例,使其获得焦点,并在最前端显示.
- 使用C#编写的一个定时关机程序(我也不记得是谁写的了,偶翻出来了就贴了)
- 使用C#编写的一个定时关机程序
- c# 控制winform程序只能打开一个