Solved

Exception 0xC0000008 in NTDLL.DLL

Posted on 1999-01-15
3
1,459 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
[X]
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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

726 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