SetUnhandledExceptionFilter problem

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Nov 2008
Posts: 2
Reputation: z00mit is an unknown quantity at this point 
Solved Threads: 0
z00mit z00mit is offline Offline
Newbie Poster

SetUnhandledExceptionFilter problem

 
0
  #1
Nov 7th, 2008
Hi Guys,

Have a question regarding the exception filter.

I have a MiniDump class which looks like this:

class MiniDumpHelper
{
public:

MiniDumpHelper()
{
...
}


LONG WINAPI exitWithDump(struct _EXCEPTION_POINTERS* exceptionInfo)
{
...
return EXCEPTION_CONTINUE_SEARCH;
}
}

then i have a host.cpp class where i have a main()
I try this:

MiniDump *miniDump = new MiniDump();
SetUnhandledExceptionFilter(miniDump->exitWithDump);

Then I get this:

error C3867: 'MiniDump::exitWithDump': function call missing argument list;
use '&MiniDump::exitWithDump' to create a pointer to member

So I do:

MiniDump *miniDump = new MiniDump();
SetUnhandledExceptionFilter(&MiniDump::exitWithDump);

And I get this:

'SetUnhandledExceptionFilter' : cannot convert parameter 1 from 'LONG (__stdcall :MiniDump: )
(_EXCEPTION_POINTERS *)' to 'LPTOP_LEVEL_EXCEPTION_FILTER'



I'm really stuck, would really appreciate help, thanks in advance!!

z00mit
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 2,001
Reputation: ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of 
Solved Threads: 343
ArkM's Avatar
ArkM ArkM is offline Offline
Postaholic

Re: SetUnhandledExceptionFilter problem

 
0
  #2
Nov 7th, 2008
I don't see any MiniDump class in your post (only MiniDumpHelper), but...

Obviously SetUnhandledExceptionFilter wait a pointer to ordinar function (exception handler). But non-static member function is not an ordinar function and a pointer to it is not a pointer to ordinar function. Make it a static mamber (if possible): static member functions treated as ordinar.

Can't say more on this scant info...
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC