瞿
瞿巫西
Unregistered / Unconfirmed
GUEST, unregistred user!
一,VC中结构体声明如下<br> struct Ttest<br>{<br> long m_iAcctID;<br> long m_iPaymentMethod;<br> long m_iPaymentPlanID;<br> long m_lBalance;<br> char m_str[10];<br>};<br>int WINAPI DLL_CallGetOweAcct( Ttest &test1);<br>2,DELPHI中的结构体声明如下<br> PTest = ^Ttest;<br> Ttest = record<br> m_iAcctID :integer;<br> m_iPaymentMethod :integer;<br> m_iPaymentPlanID :integer;<br> m_lBalance :integer;<br> m_str : Pchar ;<br> end;<br>调用部分为<br>test1 : PTest;<br>getmem(test1,sizeof(TTest));<br>DLL_CallGetOweAcct1(test1);<br>freemem( test1);<br>问题:<br>1,我用了VC写了一个DLL调用,结果无问题,但用DELPHI调用则有错<br>2,我把结构体中的 m_str去掉之后,则DELPHI调用无问题,加上则会报错<br>请高手解答,200分送上