Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2005

Tip: Looking for answers? Try searching our database.

Exception when using delayload linker option in release build

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
HairlipDog58 - 28 Jan 2005 17:07 GMT
I have a VC++6 project where I need to delay load a DLL. I used a structured
exception handling frame and all seems to work when I build the debug version
and run it (either in or out of the debugger). In debug build, the exception
is caught and reported gracefully to the user. When I build the release
version and run it, the SEH frame does not catch the exception and the
application crashes.

Has anyone had a similar experience and if so, what is the resolution?
William DePalo [MVP VC++] - 28 Jan 2005 17:20 GMT
>I have a VC++6 project where I need to delay load a DLL. I used a
>structured
[quoted text clipped - 7 lines]
>
> Has anyone had a similar experience and if so, what is the resolution?

This is a guess. Try rebuilding with the /EHa switch.

If it does not fix the problem, as Emily Litella used to say "nevermind".

If it does it is because the Release build optimizes away your exception
handling. That can happen when it doesn't see a way in which an exception
can be thrown. Realize that the compiler has limited information when it
does this - it does not know about structured exceptions, it only knows
about C++ exceptions.

Regards,
Will
Doug Harrison [MVP] - 28 Jan 2005 17:25 GMT
>I have a VC++6 project where I need to delay load a DLL. I used a structured
>exception handling frame and all seems to work when I build the debug version
[quoted text clipped - 4 lines]
>
>Has anyone had a similar experience and if so, what is the resolution?

Have you tried changing the exception-handling compiler option for the file
from /GX (implies /EHsc) to /EHa?

Signature

Doug Harrison
Microsoft MVP - Visual C++

HairlipDog58 - 31 Jan 2005 18:17 GMT
Thank you both very much, that seems to have solved the problem.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.