延迟载入DLL—测试程序
`
演示延迟载入DLL—测试程序
演示延迟载入DLL—测试程序
/*------------------------------------------------------------------------
20_ImportDelay.cpp
演示延迟载入DLL---测试程序
-----------------------------------------------------------------------*/
#include <windows.h>
#include <tchar.h>
#include <strsafe.h>
#include <locale.h>
#include <Psapi.h> //For EnumProcessModules函数
#include "ExportDelay.h"
//#pragma comment(lib,"psapi")
#pragma comment(lib,"20-Export-ImportDelay.lib")
//1、延迟加载是针对Dll的隐式链接的
//2、为了延迟加载Dll,还需要在解决方案的该项目“属性”->“配置属性”->
//“链接器”->“输入”->“延迟加载的Dll”中输入20_ImportDelay.dll
void PrintModules(DWORD dwProcessID) {
HMODULE* phMods =