From: Zhiyi Zhang <zzhang@codeweavers.com> --- dlls/ntdll/alpc.c | 21 +++++++++++++++++++++ dlls/ntdll/ntdll.spec | 1 + dlls/ntdll/tests/alpc.c | 1 - 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/alpc.c b/dlls/ntdll/alpc.c index 730d2942890..81e4641876d 100644 --- a/dlls/ntdll/alpc.c +++ b/dlls/ntdll/alpc.c @@ -21,6 +21,7 @@ #include <stdarg.h> #include <windef.h> #include <winternl.h> +#include <ntstatus.h> #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(alpc); @@ -56,3 +57,23 @@ SIZE_T WINAPI AlpcGetHeaderSize(ULONG attribute_flags) return size; } + +NTSTATUS WINAPI AlpcInitializeMessageAttribute(ULONG attribute_flags, ALPC_MESSAGE_ATTRIBUTES *buffer, + SIZE_T buffer_size, SIZE_T *required_buffer_size) +{ + TRACE("%#lx, %p, %Ix, %p.\n", attribute_flags, buffer, buffer_size, required_buffer_size); + + *required_buffer_size = AlpcGetHeaderSize(attribute_flags); + + if (buffer_size < *required_buffer_size) + return STATUS_BUFFER_TOO_SMALL; + + if (buffer) + { + buffer->AllocatedAttributes = attribute_flags; + buffer->ValidAttributes = 0; + } + + return STATUS_SUCCESS; + +} diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 55a05d084e8..578bfc7963e 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -7,6 +7,7 @@ @ stdcall A_SHAInit(ptr) @ stdcall A_SHAUpdate(ptr ptr long) @ stdcall AlpcGetHeaderSize(long) +@ stdcall AlpcInitializeMessageAttribute(long ptr long ptr) @ stdcall ApiSetQueryApiSetPresence(ptr ptr) @ stdcall ApiSetQueryApiSetPresenceEx(ptr ptr ptr) @ stub CsrAllocateCaptureBuffer diff --git a/dlls/ntdll/tests/alpc.c b/dlls/ntdll/tests/alpc.c index 504b47fda4d..9b10926f27e 100644 --- a/dlls/ntdll/tests/alpc.c +++ b/dlls/ntdll/tests/alpc.c @@ -154,7 +154,6 @@ static void test_AlpcInitializeMessageAttribute(void) if (!pAlpcInitializeMessageAttribute) { - todo_wine win_skip("AlpcInitializeMessageAttribute is unavailable.\n"); return; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10492