谁能把这个小单元翻译成vc的.h文件,最先给出的得分:)(100分)

  • 主题发起人 主题发起人 bitfarmer
  • 开始时间 开始时间
B

bitfarmer

Unregistered / Unconfirmed
GUEST, unregistred user!
unit uSvrPlugInf;<br><br>interface<br>type<br> &nbsp;TPlugPackEvnt = procedure(ARoomID, AUserID: longword; APack: pointer; ASize: integer); stdcall;<br> &nbsp;TRoomOnOffEvnt = procedure(ARoomID: longword; IsOn: boolean); stdcall;<br> &nbsp;TUserInOutEvnt = procedure(ARoomID, AUserID: longword; IsLogin: boolean); stdcall;<br><br> &nbsp;pPlugEvnts = ^TPlugEvnts;<br> &nbsp;TPlugEvnts = packed record<br> &nbsp; &nbsp;OnPlugPack: TPlugPackEvnt;<br> &nbsp; &nbsp;OnRoomOnOff: TRoomOnOffEvnt;<br> &nbsp; &nbsp;OnUserInOut: TUserInOutEvnt;<br> &nbsp;end;<br> &nbsp;<br><br>TCreatePlugFun = function(APlugMngIp: longword; APlugMngPort: word; APlugID: longword): longword; stdcall;<br>TFreePlugFun = function(AHandle: longword): boolean; stdcall;<br>TSetPlugEvntsFun = function(AHandle: longword; pEvnts: pPlugEvnts): boolean; stdcall;<br>TSendPackFun = function(AHandle, ARoomID, AUserID: longword; APack: pointer;ASize: integer): boolean; stdcall;<br><br>implementation<br><br>end.
 
typedef VOID (*TPlugPackEvnt)(DWORD ARoomID, DWORD AUserID, VOID* APack, WORD ASize);<br>typedef VOID (*TRoomOnOffEvnt)(DWORD ARoomID,bool IsOn);<br>typedef VOID (*TUserInOutEvnt)(DWORD ARoomID, DWORD AUserID, bool IsLogin);<br><br>typedef struct PlugEvnts<br>{<br> &nbsp; &nbsp;TPlugPackEvnt OnPlugPack;<br> &nbsp; &nbsp;TRoomOnOffEvnt OnRoomOnOff;<br> &nbsp; &nbsp;TUserInOutEvnt OnUserInOut;<br>} TPlugEvent, *pPlugEvent;<br><br>下面的自己类推了
 
接受答案了.
 
后退
顶部