On 31/05/2022 23:39, Grey Serg wrote:
> I want to call dll function from dll, which
> should lie in app folder (temporary folder
> not suitable).
> When I write
> /procedure MyDllFuncSetup(hWnd: Integer; lpText, lpCaption: AnsiString;
> uType: Cardinal);
> external 'MyDllFunc@{app}\MyDll.dll stdcall';/
> On start I got error "/An attempt was made to expand the app constant
> before it was initialized/".
>
> '/files:/' prefix is not suitable, because It call function in dll in
> temporary folder, and my function failed (dll must lie in app folder).
Add the 'delayload' tag after 'stdcall', and avoid calling the function
until after [Files] are installed.