草庐IT

simpledll

全部标签

c++ - 为什么 GetProcAddress 不起作用?

首先,我创建一个名为SimpleDll.dll的简单dll,其头文件://SimpleDll.h#ifdefMYLIBAPI#else#defineMYLIBAPI__declspec(dllimport)#endifMYLIBAPIintAdd(inta.intb);其源代码://SimpleDll.c#include#defineMYLIBAPI__declspec(dllexport)#include"SimpleDll.h"intAdd(inta,intb){returna+b;}然后我在另一个项目中调用它,它工作正常://TestSimpleDll.c#include"std