"指定的程序找不到"禁用WOW64重定向后 [英] "The specified procedure could not be found " after disabling wow64 redirection

查看:402
本文介绍了"指定的程序找不到"禁用WOW64重定向后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行在x64系统中的32位应用程序。(视窗7) 我试图运行Windows备份它位于C:\ SYSTEM32 \ sdclt.exe。 因为我正在为一个32位的过程中,我必须禁用WOW64重定向(使用Wow64DisableWow64FsRedirection)。 问题是,禁用WOW64重定向后,我得到指定的程序无法找到错误。

I am running a 32bit application on a x64 system.(windows 7) I am trying to run windows backup which is located at: c:\System32\sdclt.exe. Because I am running as a 32 bit process I have to disable WOW64 redirection (using Wow64DisableWow64FsRedirection) . The problem is that after disabling the wow64 redirection I get "The specified procedure could not be found" error.

我的猜测是,禁用重定向莫名其妙的时候sdclt.exe无法加载所有依赖的DLL。

My guess is that somehow when disabling the redirection the sdclt.exe cannot load all its dependent dll's.

注: 1.出现这种情况只有在情况下,我不以提升特权时运行。 2.我的设置使​​用shell中执行以正确的,因为我想要让用户使用不带高架特权时我的应用程序。 2.编制为64位时,这个错误不会发生。

notes: 1. this happens only in case I'm not running with elevated priviliges. 2. I am setting "use shell execute" to true because I wanna let users to use my app with no elevated priviliges. 2. this error won't happen when compiling to 64 bit.

推荐答案

禁用文件重定向是precarious业务。您正在做在这里为了让您的32位进程能够看到位于 SYSTEM32 文件。通常从32位进程的任何引用该文件夹会被重定向到 Syswow64资料。但是,当你发现,禁用文件重定向打破链中的其他环节。

Disabling file redirection is a precarious business. You are doing it here in order for your 32 bit process to be able to see the file located in system32. Normally any reference to that folder from a 32 bit process would be redirected to SysWOW64. But, as you discovered, disabling file redirection breaks other links in the chain.

这是我所知道的最好的解决办法是使用特殊的%WINDIR%\ sysnative 别名能够找到真正的system32目录中。不要禁用文件重定向和简单地传递%WINDIR%\ sysnative \ sdclt.exe 产卵的过程时。

The best solution that I know is to use the special %windir%\sysnative alias to be able to locate the true system32 directory. Don't disable file redirection and simply pass %windir%\sysnative\sdclt.exe when spawning the process.

有关文件重定向的文档说:

32位应用程序可以通过替换%WINDIR访问本地系统目录%\ Sysnative为%WINDIR%\ System32下。 WOW 64识别Sysnative作为一个特殊的别名用于指示文件系统不应重定向访问。这种机制是灵活的,易于使用的,因此,它是推荐机制绕过文件系统重定向。需要注意的是64位应用程序不能使用Sysnative别名,因为它是一个虚拟目录不是一个真实的。

32-bit applications can access the native system directory by substituting %windir%\Sysnative for %windir%\System32. WOW64 recognizes Sysnative as a special alias used to indicate that the file system should not redirect the access. This mechanism is flexible and easy to use, therefore, it is the recommended mechanism to bypass file system redirection. Note that 64-bit applications cannot use the Sysnative alias as it is a virtual directory not a real one.

的Windows Server 2003和Windows XP :该Sysnative别名加入从Windows Vista开始

Windows Server 2003 and Windows XP: The Sysnative alias was added starting with Windows Vista.

最后的警告实际上意味着%WINDIR%\ Sysnative 未确认的XP64,除非机器已经维修与MS修补程序回到万能%WINDIR%\ Sysnative 到该操作系统。在实践中,这并不重要,因为XP64安装基础是微乎其微。

The final warning effectively means that %windir%\Sysnative is not recognised on XP64, unless the machine has been serviced with the MS hotfix that back-fits %windir%\Sysnative to that OS. In practice this doesn't matter because the XP64 installed base is vanishingly small.

这是我所知道的唯一解决方案是创建你自己的专用发射器是一个64位进程。如果你把那个发射一个文件夹,不受文件重定向的话,你可以调用启动从32位进程,然后启动能够看到64位系统目录。我认为你将不得不使用这种方法,如果你需要支持XP64。

The only other solution that I am aware of is to create your own dedicated launcher that is a 64 bit process. If you place that launcher in a folder that is not subject to file redirection then you can call that launcher from your 32 bit process and then the launcher is able to see the 64 bit system directory. I think you would have to use this approach if you needed to support XP64.

这篇关于"指定的程序找不到"禁用WOW64重定向后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆