DLL和Lib自己建立个工程,自己生成吧
代码是控制台的
#include <iostream>
#include <map>
#include <Windows.h>
#include <tchar.h>
#include <process.h>
#include <delayimp.h>
#include "../../dynamic_DLL/dynamic_DLL/dynamic_DLL.h"
//系统的lib
#pragma comment(lib,"delayimp.lib")
//自定义的lib
#pragma comment(lib,"dynamic_DLL.lib")
using namespace std;
FARPROC WINAPI delayHook(unsigned dliNotify, PDelayLoadInfo pdli)
{
switch (dliNotify) {
case dliStartProcessing :
// If you want to return control to the helper, return 0.
// Otherwise, return a pointer to a FARPROC helper function
// that will be used instead, thereby bypassing the rest
// of the helper.
break;
case dliNotePreLoadLibrary :
// If you want to return control to the helper, return 0.
// Otherwise, return your own HMODULE to be used by the
// helper instead of having it call LoadLibra