开发者

how to access files in a resource dll

I have created a resource DLL for an IE addon with Visual C++开发者_如何学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.


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'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜