I have a c++ dll project, in which, I have embedded some raw data through "resource.rc" file.
IDR_TEMPLATE1 RCDATA "areaTemplate.bin"
Now I want to access the data of "areaTemplate.bin" file from the dll. How can I read the contents of "areaTemplate.bin" in a byte array?
First use FindResource or FindResourceEx, then use LoadResource and LockResource.
Use SizeofResource to get the size of datas.
Code:
Be sure to read the following remark about LoadResource:
There is no "unlock resource" or "free resource" APIs.
As Manuell says, you use FindResource(), LoadResource() and probably LockResource() and SizeofResource()
I happen to have some code which does pulls out a resource and writes it to a file, and may help with your understanding of the API in question.