L
letgolxh
Unregistered / Unconfirmed
GUEST, unregistred user!
vc是这样定义的<br>typedef struct lxh {<br> char cx1[1]; // 区域0 密文数据(84字节),密文共4行,每行21个字母<br> char cx2[1]; // 区域8 加密版本号(2字节)<br> char cx3[1]; // 区域1 发票代码(10字节)<br>} lxhDATA, *lxhPINDATA;<br><br>int WINAPI Hellolxh(lxh lxhData)<br>{<br>MessageBox(NULL,lxhData.cx1,lxhData.cx1,0) ;<br>MessageBox(NULL,lxhData.cx2,lxhData.cx2,0) ;<br>MessageBox(NULL,lxhData.cx3,lxhData.cx3,0) ;<br> return 100 ;<br>}<br><br>在delphi中定义<br> lxh = record<br> CX1 :array [0..0] of pchar ;<br> CX2 :array [0..0] of pchar ;<br> CX3 :array [0..0] of pchar;<br> END;<br> lxhPINDATA = ^lxh ;<br><br>调用<br>procedure Tfrm_query.Button2Click(Sender: TObject);<br>var ab :lxh ;<br>lxhPINDATA : ^lxh ;<br>begin<br>ab.CX1[0] := 'a' ;<br>ab.CX2[0] := 'b' ;<br>ab.CX3[0] := 'c' ;<br>Hellolxh(@ab) ;<br>end;<br>不会报错,但是msgbox显示的是乱码??<br>为什么?<br><br>