![]() |
![]() |
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);//把信息寫入定時返回服務器的數據體裏,嘿嘿~ } } }
![]() |
![]() |
![]() |
![]() |