Solved

Exception 0xC0000008 in NTDLL.DLL

Posted on 1999-01-15
3
1,436 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
ID: 1182280
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
ID: 1182281
Ooops
>>within the 'kernel32.dll'
should of course read
within the 'ntdll.dll'
0
 

Author Comment

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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

785 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