delphi7 转 delphi2010 StrLCopy 函数报错,如何转换?

microd 2013-11-18 06:11:24
StrLCopy(Dest, PAnsiChar(Source), MaxLen);

-----------
Building hjkTrayIcon.dproj (Debug configuration)
[DCC Error] TrayIcon.pas(310): E2251 Ambiguous overloaded call to 'StrLCopy'
SysUtils.pas(8063): Related method: function StrLCopy(PAnsiChar; const PAnsiChar; Cardinal): PAnsiChar;
TrayIcon.pas(275): Related method: function StrLCopy(PAnsiChar; const PAnsiChar; Cardinal): PAnsiChar;
[DCC Error] TrayIcon.pas(315): E2251 Ambiguous overloaded call to 'StrLCopy'
SysUtils.pas(8094): Related method: function StrLCopy(PWideChar; const PWideChar; Cardinal): PWideChar;
TrayIcon.pas(263): Related method: function StrLCopy(PWideChar; const PWideChar; Cardinal): PWideChar;
[DCC Error] TrayIcon.pas(315): E2010 Incompatible types: 'Char' and 'AnsiChar'
[DCC Fatal Error] hjkTrayIcon.dpk(34): F2063 Could not compile used unit 'TrayIcon.pas'
Failed
Elapsed time: 00:00:00.2
...全文
192 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
孤独de猫 2013-11-18
  • 打赏
  • 举报
回复
Delphi2010分 AnsiChar(1个字节) 和WideChar(2个字节) 。D7都是AnsiChar。而且 D2010自带TTrayIcon类。

2,498

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧