I successfully call the function in the DLL from Inno Setup, however when I return, I get a Runtime Error ... Exception: access violation at XXXXXXX. Record of address XXXXXX.
The function is declared as:
function CompleteInstall(szIntallPath: String) : Integer; external ' CompleteInstall@files :InstallHelper.dll stdcall setuponly';
And called:
procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep = ssPostInstall then begin CompleteInstall('Parm1'); // ExpandConstant('{app}') end; end;
No problem if I change the function so as not to accept the parameter. This still happens if I change it to accept a single integer parameter or declare it as a function and change the function as a void function with an integer parameter.
The called function does not return anything:
__declspec(dllexport) int CompleteInstall(char* szInstallPath) {
visual-c ++ inno-setup
Alankley
source share