[ros-kernel] NtUserBuildHwndList()

Ge van Geldorp gvg at reactos.com
Tue May 4 10:20:52 CEST 2004


> 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.



More information about the Ros-kernel mailing list