From fdf30001fbfbc6f0f1a7636eb00f532bb50000b2 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 13 Jul 2009 03:37:00 +0000 Subject: [PATCH] - Implement NtUserInitializeClientPfnArrays, tested and will be needed in later commits. svn path=/trunk/; revision=41936 --- .../subsystems/win32/win32k/ntuser/ntstubs.c | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/ntstubs.c b/reactos/subsystems/win32/win32k/ntuser/ntstubs.c index c012aed9a70..270b51a9206 100644 --- a/reactos/subsystems/win32/win32k/ntuser/ntstubs.c +++ b/reactos/subsystems/win32/win32k/ntuser/ntstubs.c @@ -364,9 +364,35 @@ NtUserInitializeClientPfnArrays( PPFNCLIENTWORKER pfnClientWorker, HINSTANCE hmodUser) { - UNIMPLEMENTED + NTSTATUS Status = STATUS_SUCCESS; + DPRINT("Enter NtUserInitializeClientPfnArrays User32 0x%x\n",hmodUser); + UserEnterExclusive(); - return STATUS_UNSUCCESSFUL; + _SEH2_TRY + { + ProbeForRead( pfnClientA, sizeof(PFNCLIENT), 1); + ProbeForRead( pfnClientW, sizeof(PFNCLIENT), 1); + ProbeForRead( pfnClientWorker, sizeof(PFNCLIENTWORKER), 1); + RtlCopyMemory(&gpsi->apfnClientA, pfnClientA, sizeof(PFNCLIENT)); + RtlCopyMemory(&gpsi->apfnClientW, pfnClientW, sizeof(PFNCLIENT)); + RtlCopyMemory(&gpsi->apfnClientWorker, pfnClientWorker, sizeof(PFNCLIENTWORKER)); + + hModClient = hmodUser; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status =_SEH2_GetExceptionCode(); + } + _SEH2_END + + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed reading Client Pfns from user space.\n"); + SetLastNtError(Status); + } + + UserLeave(); + return Status; } DWORD