[ros-kernel] NtUserBuildHwndList()
Royce Mitchell III
royce3 at ev1.net
Tue May 4 08:22:10 CEST 2004
Ge van Geldorp wrote:
>>From: Royce Mitchell III
>>
>>Would someone please take a moment to see if this would be a
>>better/safer/(& more correct) implementation of NtUserBuildHwndList()?
>>
>>
>
>It's not a problem because of your changes, but the following lines seem
>odd to me:
>
>- pWnd[dwCount] =
>- (HWND)IntReferenceWindowObject(ObjectBody);
>+ HWND hTmp = (HWND)IntReferenceWindowObject(ObjectBody);
>+ Status = MmCopyToCaller(&pWnd[dwCount], &hTmp, sizeof(HWND));
>
>IntReferenceWindowObject is #defined as:
>
>#define IntReferenceWindowObject(WndObj) \
> ObmReferenceObjectByPointer(WndObj, otWindow)
>
>and ObmReferencObjectByPointer is declared as:
>
>NTSTATUS FASTCALL
>ObmReferenceObjectByPointer(PVOID ObjectBody,
> USER_OBJECT_TYPE ObjectType)
>
>So we're returning an array of NTSTATUS values here, not of HWNDs. The
>same happens in the old code.
>
>Ge van Geldorp.
>
My original code probably didn't work *much* better... *grin*. How would
I fix it?
Or...
Maybe ObmReferenceObjectByPointer returns what we want, or an NTSTATUS
on failure? I apologize in advance if that was a stupid conjecture ;)
More information about the Ros-kernel
mailing list