G
gutian
Unregistered / Unconfirmed
GUEST, unregistred user!
c++的声明
namespace Fish {
extern "C"{
__declspec(dllexport) bool DoSplash(char*,int FAR*, int FAR*,int FAR*)
}
delphi调用
TDoSplash=function(fnameChar;var res,depth,fullInteger):Boolean;stdcall;
THandle=Integer;
var
Handle:THandle;
DoSplash:TDoSplash;
resInteger;
depthInteger;
fullInteger;
begin
Handle:=LoadLibrary('FishSdk.dll')
new(res);
new(depth);
new(full);
res^ := 0;
depth^ := 0;
full^ := 0;
if Handle<>0 then
begin
@DoSplash:=GetProcAddress(Handle,'DoSplash')
//取得DLL中函数Min1( )的地址
if (@DoSplash<>nil)then
begin
DoSplash(PChar('Setup.cfg'),res,depth,full);
end else ShowMessage('调用函数“GetProcAddress”时出错!');
Dispose(res);
Dispose(depth);
Dispose(full);
FreeLibrary(Handle)
end;
end;
执行后返回的res,depth,full出错。
}
namespace Fish {
extern "C"{
__declspec(dllexport) bool DoSplash(char*,int FAR*, int FAR*,int FAR*)
}
delphi调用
TDoSplash=function(fnameChar;var res,depth,fullInteger):Boolean;stdcall;
THandle=Integer;
var
Handle:THandle;
DoSplash:TDoSplash;
resInteger;
depthInteger;
fullInteger;
begin
Handle:=LoadLibrary('FishSdk.dll')
new(res);
new(depth);
new(full);
res^ := 0;
depth^ := 0;
full^ := 0;
if Handle<>0 then
begin
@DoSplash:=GetProcAddress(Handle,'DoSplash')
//取得DLL中函数Min1( )的地址
if (@DoSplash<>nil)then
begin
DoSplash(PChar('Setup.cfg'),res,depth,full);
end else ShowMessage('调用函数“GetProcAddress”时出错!');
Dispose(res);
Dispose(depth);
Dispose(full);
FreeLibrary(Handle)
end;
end;
执行后返回的res,depth,full出错。
}