一个C++语句转为DELPHI语句的问题,请大家帮个忙!(50分)

  • 主题发起人 主题发起人 3cs
  • 开始时间 开始时间
3

3cs

Unregistered / Unconfirmed
GUEST, unregistred user!
struct TBuf *Buf;<br>Buf= (struct TBuf *)FMPGet( hMPEGStream, FMPI_STM_USER);<br>Buf = (struct TBuf *)GlobalAllocPtr( GMEM_FIXED, sizeof( struct TBuf ) );<br>其中Buf 是个记录型变量;hMPEGStream:BYTE ;FMPI_STM_USER是个常量。<br>如何把它转成DELPHI语句? 谢谢了!
 
真的没人会吗?
 
大概是这样吧:<br><br>type<br>&nbsp; PBuf = ^TBuf;<br>&nbsp; TBuf = record<br>&nbsp; &nbsp; ...... &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// 你的定义<br>&nbsp; end;<br><br>var<br>&nbsp; Buf: PBuf;<br>...<br>&nbsp; Buf := PBuf(FMPGet(hMPEGStream, FMPI_STM_USER));<br>&nbsp; Buf := PBuf(GlobalAllocPtr(GMEM_FIXED, SizeOf(TBuf)));<br>...
 
接受答案了.
 
后退
顶部