Author: jimtabor
Date: Wed Oct 24 15:19:30 2007
New Revision: 29849
URL:
http://svn.reactos.org/svn/reactos?rev=29849&view=rev
Log:
- Implement NtUserGetComboBoxInfo and use it in GetComboBoxInfo.
- Use Shared locks.
Modified:
trunk/reactos/dll/win32/user32/controls/combo.c
trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/dll/win32/user32/controls/combo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/…
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/combo.c (original)
+++ trunk/reactos/dll/win32/user32/controls/combo.c Wed Oct 24 15:19:30 2007
@@ -2375,5 +2375,9 @@
PCOMBOBOXINFO pcbi /* [in/out] combo box information */)
{
TRACE("(%p, %p)\n", hwndCombo, pcbi);
+#ifndef __REACTOS__
return SendMessageW(hwndCombo, CB_GETCOMBOBOXINFO, 0, (LPARAM)pcbi);
-}
+#else
+ return NtUserGetComboBoxInfo(hwndCombo, pcbi);
+#endif
+}
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c Wed Oct 24 15:19:30 2007
@@ -272,17 +272,6 @@
return 0;
}
-BOOL
-STDCALL
-NtUserGetComboBoxInfo(
- HWND hWnd,
- PCOMBOBOXINFO pcbi)
-{
- UNIMPLEMENTED
-
- return 0;
-}
-
DWORD
STDCALL
NtUserGetControlBrush(
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c Wed Oct 24 15:19:30 2007
@@ -2809,6 +2809,48 @@
}
+BOOL
+STDCALL
+NtUserGetComboBoxInfo(
+ HWND hWnd,
+ PCOMBOBOXINFO pcbi)
+{
+ PWINDOW_OBJECT Wnd;
+ DECLARE_RETURN(BOOL);
+
+ DPRINT("Enter NtUserGetComboBoxInfo\n");
+ UserEnterShared();
+
+ if (!(Wnd = UserGetWindowObject(hWnd)))
+ {
+ RETURN( FALSE );
+ }
+ _SEH_TRY
+ {
+ if(pcbi)
+ {
+ ProbeForWrite(pcbi,
+ sizeof(COMBOBOXINFO),
+ 1);
+ }
+ }
+ _SEH_HANDLE
+ {
+ SetLastNtError(_SEH_GetExceptionCode());
+ _SEH_YIELD(RETURN(FALSE));
+ }
+ _SEH_END;
+
+ // Pass the user pointer, it was already probed.
+ RETURN( (BOOL) co_IntSendMessage( Wnd->hSelf, CB_GETCOMBOBOXINFO, 0,
(LPARAM)pcbi));
+
+CLEANUP:
+ DPRINT("Leave NtUserGetComboBoxInfo, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+
/*
* @implemented
*/
@@ -2882,7 +2924,7 @@
DECLARE_RETURN(DWORD);
DPRINT("Enter NtUserGetListBoxInfo\n");
- UserEnterExclusive();
+ UserEnterShared();
if (!(Wnd = UserGetWindowObject(hWnd)))
{