c++ dll中 struct类型 在delphi中的调用(200分)

  • 主题发起人 主题发起人 huoxiyin
  • 开始时间 开始时间
H

huoxiyin

Unregistered / Unconfirmed
GUEST, unregistred user!
GetCardData(unsigned char * ucDesCardData,(struct ST_CARD) )<br>函数如上,我在delphi中定义的 <br>type<br>&nbsp; ST_Card=record<br>&nbsp; wTimes:word; //次数<br>&nbsp;end;<br>数据不正确,大侠帮帮忙,在线等待,十万火急,要多少分都可以,只要我积分够
 
自己顶,怎么没人关心下!!!!
 
数据类型不一致吧
 
ST_CARD在c++的定义读没有给出来,哪个也帮不了你!
 
GetCardData(ucDesCardData: PChar;card: PST_CARD)<br><br>函数如上,我在delphi中定义的 <br>type<br>&nbsp; PST_Card = ^ST_Card;<br>&nbsp; ST_Card=record<br>&nbsp; wTimes:word; &nbsp; &nbsp;//次数<br>&nbsp;end;
 
把你的c++原形GetCardData函数和ST_CARD贴出来才能帮你啊!
 
typedef struct &nbsp;{ <br> WORD wTimes; //次数( WORD wCardType; //标志,为0<br> WORD wCardId; //表号 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WORD wCodes; //区号 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WORD wWiteData; //气量<br>} ST_CARD;<br><br>函数名称:GetCardData(unsigned char * ucDesCardData, <br>&nbsp; &nbsp; &nbsp;(struct ST_CARD)*stUndesData )<br><br>在线等待,可以加分
 
type<br>&nbsp; PST_CARD = ^ST_CARD;<br>&nbsp; ST_CARD = packed record<br>&nbsp; &nbsp; wTimes:WORD;<br>&nbsp; &nbsp; wCardType:WORD;<br>&nbsp; &nbsp; wCardId:WORD;<br>&nbsp; &nbsp; wCodes:WORD;<br>&nbsp; &nbsp; wWiteData:WORD;<br>&nbsp; end;<br>&nbsp; procedure GetCardData(ucDesCardData:pChar; stUndesData:PST_CARD);
 
今天为何没有看见!<br><br>Type<br>&nbsp; PST_CARD = ^ST_CARD;<br>&nbsp; ST_CARD = packed record<br>&nbsp; &nbsp; wTimes:WORD;<br>&nbsp; &nbsp; wCardType:WORD;<br>&nbsp; &nbsp; wCardId:WORD;<br>&nbsp; &nbsp; wCodes:WORD;<br>&nbsp; &nbsp; wWiteData:WORD;<br>&nbsp; end;<br><br>procedure GetCardData(ucDesCardData:pChar; stUndesData:PST_CARD);stdcall;// 最后加stdcall;
 
后退
顶部