草庐IT

getHello

全部标签

c++ - 如何从 DLL 的导出函数中获取 std::string?

我想加载自定义DLL(C++之一)并调用它导出的函数?这是我的Go代码:funcmain(){dllForGo:=syscall.MustLoadDLL("dllForGo.dll")deferdllForGo.Release()getHello:=dllForGo.MustFindProc("getHello")r1,_,err:=getHello.Call(0)//alsotriedwith.Call()andstillgotthesameerror}这是我的DLL的C++代码:std::string__stdcallgetHello(void){inta=1;doubleb=10

c++ - 如何从 DLL 的导出函数中获取 std::string?

我想加载自定义DLL(C++之一)并调用它导出的函数?这是我的Go代码:funcmain(){dllForGo:=syscall.MustLoadDLL("dllForGo.dll")deferdllForGo.Release()getHello:=dllForGo.MustFindProc("getHello")r1,_,err:=getHello.Call(0)//alsotriedwith.Call()andstillgotthesameerror}这是我的DLL的C++代码:std::string__stdcallgetHello(void){inta=1;doubleb=10