我不能很好地使用C++,但现在我需要构建一个调用Delphi DLL并将字符串传递给DLL并返回新字符串的函数.
这是我的Delphi DLL代码:
library testdll;
uses
System.Classes,Winapi.Windows,System.SysUtils;
{$R *.res}
function hello(name : PWideChar):PWideChar;
var
rs:PWideChar;
begin
rs:=PWideChar('Hello '+rs);
Result:=rs;
end;
exports
hello;
begin
end.
Run Code Online (Sandbox Code Playgroud)
任何人都可以帮我在C++中创建简单的代码来调用并获得结果形式的hello函数,谢谢你的帮助.