|
@@ -83,6 +83,10 @@ interface
|
|
end;
|
|
end;
|
|
|
|
|
|
tDLLScannerWin32=class(tDLLScanner)
|
|
tDLLScannerWin32=class(tDLLScanner)
|
|
|
|
+ private
|
|
|
|
+ importfound : boolean;
|
|
|
|
+ procedure CheckDLLFunc(const dllname,funcname:string);
|
|
|
|
+ public
|
|
function Scan(const binname:string):boolean;override;
|
|
function Scan(const binname:string):boolean;override;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1621,7 +1625,7 @@ end;
|
|
TDLLScannerWin32
|
|
TDLLScannerWin32
|
|
****************************************************************************}
|
|
****************************************************************************}
|
|
|
|
|
|
- procedure CheckDLLFunc(const dllname,funcname:string);
|
|
|
|
|
|
+ procedure tDLLScannerWin32.CheckDLLFunc(const dllname,funcname:string);
|
|
var
|
|
var
|
|
hp : tExternalsItem;
|
|
hp : tExternalsItem;
|
|
begin
|
|
begin
|
|
@@ -1642,6 +1646,7 @@ end;
|
|
// timportlibwin32(importlib).importvariable_str(funcname,dllname,funcname)
|
|
// timportlibwin32(importlib).importvariable_str(funcname,dllname,funcname)
|
|
// else
|
|
// else
|
|
timportlibwin32(importlib).importprocedure_str(funcname,dllname,0,funcname);
|
|
timportlibwin32(importlib).importprocedure_str(funcname,dllname,0,funcname);
|
|
|
|
+ importfound:=true;
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
hp:=tExternalsItem(hp.next);
|
|
hp:=tExternalsItem(hp.next);
|
|
@@ -1654,7 +1659,7 @@ end;
|
|
hs,
|
|
hs,
|
|
dllname : string;
|
|
dllname : string;
|
|
begin
|
|
begin
|
|
- result:=true;
|
|
|
|
|
|
+ result:=false;
|
|
{ is there already an import library the we will use that one }
|
|
{ is there already an import library the we will use that one }
|
|
if FindLibraryFile(binname,target_info.staticClibprefix,target_info.staticClibext,hs) then
|
|
if FindLibraryFile(binname,target_info.staticClibprefix,target_info.staticClibext,hs) then
|
|
exit;
|
|
exit;
|
|
@@ -1662,7 +1667,9 @@ end;
|
|
hs:=AddExtension(binname,target_info.sharedlibext);
|
|
hs:=AddExtension(binname,target_info.sharedlibext);
|
|
if not FindDll(hs,dllname) then
|
|
if not FindDll(hs,dllname) then
|
|
exit;
|
|
exit;
|
|
|
|
+ importfound:=false;
|
|
ReadDLLImports(dllname,@CheckDLLFunc);
|
|
ReadDLLImports(dllname,@CheckDLLFunc);
|
|
|
|
+ result:=importfound;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|