Delphi中调用VC创建的DLL时出现问题
使用的VC动态库的函数:
extern "C" _declspec(dllexport) _stdcall int CreateVix(char *MpegPath,char *VixPath,char *FileName,char &Error,int *pct)
在delphi中调用:
function CreateVix(MPEGPath:PChar;VixPath:PChar;FileName:PChar;Error:PChar;Pro0:PInt):integer;stdcall;external 'CreateSaf.dll' name '_CreateVix@20';
procedure TForm1.Button1Click(Sender: TObject);
var
VixTag,pp:integer;
a,b:integer;
jj:PInt;
mpegPath,vixPath,fileName,error:string;
begin
mpegPath:= 'D:\Clips\@A084A01.mpg' ;
vixPath:= 'D:\Clips\';
fileName:= '@A084A01' ;
error:= 'p';
pp := 2;
jj:= @pp;
VixTag := CreateVix(PChar(mpegPath),PChar(vixPath),Pchar(fileName),PChar(error),jj);
if VixTag<>0 then
edit1.Text:=inttostr(VixTag)
else
edit1.Text:='error';
在运行时弹出CPU对话框,提示错误箭头指向:77F9193D ret
不知道这是什么错误,如何解决
注:VC动态库中包含调用了其他一些静态库的内容,不知道在delphi调用此类动态库的时候需要如何设置
声明:此动态库在用VC进行调用的时候是没有问题的