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

Edited 3 Years Ago by happygeek: fixed formatting

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...

This question has already been answered. Start a new discussion instead.