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"); +}
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 95dea0e7e5f..d6b491802bf 100644 --- a/dlls/wdscore/main.c +++ b/dlls/wdscore/main.c @@ -53,3 +53,21 @@ LPVOID WINAPI CurrentIP(void) return NULL; } #endif + +/*********************************************************************** + * 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 02df26acc20..6b39727f1c5 100644 --- a/dlls/wdscore/wdscore_internal.h +++ b/dlls/wdscore/wdscore_internal.h @@ -19,6 +19,19 @@ #ifndef __WDSCORE_INTERNAL_H__ #define __WDSCORE_INTERNAL_H__
+typedef enum _WdsLogLevel { + WdsLogLevelAssert = 0x00000000, + WdsLogLevelFatalError = 0x01000000, + WdsLogLevelError = 0x02000000, + WdsLogLevelWarning = 0x03000000, + WdsLogLevelInfo = 0x04000000, + WdsLogLevelStatus = 0x05000000, + WdsLogLevelVerbose = 0x68000000, + WdsLogLevelTrace = 0x70000000 +} WdsLogLevel; + 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 --- The deletions are just an extra space added to line up the prototypes. --- dlls/wdscore/main.c | 24 ++++++++++++++++++++++ dlls/wdscore/wdscore.spec | 4 ++-- dlls/wdscore/wdscore_internal.h | 35 ++++++++++++++++++++++++++++++--- 3 files changed, 58 insertions(+), 5 deletions(-)
diff --git a/dlls/wdscore/main.c b/dlls/wdscore/main.c index d6b491802bf..8d67215bbe7 100644 --- a/dlls/wdscore/main.c +++ b/dlls/wdscore/main.c @@ -71,3 +71,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 6b39727f1c5..767bbf3bfa8 100644 --- a/dlls/wdscore/wdscore_internal.h +++ b/dlls/wdscore/wdscore_internal.h @@ -30,8 +30,37 @@ typedef enum _WdsLogLevel { WdsLogLevelTrace = 0x70000000 } WdsLogLevel;
-LPVOID WINAPI CurrentIP(void); -LPVOID WINAPI ConstructPartialMsgVA(WdsLogLevel,LPCSTR,va_list); -LPVOID WINAPI ConstructPartialMsgVW(WdsLogLevel,LPCWSTR,va_list); +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; + +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