Author: gadamopoulos
Date: Wed Nov 23 19:52:06 2011
New Revision: 54483
URL:
http://svn.reactos.org/svn/reactos?rev=54483&view=rev
Log:
[win32k]
- Fix a typo in NtUserSetClipboardData that tried to print a struct as a pointer (cid
15051)
- Clean up clipboard.c a bit. note: this cleanup "fixes" cid 14599 and 14598,
but even though they are false positives, this cleanup was needed
- Add missing break in NtUserQueryWindow (cid 13486)
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c [iso-8859-1] Wed Nov 23
19:52:06 2011
@@ -780,7 +780,6 @@
HANDLE APIENTRY
NtUserGetClipboardData(UINT fmt, PGETCLIPBDATA pgcd)
{
- NTSTATUS Status = STATUS_SUCCESS;
HANDLE hRet = NULL;
PCLIP pElement;
PWINSTATION_OBJECT pWinStaObj = NULL;
@@ -861,20 +860,14 @@
if (pPaletteEl && !IS_DATA_DELAYED(pPaletteEl))
pgcd->hPalette = pPaletteEl->hData;
}
+
+ hRet = pElement->hData;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- Status = _SEH2_GetExceptionCode();
+ SetLastNtError(_SEH2_GetExceptionCode());
}
_SEH2_END
-
- if (!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- goto cleanup;
- }
-
- hRet = pElement->hData;
cleanup:
if(pWinStaObj)
@@ -882,7 +875,7 @@
UserLeave();
- TRACE("Ret: %p\n", hRet);
+ TRACE("NtUserGetClipboardData returns %p\n", hRet);
return hRet;
}
@@ -952,12 +945,9 @@
NtUserSetClipboardData(UINT fmt, HANDLE hData, PSETCLIPBDATA pUnsafeScd)
{
SETCLIPBDATA scd;
- NTSTATUS Status = STATUS_SUCCESS;
- HANDLE hRet = NULL;
-
- TRACE("NtUserSetClipboardData(%x %p %p)\n", fmt, hData, scd);
-
- UserEnterExclusive();
+ HANDLE hRet;
+
+ TRACE("NtUserSetClipboardData(%x %p %p)\n", fmt, hData, pUnsafeScd);
_SEH2_TRY
{
@@ -966,20 +956,16 @@
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- Status = _SEH2_GetExceptionCode();
+ SetLastNtError(_SEH2_GetExceptionCode());
+ _SEH2_YIELD(return NULL;)
}
_SEH2_END
- if (!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- goto cleanup;
- }
+ UserEnterExclusive();
/* Call internal function */
hRet = UserSetClipboardData(fmt, hData, &scd);
-cleanup:
UserLeave();
return hRet;
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 [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Wed Nov 23 19:52:06
2011
@@ -3683,6 +3683,7 @@
case QUERY_WINDOW_REAL_ID:
Result = (DWORD)pWnd->head.pti->pEThread->Cid.UniqueProcess;
+ break;
default:
Result = (DWORD)NULL;