GetProcAddress 宏

#define FUNC_ADDR(hDll, func) pf##func func = \

(pf##func)GetProcAddress(hDll,#func);\
if(! func) {\
AfxMessageBox("GetAddrErr"#func);\
}

HMODULE hDll = LoadLibrary("InvoicePrintMP512.dll");
if(!hDll) {
AfxMessageBox("LoadErr");
}
FUNC_ADDR(hDll, OpenDevice)
FUNC_ADDR(hDll, CloseDevice)

  

posted @ 2013-07-16 12:02  呵呵··  阅读(292)  评论(0编辑  收藏  举报