如何在 Delphi 中编写 Windows Shell 命名空间扩展?

发布于 2024-10-07 07:14:06 字数 154 浏览 0 评论 0原文

首先,抱歉我的英语不好...

我想使用命名空间扩展(NSE)向 Windows 资源管理器添加一个虚拟文件夹,并且我希望用户能够打开这个虚拟文件夹来探索某些路径(例如,c:\test)。

我如何使用 Delphi 来做到这一点?谢谢。

First, sorry for my poor English...

I want to add a virtual folder to Windows Explorer using a Namespace Extension (NSE), and I want users to be able to open this virtual folder to explore some path (e.g., c:\test).

How can I do this using Delphi? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

夜巴黎 2024-10-14 07:14:06

从 MSDN 文档开始: Shell 命名空间简介。当然,这是从 C++ 角度编写的,但将其映射到 Delphi 并不难。

用于此类任务的另一个优秀资源是代码项目。例如:编写命名空间扩展的完整白痴指南 - 第一部分,作者:Mike Dunn 。事实上,这只是有关 shell 扩展的优秀文章系列的一部分。

目前 Delphi 是一个糟糕的选择,因为它不生成 64 位可执行文件。这意味着您的 shell 扩展将无法在 64 位 Windows 上运行,这现在是一个严重的限制。

随着最近发布的 Delphi XE2,此限制已被消除。 XE2 能够生成 64 位可执行文件,因此可用于生成 64 位 shell 扩展。

The place to start is the MSDN documentation: Introduction to the Shell Namespace. Naturally this is written from a C++ perspective but it's not too hard to map that across to Delphi.

Another excellent resource for such tasks is Code Project. For example: The Complete Idiot's Guide to Writing Namespace Extensions - Part I by Mike Dunn. In fact this is just part of an excellent series of articles on shell extensions.

At present Delphi is a poor choice because it does not produce 64 bit executables. This means that your shell extension will not run on 64 bit Windows which is now a serious limitation.

With the recent release of Delphi XE2 this limitation has been removed. XE2 is capable of producing 64 bit executables and can therefore be used to produce 64 bit shell extensions.

别把无礼当个性 2024-10-14 07:14:06

基本上,shell 扩展是一个实现一组接口的 COM 对象。需要实现哪些接口取决于扩展的类型(当然,任何扩展都会使用一些接口)。
您可以开始阅读此处(您需要一些 C -> Delphi 翻译,但是当您开始处理此类问题时,最好做好准备),然后参考当然是 MSDN

Basically a shell extension is a COM object that implements a set of interfaces. Which interfaces needs to be implemented depends on the type of the extension (there are some used by any extension, of course).
You can start reading here (you need some C -> Delphi translation, but when you start to work on such matters is better you get prepared to it), and then the reference is of course MSDN

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文