我正在从Windows XP SP3上运行的本地服务应用程序的顶级异常处理程序中调用MiniDumpWriteDump API,如下所示:
_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
}
上面的错误代码为0x80070057,但是如果我将转储类型更改为MiniDumpWithFullMemory它就可以了。知道为什么吗?