有谁知道代码或对如何使用 Visual C++ 2005 启动 .exe 有想法?
如果是 Windows Mobile,则 dll 所在的环境。执行此操作的 C#P/Invoke
是
[DllImport("coredll.Dll")]
private static extern int CreateProcess(string strImageName, string strCmdLine, IntPtr pProcessAttributes, IntPtr pThreadAttributes , int bInheritsHandle, int dwCreationFlags, IntPtr pEnvironment, IntPtr pCurrentDir, Byte[] bArray, ProcessInfo oProc);
c#代码启动.exe
CreateProcess("\\Program Files\\myprogram\\myprogram.exe.exe", "", IntPtr.Zero, IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, new Byte[128], pi);
我在 C++ 中需要它的原因是因为在运行自定义 cab 安装程序时,我被迫使用本机 dll 来执行前后 intit 检查等。
非常感谢您的想法。托尼