Click here to Skip to main content
15,072,691 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a DLL that I created, that contains an image file on my hard drive and when I go to use that DLL in another program it complains that it can't find it. Instead of moving the file to the programs directory where I'm using the DLL, is it possible to compile the image right into the DLL or EXE for that matter)?

Is that even possible ?

OR

Do I always have to keep an image in some local directory that I package up with the program?
Posted
Comments
[no name] 11-Jul-14 7:13am
   
Yes it is possible. You would do this in the exact same manner as you have already been told.

1 solution

You have already been told that it is possible and how to embed the resource on your previous post How to include images as a resource into C++ executable ?[^]

Once you have embedded the images you do not need to ship the images as well - the whole point is that they have been embedded! Useful MSDN article[^]

The problem is more likely the way you are trying to access the images - have a look at this article Load JPEG images from DLL with LoadResource in Managed C++[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900