Re: Exception Handling
<deepaksrivastav@gmail.com> wrote in message ...
Hi,
I am using my own exception handler whose code is as shown below.
struct EXCEPTION_REGISTRATION {
Usually, all uppercase names are for macros.
EXCEPTION_REGISTRATION *prev;
DWORD handler;
You have not declared or defined 'DWORD'.
};
EXCEPTION_DISPOSITION myHandler(_EXCEPTION_RECORD
You have not declared or defined 'EXCEPTION_DISPOSITION'.
You have not declared or defined '_EXCEPTION_RECORD'. Also, an underscore
followed by an uppercase letter is reserved by the implementation.
*ExcRecord, void *EstablisherFrame, _CONTEXT *ContextRecord,void *
DispatcherContext)
You have not declared or defined '_CONTEXT'. Ditto the underscore warning.
{
LOG4CPLUS_DEBUG(logger,"Possiblility of a crash");
You have not declared or defined 'LOG4CPLUS_DEBUG'.
(are you starting to get the picture? We need to see all to tell you what
you are doing wrong.)
return ExceptionContinueExecution;
What is that?
}
i am registering the exception as follows :
void func foo(){
EXCEPTION_REGISTRATION reg, *preg = ®
reg.handler = (DWORD)myHandler;
DWORD prev;
_asm {
mov EAX,FS:[0];
mov prev,EAX;
}
reg.prev = (EXCEPTION_REGISTRATION*)prev;
_asm {
mov EAX,preg;
mov FS:[0],EAX;
}
}
This is actually in a DLL file.
'DLL' is off-topic in this NG. Try one of the windows NGs.
After the execution of this function, the code exits.
I don't blame it, I'd exit too!!
This code is running on a web server, if there are no
exceptions, it should not exit. Any idea why this is happening?
Regards, Deepak Srivastav
Don't know, too much missing to tell.
--
Bob R
POVrookie