From ac75c6dd229c7db9a59255a2de59de953cabd662 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 22 Jul 2005 21:10:20 +0000 Subject: [PATCH] callbacks are created using System::Get, not System::Call git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4185 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/System/System.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Contrib/System/System.html b/Contrib/System/System.html index 7a80ae8f..65831728 100644 --- a/Contrib/System/System.html +++ b/Contrib/System/System.html @@ -364,7 +364,7 @@ System::Call "dll::UseCallback(k r0)"

Each time the callback is called, the string callback#, where # is the number of the callback, will be placed in the destination of the return "parameter". The number of the first callback created is 1, the second's is 2, the third's is 3 and so on. As System is single threaded, a callback can only be called while calling another function. For example, EnumChildWindows's callback can only be called when EnumChildWindows is being called. You should therefore check for callback# after each function call that might call your callback.

-
System::Call "(i .r0, i .r1) isR0"
+
System::Get "(i .r0, i .r1) isR0"
 Pop $0
 System::Call "dll::UseCallback(k r0)"
 StrCmp $R0 "callback1" 0 +2
@@ -374,7 +374,7 @@ DetailPrint "UseCallback passed ($0, $1) to the callback"
 

After you've processed the callback call, you should use Call, passing it the value returned by Get - the callback. This tells System to return from the callback. If you've specified a source for the return "parameter" when the callback was created, you should fill that source with the appropriate return value. Callbacks are not automatically freed, don't forget to free it after you've finished using it.

SetPluginUnload alwaysoff
-System::Call "(i .r0, i .r1) isR0"
+System::Get "(i .r0, i .r1) isR0"
 Pop $0
 System::Call "dll::UseCallback(k r0)"
 loop: