Click here to Skip to main content
15,898,538 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have bitmap resources in dll. When I use the dll in debug configuration, I am able to load the bitamps . However, same code when run in release configuration returns error for LoadBitmap. Are the resources not availale in release configuration? are theere any settings in visual studio or any configuration to make them available?
Posted

Resources are available, for sure, regardless of the settings and configuration.
You problem is somewhere else. Are you sure you're loading from embedded resource? It can be a path name problem.

You can debug your code even in Release configuration and find where the problem is. Better yet (in this case), catch all the exception and dump exception information (with stack) to see the code lines where the exception is thrown and propagated. If you still cannot figure out the resolution, post this dump and relevant parts of the code.

—SA
 
Share this answer
 
v2
There are no exceptions in code except that LoadBitmap is returning 0 to indicate resource is not available.
 
Share this answer
 
Comments
barneyman 25-Apr-11 5:37am    
normally release/debug inconsistencies are due to

1. different build configs
2. uninitialised data (debug zero's everything)

So, I'd check for the resource actually being included in release, or the resource hinstance you're using being valid
Albert Holguin 25-Apr-11 15:15pm    
Don't post follow-ups as solutions

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