The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: jdoe on December 09, 2008, 01:33:58 AM

Title: GetOpenFileName - exception raised internally
Post by: jdoe on December 09, 2008, 01:33:58 AM

Hi,

When I use GetOpenFileName, everything works fine but when I debug a program I can see that an exception is raised by GetOpenFileName. Windows is taking care of this exception obviously but am I to the only it occurs. My system is tweaked a little bit like many services disabled and few registry modifications (documented ones).

I've lost time on this because I thought it was my BrowseForFile function that was the cause but luck for me, it is not.

Title: Re: GetOpenFileName - exception raised internally
Post by: sinsi on December 09, 2008, 07:06:37 AM
Quote from: jdoe on December 09, 2008, 01:33:58 AMbut am I to the only it occurs.

And I thought I could get incoherent...hic... :U
Title: Re: GetOpenFileName - exception raised internally
Post by: jdoe on December 09, 2008, 07:40:48 AM

Yeah it's weird   :red

Quote
I meant... Does it happens just to me.

Maybe still poor english but it's the best I can do    :P

Title: Re: GetOpenFileName - exception raised internally
Post by: sinsi on December 09, 2008, 07:56:09 AM
Some code post, then, Yoda. Help you we can. In abundance have you English.
Title: Re: GetOpenFileName - exception raised internally
Post by: jdoe on December 09, 2008, 08:13:23 AM

Don't need to post code. Take any program in the examples of MASM32 which use GetOpenFileName, run the program into ollydbg, put a breakpoint to a call of GetOpenFileName and step with F7 or F8. Bang !!!

\MASM32\examples\exampl02\showdib

:bdg

Title: Re: GetOpenFileName - exception raised internally
Post by: Tedd on December 09, 2008, 12:30:14 PM
Exceptions are used internally to signal various conditions, some of which may not necessarily be errors that need to cause explosions :wink So they're caught internally and handled to cause the correct thing to happen. Exceptions are only thrown back when they can't/shouldn't be handled internally, to give them a chance to be handled further up, if not handled they eventually reach the top level and you get "Your program caused an exception. DIE DIE DIE!"
If you don't see it when not debugging, then it's not a problem :P
Title: Re: GetOpenFileName - exception raised internally
Post by: jdoe on December 09, 2008, 12:49:57 PM

It's the first time that, while debuging a program, I see this kind of exception. So it is normal that it occurs internally in Windows. It's nice to know. Looks like I "arrive in town".

Thanks Tedd

Title: Re: GetOpenFileName - exception raised internally
Post by: Vortex on December 09, 2008, 12:50:36 PM
Jdoe,

What's the service pack level of your OS?
Title: Re: GetOpenFileName - exception raised internally
Post by: jdoe on December 09, 2008, 01:22:53 PM
Quote from: Vortex on December 09, 2008, 12:50:36 PM
What's the service pack level of your OS?


Windows XP Service Pack 3