0

I need to extract a binary resource (that's in my project) however, I cannot think of any way I can do it, I'm using Windows/C++.

How can I do it?

4
  • Clarify please. Do you mean an imbedded resource compiled into your .res file and linked in to your final executable/dll ? Commented Oct 27, 2012 at 15:03
  • No, I just need it to extract the file from the resources section. Commented Oct 27, 2012 at 15:16
  • And that is different.. how? "the file" is a file listed in your .rc script or not? Commented Oct 27, 2012 at 15:17
  • FindResource would be a good start. Follow the documentation from there onwards. Commented Oct 27, 2012 at 15:28

1 Answer 1

2

FindResource, SizeofResource, LoadResource, and LockResource are used in concert to gain access to "the file" held in the resource table of the module your reading. A reasonable sample of how to do this can be found at this question, Note that you need to know the resource type and name (or ordinal), to find it for the copy.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.