mscoree: Initial stub implementation
Paul Chitescu
paulc at voip.null.ro
Fri Oct 6 04:21:02 CDT 2006
Changelog: mscoree: Initial stub implementation, allows .NET executables and
libraries to load but not do anything.
Although a full implementation of the runtime execution engine would be
overkill adding code that launches mono for .NET executables is easy.
-------------- next part --------------
--- ./configure.ac.orig 2006-10-05 17:40:39.000000000 +0300
+++ ./configure.ac 2006-10-05 17:46:30.000000000 +0300
@@ -1613,6 +1613,7 @@
dlls/msadp32.acm/Makefile
dlls/mscms/Makefile
dlls/mscms/tests/Makefile
+dlls/mscoree/Makefile
dlls/msdmo/Makefile
dlls/msftedit/Makefile
dlls/msg711.acm/Makefile
--- ./Makefile.in.orig 2006-10-05 17:40:39.000000000 +0300
+++ ./Makefile.in 2006-10-05 17:45:52.000000000 +0300
@@ -269,6 +269,7 @@
dlls/msadp32.acm/Makefile \
dlls/mscms/Makefile \
dlls/mscms/tests/Makefile \
+ dlls/mscoree/Makefile \
dlls/msdmo/Makefile \
dlls/msftedit/Makefile \
dlls/msg711.acm/Makefile \
@@ -590,6 +591,7 @@
dlls/msadp32.acm/Makefile: dlls/msadp32.acm/Makefile.in dlls/Makedll.rules
dlls/mscms/Makefile: dlls/mscms/Makefile.in dlls/Makedll.rules
dlls/mscms/tests/Makefile: dlls/mscms/tests/Makefile.in dlls/Maketest.rules
+dlls/mscoree/Makefile: dlls/mscoree/Makefile.in dlls/Makedll.rules
dlls/msdmo/Makefile: dlls/msdmo/Makefile.in dlls/Makedll.rules
dlls/msftedit/Makefile: dlls/msftedit/Makefile.in dlls/Makedll.rules
dlls/msg711.acm/Makefile: dlls/msg711.acm/Makefile.in dlls/Makedll.rules
--- ./dlls/mscoree/.cvsignore.orig 2006-10-06 10:42:41.000000000 +0300
+++ ./dlls/mscoree/.cvsignore 2006-09-20 15:27:58.000000000 +0300
@@ -0,0 +1,11 @@
+*.avi
+*.bmp
+*.cur
+*.ico
+*.mc.rc
+*.res
+*.tab.[ch]
+*.tlb
+*.yy.c
+*_[cips].c
+Makefile
--- ./dlls/mscoree/Makefile.in.orig 2006-10-06 10:42:41.000000000 +0300
+++ ./dlls/mscoree/Makefile.in 2006-10-05 17:48:54.000000000 +0300
@@ -0,0 +1,13 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+MODULE = mscoree.dll
+IMPORTS = kernel32
+
+C_SRCS = \
+ mscoree_main.c
+
+ at MAKE_DLL_RULES@
+
+ at DEPENDENCIES@ # everything below this line is overwritten by make depend
--- ./dlls/mscoree/mscoree.spec.orig 2006-10-06 10:42:41.000000000 +0300
+++ ./dlls/mscoree/mscoree.spec 2006-10-06 11:06:26.000000000 +0300
@@ -0,0 +1,5 @@
+116 stdcall _CorDllMain(long long ptr)
+117 stdcall _CorExeMain2(ptr long ptr ptr ptr)
+118 stdcall _CorExeMain()
+119 stdcall _CorImageUnloading(ptr)
+120 stdcall _CorValidateImage(ptr ptr)
--- ./dlls/mscoree/mscoree_main.c.orig 2006-10-06 10:42:41.000000000 +0300
+++ ./dlls/mscoree/mscoree_main.c 2006-10-06 11:50:43.000000000 +0300
@@ -0,0 +1,85 @@
+/*
+ * Implementation of mscoree.dll
+ * Microsoft Component Object Runtime Execution Engine
+ *
+ * Copyright 2006 Paul Chitescu
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL( mscoree );
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+ TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
+
+ switch (fdwReason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(hinstDLL);
+ break;
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ return TRUE;
+}
+
+BOOL WINAPI _CorDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+ FIXME("(%p, %d, %p): stub\n", hinstDLL, fdwReason, lpvReserved);
+
+ switch (fdwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(hinstDLL);
+ break;
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ return TRUE;
+}
+
+int WINAPI _CorExeMain()
+{
+ FIXME("Directly running .NET applications not supported.\n");
+ return -1;
+}
+
+int WINAPI _CorExeMain2(PBYTE ptrMemory, DWORD cntMemory, LPCWSTR imageName, LPCWSTR loaderName, LPCWSTR cmdLine)
+{
+ TRACE("(%p, %u, %s, %s, %s)\n", ptrMemory, cntMemory, debugstr_w(imageName), debugstr_w(loaderName), debugstr_w(cmdLine));
+ FIXME("Directly running .NET applications not supported.\n");
+ return -1;
+}
+
+void WINAPI _CorImageUnloading(LPCVOID* imageBase)
+{
+ TRACE("(%p): stub\n", imageBase);
+}
+
+DWORD _CorValidateImage(LPCVOID* imageBase, LPCWSTR imageName)
+{
+ TRACE("(%p, %s): stub\n", imageBase, debugstr_w(imageName));
+ return E_FAIL;
+}
--- ./dlls/Makefile.in.orig 2006-10-03 17:51:44.000000000 +0300
+++ ./dlls/Makefile.in 2006-10-05 17:44:00.000000000 +0300
@@ -99,6 +99,7 @@
msacm32.drv \
msadp32.acm \
mscms \
+ mscoree \
msdmo \
msftedit \
msg711.acm \
More information about the wine-patches
mailing list