想要动态调用一个DLL格式.在**.cpp开头增加
#ifdef __cplusplus
typedef extern "C" void (* __stdcall PIMAGEVIEW_FULLSCREENA)(CWnd* hWnd, HINSTANCE hInst, LPCSTR lpString, int iCmdShow);
typedef extern "C" void (* __stdcall PIMAGEVIEW_FULLSCREENW)(CWnd* hWnd, HINSTANCE hInst, LPCWSTR lpString, int iCmdShow);
#else
typedef  void (* __stdcall PIMAGEVIEW_FULLSCREENA)(CWnd* hWnd, HINSTANCE hInst, LPCSTR lpString, int iCmdShow);
typedef  void (* __stdcall PIMAGEVIEW_FULLSCREENW)(CWnd* hWnd, HINSTANCE hInst, LPCWSTR lpString, int iCmdShow);
#endif 
#ifdef UNICODE
#define PIMAGEVIEW_FULLSCREEN PIMAGEVIEW_FULLSCREENW
#else
#define PIMAGEVIEW_FULLSCREEN PIMAGEVIEW_FULLSCREENA
#endif
在函数里头
hPhoto = LoadLibrary(strExePath);
PIMAGEVIEW_FULLSCREEN pImageView = NULL;
pImageView = (PIMAGEVIEW_FULLSCREEN)GetProcAddress(hPhoto,"ImageView_Fullscreen");
if (NULL == pImageView)
{
 return;
}
pImageView(this,NULL,itThrough->strPicPath,SW_SHOW);
FreeLibrary(hPhoto);结果出现了错误
ImageListView.cpp
j:\.cpp(22) : error C2159: more than one storage class specified
j:\.cpp(22) : warning C4518: 'typedef ' : storage-class or type specifier(s) unexpected here; ignored
j:.\cpp(22) : warning C4502: 'linkage specification' requires use of keyword 'extern' and must precede all other specifiers
j:\.cpp(22) : warning C4229: anachronism used : modifiers on data are ignored
j:\.cpp(23) : error C2159: more than one storage class specified
j:\cpp(23) : warning C4518: 'typedef ' : storage-class or type specifier(s) unexpected here; ignored
j:\.cpp(23) : warning C4502: 'linkage specification' requires use of keyword 'extern' and must precede all other specifiers
如果把 extern "C"去掉会出现 堆栈协议不一致.
一般引用第三方DLL
typedef如何写?