Click here to Skip to main content
13,042,630 members (72,014 online)
Rate this:
Please Sign up or sign in to vote.
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 21:03pm
Rate this: bad
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.

Rate this: bad
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.
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 25 Apr 2011
Copyright © CodeProject, 1999-2017
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