D
DearLily
Unregistered / Unconfirmed
GUEST, unregistred user!
vc的函数是这样的:
extern "C" __declspec(dllexport) int ReConstructor(float* projection, float* presult)。传递的参数为指向一批数据的指针。
delphi中写了这样一个调用dll的单元:
unit recdll;
interface
function reconstruct(projectionointer;presultointer):integer;
implementation
function ReConstructor(projectionointer;presultointer):integer;stdcall;external 'recdll.dll' name 'ReConstructor';
function reconstruct(projectionointer;presultointer):integer;
begin
result:=ReConstructor(projection,presult);
end;
end.
然后在主单元中直接调用该单元,用a:=reconstruct(@singlearr,@reconarr);singlearr,reconarr均为静态数组,运行时为何总是说地址出错?
extern "C" __declspec(dllexport) int ReConstructor(float* projection, float* presult)。传递的参数为指向一批数据的指针。
delphi中写了这样一个调用dll的单元:
unit recdll;
interface
function reconstruct(projectionointer;presultointer):integer;
implementation
function ReConstructor(projectionointer;presultointer):integer;stdcall;external 'recdll.dll' name 'ReConstructor';
function reconstruct(projectionointer;presultointer):integer;
begin
result:=ReConstructor(projection,presult);
end;
end.
然后在主单元中直接调用该单元,用a:=reconstruct(@singlearr,@reconarr);singlearr,reconarr均为静态数组,运行时为何总是说地址出错?