Uncaught exception in WindowProc (returning 0).

I'm using VC6 and can't figure out how to get the debugger to stop on this error.

Warning: constructing COleException, scode = DISP_E_BADINDEX ($8002000B).
First-chance exception in test.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.

This line sometimes shows up on the same error.
Warning: Uncaught exception in WindowProc (returning 0).

Is it possible to get the debugger to stop on an error like this if so how ?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

All the ole functions and properties when get called thru IDispatch(they use dispid of function).I hope the problem is with the id of the function.Can u put sample code.
hansw77041Author Commented:
That's the big problem this code is part of a library I purchased (TeeChart) so I really don't have access to that code.

At first I thought is could be my code, and then coded a bunch of stuff to ensure arrays are not used beyond the correct size.

I'll leave the question open for a while to see if someone else has any  suggestion.
Well, one simple solution is to catch the exception.  That doesn't really fix the error, though.  From the looks of it, and knowing nothing of the library, I'd suspect you are not calling an initialization routine it needs you to call.

I'd say catch the exception everywhere you suspect it might be and see if you can track down from that what call is causing the problem.  Hopefully that will give you enough of a hint to guess what the problem may be.

Hope this helps.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

>>Is it possible to get the debugger to stop on an error like this if so how ?

Go to 'Debug|Exceptions'. There, scroll down to 'Microsoft C++ Exception' and set the setting to 'stop always'.
hansw77041Author Commented:
Yes to catch the exception is what my question is all about. but how to do that ? As humakumar implies it is not possible.

The initialization is correct, I think the biggest problem is that all happened to working code when I upgraded from Version 6 to Version 7 !
I'm sick of companies peddling libraries and programs as if it's tested, just for me and others to become their beta tester.

It's getting so bad I'm at the point of dumping Version 7 and going back to Version 6 which does not have these problems.  V6 has plenty of crap in it, but that this killer.

jkr: Yes I did that and of course it points to a fuction within the library, and that's as far as I can go without source.

To All:
Everyone has contributed so I'm splitting points, dividing 500 by 3 is not easy so please accept my split.
>>Yes to catch the exception is what my question is all about. but how to do that ?

Write your own exception filter and set that via 'SetUnhandledExceptionFilter()'
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.