From f0a3c583c80dc922edf70347cb493dff0bb5709a Mon Sep 17 00:00:00 2001 From: Amlal Date: Wed, 28 Aug 2024 19:40:36 +0200 Subject: [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 --- dev/DLL/RunSCM/Sources/LauncherMain.cxx | 25 +++++++++++++++++++++++++ dev/DLL/RunSCM/Sources/compile_flags.txt | 1 + 2 files changed, 26 insertions(+) create mode 100644 dev/DLL/RunSCM/Sources/LauncherMain.cxx create mode 100644 dev/DLL/RunSCM/Sources/compile_flags.txt (limited to 'dev/DLL/RunSCM/Sources') diff --git a/dev/DLL/RunSCM/Sources/LauncherMain.cxx b/dev/DLL/RunSCM/Sources/LauncherMain.cxx new file mode 100644 index 00000000..51894df1 --- /dev/null +++ b/dev/DLL/RunSCM/Sources/LauncherMain.cxx @@ -0,0 +1,25 @@ +#include + +typedef int (*rpc_call_t)(IUnknown*); + +int WinMain(int argc, char* argv[]) +{ + if (argc < 4) + return -1; + + auto mainDll = LdrOpenDLL(argv[1], argv[2]); + + IUnknown* interface = (IUnknown*)LdrGetDLLProc(argv[3], mainDll); + rpc_call_t dllRpc = (rpc_call_t)LdrGetDLLProc(argv[4], mainDll); + + if (!dllRpc) + return -1; + if (!interface) + return -1; + + auto ret = dllRpc(interface); + + LdrCloseDLL(mainDll); + + return ret; +} diff --git a/dev/DLL/RunSCM/Sources/compile_flags.txt b/dev/DLL/RunSCM/Sources/compile_flags.txt new file mode 100644 index 00000000..53118879 --- /dev/null +++ b/dev/DLL/RunSCM/Sources/compile_flags.txt @@ -0,0 +1 @@ +-I../../SCI -- cgit v1.2.3