📄 dll_withlib_client.cpp
字号:
// dll_withlib_client.cpp : Defines the entry point for the console application.
//
#include <windows.h>
#include <iostream.h>
int main(void)
{
//定义一个函数指针
typedef void (* DLLWITHLIB )(void);
//定义一个函数指针变量
DLLWITHLIB pfFuncInDll = NULL;
//加载我们的dll
HINSTANCE hinst=::LoadLibrary("dll_withlib.dll");
if (NULL != hinst)
{
cout<<"dll called!"<<endl;
}
//找到dll的FuncInDll函数
pfFuncInDll = (DLLWITHLIB)GetProcAddress(hinst, "FuncInDll");
//调用dll里的函数
if (NULL != pfFuncInDll)
{
(*pfFuncInDll)();
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -