欢迎光临
我们一直在努力

如何将c/c++程序转译成delphi(九)_delphi教程

建站超值云服务器,限时71元/月

Case Integer of starts the variant part of the record. Each variant is identified by an ordinal value. This value has no meaning when the type is being used, but is required for declaration.


Please note the difference between a variant (case-) record and a record without case-declaration.


The following translation is wrong:

type  PProcessHeapEntry = ^TProcessHeapEntry;  TProcessHeapEntry = Record    lpData: Pointer;    cbData: DWord;    cbOverhead: Byte;    iRegionIndex: Byte;    wFlags: Word;    Block: Record       hMem: Thandle       Reserved : Array [0..2] of DWord;    end;    Region: Record      dwCommittedSize: DWord;      dwUnCommittedSize: DWord;      lpFirstBlock: Pointer;      lpLastBlock: Pointer    end);  end;

This wrong translation would cause Block and Region to be consecutive in memory, and not overlaid, as follows:







LpData, cbData, cbOverhead, iRegionIndex, wFlags HMem, dwReserved DwCommittedSize, dwUnCommittedSize, lpFirstBlock, lplastBlock



Back to contents

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 如何将c/c++程序转译成delphi(九)_delphi教程
分享到: 更多 (0)

相关推荐

  • 暂无文章