编写类似于程序集缓存查看器的 Windows Shell 扩展

发布于 2024-08-04 00:27:55 字数 134 浏览 11 评论 0原文

我想编写一个 shell 扩展来完全自定义特定文件夹的显示,以及程序集缓存查看器(浏览到 c:\windows\ assembly,您就会明白我的意思)。 哪些 COM 接口负责提供这些钩子? 我的“查看器”将用 C# 编写...

谢谢!

I would like to write a shell extensions to completely customize the display of a particular folder, ala the Assembly Cache Viewer (browse to c:\windows\assembly and you will see what I mean).
Which COM interfaces are responsible for providing these hooks?
My 'viewer' will be written in C#...

Thanks!

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

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

发布评论

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

评论(2

樱娆 2024-08-11 00:27:55

请注意,存在争议关于在 .NET 中进行资源管理器扩展

问题示例:如果您的目标是 .NET 2.0,则您的扩展将无法在 .NET 1.1 应用程序显示的任何“打开文件”对话框中运行。一个进程只能加载一个版本的 .NET 运行时。

这不仅仅是您的扩展无法工作的问题;而是您的扩展无法工作的问题。您将把特定版本的 .NET 运行时注入到使用文件对话框的任何应用程序中。如果应用程序是一个非托管应用程序,并且计划加载针对较新版本的 .NET 运行时等的 COM 组件,那么这就是个坏消息。

编辑:如评论中所述,这个问题现已解决由 .NET 4.0 运行时。因此,托管资源管理器扩展应始终以 .NET 4.0 或更高版本为目标。

Note that there is controversy about doing explorer extensions in .NET.

Example problem: If you target .NET 2.0, then your extension won't work in any "open file" dialogs shown by .NET 1.1 applications. A process can load only one version of the .NET runtime.

It's not just a matter of your extension not working; you will be injecting a particular version of the .NET runtime into any application that uses file dialogs. That's bad news if the app is an unmanaged application that was planning on loading a COM component targetting a newer version of the .NET runtime, etc.

edit: as explained in the comment, this has now been solved by the .NET 4.0 runtime. Therefore, managed explorer extensions should always target .NET 4.0 or later.

瀞厅☆埖开 2024-08-11 00:27:55

这里有一篇文章应该可以帮助您入门:

使用命名空间扩展来扩展 Windows shell 允许您为 Windows 资源管理器创建一些自定义功能。一种常见用途是使资源管理器能够显示一个真实文件夹中不存在的项目列表,但实际上驻留在多个位置。文件夹上的视图使这些项目看起来像是在一个位置,因此管理它们变得更加容易。本文说明了使用 C# 和 .NET Framework 创建自定义 shell 命名空间扩展的过程。 [...]

Here's an article that should get you on your way:

Extending the Windows shell with namespace extensions allows you to create some custom functionality for Windows Explorer. One common use is to enable Explorer to present a list of items that do not exist in one real folder, but actually reside in a number of places. The view on the folder makes it look like these items are in one place, so managing them becomes easier. This article illustrates the process of creating custom shell namespace extensions using C# and the .NET Framework. [...]

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