问题标签 [sharpshell]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
793 浏览

shell-extensions - 我的图标处理程序使资源管理器崩溃

我有一个使用 SharpShell 作为图标处理程序的项目。它会在 APK 内部窥视以查找并显示其图标。我已经让它工作了,但有一些副作用。如果我尝试将 APK 重命名为其他名称,例如 from A.apkto B.apk,那么 Explorer 就会崩溃,我找不到原因。

这是主要部分和日志记录位:

我的 APK 代码运行aapt d badging "path.apk"并解析输出以获取图标信息,GetIcon 将 APK 作为 zip 打开以获取该文件。我将它全部包装在一个 try/catch 中并绑定到 SharpShell 的 LogError 方法中,但我从来没有得到任何输出。我禁用了 UAC。我认为写入驱动器的根目录没有权限问题,因为 APKLog.txt 确实显示但没有有用的信息。

我得到窗口“Windows 资源管理器已停止工作”并将此信息列为“问题签名”

我看到它说System.AccessViolationException,但我的代码都没有捕捉到它。有人可以对这里发生的事情提供一些见解吗?

0 投票
1 回答
1398 浏览

c# - 使用 setup 注册Sharpshell 程序集。

我一直在寻找一种在右键单击特殊文件时添加菜单项的方法,直到找到这篇文章SharpShell

我能够编写修改后的 shell 并使用 ServerManager.exe 注册它。

当用户使用安装程序安装我的程序时,我如何在系统中注册我的 shell?

0 投票
1 回答
386 浏览

c# - C# shell 扩展在 x64 中工作 fini,但在 x86 中崩溃并出现访问冲突异常

我知道这不是在托管代码中实现 shell 扩展的更好方法,但这不是主题。

我有一个扩展SharpShell库的 C# 项目。我按照教程创建了一个图标处理程序扩展。虽然我所有的开发都是在 x64 平台上测试我的 dll。但是现在我希望能够在两个平台上都使用这个 dll,但是当我尝试在 Windows x86 资源管理器崩溃中注册我的 dll 时,每次他看到我的一个扩展程序出现访问冲突异常时:

问题事件名称:CLR20r3

所以我试图在任何 CPU、x86、x64 中重新编译我的 dll,但没有人在这个平台上工作。我尝试使用 SharpShell 提供的服务器管理器或使用 regasm 手动注册我的 dll,但没有任何效果。

有人知道这里发生了什么吗?

0 投票
1 回答
178 浏览

c# - 强名称 - Sharpshell / LibTiff

我正在使用 Sharpshell 和 LibTiff/Tiff2Pdf 构建一个 shell 扩展。它是 Windows 中用于转换文件的简单下拉菜单。为了构建所有程序集的解决方案必须需要一个强名称,包括项目本身。

任何人都知道如何在 Windows 中使用强名称重建 LibTiff.Net?如果是我自己的程序集,那就像添加一个新密钥一样简单。但是,我迷失了这一点。任何帮助将不胜感激。

0 投票
2 回答
618 浏览

c# - How to get Multiple selected files using a sharpshell contextmenu?

i am making an app that integrates in windows contextmenu,i am using sharpshell tutorials from CodeProject.com. is there any possible way of getting all information of all files that are selected because its giving information about only one file(selected and right click in the end). Is this Possible. if not how can i achieve my purpose

0 投票
0 回答
1017 浏览

wix - How to deploy a SharpShell-based shell extension via WiX?

I have written this simplistic shell extension (explorer context menu) with SharpShell:

It works fine when I deploy it manually.

Based on William's instructions, I wrote the WiX script below to install the shell extension on 32bit PCs:

But after installing the MSI, the shell context menu does not appear. ShellExView does not even show it:

ShellExView SharpShell WiX

Here is the MSI log part that mentions srm, it is not really understandable for me:

0 投票
1 回答
1004 浏览

shell-extensions - srm.exe 安装 shell 扩展:失败并显示“无法转换基础导出值”

我用 SharpShell 编写了这个简单的 shell 扩展(资源管理器上下文菜单):

它可以与 SharpShell 服务器管理器一起调试,但是当我尝试通过srm.exe命令行安装它时,我得到:

如何解决这个问题?

0 投票
1 回答
191 浏览

c# - Where is the app.config installed for a SharpShell assembly?

I created a shell context extension using the SharpShell nuget package. I then used the ServerManager executable to help install/register my assembly, and it works.

The problem I am running into is that I have no idea where the app.config is installed. I have a user setting that I want to adjust, but I can't find the proper app.config file. Where exactly does the app.config get stored for shell extension assemblies?

0 投票
0 回答
276 浏览

windows - 图标处理程序显示黑色图标

我正在使用 Sharpshell 更改我的 pdf 和 xlsx 图标。大多数时候它工作正常,但有时它显示黑色图标。刷新或重新启动资源管理器对其没有影响。

此外,它在某些图标视图中运行良好 - 例如在详细信息、内容中运行良好,但在中等图标或磁贴中运行良好。此外,这些图标在服务器管理器工具中也能正常工作。

还有一件事 - 如果我更改具有黑色图标的文件的名称,正确的图标会立即出现。

这是代码:

这是更简单的版本。我将处理数百个图标。有人有什么建议吗?

编辑:我现在看到图标是随机分配的。每当我清除图标缓存时,都会显示一些随机图标。有时什么都没有,所以它变成全黑或全白。服务器管理器工具中也发生了同样的事情。请帮忙!

0 投票
2 回答
1208 浏览

c# - 在 SharpShell 上下文菜单中选择要重命名的文件

我正在使用 SharpShell 编写一个小的新 shell 上下文菜单项,它将当前选定的文件复制到一个新的子文件夹,然后提示用户输入目录的新名称

搜索 StackOverflow,我找到了这个答案。但是,我想在 SharpShell 中做同样的事情。

我将不得不以某种方式向SVSI_EDIT它开火,我可以发现它埋在深处SharpShell.Interop,但我不确定这是如何工作的。我找不到任何文档或代码示例。

(编辑:我认为找出如何Pidl从文件名中获取 a 将是一个好的开始,但也许我根本不需要它?)