15,471
社区成员
发帖
与我相关
我的任务
分享
extern "C" _declspec(dllexport) int Test(WCHAR ** pWidechar)
{
WCHAR testWidechar[10]=TEXT("已启动全部重新生成");
WriteBSTR(pWidechar,testWidechar);
return 1;
}
typedef int(__stdcall *Connect)(WCHAR * pWidechar);
HINSTANCE hinstDLL=NULL;
hinstDLL=LoadLibrary(_T("dll.dll"));
if (hinstDLL)
{
Connect Proc;
Proc = (Connect)GetProcAddress (hinstDLL,"Test");
WCHAR * pWidecharTest=0;
int iValue = Proc(&pWidecharTest);
MessageBoxW(NULL,pWidecharTest,NULL,NULL);
}