资源简介
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
评论
共有 条评论