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:
parent
1b9d0c76a8
commit
a551dddd0d
2 changed files with 25 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -18,7 +18,7 @@ ANSI targets are deprecated, consider moving to Unicode.
|
|||
|
||||
\# Undocumented: \b Added ManifestMaxVersionTested
|
||||
|
||||
\b Allow quoted library path in System::Call (\W{http://sf.net/p/nsis/bugs/546}{bug #546})
|
||||
\b Allow quoted library path in System::Call (\W{http://sf.net/p/nsis/bugs/546}{bug #546} and \W{http://sf.net/p/nsis/bugs/1225}{bug #1225})
|
||||
|
||||
\b %1 in !finalize command can be specified multiple times
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue