![]() |
![]() |
DWORD GetInputAwayTime() { LASTINPUTINFO lpi; lpi.cbSize = sizeof(lpi); GetLastInputInfo(&lpi); return DWORD((GetTickCount()-lpi.dwTime)/1000); }
![]() |
WCHAR wzCallerName[MAX_PATH]; PVOID dwRetArray[62]; DWORD dwRetCount; BOOL bNeedLogStack = TRUE; dwRetCount = RtlCaptureStackBackTrace(2,50,dwRetArray,0);//用api是很差的,能够本身实现的说~~ if (dwRetCount) { for(DWORD xIndex=0;xIndex<dwRetCount;xIndex++) { if (CheckExcepAddr((DWORD)dwRetArray[xIndex]))//排除部分白地址 { bNeedLogStack = FALSE; break; } } if (bNeedLogStack) { for(DWORD xIndex=0;xIndex<dwRetCount;xIndex++) { GetCallerModule((DWORD)dwRetArray[xIndex],wzCallerName);//获取地址模块名称 ReportToSrv((DWORD)dwRetArray[xIndex],xIndex,wzCallerName);//把信息写入定时返回服务器的数据体里,嘿嘿~ } } }
![]() |
![]() |
![]() |
![]() |