msftedit: add DllGetVersion

=3D?utf-8?q?Rico=3D20Sch=3DC3=3DBCller?=3D kgbricola at web.de
Sat Mar 8 17:11:58 CST 2008


---
 dlls/msftedit/Makefile.in     |    3 ++
 dlls/msftedit/msftedit.spec   |    2 +-
 dlls/msftedit/msftedit_main.c |   77 +++++++++++++++++++++++++++++++++++=
++++++
 3 files changed, 81 insertions(+), 1 deletions(-)
 create mode 100644 dlls/msftedit/msftedit_main.c

diff --git a/dlls/msftedit/Makefile.in b/dlls/msftedit/Makefile.in
index 8c08ade..06cc65d 100644
--- a/dlls/msftedit/Makefile.in
+++ b/dlls/msftedit/Makefile.in
@@ -6,6 +6,9 @@ MODULE    =3D msftedit.dll
 IMPORTS   =3D riched20 kernel32
 EXTRALIBS =3D -luuid
=20
+C_SRCS =3D \
+	msftedit_main.c
+
 @MAKE_DLL_RULES@
=20
 @DEPENDENCIES@  # everything below this line is overwritten by make depe=
nd
diff --git a/dlls/msftedit/msftedit.spec b/dlls/msftedit/msftedit.spec
index be36be5..dccd747 100644
--- a/dlls/msftedit/msftedit.spec
+++ b/dlls/msftedit/msftedit.spec
@@ -8,7 +8,7 @@
 9 stdcall RichEdit10ANSIWndProc(ptr long long long) riched20.RichEdit10A=
NSIWndProc
 10 stdcall RichEditANSIWndProc(ptr long long long) riched20.RichEditANSI=
WndProc
 11 stub SetCustomTextOutHandlerEx
-12 stub DllGetVersion
+@ stdcall DllGetVersion(ptr)
 13 stub RichEditWndProc
 14 stub RichListBoxWndProc
 15 stub RichComboBoxWndProc
diff --git a/dlls/msftedit/msftedit_main.c b/dlls/msftedit/msftedit_main.=
c
new file mode 100644
index 0000000..3a2da43
--- /dev/null
+++ b/dlls/msftedit/msftedit_main.c
@@ -0,0 +1,77 @@
+/*
+ * msftedit main file
+ *
+ * Copyright (C) 2008 Rico Sch=C3=BCller
+ *
+ * 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 "config.h"
+#include "wine/port.h"
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "wine/debug.h"
+
+
+typedef struct _DllVersionInfo {
+    DWORD cbSize;
+    DWORD dwMajorVersion;
+    DWORD dwMinorVersion;
+    DWORD dwBuildNumber;
+    DWORD dwPlatformID;
+} DLLVERSIONINFO;
+
+
+WINE_DEFAULT_DEBUG_CHANNEL(msftedit);
+
+/***********************************************************************
+ * DllMain.
+ */
+BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
+{
+    switch(reason)
+    {
+    case DLL_WINE_PREATTACH:
+        return FALSE; /* prefer native version */
+    case DLL_PROCESS_ATTACH:
+        DisableThreadLibraryCalls(inst);
+        break;
+    case DLL_PROCESS_DETACH:
+        break;
+    }
+    return TRUE;
+}
+
+/***********************************************************************
+ *              DllGetVersion (msftedit.@)
+ */
+HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *info)
+{
+    if (info->cbSize !=3D sizeof(DLLVERSIONINFO)) FIXME("support DLLVERS=
IONINFO2\n");
+
+    /* this is what WINXP SP2 reports */
+    info->dwMajorVersion =3D 41;
+    info->dwMinorVersion =3D 15;
+    info->dwBuildNumber =3D 1507;
+    info->dwPlatformID =3D 1;
+
+    return NOERROR;
+}
--=20
1.5.3.3


--------------000304070008010407000301--



More information about the wine-patches mailing list