Outlook 插件导致 Windows 资源管理器崩溃

发布于 2024-09-02 15:13:57 字数 161 浏览 0 评论 0原文

我正在构建一个 Outlook 插件,它利用 Windows 剪贴板进行临时存储。当我在进程结束时调用 Clipboard.Clear() 时,Windows 资源管理器崩溃并需要重新启动。

有谁知道为什么会这样?

它只发生在 64 位操作系统上,而不是 32 位操作系统上。

i am building an outlook addin that utilizes the windows clipboard for temporary storage. When i make a call to Clipboard.Clear() at the end of the process, Windows Explorer crashes and needs to restart.

Does anyone know why this may be?

It ONLY happens on a 64bit OS, not 32bit..

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

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

发布评论

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

评论(1

罪歌 2024-09-09 15:13:57

首先,永远不要这样做。 Windows 剪贴板不是为了您的利益而存在,它是为了用户而存在。用户拥有它,而不是你。用户不希望他的数据被你的东西覆盖。您无法将其保存在某处并稍后放回,而不影响其他应用程序或更改数据。

“如果没有用户的明确指示,程序不应将数据从剪贴板传输到我们的系统中。”
— Charles Petzold,《Windows 3.1 编程》,微软出版社,1992 年

First, don't ever do this. The windows clipboard is not there for your benefit, it's there for the user. The user owns it, not you. The user doesn't want his data overwritten by your stuff. You cannot save it off somewhere and put it back later, without affecting other apps or altering the data.

“Programs should not transfer data into our out of the clipboard without an explicit instruction from the user.”
— Charles Petzold, Programming Windows 3.1, Microsoft Press, 1992

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