Why is CreateProcess failing in Windows Server 2003 64-bit?

与世无争的帅哥 提交于 2019-12-23 22:07:03

问题


We have a 32-bit application that launches other 32-bit applications during its process. The application is working fine on other 64-bit platforms but on Windows Server 2003 64-bit, we get an error trying to launch the apps:

error 193 (not a valid 32 bit application)

We can manually launch these applications on that system without any problem.

I thought we had found the problem with this article, but our customer already has this patch on his system and the error is still occurring.

If anyone else has encountered something similar or if anyone has any idea on how to resolve this, it would be greatly appreciated!

Thanks! François Côté


回答1:


IIRC, you can get that error code even if the app really is a valid 32-bit .exe, for a host of various other reasons, such as a dll dependency problem. Or if the Windows loader is confused by 64-bit dlls in the path with the same name as the 32-bit dll it needs.




回答2:


You might want to do a runtime profile using dependency walker using the "automatically open and profile child processes" option. This will give you a better idea how far along it's getting and which dependencies it is resolving at runtime.




回答3:


Are you sure the to-be-launched applications are compiled for 32-bit? When you run each of the apps directly, make sure they are running within WOW64. If they are not, then Windows is running them as 64-bit apps, which could cause the problem you are seeing.



来源:https://stackoverflow.com/questions/331829/why-is-createprocess-failing-in-windows-server-2003-64-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!