mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 17:29:10 +02:00
+ register a win16 dll scanner. Not functional yet.
git-svn-id: trunk@42230 -
This commit is contained in:
parent
1f3d5e8865
commit
fe49522e6f
@ -78,6 +78,16 @@ implementation
|
|||||||
constructor create;override;
|
constructor create;override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TDLLScannerWin16 }
|
||||||
|
|
||||||
|
TDLLScannerWin16=class(tDLLScanner)
|
||||||
|
private
|
||||||
|
importfound : boolean;
|
||||||
|
{ procedure CheckDLLFunc(const dllname,funcname:string);}
|
||||||
|
public
|
||||||
|
function Scan(const binname:string):boolean;override;
|
||||||
|
end;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TImportLibWin16
|
TImportLibWin16
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
@ -397,6 +407,31 @@ begin
|
|||||||
CObjInput:=TOmfObjInput;
|
CObjInput:=TOmfObjInput;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{****************************************************************************
|
||||||
|
TDLLScannerWin16
|
||||||
|
****************************************************************************}
|
||||||
|
|
||||||
|
function TDLLScannerWin16.Scan(const binname: string): boolean;
|
||||||
|
var
|
||||||
|
hs,
|
||||||
|
dllname : TCmdStr;
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
{ is there already an import library the we will use that one }
|
||||||
|
if FindLibraryFile(binname,target_info.staticClibprefix,target_info.staticClibext,hs) then
|
||||||
|
exit;
|
||||||
|
{ check if we can find the dll }
|
||||||
|
hs:=binname;
|
||||||
|
if ExtractFileExt(hs)='' then
|
||||||
|
hs:=ChangeFileExt(hs,target_info.sharedlibext);
|
||||||
|
if not FindDll(hs,dllname) then
|
||||||
|
exit;
|
||||||
|
importfound:=false;
|
||||||
|
{todo: ReadDLLImports(dllname,@CheckDLLFunc);}
|
||||||
|
if importfound then
|
||||||
|
current_module.dllscannerinputlist.Pack;
|
||||||
|
result:=importfound;
|
||||||
|
end;
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
Initialize
|
Initialize
|
||||||
@ -407,5 +442,6 @@ initialization
|
|||||||
RegisterLinker(ld_win16,TExternalLinkerWin16WLink);
|
RegisterLinker(ld_win16,TExternalLinkerWin16WLink);
|
||||||
RegisterImport(system_i8086_win16,TImportLibWin16);
|
RegisterImport(system_i8086_win16,TImportLibWin16);
|
||||||
RegisterExport(system_i8086_win16,TExportLibWin16);
|
RegisterExport(system_i8086_win16,TExportLibWin16);
|
||||||
|
RegisterDLLScanner(system_i8086_win16,TDLLScannerWin16);
|
||||||
RegisterTarget(system_i8086_win16_info);
|
RegisterTarget(system_i8086_win16_info);
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user