dll - 我尝试制作 dll 文件时 Visual Studio 2019 中的错误
问题描述
我想为游戏创建一个 dll hack,并且刚刚选择了动态链接库,并且已经有 3 个错误。
这是原始代码:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
错误:
cannot open source file "windows.h" ;
expected a ';' ;
identifier "BOOL" is undefined