summaryrefslogtreecommitdiffhomepage
path: root/dev/DLL/RunDLL64/Sources
diff options
context:
space:
mode:
authorAmlal <amlal@el-mahrouss-logic.com>2024-08-28 19:40:36 +0200
committerAmlal <amlal@el-mahrouss-logic.com>2024-08-28 19:40:36 +0200
commitf0a3c583c80dc922edf70347cb493dff0bb5709a (patch)
treeb2d522852feb30b0f6aa0296c37a3e3b57914ddc /dev/DLL/RunDLL64/Sources
parentc2e183b46a71e001683fd3b613ce49c9534460e2 (diff)
[IMP] RunSCM, RunDLL64 programs, needs SCI.dll to implement these functions though.
[WIP] WRenderer DLL, which takes care of Window rendering, add UIRenderView class. - Note that this DLL is used internally by the shell, it shouldn't be linked with. Signed-off-by: Amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'dev/DLL/RunDLL64/Sources')
-rw-r--r--dev/DLL/RunDLL64/Sources/LauncherMain.cxx22
-rw-r--r--dev/DLL/RunDLL64/Sources/compile_flags.txt1
2 files changed, 23 insertions, 0 deletions
diff --git a/dev/DLL/RunDLL64/Sources/LauncherMain.cxx b/dev/DLL/RunDLL64/Sources/LauncherMain.cxx
new file mode 100644
index 00000000..0d64b654
--- /dev/null
+++ b/dev/DLL/RunDLL64/Sources/LauncherMain.cxx
@@ -0,0 +1,22 @@
+#include <SCI/sci_base.hxx>
+
+typedef int (*main_t)(int, char**);
+
+int WinMain(int argc, char* argv[])
+{
+ if (argc < 3)
+ return -1;
+
+ auto mainDll = LdrOpenDLL(argv[1], argv[2]);
+
+ int (*entrypointOff)(int, char**) = (main_t)LdrGetDLLProc(argv[3], mainDll);
+
+ if (!entrypointOff)
+ return -1;
+
+ int ret = entrypointOff(argc, argv);
+
+ LdrCloseDLL(mainDll);
+
+ return ret;
+}
diff --git a/dev/DLL/RunDLL64/Sources/compile_flags.txt b/dev/DLL/RunDLL64/Sources/compile_flags.txt
new file mode 100644
index 00000000..53118879
--- /dev/null
+++ b/dev/DLL/RunDLL64/Sources/compile_flags.txt
@@ -0,0 +1 @@
+-I../../SCI