转储当前进程内存 [英] Dump current process memory
本文介绍了转储当前进程内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请提示我如何创建转储堆?
应该使用哪些函数来接收转储堆?
Hi, prompt please how i can create dump heap?
What functions should be used to receive the dump heap?
推荐答案
这可能就是你要找的东西: MiniDumpWriteDump [ ^ ],祝你好运。 />
请注意,创建完整内存转储可能需要较长时间,并且可能会创建相当大的文件,因此请小心处理。
This is probably what you are looking for: MiniDumpWriteDump[^], good luck.
Please note that creating full memory dumps might take a longer time and it might create quite a large file, so handle with care.
我试试..但没有写入文件
I try.. but nothing is written to the file
case IDC_BUTTON2:
hFile = CreateFile( TEXT("minidump.dmp"), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
if( hFile!=NULL && hFile!=INVALID_HANDLE_VALUE )
{
MINIDUMP_EXCEPTION_INFORMATION eInfo;
eInfo.ThreadId = GetCurrentThreadId();
eInfo.ExceptionPointers = NULL;
eInfo.ClientPointers = FALSE;
MiniDumpWriteDump( GetCurrentProcess(), GetCurrentProcessId(), hFile,
MiniDumpNormal, &eInfo, NULL, NULL);
MessageBox(hDlg,L"MiniDumpCreate",L"Minidump",MB_OK);
CloseHandle( hFile ); }
这篇关于转储当前进程内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文