动态调用dll

LoadLibrary的头文件是#include <Windows.h>

假设要调用dll中的函数原型是 int func(int a,char *);

HMODULE dll;

dll = LoadLibrary("dll的路径名");

int (*func)(int,char *);

func = (int(*)(int,char *))GetProcAddress(dll,"func");

你可能感兴趣的:(dll)