vc写的dll文件,在BCB中调进用正常,我在DELPHI中调用不成功,请大家帮助解决一下!(100分)

  • 主题发起人 linjifan
  • 开始时间
L

linjifan

Unregistered / Unconfirmed
GUEST, unregistred user!
vc写的dll文件 pReadAllMsg函数
在BCB中调进用正常,我在DELPHI中调用不成功,请大家帮助解决一下!
最好能翻译成DELPHI的过程!

typedef int (__stdcall *ReadAllMsg )(int type,char* PhoneID,char* SmsContent,char* Date,char* Index);

这是用BCB写的过程,pReadAllMsg是一个从DLL文件中调用的函数!

int i,type,count;
char PhoneID[30][20];
char SmsContent[30][512];
char Date[30][20];
char Index[30][3];
type=0;
i=0;

count = pReadAllMsg(type,*PhoneID,*SmsContent,*Date,*Index);
ListView1->Clear();

while(i<count) {
TListItem *pItem = ListView1->Items->Add();
pItem->Caption = Index;
pItem->SubItems->Add(PhoneID);
pItem->SubItems->Add(SmsContent);
pItem->SubItems->Add(pInvertTime(Date).c_str());
i++;
}

if(count==0){
ShowMessage("没有短信!");
}
 
typedef int (__stdcall *ReadAllMsg )(int type,char* PhoneID,char* SmsContent,char* Date,char* Index);
翻译成Delphi的函数形式的话就是:
type
TpReadAllMsg=function (type:integer;PhoneID,SmsContent,Date,Index:pChar):integer; stdcall;
“在Delphi里面调用不成功”这种提法很模糊,具体怎样的不成功呀?不成功的原因有很多种,把你在Delphi里面写的代码贴出来吧。
 

Similar threads

顶部