求助,DLL调用问题

u010475025 2017-05-19 06:39:41

这个在delphi 应该怎么调用?感谢
...全文
89 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Mr Dang 2017-05-20
  • 打赏
  • 举报
回复


function funMain(inList:PAnsiChar;OutList:PAnsiChar):integer;stdcall;extern 'XX.dll';

var
         inList,OutList:PAnsiChar
         Str_InList,Str_Outlist:string;
begin
       GetMem(inList,2048);
       GetMem(OutList,2048);
      try
           inList:='XXOO';
            zeromemory(inList,strLen(inList));
            zeromemory(outList,strLen(OutList));
            strpcopy(str_inList,inList)
            if funMain(inList,outList)<>0 then
            begin
                    showmessage('返回失败!');
                    exit;
            end;
            str_outlist:=strpas(outlist);
            showmessage(str_outlist);
      finally
             freemem(inList);
             freemem(outList);
      end;
end;

1,183

社区成员

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

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