summaryrefslogtreecommitdiffstats
path: root/other-licenses/nsis/Contrib/ExDLL/exdll.c
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /other-licenses/nsis/Contrib/ExDLL/exdll.c
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'other-licenses/nsis/Contrib/ExDLL/exdll.c')
-rw-r--r--other-licenses/nsis/Contrib/ExDLL/exdll.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/other-licenses/nsis/Contrib/ExDLL/exdll.c b/other-licenses/nsis/Contrib/ExDLL/exdll.c
new file mode 100644
index 000000000..c46e621a0
--- /dev/null
+++ b/other-licenses/nsis/Contrib/ExDLL/exdll.c
@@ -0,0 +1,44 @@
+// Unicode support by Jim Park -- 08/02/2007
+
+#include <windows.h>
+#include "tchar.h"
+#include "exdll.h"
+
+HINSTANCE g_hInstance;
+
+HWND g_hwndParent;
+
+// To work with Unicode version of NSIS, please use TCHAR-type
+// functions for accessing the variables and the stack.
+
+void __declspec(dllexport) myFunction(HWND hwndParent, int string_size,
+ TCHAR *variables, stack_t **stacktop,
+ extra_parameters *extra)
+{
+ g_hwndParent=hwndParent;
+
+ EXDLL_INIT();
+
+
+ // note if you want parameters from the stack, pop them off in order.
+ // i.e. if you are called via exdll::myFunction file.dat poop.dat
+ // calling popstring() the first time would give you file.dat,
+ // and the second time would give you poop.dat.
+ // you should empty the stack of your parameters, and ONLY your
+ // parameters.
+
+ // do your stuff here
+ {
+ TCHAR buf[1024];
+ wsprintf(buf,_T("$0=%s\n"),getuservariable(INST_0));
+ MessageBox(g_hwndParent,buf,0,MB_OK);
+ }
+}
+
+
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ g_hInstance=hInst;
+ return TRUE;
+}