如何访问资源dll中的文件

发布于 2024-09-15 19:21:16 字数 273 浏览 4 评论 0原文

我在 Visual Studio 2005 中使用 Visual C++ 创建了 IE 插件的资源 DLL,但无法访问 DLL 中的文件(html 和图标)。我尝试过使用和不使用资源文件,但仍然无法访问它们。 设置 /NOENTRY 选项,因为它是资源 dll。 为了访问资源,我使用与此类似的路径: “res://C:\Program Files\MyApp\MyDLL.dll/myfile.htm” 但它似乎不起作用。 我是否错过了一步,或者有什么地方做得不对? 请告诉我。

谢谢,

奥利维尔。

I have created a resource DLL for an IE addon with Visual C++ in Visual Studio 2005, but I cannot access the files (html and icons) within the DLL. I tried with and without a resource file but I still haven't been able to access them.
the /NOENTRY option is set, since it is a resource dll.
to access the resources I use a path similar to this:
"res://C:\Program Files\MyApp\MyDLL.dll/myfile.htm"
but it does not seem to work.
Did I miss a step or is there something I'm not doing right?
Please let me know.

Thanks,

Olivier.

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

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

发布评论

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

评论(1

ぃ弥猫深巷。 2024-09-22 19:21:16

我再次找到了解决问题的方法。
语法“res://C:\Program Files\MyApp\MyDLL.dll/myfile.htm”是正确的,但不知何故它对我不起作用。然后我将其更改为“res://C:\Program Files\MyApp\MyDLL.dll/100”,其中 100 是资源的“值”(资源文件中的每个资源都有一个 ID 和一个值)。要了解 VS 2005 中的资源值是多少,请切换到资源视图,右键单击要了解其值的资源文件,然后选择“资源符号”。

Once again, I found the solution to the problem.
The syntax "res://C:\Program Files\MyApp\MyDLL.dll/myfile.htm" is correct but somehow it was not working for me. Then I changed it ti "res://C:\Program Files\MyApp\MyDLL.dll/100" where 100 is the 'value' of the resource (every resource in a resource file has an ID and a value). To find out what your resource value is in VS 2005, switch to resource view, right click on the resource file that you want to know the value of and select 'resource symbols'.

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