Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Exception 0xC0000008 in NTDLL.DLL

Posted on 1999-01-15
3
1,446 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

  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 …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

791 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