Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- There's no public API for this function so I didn't add WINELIB_NAME_AW. --- dlls/wdscore/main.c | 23 +++++++++++++++++++++++ dlls/wdscore/wdscore.spec | 2 +- include/wdscore.h | 1 + 3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/dlls/wdscore/main.c b/dlls/wdscore/main.c index 828e8c2451d..3d18ee2d5ab 100644 --- a/dlls/wdscore/main.c +++ b/dlls/wdscore/main.c @@ -20,6 +20,7 @@
#include "windef.h" #include "winbase.h" +#include "winnls.h" #include "wdscore.h"
#include "wine/asm.h" @@ -54,6 +55,28 @@ LPVOID CurrentIP(void) } #endif
+/*********************************************************************** + * ConstructPartialMsgVA (wdscore.@) + */ +LPVOID WINAPI ConstructPartialMsgVA( WdsLogLevel level, LPCSTR msg, va_list args ) +{ + DWORD len; + LPVOID ret; + LPWSTR str = NULL; + + if(msg) + { + len = MultiByteToWideChar( CP_ACP, 0, msg, -1, NULL, 0 ); + str = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, msg, -1, str, len ); + } + + ret = ConstructPartialMsgVW( level, str, args ); + + HeapFree( GetProcessHeap(), 0, str ); + return ret; +} + /*********************************************************************** * ConstructPartialMsgVW (wdscore.@) */ diff --git a/dlls/wdscore/wdscore.spec b/dlls/wdscore/wdscore.spec index 4690fb3badd..86a3bf37797 100644 --- a/dlls/wdscore/wdscore.spec +++ b/dlls/wdscore/wdscore.spec @@ -69,7 +69,7 @@ #@ extern g_bEnableDiagnosticMode @ stub ConstructPartialMsgIfA @ stub ConstructPartialMsgIfW -@ stub ConstructPartialMsgVA +@ stdcall ConstructPartialMsgVA(long str ptr) @ stdcall ConstructPartialMsgVW(long wstr ptr) @ cdecl CurrentIP() @ stub EndMajorTask diff --git a/include/wdscore.h b/include/wdscore.h index 36e3a216649..d7007d13804 100644 --- a/include/wdscore.h +++ b/include/wdscore.h @@ -35,6 +35,7 @@ typedef enum _WdsLogLevel { } WdsLogLevel;
LPVOID CurrentIP(void); +LPVOID WINAPI ConstructPartialMsgVA(WdsLogLevel,LPCSTR,va_list); LPVOID WINAPI ConstructPartialMsgVW(WdsLogLevel,LPCWSTR,va_list);
#ifdef __cplusplus