diff --git a/reactos/dll/win32/user32/controls/combo.c b/reactos/dll/win32/user32/controls/combo.c index abda9c86f85..9525d7e4154 100644 --- a/reactos/dll/win32/user32/controls/combo.c +++ b/reactos/dll/win32/user32/controls/combo.c @@ -2375,5 +2375,9 @@ BOOL WINAPI GetComboBoxInfo(HWND hwndCombo, /* [in] handle to combo box */ 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 } diff --git a/reactos/subsystems/win32/win32k/ntuser/ntstubs.c b/reactos/subsystems/win32/win32k/ntuser/ntstubs.c index 3474755d8a3..cf12dc3851b 100644 --- a/reactos/subsystems/win32/win32k/ntuser/ntstubs.c +++ b/reactos/subsystems/win32/win32k/ntuser/ntstubs.c @@ -272,17 +272,6 @@ NtUserGetAltTabInfo( return 0; } -BOOL -STDCALL -NtUserGetComboBoxInfo( - HWND hWnd, - PCOMBOBOXINFO pcbi) -{ - UNIMPLEMENTED - - return 0; -} - DWORD STDCALL NtUserGetControlBrush( diff --git a/reactos/subsystems/win32/win32k/ntuser/window.c b/reactos/subsystems/win32/win32k/ntuser/window.c index 93e4e484027..fa5e2cfae1d 100644 --- a/reactos/subsystems/win32/win32k/ntuser/window.c +++ b/reactos/subsystems/win32/win32k/ntuser/window.c @@ -2809,6 +2809,48 @@ CLEANUP: } +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 @@ NtUserGetListBoxInfo( DECLARE_RETURN(DWORD); DPRINT("Enter NtUserGetListBoxInfo\n"); - UserEnterExclusive(); + UserEnterShared(); if (!(Wnd = UserGetWindowObject(hWnd))) {