[Quote=引用 2 楼 visualeleven 的回复:]
extern void Writeintowinini(CString appname,CString keyname,CString str);
-->
typedef void (*WriteintowininiProc)(CString appname,CString keyname,CString str);
HMODULE hDll = LoadLibrary(...);
W……
[/Quote]
现在我来用2楼的帖来给出能够使用的完整程序,不过有几个地方,我仍然不明白:
<1> : 在调用该函数时,头文件使用<afx.h>取代<windows.h> !
错误如下:
Compiling...
dlltr.cpp
Linking...
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in libcpd.lib(delop.obj)
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/dlltr.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
dlltr.exe - 4 error(s), 0 warning(s)
&