Archive: Call dll outside of function or section


Call dll outside of function or section
Hi,
At first I want to say that I'm new in NSIS. Before that I was creating installers in InstallShield. I want to call custom dialog from dll. As far as I know all dialogs are called outside of function or section - this is the main problem because I can't call custom dialog from dll. This is the example what I want to do:

# Installer pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${LICENSE_FILE}"
!insertmacro ShowCustomDialog 'param1' 'param2'
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH


ShowCustomDialog macro looks like this:

!macro ShowCustomDialog Param1 Param2
InitPluginsDir
SetOutPath $PLUGINSDIR
File ..\lib\CustomDialog.dll

System::Call "CustomDialog::ShowCustomDialog(t '${Param1}', t ${Param1}) i.r5 ? u"
Delete "$PLUGINSDIR\CustomDialog.dll"
System::Free 0
!macroend


The problem is that I cant call InitPluginsDir outside of section or function, etc. Any ideas?

I've found the solution. I need to use:

Page custom ShowCustomDialogCreator