In the 64-bit Windows 7 operating system, visualstudio compiles a 32-bit application. Calling CreateProcess to run the System32 folder to process files in the next batch will fail. The returned value of getlasterror is 2. Query error lookup: the system cannot find the specified file.
The reason is that 64 is the operating system's processing method for 32-bit programs to call files under system32 [1]. For 64-bit operating systems, the c: \ windows \ system32 folder is not a system folder, but reserved for the 64-bit operating system. When the 64-bit and 32-bit DLL with the same name exist in a system at the same time, system32 is used to store 32-bit DLL and these DLL are called by 64-bit applications. Because the file system redirector mechanism exists, syswow64 transparently calls different files.
If a 32-bit application needs to call the file under system32, it is better to use the System32 alias of sysnative. Otherwise, the call will fail. In fact, the sysnative Folder does not exist. This is only a convenience provided by windows for 32-bit application developers. It cannot be used in 64-bit applications.
--------------------------------------------------------
[1] http://msdn.microsoft.com/en-us/library/aa384187.aspx