diff --git a/Contrib/System/SysFunc.nsh b/Contrib/System/SysFunc.nsh index 57c20167..d69b9a20 100644 --- a/Contrib/System/SysFunc.nsh +++ b/Contrib/System/SysFunc.nsh @@ -319,17 +319,17 @@ Function systemSplash System::Store "s r8r9" ; Get module instance - System::Call "${sysGetModuleHandle} (i) .r7" + System::Call "${sysGetModuleHandle} (p) .r7" ; Get arrow cursor - System::Call "${sysLoadCursor} (0, i ${IDC_ARROW}) .R9" + System::Call "${sysLoadCursor} (0, p ${IDC_ARROW}) .R9" ; Get callback System::Get "${sysWNDPROC}" Pop $3 ; Create window class - System::Call "*${stWNDCLASS} (0,r3,0,0,r7,0,R9,0,i 0,'_sp') .R9" + System::Call "*${stWNDCLASS} (0,r3,0,0,r7,0,R9,0,p 0,'_sp') .R9" ; Register window class System::Call "${sysRegisterClass} (R9) .R9" @@ -347,7 +347,7 @@ Function systemSplash !insertmacro SINGLE_CALLBACK 1 $5 1 _systemSplashWndCB ; Create MSG struct - System::Call "*${stMSG} (_) i.R9" + System::Call "*${stMSG} (_) p.R9" ; ------------------------- repeat: @@ -371,7 +371,7 @@ repeat: finish: ; Stop the sound - System::Call "${sysPlaySound} (i 0, i 0, i 0)" + System::Call "${sysPlaySound} (p 0, p 0, i 0)" ; Delete bitmap object System::Call "${sysDeleteObject} (r6)" diff --git a/Contrib/System/System.html b/Contrib/System/System.html index 8731fbbb..2221ea89 100644 --- a/Contrib/System/System.html +++ b/Contrib/System/System.html @@ -72,7 +72,7 @@ System::Free $0
# allocate a buffer and put 'test string' and an int in it -System::Call "*(&t1024 'test string', i 5) i .s" +System::Call "*(&t1024 'test string', i 5) p .s" Pop $0 # copy to an automatically created buffer System::Copy 0 $0 @@ -294,7 +294,7 @@ DetailPrint $4N bytes of GUID (structures only) -Additionally, each type can be prefixed with an asterisk to denote a pointer. When using an asterisk, the System plug-in still expects the value of the parameter, rather than the pointer's address. To pass a direct address, use `i' with no asterisk. A usage example is available. Alloc returns addresses and its return value should therefore be used with `i', without an asterisk.
+Additionally, each type can be prefixed with an asterisk to denote a pointer. When using an asterisk, the System plug-in still expects the value of the parameter, rather than the pointer's address. To pass a direct address, use `p' with no asterisk. A usage example is available. Alloc returns addresses and its return value should therefore be used with `p', without an asterisk.
-System::Call "user32::MessageBox(i $HWNDPARENT, t 'NSIS System Plug-in', t 'Test', i 0)" +System::Call "user32::MessageBox(p $HWNDPARENT, t 'NSIS System Plug-in', t 'Test', i 0)"
-System::Call "kernel32::GetModuleHandle(t 'user32.dll') i .s" -System::Call "kernel32::GetProcAddress(i s, t 'MessageBoxA') i .r0" -System::Call "::$0(i $HWNDPARENT, t 'GetProcAddress test', t 'NSIS System Plug-in', i 0)" +System::Call "kernel32::GetModuleHandle(t 'user32.dll') p .s" +System::Call "kernel32::GetProcAddress(p s, t 'MessageBoxA') p .r0" +System::Call "::$0(p $HWNDPARENT, t 'GetProcAddress test', t 'NSIS System Plug-in', i 0)"
-System::Get "user32::MessageBox(i $HWNDPARENT, t 'This is a default text', t 'Default', i 0)" +System::Get "user32::MessageBox(p $HWNDPARENT, t 'This is a default text', t 'Default', i 0)" Pop $0 System::Call "$0"
-System::Get "user32::MessageBox(i $HWNDPARENT, t 'This is a default text', \ +System::Get "user32::MessageBox(p $HWNDPARENT, t 'This is a default text', \ t 'Default', i 0x1|0x10)" Pop $0 System::Call "$0(, 'This is a System::Get test', 'NSIS System Plug-in',)" @@ -481,7 +481,7 @@ System::Call "*$0(i .r1)" DetailPrint $1
@@ -492,9 +492,9 @@ DetailPrint $1 !define IID_IActiveDesktop {F490EB00-1240-11D1-9888-006097DEACF9} # create IActiveDesktop interface System::Call "ole32::CoCreateInstance( \ - g '${CLSID_ActiveDesktop}', i 0, \ + g '${CLSID_ActiveDesktop}', p 0, \ i ${CLSCTX_INPROC_SERVER}, \ - g '${IID_IActiveDesktop}', *i .r0) i.r1" + g '${IID_IActiveDesktop}', *p .r0) i.r1" StrCmp $1 0 0 end # call IActiveDesktop->GetWallpaper System::Call "$0->4(w .r2, i ${NSIS_MAX_STRLEN}, i 0)" @@ -512,14 +512,14 @@ System::Call "MyDLL::MyFunc(i 5) ? u" Delete $PLUGINSDIR\MyDLL.dll-System::Call "*(i 5) i .r0" +System::Call "*(i 5) p .r0" System::Call "*$0(i .r1)" DetailPrint $1
-System::Get "(i.r1, i) iss" +System::Get "(p.r1, p) iss" Pop $R0 -System::Call "user32::EnumChildWindows(i $HWNDPARENT, k R0, i) i.s" +System::Call "user32::EnumChildWindows(p $HWNDPARENT, k R0, p) i.s" loop: Pop $0 StrCmp $0 "callback1" 0 done - System::Call "user32::GetWindowText(ir1,t.r2,i${NSIS_MAX_STRLEN})" - System::Call "user32::GetClassName(ir1,t.r3,i${NSIS_MAX_STRLEN})" + System::Call "user32::GetWindowText(pr1,t.r2,i${NSIS_MAX_STRLEN})" + System::Call "user32::GetClassName(pr1,t.r3,i${NSIS_MAX_STRLEN})" IntFmt $1 "0x%X" $1 DetailPrint "$1 - [$3] $2" Push 1 # callback's return value @@ -529,13 +529,13 @@ done: System::Free $R0
-!define MB "user32::MessageBox(i$HWNDPARENT,t,t'NSIS System Plug-in',i0)" +!define MB "user32::MessageBox(p$HWNDPARENT,t,t'NSIS System Plug-in',i0)" System::Call "${MB}(,'my message',,)" System::Call "${MB}(,'another message',,) i.r0" MessageBox MB_OK "last call returned $0"
-System::Call "user32::SendMessage(i $HWNDPARENT, t 'test', t 'test', i 0) i.s ? \ +System::Call "user32::SendMessage(p $HWNDPARENT, t 'test', t 'test', p 0) p.s ? \ e (,t'test replacement',,) i.r0 ? !e #user32::MessageBox" DetailPrint $0 ClearErrors @@ -699,7 +699,7 @@ System::Alloc 16
@@ -709,7 +709,7 @@ System::Call "*(i, i, i, t)i.s"-System::Call "*(i, i, i, t)i.s" +System::Call "*(i, i, i, t)p.s"
Setting data can be done using Call. It can be done in the allocation stage, or in another stage using the struct handling syntax.
-System::Call "*(i 5, i 2, i 513, t 'test')i.s" +System::Call "*(i 5, i 2, i 513, t 'test')p.s"@@ -763,9 +763,9 @@ System::Free $0 System::Alloc 32 Pop $1 # call -System::Call "Kernel32::GlobalMemoryStatus(i r1)" +System::Call "Kernel32::GlobalMemoryStatus(p r1)" # get -System::Call "*$1(i.r2, i.r3, i.r4, i.r5, i.r6, i.r7, i.r8, i.r9)" +System::Call "*$1(i.r2, i.r3, p.r4, p.r5, p.r6, p.r7, p.r8, p.r9)" # free System::Free $1 # print