Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows Win32 VC10.0
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 24-Apr-11 22:03pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

There are no exceptions in code except that LoadBitmap is returning 0 to indicate resource is not available.
  Permalink  
Comments
barneyman at 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 at 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)

  Print Answers RSS
0 OriginalGriff 195
1 ProgramFOX 130
2 Maciej Los 105
3 Sergey Alexandrovich Kryukov 105
4 Afzaal Ahmad Zeeshan 82
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 25 Apr 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100