type
TFunc=procedure (nHwnd :THandle);stdcall;//根据你的函数定义
var
LibHandle:THandle;
proc:TFunc;
begin
LibHandle:=LoadLibrary(xxxx.dll');
if LibHandle=0 then begin
//报错
Exit;
end;
try
@Proc:=GetProcAddress(LibHandle,'DoWork');//dowork为函数名
if @Proc<>nil then Proc(Handle);
finally
FreeLibrary(LibHandle);
end;