WOW64麻烦(.lnk快捷方式) [英] WOW64 woes (.lnk shortcuts)

查看:121
本文介绍了WOW64麻烦(.lnk快捷方式)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows 7(x64)和Delphi 2010。

I'm using Windows 7 (x64) and Delphi 2010.

我正在编写一个模仿开始菜单的组件。但是,我遇到了以下问题:

I'm writing a component that will emulate the start menu. However, I've run into the following problems:


  1. 如果我尝试使用<$ c $打开快捷方式(.lnk文件) c> ShellExecute ,只要%ProgramFiles%是快捷方式目标路径的一部分,此操作都会失败(然后它将查看 C:\Program Files (x86)文件夹,而不是 C:\Program Files );

  2. ShGetFileInfo 如果%ProgramFiles%是图标文件路径的一部分,则无法在系统映像列表中提取正确的图标索引(与上述问题相同)。

  1. If I attempt to open a shortcut (.lnk file) with ShellExecute, this will fail whenever %ProgramFiles% is part of the target path of the shortcut (it will then look at the C:\Program Files (x86) folder instead of C:\Program Files);
  2. ShGetFileInfo fails to extract the correct index of the icon in the system image list if %ProgramFiles% is part of the path to the icon file (same problem as above).

上述问题是否有任何解决方法,还是我必须等待本机64位Delphi可供使用?

Is there any workaround to the above issues or do I have to wait for native 64-bit Delphi to become available for this to work?

推荐答案

我认为您应该致电 Wow64DisableWow64FsRedirection 之前和 Wow64RevertWow64FsRedirection aftyer。

I think you should call Wow64DisableWow64FsRedirection before and Wow64RevertWow64FsRedirection aftyer.

这篇关于WOW64麻烦(.lnk快捷方式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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