MiniDumpWriteDump fails with MiniDumpNormal but works with MiniDumpWithFullMemory

1.7k Views Asked by At

I'm calling MiniDumpWriteDump API from a top level exception handler from a local service app running on Windows XP SP3 like so:

_MINIDUMP_EXCEPTION_INFORMATION ExInfo;
DWORD dwProcID = ::GetCurrentProcessId();
DWORD dwThreadID = ::GetCurrentThreadId();

ExInfo.ThreadId = dwThreadID;
ExInfo.ExceptionPointers = pExceptionInfo;   //Receive it from the exception handler
ExInfo.ClientPointers = NULL;

if(!pfnMiniDumpWriteDump(GetCurrentProcess(), dwProcID, hFile, MiniDumpNormal, &ExInfo, NULL, NULL))
{
    int nOSError = ::GetLastError();    //I receive 0x80070057
}

The above fails with the error code 0x80070057, but if I change the dump type to MiniDumpWithFullMemory it works just fine. Any idea why?

0

There are 0 best solutions below