下面这段VC++代码转为DELPHI

yjbing 2005-11-01 04:20:31
extern "C" int FAR PASCAL CastelStreamInCallBack(VOID (CALLBACK *func)(char *Ipaddr, char *buf,int buflen));


VOID (CALLBACK Stream)(char *Ipaddr, char *buf,int buflen)
{

}

调用:

CastelStreamInCallBack(Stream)
...全文
126 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
yjbing 2005-11-02
  • 打赏
  • 举报
回复
不好意思,开始是硬件设置问题,现在解决了。
clasj 2005-11-01
  • 打赏
  • 举报
回复
那就是dll里面的问题了呀,它不调用肯定不会执行咯,你看看为什么它不调用了!
yjbing 2005-11-01
  • 打赏
  • 举报
回复
照你的做,但是Steam过程并没有执行呀
clasj 2005-11-01
  • 打赏
  • 举报
回复
function CastelStreamInCallBack(func: Pointer): Integer; stdcall; external 'dllname.dll';

procedure Stream(Ipaddr: PChar; buf: PChar; buflen: Integer); stdcall;
begin

end;

调用

CastelStreamInCallBack(@Stream);
clasj 2005-11-01
  • 打赏
  • 举报
回复
function CastelStreamInCallBack(func: Pointer): Integer; stdcall; external 'dllname.dll';

procedure Stream(Ipaddr: PChar; buf: PChar; buflen: Integer); stdcall;
begin

end;

调用

CastelStreamInCallBack(@Stream);

1,183

社区成员

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

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