?? checkfileandems.cpp
字號:
#include "stdafx.h"
DWORD dwRunExeFileSize = 0;
DWORD dwRunDllFileSize = 0;
DWORD dwRunDisplayDllFileSize = 0;
DWORD dwRunSDKDllFileSize = 0;
//用戶要加密執行文件
CString g_RunExe;
inline DWORD GetRunFileSize(CString sFileName)
{
DWORD dwRunFileSize = 0;
HANDLE h;
h=CreateFile(sFileName,FILE_SHARE_READ/*GENERIC_READ*/,0,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
if (h==INVALID_HANDLE_VALUE)
{
return -1;
}
dwRunFileSize = GetFileSize(h,NULL );
CloseHandle(h);
return dwRunFileSize;
}
void UserProgram()
{
CString sFileName = g_RunExe;//RunExe;
CString ls;
dwRunExeFileSize = GetRunFileSize(sFileName);
}
DWORD FileData()
{
CString sFileName = g_RunExe;//RunExe;
CString ls;
DWORD dw = GetRunFileSize(sFileName);
if (dwRunExeFileSize!=dw)
{
return 0;
}
return OK_CODE1;
}
//check EMS
HINSTANCE hinstRunExe, hinstRunDll, hinstRunDisplayDll, hinstRunSDKDll;
typedef VOID (*CheckEMCPROC)(LPTSTR);
void UserProgramA()
{
//獲取程序基地址
HINSTANCE hinstLib;
CheckEMCPROC ProcAdd;
hinstLib = GetModuleHandle(g_RunExe);//RunExe);
hinstRunExe = hinstLib;
/*
if (hinstLib != NULL)
{
//ProcAdd = (CheckEMCPROC)GetProcAddress(hinstLib, _T("VideoCodec"));
ProcAdd = GetProcAddress(hinstLib, "EndVideoEncode");
if (ProcAdd!=NULL)
// AfxMessageBox("ok!");
else
// AfxMessageBox("no ok!");
}
*/
}
DWORD MemData()
{
if (hinstRunExe!=GetModuleHandle(g_RunExe))//RunExe) )
return 0;
return OK_CODE1;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -