| | |
SetUnhandledExceptionFilter problem
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Nov 2008
Posts: 2
Reputation:
Solved Threads: 0
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
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
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...
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...
![]() |
Similar Threads
- explorer.exe uses 99% CPU (Viruses, Spyware and other Nasties)
- Please i need your help !!! Hijackthis+Rootkitrevealer+Gmer LOGS (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: cannot access private member declared in class
- Next Thread: Writing an Operating System
| Thread Tools | Search this Thread |
api array arrays based binary c++ c/c++ calculator char char* class classes code coding compile console conversion convert count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






