// 1.加载动态链接库
g_hDll = ::LoadLibrary("piano_dll.dll");
if(g_hDll){
// 2.得到各函数的地址
g_pCreateFun = (TYPEFUNCREATE)::GetProcAddress(g_hDll, "fun_Create");
g_pPlayFun = (TYPEFUNPLAY)::GetProcAddress(g_hDll, "fun_playOneSound");
g_pReleaseFun = (TYPEFUNCREATE)::GetProcAddress(g_hDll, "fun_Release");
// 3.调用
g_pCreateFun(hWnd);
}
dll动态链接库使用过程
最新推荐文章于 2022-01-20 17:10:27 发布