資源簡介
C MFC程序 防止進程被結束
代碼片段和文件信息
//?dllmain.cpp?:?定義?DLL?應用程序的入口點。
#include?“stdafx.h“
#include?“export.h“
#include?“MinHook.h“
#pragma?comment(lib?“MinHook.x64.lib“)
#pragma?data_seg(“MyProtect“)
BOOL?IsMyInit=FALSE;
BOOL?IsTaskInj=FALSE;
DWORD?MyID=0;
#pragma?data_seg()
#pragma?comment(linker“/Section:MyProtectRWS“)
void?SetProcessID(DWORD?ProcID)
{
MyID=ProcID;
}
DWORD?GetProcessID()
{
return?MyID;
}
template?
inline?MH_STATUS?MH_CreateHookAPIEx(LPCWSTR?pszModule?LPCSTR?pszProcName?LPVOID?pDetour?T?**ppOriginal)
{
return?MH_CreateHookApi(pszModule?pszProcName?pDetour?reinterpret_cast(ppOriginal));
}
typedef?HANDLE(*OPENPROCESS)(DWORD?BOOL?DWORD);
OPENPROCESS?fpOpenProcess?=?NULL;
HANDLE?DetourOpenProcess(DWORD?dwDesiredAccess?BOOL?bInheritHandle
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-06-15?14:12??SelfProtect\
?????目錄???????????0??2015-06-15?14:12??SelfProtect\Protect\
?????文件????????1917??2015-06-15?10:42??SelfProtect\Protect\dllmain.cpp
?????文件?????????213??2015-06-02?12:48??SelfProtect\Protect\export.h
?????文件????????6327??2015-03-17?17:34??SelfProtect\Protect\MinHook.h
?????文件???????18432??2015-03-18?09:05??SelfProtect\Protect\MinHook.x64.dll
?????文件????????3614??2015-03-18?09:05??SelfProtect\Protect\MinHook.x64.lib
?????文件???????14848??2015-03-18?09:05??SelfProtect\Protect\MinHook.x86.dll
?????文件????????3768??2015-03-18?09:05??SelfProtect\Protect\MinHook.x86.lib
?????文件??????????79??2015-06-02?11:46??SelfProtect\Protect\Protect.cpp
?????文件????????8824??2015-06-02?12:49??SelfProtect\Protect\Protect.vcproj
?????文件????????2555??2015-06-15?12:17??SelfProtect\Protect\Protect.vcproj.DELL.Administrator.user
?????文件????????1601??2015-06-02?11:46??SelfProtect\Protect\ReadMe.txt
?????文件?????????212??2015-06-02?11:46??SelfProtect\Protect\stdafx.cpp
?????文件?????????313??2015-06-02?11:46??SelfProtect\Protect\stdafx.h
?????文件????????1026??2015-06-02?11:46??SelfProtect\Protect\targetver.h
?????目錄???????????0??2015-06-15?14:12??SelfProtect\SelfProctect\
?????文件????????2015??2015-06-02?12:49??SelfProtect\SelfProctect.sln
?????文件???????14848??2015-06-15?12:17??SelfProtect\SelfProctect.suo
?????文件????????2959??2015-06-02?11:29??SelfProtect\SelfProctect\ReadMe.txt
?????目錄???????????0??2015-06-02?11:29??SelfProtect\SelfProctect\res\
?????文件?????????638??2015-06-02?11:33??SelfProtect\SelfProctect\resource.h
?????文件???????67777??2007-11-28?16:21??SelfProtect\SelfProctect\res\SelfProctect.ico
?????文件?????????368??2015-06-02?11:29??SelfProtect\SelfProctect\res\SelfProctect.rc2
?????文件??????103816??2015-06-02?13:14??SelfProtect\SelfProctect\SelfProctect.aps
?????文件????????1731??2015-06-02?11:29??SelfProtect\SelfProctect\SelfProctect.cpp
?????文件?????????481??2015-06-02?11:29??SelfProtect\SelfProctect\SelfProctect.h
?????文件????????4172??2015-06-02?13:14??SelfProtect\SelfProctect\SelfProctect.rc
?????文件????????9268??2015-06-02?13:14??SelfProtect\SelfProctect\SelfProctect.vcproj
?????文件????????2607??2015-06-15?12:17??SelfProtect\SelfProctect\SelfProctect.vcproj.DELL.Administrator.user
?????文件????????5079??2015-06-15?10:43??SelfProtect\SelfProctect\SelfProctectDlg.cpp
............此處省略5個文件信息
- 上一篇:c++ html網頁編程
- 下一篇:c++ 八皇后問題求解
評論
共有 條評論