From f8c25628266f025e01332b780c793d96d97dad25 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Thu, 9 May 2019 18:52:35 +1000 Subject: [PATCH] mspatcha: Add stubs for signature and normalization functions. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=12501 Signed-off-by: Conor McCarthy Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/mspatcha/mspatcha.spec | 10 +++--- dlls/mspatcha/mspatcha_main.c | 66 +++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 5 deletions(-) diff --git a/dlls/mspatcha/mspatcha.spec b/dlls/mspatcha/mspatcha.spec index 060c090a9c3..f8cfc4168af 100644 --- a/dlls/mspatcha/mspatcha.spec +++ b/dlls/mspatcha/mspatcha.spec @@ -5,11 +5,11 @@ @ stdcall ApplyPatchToFileExA(str str str long ptr ptr) @ stdcall ApplyPatchToFileExW(wstr wstr wstr long ptr ptr) @ stdcall ApplyPatchToFileW(wstr wstr wstr long) -@ stub GetFilePatchSignatureA -@ stub GetFilePatchSignatureByBuffer -@ stub GetFilePatchSignatureByHandle -@ stub GetFilePatchSignatureW -@ stub NormalizeFileForPatchSignature +@ stdcall GetFilePatchSignatureA(str long ptr long ptr long ptr long ptr) +@ stdcall GetFilePatchSignatureByBuffer(ptr long long ptr long ptr long ptr long ptr) +@ stdcall GetFilePatchSignatureByHandle(ptr long ptr long ptr long ptr long ptr) +@ stdcall GetFilePatchSignatureW(wstr long ptr long ptr long ptr long ptr) +@ stdcall NormalizeFileForPatchSignature(ptr long long ptr long long long ptr long ptr) @ stdcall TestApplyPatchToFileA(str str long) @ stdcall TestApplyPatchToFileByBuffers(ptr long ptr long ptr long) @ stdcall TestApplyPatchToFileByHandles(ptr ptr long) diff --git a/dlls/mspatcha/mspatcha_main.c b/dlls/mspatcha/mspatcha_main.c index 68872531cb5..9695a7afb81 100644 --- a/dlls/mspatcha/mspatcha_main.c +++ b/dlls/mspatcha/mspatcha_main.c @@ -224,3 +224,69 @@ BOOL WINAPI ApplyPatchToFileByBuffers(PBYTE patch_file_view, ULONG patch_file_s return err == ERROR_SUCCESS; } + +/***************************************************** + * GetFilePatchSignatureA (MSPATCHA.@) + */ +BOOL WINAPI GetFilePatchSignatureA(LPCSTR filename, ULONG flags, PVOID data, ULONG ignore_range_count, + PPATCH_IGNORE_RANGE ignore_range, ULONG retain_range_count, + PPATCH_RETAIN_RANGE retain_range, ULONG bufsize, LPSTR buffer) +{ + FIXME("stub - %s, %x, %p, %u, %p, %u, %p, %u, %p\n", debugstr_a(filename), flags, data, + ignore_range_count, ignore_range, retain_range_count, retain_range, bufsize, buffer); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +/***************************************************** + * GetFilePatchSignatureW (MSPATCHA.@) + */ +BOOL WINAPI GetFilePatchSignatureW(LPCWSTR filename, ULONG flags, PVOID data, ULONG ignore_range_count, + PPATCH_IGNORE_RANGE ignore_range, ULONG retain_range_count, + PPATCH_RETAIN_RANGE retain_range, ULONG bufsize, LPWSTR buffer) +{ + FIXME("stub - %s, %x, %p, %u, %p, %u, %p, %u, %p\n", debugstr_w(filename), flags, data, + ignore_range_count, ignore_range, retain_range_count, retain_range, bufsize, buffer); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +/***************************************************** + * GetFilePatchSignatureByHandle (MSPATCHA.@) + */ +BOOL WINAPI GetFilePatchSignatureByHandle(HANDLE handle, ULONG flags, PVOID options, ULONG ignore_range_count, + PPATCH_IGNORE_RANGE ignore_range, ULONG retain_range_count, + PPATCH_RETAIN_RANGE retain_range, ULONG bufsize, LPSTR buffer) +{ + FIXME("stub - %p, %x, %p, %u, %p, %u, %p, %u, %p\n", handle, flags, options, + ignore_range_count, ignore_range, retain_range_count, retain_range, bufsize, buffer); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +/***************************************************** + * GetFilePatchSignatureByBuffer (MSPATCHA.@) + */ +BOOL WINAPI GetFilePatchSignatureByBuffer(PBYTE file_buf, ULONG file_size, ULONG flags, PVOID options, + ULONG ignore_range_count, PPATCH_IGNORE_RANGE ignore_range, + ULONG retain_range_count, PPATCH_RETAIN_RANGE retain_range, + ULONG bufsize, LPSTR buffer) +{ + FIXME("stub - %p, %u, %x, %p, %u, %p, %u, %p, %u, %p\n", file_buf, file_size, flags, options, + ignore_range_count, ignore_range, retain_range_count, retain_range, bufsize, buffer); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +/***************************************************** + * NormalizeFileForPatchSignature (MSPATCHA.@) + */ +INT WINAPI NormalizeFileForPatchSignature(PVOID file_buffer, ULONG file_size, ULONG flags, PATCH_OPTION_DATA *options, + ULONG new_coff_base, ULONG new_coff_time, ULONG ignore_range_count, PPATCH_IGNORE_RANGE ignore_range, + ULONG retain_range_count, PPATCH_RETAIN_RANGE retain_range) +{ + FIXME("stub - %p, %u, %x, %p, %u, %u, %u, %p, %u, %p\n", file_buffer, file_size, flags, options, new_coff_base, + new_coff_time, ignore_range_count, ignore_range, retain_range_count, retain_range); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return 0; +}