这样的声明如何转换(100分)

  • 主题发起人 主题发起人 topgun2
  • 开始时间 开始时间
T

topgun2

Unregistered / Unconfirmed
GUEST, unregistred user!
typedef struct tagCHAROCRINFO { <br>&nbsp;int &nbsp;nArea, nIndex; &nbsp; &nbsp;<br>&nbsp;BOOL bTrue; &nbsp; &nbsp; <br>&nbsp;WORD pCand[10]; &nbsp; &nbsp;<br>&nbsp;WORD uWidth, uHeight; &nbsp; <br>&nbsp;BYTE pDotMatrix[2048]; &nbsp; <br>} CHAROCRINFO, *PCHAROCRINFO; <br><br>bool WINAPI FpGetCharOCRInfo(PCHAROCRINFO lpCharInfo); <br>有人问我这个如何转Delphi声明
 
type<br>&nbsp; CHAROCRINFO=record<br>&nbsp; nArea,nIndex:Integer;<br>&nbsp; bTrue:Boolean;<br>&nbsp; pCand:array[0..9] of Word;<br>&nbsp; uWidth,uHeight:Word;<br>&nbsp; pDotMatric:array[0..2047] of Byte;<br>end;<br>PCHAROCRINFO=^CHAROCRINFO;<br><br>function FpGetCharOCRInfo(lpCharInfo:PCHAROCRINFO):Boolean;stdcall;
 
huawdg这位兄弟翻译的完全正确<br>
 
OK,同意huawdg
 
无懈可击
 
有漏洞!<br>Boolean最好改为LongBool<br>type<br>&nbsp; CHAROCRINFO=record<br>&nbsp; nArea,nIndex:Integer;<br>&nbsp; bTrue:LongBool;<br>&nbsp; pCand:array[0..9] of Word;<br>&nbsp; uWidth,uHeight:Word;<br>&nbsp; pDotMatric:array[0..2047] of Byte;<br>end;<br>PCHAROCRINFO=^CHAROCRINFO;<br><br>function FpGetCharOCRInfo(lpCharInfo:PCHAROCRINFO):LongBool;stdcall;
 
CHAROCRINFO=packed record<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /////
 
接受答案了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
719
import
I
后退
顶部