T
tzh781228
Unregistered / Unconfirmed
GUEST, unregistred user!
有没有那位大侠使用Delphi调用用友EAI控件的。
我使用以下代码调用,老提示问题。
procedure TForm1.Button1Click(Sender: TObject);
Type TPROCESS=FUNCTION(STR:string ):string;Stdcall;
var
str,ss:string;
tmpStr:String;
dllhdl:THandle;
MYPROCESS:TPROCESS;
ff:textfile;
begin
OpenDialog1.Execute;
AssignFile(Ff, OpenDialog1.FileName);
reset(ff);
ss:='';
while not eof(ff) do
begin
Readln(Ff, Str);
ss:=ss+str;
end;
OpenDialog1.Execute;
try
tmpStr:=OpenDialog1.FileName;
dllhdl:=LoadLibrary(Pchar(tmpStr));
@MYPROCESS:=GetProcAddress(DLLHDL,'Process');
if Assigned(MYPROCESS) then
Str:=MYPROCESS(ss);
finally
FreeLibrary(dllhdl);
end;
end;
我使用以下代码调用,老提示问题。
procedure TForm1.Button1Click(Sender: TObject);
Type TPROCESS=FUNCTION(STR:string ):string;Stdcall;
var
str,ss:string;
tmpStr:String;
dllhdl:THandle;
MYPROCESS:TPROCESS;
ff:textfile;
begin
OpenDialog1.Execute;
AssignFile(Ff, OpenDialog1.FileName);
reset(ff);
ss:='';
while not eof(ff) do
begin
Readln(Ff, Str);
ss:=ss+str;
end;
OpenDialog1.Execute;
try
tmpStr:=OpenDialog1.FileName;
dllhdl:=LoadLibrary(Pchar(tmpStr));
@MYPROCESS:=GetProcAddress(DLLHDL,'Process');
if Assigned(MYPROCESS) then
Str:=MYPROCESS(ss);
finally
FreeLibrary(dllhdl);
end;
end;