且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CreateProcess 在 Windows 7 下失败

更新时间:2023-02-16 20:39:48

问题是您有一个 32 位应用程序试图执行 64 位 Windows 命令.您不必将应用程序重新编译为 64 位来解决问题.您所要做的就是将所有出现的 c:\windows\system32 更改为 c:\windows\SysNative.

The problem is that you have a 32 bit application trying to execute a 64 bit Windows command. You do not have to recompile your application as 64 bit to solve the problem. All you have to do is change all occurrences of c:\windows\system32 to c:\windows\SysNative.

在 Windows 7 x64 中,32 位程序对 c:\windows\system32 的引用会自动重定向到 c:\windows\syswow64.使用特殊别名 c:\windows\SysNative 会导致 Windows 7 不执行重定向.

In Windows 7 x64, references to c:\windows\system32 from 32 bit programs are automatically redirected to c:\windows\syswow64. Using the special alias c:\windows\SysNative causes Windows 7 to not do the redirect.