function FindDllInDllsTree(const DllName, StartPath, SubDir: string): string;
| DllName | string |
| StartPath | string |
| SubDir | string |
stringFindDllInDllsTree walks upward from StartPath and probes DLLs\SubDir folders for the requested PDFium DLL
It supports application layouts where executables live below the repository or installer output tree
StartPath is skipped, so a DLLs folder created at a volume root is never usedDllPath := FindDllInDllsTree('pdfium.dll', GetApplicationPath, 'Win64');