From within a BPL, is it possible to get its own file name? e.g. C:\foo\bar.bpl
(dynamically loaded and delphi7, if it matters)
bpldelphi
From within a BPL, is it possible to get its own file name? e.g. C:\foo\bar.bpl
(dynamically loaded and delphi7, if it matters)
Best Answer
Call
GetModuleFileName
. For the module handle, useSysInit.HInstance
. Passing zero will give you the host EXE's file name instead, also known asParamStr(0)
.