type TMatchSearcher= function (wanting,founding:PChar):boolean; stdcall;
var
s1,s2,dllpath:string;
i:Longint;
hInstDLL:THandle;
pms1:TMatchSearcher ;
begin
s1:=trim(edit2.Text );
listbox2.Items.Clear ;
hasfenxip:=false;
dllpath:=ExtractFilePath(Application.ExeName )+'\新建文件夹\tongpeidll.dll';
hInstDLL := LoadLibrary(PChar(dllpath) );
if(hInstDLL =0) then exit;
@pms1 :=GetProcAddress(hInstDLL ,'MatchSearcher');
if (@pms1=nil) then exit;
for i:=0 to Memo1.Lines.Count -1 do
begin
s2:=Memo1.Lines.Strings[i];
if pms1(PChar(s1),PChar(s2)) then
// if MatchSearcher(PChar(s1),PChar(s2)) then
begin
listbox2.Items.Add(s2);
end;
end;
if (hInstDLL<>0) then FreeLibrary(hInstDLL);
end;