Receive a string from a function in a DLL in Inno Setup(Inno Setup从DLL调用中获取字符串)
c code on DLL side(DLL端的c代码):
extern "C" void __stdcall MyDllFunc(const wchar_t* source, BSTR *bstr)
{
_bstr_t bstrt(source);
*bstr = bstrt.GetBSTR();
}
Declare on Inno Setup Side(Inno Setup端的申明):
procedure MyDllFunc(source: string; out wide_string: WideString);
external 'MyDllFunc@files:MyDll.dll stdcall setuponly';