var
  Moudle: THandle;
  PFunc: TFarProc;
begin
  Moudle:=loadlibrary('stock.dll');
  edit1.text:=inttostr(Moudle);
  if Moudle>32 then
  begin
  PFunc:=GetProcAddress(Moudle,'GetStockByCode');
  if PFunc=nil then RaiseLastWin32Error;
  end;
  if Moudle=0 then showmessage('文件没有发现');
  PFunc();
  Freelibrary(Moudle);
end;