32位打开文件对话框 - > 64位System32下? [英] 32-bit OpenFileDialog --> 64-bit System32?

查看:192
本文介绍了32位打开文件对话框 - > 64位System32下?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个32位的程序,如何才能得到打开/保存文件对话框,显示在64位系统的System32文件夹中的文件?

In a 32-bit program, how can I get the Open/Save File Dialogs to show the files in the System32 folder of a 64-bit system?

Wow64DisableWow64FsRedirection 不起作用,因为某种原因,它没有为对话工作,我猜,因为它是在不同的线程。当然,使用 SysNative 不起作用,因为用户不知道什么内部发生了。他只是想在电脑上看到的实际的文件)。

(Wow64DisableWow64FsRedirection doesn't work, because for some reason it doesn't work for the dialog, I'm guessing because it's on a different thread. And of course using SysNative doesn't work because the user isn't aware of what's going on internally; he just wants to see the "actual" files on the computer.)

下面是另一种方式来问这个问题:

Here's another way to ask the question:

有没有的任意的32位程序浏览64位 System32下从打开文件对话框的文件夹?

Does any 32-bit program browse a 64-bit System32 folder from the open file dialog?

推荐答案

我认为,这是根本不可能的。

I believe that this is simply not possible.

即使你能得到的对话框显示文件,将他们的名字是什么,当他们返回到您的32位进程? Sysnative是XP 64。这一个黑客位,并在任何情况下不可用是超载SYSTEM32名字只是一个后果。

Even if you could get the dialog to show the files, what would their names be when they were returned to your 32 bit process? Sysnative is a bit of a hack and in any case not available on XP 64. This is just a consequence of overloading the system32 name.

另外一个思想实验。如果它是可能的,你需要一个做枚举禁用重定向线程。由于该线是失控的话,那就必须是已发布的选项来禁用它。没有。这不会有什么好让你从外面禁用重定向,因为这会导致DLL加载失败时,32位进程试图加载外壳扩展 - 你无法禁用重定向,如果你要加载的DLL,因为你会得到那些错误的

Another thought experiment. If it were to be possible, you'd need the thread that does the enumeration to disable redirection. Since that thread is out of your control then there would have to be a published option to disable it. There isn't. It would be no good allowing you to disable redirection from the outside because that would result in DLL load failures when the 32 bit process tried to load shell extensions - you can't disable redirection if you are going to load DLLs because you'll get the wrong ones

我想,我们希望你,如果你想绕过这个限制写一个64位程序。

I imagine that you are expected to write a 64 bit program if you want to get around this limitation.

这篇关于32位打开文件对话框 - > 64位System32下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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