var hDll: HMODULE; begin hDll:=LoadLibrary('c:\Windows\System32\kernel32.dll'); if hDll=0 then raise Exception.Create('!LoadLibrary'); FreeLibrary(hDll); end;