这个函数怎样转换?(50分)

  • 主题发起人 迷惘的人
  • 开始时间

迷惘的人

Unregistered / Unconfirmed
GUEST, unregistred user!
CPLAYER_API void __stdcall MP4_ServerSetStart(void(CALLBACK *StartCap)(int port));
这是C++中的一个函数原型,怎样把它转换成Delphi的函数原型?
 
你可以按下面方法试一下
type
TProc = procedure(Port:Integer)
stdcall;

procedure StartCap(Port:Integer);stdcall;
procedure MP4_ServerSetStart(Proc:TProc);stdcall;

procedure StartCap(Port:Integer);
begin
……
end;

procedure MP4_ServerSetStart(Proc:TProc);
begin
……
end;

begin
……
MP4_ServerSetStart(StartCap);
……
end;


 
多人接受答案了。
 
顶部