mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[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) svn path=/trunk/; revision=54483
This commit is contained in:
parent
d87dae2daa
commit
c1a19714f6
2 changed files with 10 additions and 23 deletions
|
@ -780,7 +780,6 @@ cleanup:
|
|||
HANDLE APIENTRY
|
||||
NtUserGetClipboardData(UINT fmt, PGETCLIPBDATA pgcd)
|
||||
{
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
HANDLE hRet = NULL;
|
||||
PCLIP pElement;
|
||||
PWINSTATION_OBJECT pWinStaObj = NULL;
|
||||
|
@ -861,28 +860,22 @@ NtUserGetClipboardData(UINT fmt, PGETCLIPBDATA pgcd)
|
|||
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)
|
||||
ObDereferenceObject(pWinStaObj);
|
||||
|
||||
UserLeave();
|
||||
|
||||
TRACE("Ret: %p\n", hRet);
|
||||
TRACE("NtUserGetClipboardData returns %p\n", hRet);
|
||||
|
||||
return hRet;
|
||||
}
|
||||
|
@ -952,12 +945,9 @@ HANDLE APIENTRY
|
|||
NtUserSetClipboardData(UINT fmt, HANDLE hData, PSETCLIPBDATA pUnsafeScd)
|
||||
{
|
||||
SETCLIPBDATA scd;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
HANDLE hRet = NULL;
|
||||
HANDLE hRet;
|
||||
|
||||
TRACE("NtUserSetClipboardData(%x %p %p)\n", fmt, hData, scd);
|
||||
|
||||
UserEnterExclusive();
|
||||
TRACE("NtUserSetClipboardData(%x %p %p)\n", fmt, hData, pUnsafeScd);
|
||||
|
||||
_SEH2_TRY
|
||||
{
|
||||
|
@ -966,20 +956,16 @@ NtUserSetClipboardData(UINT fmt, HANDLE hData, PSETCLIPBDATA pUnsafeScd)
|
|||
}
|
||||
_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;
|
||||
|
|
|
@ -3683,6 +3683,7 @@ NtUserQueryWindow(HWND hWnd, DWORD Index)
|
|||
|
||||
case QUERY_WINDOW_REAL_ID:
|
||||
Result = (DWORD)pWnd->head.pti->pEThread->Cid.UniqueProcess;
|
||||
break;
|
||||
|
||||
default:
|
||||
Result = (DWORD)NULL;
|
||||
|
|
Loading…
Reference in a new issue