gpt4 book ai didi

delphi - Delphi中的宽字符串兼容性问题

转载 作者:行者123 更新时间:2023-12-03 19:05:59 26 4
gpt4 key购买 nike

在使用Delphi 2006构建的dll中

Foo(aPath: widestring);
begin
_rootPath := aPath;
end;


在使用Delphi 2010构建的可执行文件中

_Foo := GetProcAddress(FooModule,’Foo’);
_Foo(‘123456’);


进入dll,aPath ='123'。实际上,我传递的任何字符串都会被切成两半。

1.)为什么我的文字被减半?
2.)我该如何解决?

最佳答案

确保_Foo参数在2010年是宽字符串

关于delphi - Delphi中的宽字符串兼容性问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2043900/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com