[PATCH] msvcr90: Implement _initterm_e [try 2]

Detlef Riekenberg wine.dev at web.de
Fri Mar 19 06:28:53 CDT 2010


try 2 fixed a typo

--
By by ... Detlef
---
 dlls/msvcr90/msvcr90.c    |   36 ++++++++++++++++++++++++++++++++++++
 dlls/msvcr90/msvcr90.spec |    2 +-
 2 files changed, 37 insertions(+), 1 deletions(-)

diff --git a/dlls/msvcr90/msvcr90.c b/dlls/msvcr90/msvcr90.c
index 4bef02c..2b9b59a 100644
--- a/dlls/msvcr90/msvcr90.c
+++ b/dlls/msvcr90/msvcr90.c
@@ -22,6 +22,15 @@
 
 #include "windef.h"
 #include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msvcr90);
+
+typedef int (CDECL *_INITTERM_E_FN)(void);
+
+/*********************************************************************
+ *  DllMain (MSVCR90.@)
+ */
 
 BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved)
 {
@@ -35,3 +44,30 @@ BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved)
     }
     return TRUE;
 }
+
+
+/*********************************************************************
+ *  _initterm_e (MSVCR90.@)
+ *
+ * call an array of application initialization functions and report the return value
+ *
+ */
+
+int CDECL _initterm_e(_INITTERM_E_FN *table, _INITTERM_E_FN *end)
+{
+    int res = 0;
+
+    TRACE("(%p, %p)\n", table, end);
+
+    while (!res && table < end) {
+        if (*table) {
+            res = (**table)();
+            if (res)
+                TRACE("function %p failed: 0x%x\n", *table, res);
+
+        }
+        table++;
+    }
+    return res;
+}
+
diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec
index 27ad21d..32c4688 100644
--- a/dlls/msvcr90/msvcr90.spec
+++ b/dlls/msvcr90/msvcr90.spec
@@ -517,7 +517,7 @@
 @ stub _i64tow_s
 @ stub _initptd
 @ cdecl _initterm(ptr ptr) msvcrt._initterm
-@ stub _initterm_e
+@ cdecl _initterm_e(ptr ptr)
 @ stub _inp
 @ stub _inpd
 @ stub _inpw
-- 
1.7.0




More information about the wine-patches mailing list