websdk增加dmp文件记录
This commit is contained in:
parent
cffefbeb8c
commit
78e0a1cee7
|
@ -1,5 +1,6 @@
|
|||
#include "base/HGDef.h"
|
||||
#include "base/HGInc.h"
|
||||
#include "base/HGCrash.h"
|
||||
#include "base/HGThread.h"
|
||||
#include "base/HGUtility.h"
|
||||
#include "base/HGIni.h"
|
||||
|
@ -12,6 +13,14 @@
|
|||
#include "MsgPumpCallback.h"
|
||||
#include "curl/curl.h"
|
||||
|
||||
static void CrashFunc(HGPointer crashAddr, HGPointer param)
|
||||
{
|
||||
HGChar logPath[256];
|
||||
HGBase_GetLogFilePath(logPath, 256);
|
||||
strcat(logPath, "crash.dmp");
|
||||
HGBase_MakeCrashFile(logPath);
|
||||
}
|
||||
|
||||
static void ThreadFunc(HGThread thread, HGPointer param)
|
||||
{
|
||||
(void)thread;
|
||||
|
@ -63,6 +72,8 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE iPrevInstance, LPWSTR lpCmdLi
|
|||
int main()
|
||||
#endif
|
||||
{
|
||||
HGBase_RegisterCrashFunc(CrashFunc, NULL);
|
||||
|
||||
#if defined(HG_CMP_MSC)
|
||||
WSADATA ws = { 0 };
|
||||
int ret = WSAStartup(MAKEWORD(2, 2), &ws);
|
||||
|
|
Loading…
Reference in New Issue