Mega Code Archive

 
Categories / Delphi / System
 

Detect Functions in dlls

Title: Detect Functions in dll's Question: How to detect if is Function exists in Library (dll)??? Answer: This Function detect is Function exists in Library (dll), returning True if is found or False if not found function FuncAvail (VLibraryname, VFunctionname: string; var VPointer: pointer): boolean; var Vlib: tHandle; begin Result := false; VPointer := NIL; if LoadLibrary(PChar(VLibraryname)) = 0 then exit; VPointer := GetModuleHandle(PChar(VLibraryname)); if Vlib 0 then begin VPointer := GetProcAddress(Vlib, PChar(VFunctionname)); if VPointer NIL then Result := true; end; end;