Added quoted path and ordinal System::Call examples.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7102 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2019-06-27 23:22:53 +00:00
parent 1b9d0c76a8
commit a551dddd0d
2 changed files with 25 additions and 1 deletions

View file

@ -5,6 +5,8 @@
Name "System Plugin Example"
OutFile "System.exe"
RequestExecutionLevel User
Unicode True
!include "SysFunc.nsh"
@ -134,4 +136,26 @@ enumex: ; End of drives or user cancel
SectionEnd
Section "Quoted path"
!define /IfNDef CSIDL_FONTS 0x14
StrCpy $9 "$PluginsDir\N(S # I)S" ; Directory with '(', ' ', '#' or ')' needs to be quoted
CreateDirectory "$9"
CopyFiles /Silent /FilesOnly "$sysdir\shfolder.dll" "$9\" ; This could fail on 95 & NT4?
System::Call '"$9\shfolder.dll"::SHGetFolderPathA(p $hWndParent, i ${CSIDL_FONTS}, p 0, i 0, m "?" r1) ?u'
DetailPrint Fonts=$1
SectionEnd
Section "Ordinal"
System::Call 'OLEAUT32::#2(w "OLE string")p.r0' ; SysAllocString
System::Call 'USER32::MessageBoxW(p $hWndParent, p r0, w "OLE:", i 0)'
System::Call 'OLEAUT32::#6(p r0)'
SectionEnd
; eof