Solved

Exception 0xC0000008 in NTDLL.DLL

Posted on 1999-01-15
3
1,417 Views
Last Modified: 2012-06-27
I have created 2 DLLs A and B. A loads B with LoadLibrary call. B calls Oracle 7.3 OCI. My application uses the first DLL (i.e. A). While debugging my application on Visual C++ 5.0 on NT 4.0 Sp3, I get an exception 0xC0000008 in NTDLL.DLL at 77F76408. Bounds checker reported the error at WaitForSingleObject call (invalid handle). However, if I run the same application from console (MS DOS promt) it goes through. Do I need to compile/link with any special project settings?
0
Comment
Question by:sridhar_dvjs
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 20 total points
Comment Utility
I assume the exception is reported as 'first chance', which means that a function from within the 'kernel32.dll' caused an 'invalid handle' exception that was handled successfully inside the SEH frame that was active when the exception occurred. You can think of it being the same as if you use code like this:

long l;

__try // set up current SEH frame
{
CopyMemory ( &l, 0, sizeof ( long)); // read from 0x00000000
}
__except( EXCEPTION_EXECUTE_HANDLER) // handler for current frame
{
puts ( "We knew that this would go wrong...");
}

This exception is - as you noticed - only reported when running under a debugger, as debuggers are notified of this before it reaches the application...
(Additional info: MS KB Article Q105675)

0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
Ooops
>>within the 'kernel32.dll'
should of course read
within the 'ntdll.dll'
0
 

Author Comment

by:sridhar_dvjs
Comment Utility
The exception was caused by Oracle OCI call olog. I used EXCEPTION_CONTINUE_EXECUTION and it works fine. Thanks a lot.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now