From 40509127a44ff6ee052afa17f44337cfa5515641 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Fri, 19 Mar 2010 12:28:53 +0100 Subject: [PATCH] msvcr90: Implement _initterm_e. --- dlls/msvcr90/msvcr90.c | 32 ++++++++++++++++++++++++++++++++ dlls/msvcr90/msvcr90.spec | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/dlls/msvcr90/msvcr90.c b/dlls/msvcr90/msvcr90.c index 4bef02c8cc0..e7baa6fae21 100644 --- a/dlls/msvcr90/msvcr90.c +++ b/dlls/msvcr90/msvcr90.c @@ -22,7 +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) { switch (reason) @@ -35,3 +43,27 @@ 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 27ad21da201..32c46887ead 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