Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- dlls/wdscore/wdscore.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wdscore/wdscore.spec b/dlls/wdscore/wdscore.spec index 15958b86aba..aa55f494387 100644 --- a/dlls/wdscore/wdscore.spec +++ b/dlls/wdscore/wdscore.spec @@ -116,7 +116,7 @@ @ stub WdsGetBlackboardValue @ stub WdsGetCurrentExecutionGroup @ stub WdsGetSetupLog -@ stub WdsTempDir +@ stub WdsGetTempDir @ stub WdsInitialize @ stub WdsInitializeCallbackArray @ stub WdsInitializeDataBinary @@ -139,7 +139,7 @@ @ stub WdsPackCollection @ stub WdsPublish @ stub WdsPublishEx -@ stub WdsPublishImmediateAsynch +@ stub WdsPublishImmediateAsync @ stub WdsPublishImmediateEx @ stub WdsPublishOffline @ stub WdsSeqAlloc @@ -150,8 +150,8 @@ @ stub WdsSetUILanguage @ stub WdsSetupLogDestroy @ stub WdsSetupLogInit -@ stub WdsSetLogMessageA -@ stub WdsSetLogMessageW +@ stub WdsSetupLogMessageA +@ stub WdsSetupLogMessageW @ stub WdsSubscribeEx @ stub WdsTerminate @ stub WdsUnlockExecutionGroup
Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- dlls/wdscore/wdscore_internal.h | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 dlls/wdscore/wdscore_internal.h
diff --git a/dlls/wdscore/wdscore_internal.h b/dlls/wdscore/wdscore_internal.h new file mode 100644 index 00000000000..a10e6552155 --- /dev/null +++ b/dlls/wdscore/wdscore_internal.h @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Mohamad Al-Jaf + * + * 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 + */ + +#ifndef __WDSCORE_INTERNAL_H__ +#define __WDSCORE_INTERNAL_H__ + +#include "wine/asm.h" + +WINAPI void *get_ip(void); + +#ifdef __i386__ +__ASM_STDCALL_FUNC(get_ip, 0, + "movl (%esp), %eax\n\t" + "ret") +#elif defined(__x86_64__) +__ASM_STDCALL_FUNC(get_ip, 0, + "movq (%rsp), %rax\n\t" + "ret") +#elif defined(__arm__) +__ASM_STDCALL_FUNC(get_ip, 0, + "mov r0, lr\n\t" + "bx lr") +#elif defined(__aarch64__) +__ASM_STDCALL_FUNC(get_ip, 0, + "mov x0, lr\n\t" + "ret") +#endif + +#endif /* __WDSCORE_INTERNAL_H__ */
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51850 Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- v10: - Revert to stdcall since it makes no difference. - Move assembly code to the header. --- dlls/wdscore/Makefile.in | 3 +++ dlls/wdscore/main.c | 37 +++++++++++++++++++++++++++++++++ dlls/wdscore/wdscore.spec | 2 +- dlls/wdscore/wdscore_internal.h | 2 ++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 dlls/wdscore/main.c
diff --git a/dlls/wdscore/Makefile.in b/dlls/wdscore/Makefile.in index 20ba1d3b1c9..2020e72c7bb 100644 --- a/dlls/wdscore/Makefile.in +++ b/dlls/wdscore/Makefile.in @@ -1,3 +1,6 @@ MODULE = wdscore.dll
EXTRADLLFLAGS = -Wb,--prefer-native + +C_SRCS = \ + main.c diff --git a/dlls/wdscore/main.c b/dlls/wdscore/main.c new file mode 100644 index 00000000000..1e7619f0657 --- /dev/null +++ b/dlls/wdscore/main.c @@ -0,0 +1,37 @@ +/* + * Copyright 2022 Mohamad Al-Jaf + * + * 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 "wdscore_internal.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(wdscore); + +/*********************************************************************** + * CurrentIP (wdscore.@) + */ +LPVOID WINAPI CurrentIP(void) +{ + void *ip = get_ip(); + if (!ip) FIXME( "not implemented\n" ); + return ip; +} diff --git a/dlls/wdscore/wdscore.spec b/dlls/wdscore/wdscore.spec index aa55f494387..282b6301688 100644 --- a/dlls/wdscore/wdscore.spec +++ b/dlls/wdscore/wdscore.spec @@ -71,7 +71,7 @@ @ stub ConstructPartialMsgIfW @ stub ConstructPartialMsgVA @ stub ConstructPartialMsgVW -@ stub CurrentIP +@ stdcall CurrentIP() @ stub EndMajorTask @ stub EndMinorTask @ stub GetMajorTask diff --git a/dlls/wdscore/wdscore_internal.h b/dlls/wdscore/wdscore_internal.h index a10e6552155..8ba0f168fc6 100644 --- a/dlls/wdscore/wdscore_internal.h +++ b/dlls/wdscore/wdscore_internal.h @@ -41,4 +41,6 @@ __ASM_STDCALL_FUNC(get_ip, 0, "ret") #endif
+LPVOID WINAPI CurrentIP(void); + #endif /* __WDSCORE_INTERNAL_H__ */
Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- v10: - Remove redundant headers.
Hopefully this was the reason why it wasn't getting committed. --- configure.ac | 1 + dlls/wdscore/tests/Makefile.in | 4 +++ dlls/wdscore/tests/main.c | 59 ++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 dlls/wdscore/tests/Makefile.in create mode 100644 dlls/wdscore/tests/main.c
diff --git a/configure.ac b/configure.ac index 6cbc0a61be1..48445cc7b2f 100644 --- a/configure.ac +++ b/configure.ac @@ -3072,6 +3072,7 @@ WINE_CONFIG_MAKEFILE(dlls/wbemdisp/tests) WINE_CONFIG_MAKEFILE(dlls/wbemprox) WINE_CONFIG_MAKEFILE(dlls/wbemprox/tests) WINE_CONFIG_MAKEFILE(dlls/wdscore) +WINE_CONFIG_MAKEFILE(dlls/wdscore/tests) WINE_CONFIG_MAKEFILE(dlls/webservices) WINE_CONFIG_MAKEFILE(dlls/webservices/tests) WINE_CONFIG_MAKEFILE(dlls/websocket) diff --git a/dlls/wdscore/tests/Makefile.in b/dlls/wdscore/tests/Makefile.in new file mode 100644 index 00000000000..baf4adf23a1 --- /dev/null +++ b/dlls/wdscore/tests/Makefile.in @@ -0,0 +1,4 @@ +TESTDLL = wdscore.dll + +C_SRCS = \ + main.c diff --git a/dlls/wdscore/tests/main.c b/dlls/wdscore/tests/main.c new file mode 100644 index 00000000000..f1f8c6d27ae --- /dev/null +++ b/dlls/wdscore/tests/main.c @@ -0,0 +1,59 @@ +/* + * Unit test suite for wdscore + * + * Copyright 2022 Mohamad Al-Jaf + * + * 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 "wine/test.h" + +static HMODULE dll; +static LPVOID (*pCurrentIP)(void); + +static BOOL init_function_pointers(void) +{ + dll = LoadLibraryA("wdscore.dll"); + + if (dll) + { + pCurrentIP = (void*)GetProcAddress(dll, "CurrentIP"); + return TRUE; + } + return FALSE; +} + +static void test_CurrentIP(void) +{ + char *cur; + char *ret; + + cur = (char*)&test_CurrentIP; + ret = (char*)pCurrentIP(); + + ok(cur <= ret && ret < (cur + 0x100), "Address %p not in function starting at %p.\n", ret, cur); +} + +START_TEST(main) +{ + if (init_function_pointers()) + { + test_CurrentIP(); + FreeLibrary(dll); + } + else + skip("could not load wdscore.dll\n"); +}
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112379
Your paranoid android.
=== debian11 (32 bit report) ===
wdscore: main.c:47: Test failed: Address 61C8248F not in function starting at 00401000.
=== debian11 (32 bit Arabic:Morocco report) ===
wdscore: main.c:47: Test failed: Address 61C8248F not in function starting at 00401000.
=== debian11 (32 bit German report) ===
wdscore: main.c:47: Test failed: Address 61C8248F not in function starting at 00401000.
=== debian11 (32 bit French report) ===
wdscore: main.c:47: Test failed: Address 61C8248F not in function starting at 00401000.
=== debian11 (32 bit Hebrew:Israel report) ===
wdscore: main.c:47: Test failed: Address 61C8248F not in function starting at 00401000.
=== debian11 (32 bit Hindi:India report) ===
wdscore: main.c:47: Test failed: Address 61C8248F not in function starting at 00401000.
=== debian11 (32 bit Japanese:Japan report) ===
wdscore: main.c:47: Test failed: Address 61C8248F not in function starting at 00401000.
=== debian11 (32 bit Chinese:China report) ===
wdscore: main.c:47: Test failed: Address 61C8248F not in function starting at 00401000.
=== debian11 (32 bit WoW report) ===
wdscore: main.c:47: Test failed: Address 61C8248F not in function starting at 00401000.
=== debian11 (64 bit WoW report) ===
wdscore: main.c:47: Test failed: Address 0000000061A81F8B not in function starting at 0000000000401000.
The Windows Media Creation Tool crashes on this unimplemented function.
Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- dlls/wdscore/main.c | 18 ++++++++++++++++++ dlls/wdscore/wdscore.spec | 4 ++-- dlls/wdscore/wdscore_internal.h | 13 +++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/dlls/wdscore/main.c b/dlls/wdscore/main.c index 1e7619f0657..c4d82051b6e 100644 --- a/dlls/wdscore/main.c +++ b/dlls/wdscore/main.c @@ -35,3 +35,21 @@ LPVOID WINAPI CurrentIP(void) if (!ip) FIXME( "not implemented\n" ); return ip; } + +/*********************************************************************** + * ConstructPartialMsgVA (wdscore.@) + */ +LPVOID WINAPI ConstructPartialMsgVA( WdsLogLevel level, LPCSTR msg, va_list args ) +{ + FIXME( "(%u, %s) - stub\n", level, debugstr_a(msg) ); + return NULL; +} + +/*********************************************************************** + * ConstructPartialMsgVW (wdscore.@) + */ +LPVOID WINAPI ConstructPartialMsgVW( WdsLogLevel level, LPCWSTR msg, va_list args ) +{ + FIXME( "(%u, %s) - stub\n", level, debugstr_w(msg) ); + return NULL; +} diff --git a/dlls/wdscore/wdscore.spec b/dlls/wdscore/wdscore.spec index 282b6301688..b14778001a8 100644 --- a/dlls/wdscore/wdscore.spec +++ b/dlls/wdscore/wdscore.spec @@ -69,8 +69,8 @@ #@ extern g_bEnableDiagnosticMode @ stub ConstructPartialMsgIfA @ stub ConstructPartialMsgIfW -@ stub ConstructPartialMsgVA -@ stub ConstructPartialMsgVW +@ stdcall ConstructPartialMsgVA(long str ptr) +@ stdcall ConstructPartialMsgVW(long wstr ptr) @ stdcall CurrentIP() @ stub EndMajorTask @ stub EndMinorTask diff --git a/dlls/wdscore/wdscore_internal.h b/dlls/wdscore/wdscore_internal.h index 8ba0f168fc6..5ab070dade2 100644 --- a/dlls/wdscore/wdscore_internal.h +++ b/dlls/wdscore/wdscore_internal.h @@ -21,6 +21,17 @@
#include "wine/asm.h"
+typedef enum _WdsLogLevel { + WdsLogLevelAssert = 0x00000000, + WdsLogLevelFatalError = 0x01000000, + WdsLogLevelError = 0x02000000, + WdsLogLevelWarning = 0x03000000, + WdsLogLevelInfo = 0x04000000, + WdsLogLevelStatus = 0x05000000, + WdsLogLevelVerbose = 0x68000000, + WdsLogLevelTrace = 0x70000000 +} WdsLogLevel; + WINAPI void *get_ip(void);
#ifdef __i386__ @@ -42,5 +53,7 @@ __ASM_STDCALL_FUNC(get_ip, 0, #endif
LPVOID WINAPI CurrentIP(void); +LPVOID WINAPI ConstructPartialMsgVA(WdsLogLevel,LPCSTR,va_list); +LPVOID WINAPI ConstructPartialMsgVW(WdsLogLevel,LPCWSTR,va_list);
#endif /* __WDSCORE_INTERNAL_H__ */
The Windows Media Creation Tool crashes on this unimplemented function.
Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- dlls/wdscore/main.c | 24 ++++++++++++++++++++++++ dlls/wdscore/wdscore.spec | 4 ++-- dlls/wdscore/wdscore_internal.h | 29 +++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/dlls/wdscore/main.c b/dlls/wdscore/main.c index c4d82051b6e..fc95391c167 100644 --- a/dlls/wdscore/main.c +++ b/dlls/wdscore/main.c @@ -53,3 +53,27 @@ LPVOID WINAPI ConstructPartialMsgVW( WdsLogLevel level, LPCWSTR msg, va_list arg FIXME( "(%u, %s) - stub\n", level, debugstr_w(msg) ); return NULL; } + +/*********************************************************************** + * WdsSetupLogMessageA (wdscore.@) + */ +HRESULT WINAPI WdsSetupLogMessageA( LPVOID msg, WdsLogSource src, LPCSTR str1, LPCSTR str2, + ULONG unk1, LPCSTR file, LPCSTR func, void *ip, ULONG unk2, + void *unk3, UINT unk4 ) +{ + FIXME( "(%p, %u, %s, %s, %lu, %s, %s, %p, %lu, %p, %u) - stub\n", msg, src, debugstr_a(str1), + debugstr_a(str2), unk1, debugstr_a(file), debugstr_a(func), ip, unk2, unk3, unk4 ); + return S_OK; +} + +/*********************************************************************** + * WdsSetupLogMessageW (wdscore.@) + */ +HRESULT WINAPI WdsSetupLogMessageW( LPVOID msg, WdsLogSource src, LPCWSTR str1, LPCWSTR str2, + ULONG unk1, LPCWSTR file, LPCWSTR func, void *ip, ULONG unk2, + void *unk3, UINT unk4 ) +{ + FIXME( "(%p, %u, %s, %s, %lu, %s, %s, %p, %lu, %p, %u) - stub\n", msg, src, debugstr_w(str1), + debugstr_w(str2), unk1, debugstr_w(file), debugstr_w(func), ip, unk2, unk3, unk4 ); + return S_OK; +} diff --git a/dlls/wdscore/wdscore.spec b/dlls/wdscore/wdscore.spec index b14778001a8..7ec8025ddee 100644 --- a/dlls/wdscore/wdscore.spec +++ b/dlls/wdscore/wdscore.spec @@ -150,8 +150,8 @@ @ stub WdsSetUILanguage @ stub WdsSetupLogDestroy @ stub WdsSetupLogInit -@ stub WdsSetupLogMessageA -@ stub WdsSetupLogMessageW +@ stdcall WdsSetupLogMessageA(ptr long str str long str str ptr long ptr long) +@ stdcall WdsSetupLogMessageW(ptr long wstr wstr long wstr wstr ptr long ptr long) @ stub WdsSubscribeEx @ stub WdsTerminate @ stub WdsUnlockExecutionGroup diff --git a/dlls/wdscore/wdscore_internal.h b/dlls/wdscore/wdscore_internal.h index 5ab070dade2..f29776b2459 100644 --- a/dlls/wdscore/wdscore_internal.h +++ b/dlls/wdscore/wdscore_internal.h @@ -32,6 +32,33 @@ typedef enum _WdsLogLevel { WdsLogLevelTrace = 0x70000000 } WdsLogLevel;
+typedef enum _WdsLogSource { + WdsLogSourceDPX = 0x10000, + WdsLogSourceCBS = 0x20000, + WdsLogSourceCSI = 0x18000, + WdsLogSourceSXS = 0x28000, + WdsLogSourceCMI = 0x30000, + WdsLogSourceDEPLOY = 0x40000, + WdsLogSourceDU = 0x50000, + WdsLogSourceIBS = 0x60000, + WdsLogSourceIBSLIB = 0x64000, + WdsLogSourceDIAG = 0x70000, + WdsLogSourceDIAGER = 0x74000, + WdsLogSourceMIG = 0x80000, + WdsLogSourceHWARE = 0x84000, + WdsLogSourceMIGUI = 0x88000, + WdsLogSourceUI = 0xA0000, + WdsLogSourceCONX = 0xA4000, + WdsLogSourceMOUPG = 0xA8000, + WdsLogSourceWDS = 0xB0000, + WdsLogSourceDISM = 0xB8000, + WdsLogSourcePANTHR = 0x90000, + WdsLogSourceWINPE = 0xC0000, + WdsLogSourceSP = 0xC8000, + WdsLogSourceLIB = 0xD0000, + WdsLogSourceTOOL = 0xE0000 +} WdsLogSource; + WINAPI void *get_ip(void);
#ifdef __i386__ @@ -55,5 +82,7 @@ __ASM_STDCALL_FUNC(get_ip, 0, LPVOID WINAPI CurrentIP(void); LPVOID WINAPI ConstructPartialMsgVA(WdsLogLevel,LPCSTR,va_list); LPVOID WINAPI ConstructPartialMsgVW(WdsLogLevel,LPCWSTR,va_list); +HRESULT WINAPI WdsSetupLogMessageA(LPVOID,WdsLogSource,LPCSTR,LPCSTR,ULONG,LPCSTR,LPCSTR,void*,ULONG,void*,UINT); +HRESULT WINAPI WdsSetupLogMessageW(LPVOID,WdsLogSource,LPCWSTR,LPCWSTR,ULONG,LPCWSTR,LPCWSTR,void*,ULONG,void*,UINT);
#endif /* __WDSCORE_INTERNAL_H__ */
The Windows Media Creation Tool crashes on this unimplemented function.
Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- dlls/wimgapi/main.c | 7 +++++++ dlls/wimgapi/wimgapi.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/wimgapi/main.c b/dlls/wimgapi/main.c index 7c39b01a5cc..1e43ca2d9f7 100644 --- a/dlls/wimgapi/main.c +++ b/dlls/wimgapi/main.c @@ -47,3 +47,10 @@ HANDLE WINAPI WIMCreateFile(WCHAR *path, DWORD access, DWORD creation, DWORD fla SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return NULL; } + +BOOL WINAPI WIMInitFileIOCallbacks(LPVOID callbacks) +{ + FIXME("(%p) stub\n", callbacks); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return 0; +} diff --git a/dlls/wimgapi/wimgapi.spec b/dlls/wimgapi/wimgapi.spec index e2476755cc1..5df9a2eebae 100644 --- a/dlls/wimgapi/wimgapi.spec +++ b/dlls/wimgapi/wimgapi.spec @@ -22,7 +22,7 @@ @ stub WIMGetMountedImageInfo @ stub WIMGetMountedImageInfoFromFile @ stdcall WIMGetMountedImages(ptr ptr) -@ stub WIMInitFileIOCallbacks +@ stdcall WIMInitFileIOCallbacks(ptr) @ stub WIMLoadImage @ stub WIMMountImage @ stub WIMMountImageHandle
The Windows Media Creation Tool crashes on this unimplemented function.
Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- dlls/wimgapi/main.c | 7 +++++++ dlls/wimgapi/wimgapi.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/wimgapi/main.c b/dlls/wimgapi/main.c index 1e43ca2d9f7..f867de0cd1b 100644 --- a/dlls/wimgapi/main.c +++ b/dlls/wimgapi/main.c @@ -54,3 +54,10 @@ BOOL WINAPI WIMInitFileIOCallbacks(LPVOID callbacks) SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return 0; } + +BOOL WINAPI WIMSetFileIOCallbackTemporaryPath(LPWSTR path) +{ + FIXME("(%s) stub\n", debugstr_w(path)); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return 0; +} diff --git a/dlls/wimgapi/wimgapi.spec b/dlls/wimgapi/wimgapi.spec index 5df9a2eebae..42e628e1092 100644 --- a/dlls/wimgapi/wimgapi.spec +++ b/dlls/wimgapi/wimgapi.spec @@ -31,7 +31,7 @@ @ stdcall WIMRegisterMessageCallback(long ptr ptr) @ stub WIMRemountImage @ stub WIMSetBootImage -@ stub WIMSetFileIOCallbackTemporaryPath +@ stdcall WIMSetFileIOCallbackTemporaryPath(wstr) @ stub WIMSetImageInformation @ stub WIMSetReferenceFile @ stub WIMSetTemporaryFile