資源簡介
dll內存加載
代碼片段和文件信息
//?RUNPCH.cpp?:?定義控制臺應用程序的入口點。
//
#include?“stdafx.h“
#include?
#include?
#include?
#include?“module/zishiA/MemLoadDll.h“
#pragma?comment(lib?“shlwapi.lib“)
using?namespace?std;
#pragma?warning(disable?:?4996)
unsigned?char?bMemory[1024*1024*5]?=?{0};
DWORD?dwLoadDll2Memory(string?strDllPath){
FILE?*fpLoadDll;?
char?cCache[1024];????????????
if((fpLoadDll?=?fopen(strDllPath.c_str()“rb“))?==?NULL)?{?
return?0;
}?
DWORD?dwNowReadId?=?0;
while?(1)?{?
ZeroMemory(cCache?sizeof(cCache));
DWORD?dwReadSize?=?fread(cCache11024?fpLoadDll);
DWORD?dwErrorCode?=?GetLastError();
if(dwReadSize?==?0){
break;
}
for(int?i?=?1?;i?<=?dwReadSize?;i?++){
bMemory[dwNowReadId++]?=?cCache[i-1];
}
}?
fclose(fpLoadDl
- 上一篇:DLL服務svchost服務
- 下一篇:intel_2013.lic
評論
共有 條評論