resource-dll

How to load text file from Resources in VC++?

拟墨画扇 提交于 2019-12-18 11:56:10
问题 I'm writing a DLL in VC++ and I need to use external text file. I have something like this right now: ifstream file; string line; file.open("C:\\Users\\Me\\Desktop\\textfile.txt"); getline(file,line); file.close(); I understand that I can have this file in Resources right? I added my text file by going to "ResourceView" -> "Add Resource" -> "Import". I chose my text file and created custom resource type. How can I access to this file to use similarly to the code above ? I have Resource.h but

How to modyfy resource in a DLL from this DLL?

白昼怎懂夜的黑 提交于 2019-12-11 07:45:31
问题 I'm writing an add-on for IE using VC++ and ATL. It's a simple DLL and I have a text file that I use as a resource. This answer helped me in doing this. I have a question about updating resource. MSDN describes how to do it but there is a function (BeginUpdateResource) that need filename of exe or dll with resource. Is it possible to update resource in my DLL from my DLL? I can easily read it that way, but to update I have to provide DLL's name. Is it necessary? Also if I won't give full path

How to load text file from Resources in VC++?

僤鯓⒐⒋嵵緔 提交于 2019-11-30 05:11:23
I'm writing a DLL in VC++ and I need to use external text file. I have something like this right now: ifstream file; string line; file.open("C:\\Users\\Me\\Desktop\\textfile.txt"); getline(file,line); file.close(); I understand that I can have this file in Resources right? I added my text file by going to "ResourceView" -> "Add Resource" -> "Import". I chose my text file and created custom resource type. How can I access to this file to use similarly to the code above ? I have Resource.h but what should I do with it? Can I edit my resource text file too? Assumptions: The resource type is "TEXT