I'm wondering if anyone knows of an elegant way of determining what BPLs are required by a given (compiled) DLL, EXE or BPL.
I'm not sure if this is even possible shy of simply scanning the binary for text references to .bpl filenames (which would be prone to possible false-positives).
Ideally I'd like to return a TStringList
or even a comma-separated String
containing the names of all required .bpl files.
Import address Table
of the PE file, but it only will show the load-time dependencies; AFAIK it is not possible to know every run-time dependency without disassembling or executing the application, if the application is running you can use theCreateToolhelp32Snapshot
function with the TH32CS_SNAPMODULE flag. – Acentric