且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

.NET:如何创建文件图标叠加

更新时间:2023-02-08 19:36:50

没有,这不是.NET。 shell编程是在非托管的C / C ++的领域。 Shell32.dll中有一个类型库,使其可用于脚本语言和.NET的一些功能。但IShellIconOverlay接口继承自IUnknown,无法接触到的脚本。这在技术上是可行的,但你必须要重新声明在C#中的接口,使用SDK的SHLOBJ.H头文件作为模板在声明。有人做了它的地方,可能是,但它是罕见的尝试,使其工作。快速谷歌搜索变成了没什么用处。

No, it's not .NET. Shell programming is in the domain of unmanaged C/C++. Shell32.dll has a type library that makes some functions available to scripting languages and .NET. But the IShellIconOverlay interface inherits from IUnknown, not accessible to scripting. It is technically possible but you'll have to redeclare the interface in C#, using the declaration in the SDK's ShlObj.h header file as a template. Somebody has done it somewhere, probably, but it is uncommon to try to make it work. A quick Google search turns up nothing useful.

希望,.NET 4.0将恢复一些活动,解决了CLR版本注入的问题。我还没有看到它的一个标志。

Hopefully, .NET 4.0 will revive some activity, solving the CLR version injection problem. I haven't yet seen a sign of it.