mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 13:38:19 +00:00
[WIN32K]
Remove SetLastWin32Error and use EngSetLastError instead svn path=/trunk/; revision=50139
This commit is contained in:
parent
54ee99abdb
commit
4d40fbf685
60 changed files with 479 additions and 548 deletions
|
@ -69,7 +69,7 @@ EngAlphaBlend(IN SURFOBJ *psoDest,
|
|||
InputRect.right > psoSource->sizlBitmap.cx ||
|
||||
InputRect.bottom > psoSource->sizlBitmap.cy )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,3 +30,10 @@ EngSetLastError(IN ULONG iError)
|
|||
if (pTeb)
|
||||
pTeb->LastErrorValue = iError;
|
||||
}
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
SetLastNtError(NTSTATUS Status)
|
||||
{
|
||||
EngSetLastError(RtlNtStatusToDosError(Status));
|
||||
}
|
||||
|
|
|
@ -619,7 +619,7 @@ NtGdiGetDeviceCaps(
|
|||
pdc = DC_LockDc(hdc);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -769,7 +769,7 @@ NtGdiGetDeviceCapsAll(
|
|||
pdc = DC_LockDc(hDC);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
VOID FASTCALL
|
||||
SetLastNtError(
|
||||
NTSTATUS Status);
|
||||
|
||||
VOID FASTCALL
|
||||
SetLastWin32Error(
|
||||
DWORD Status);
|
||||
|
||||
NTSTATUS FASTCALL
|
||||
GetLastNtError(VOID);
|
||||
|
||||
/* EOF */
|
|
@ -73,3 +73,7 @@ RegWriteUserSetting(
|
|||
IN ULONG ulType,
|
||||
OUT PVOID pvData,
|
||||
IN ULONG cbDataSize);
|
||||
|
||||
VOID FASTCALL
|
||||
SetLastNtError(
|
||||
NTSTATUS Status);
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <include/dib.h>
|
||||
#include <include/driver.h>
|
||||
#include <include/driverobj.h>
|
||||
#include <include/error.h>
|
||||
#include <include/floatobj.h>
|
||||
#include <include/gdiobj.h>
|
||||
#include <include/palette.h>
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
* ReactOS W32 Subsystem
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
/* $Id$
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: Errors
|
||||
* FILE: subsys/win32k/misc/error.c
|
||||
* PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
* REVISION HISTORY:
|
||||
* 06-06-2001 CSH Created
|
||||
*/
|
||||
|
||||
#include <win32k.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
VOID FASTCALL
|
||||
SetLastNtError(NTSTATUS Status)
|
||||
{
|
||||
SetLastWin32Error(RtlNtStatusToDosError(Status));
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
SetLastWin32Error(DWORD Status)
|
||||
{
|
||||
PTEB Teb = PsGetCurrentThread()->Tcb.Teb;
|
||||
|
||||
if (NULL != Teb)
|
||||
{
|
||||
Teb->LastErrorValue = Status;
|
||||
}
|
||||
}
|
||||
|
||||
NTSTATUS FASTCALL
|
||||
GetLastNtError(VOID)
|
||||
{
|
||||
PTEB Teb = PsGetCurrentThread()->Tcb.Teb;
|
||||
|
||||
if ( NULL != Teb )
|
||||
{
|
||||
return Teb->LastStatusValue;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* EOF */
|
|
@ -77,14 +77,14 @@ PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hAccel)
|
|||
|
||||
if (!hAccel)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_ACCEL_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_ACCEL_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Accel= UserGetObject(gHandleTable, hAccel, otAccel);
|
||||
if (!Accel)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_ACCEL_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_ACCEL_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ IntSetCaretBlinkTime(UINT uMSeconds)
|
|||
/* windows doesn't do this check */
|
||||
if((uMSeconds < MIN_CARETBLINKRATE) || (uMSeconds > MAX_CARETBLINKRATE))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
ObDereferenceObject(WinStaObject);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ BOOL FASTCALL co_UserHideCaret(PWND Window OPTIONAL)
|
|||
|
||||
if(Window && Window->head.pti->pEThread != PsGetCurrentThread())
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -266,7 +266,7 @@ BOOL FASTCALL co_UserHideCaret(PWND Window OPTIONAL)
|
|||
|
||||
if(Window && ThreadQueue->CaretInfo->hWnd != Window->head.h)
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -293,7 +293,7 @@ BOOL FASTCALL co_UserShowCaret(PWND Window OPTIONAL)
|
|||
|
||||
if(Window && Window->head.pti->pEThread != PsGetCurrentThread())
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ BOOL FASTCALL co_UserShowCaret(PWND Window OPTIONAL)
|
|||
|
||||
if(Window && ThreadQueue->CaretInfo->hWnd != Window->head.h)
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -346,7 +346,7 @@ NtUserCreateCaret(
|
|||
|
||||
if(Window->head.pti->pEThread != PsGetCurrentThread())
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ IntRegisterClassAtom(IN PUNICODE_STRING ClassName,
|
|||
/* FIXME - Don't limit to 64 characters! use SEH when allocating memory! */
|
||||
if (ClassName->Length / sizeof(WCHAR) >= sizeof(szBuf) / sizeof(szBuf[0]))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return (RTL_ATOM)0;
|
||||
}
|
||||
|
||||
|
@ -557,7 +557,7 @@ IntGetClassForDesktop(IN OUT PCLS BaseClass,
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
}
|
||||
}
|
||||
return Class;
|
||||
|
@ -832,7 +832,7 @@ IntCheckProcessDesktopClasses(IN PDESKTOP Desktop,
|
|||
if (!Ret)
|
||||
{
|
||||
DPRINT1("Failed to move process classes from desktop 0x%p to the shared heap!\n", Desktop);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
}
|
||||
|
||||
return Ret;
|
||||
|
@ -1034,7 +1034,7 @@ NoMem:
|
|||
|
||||
IntDeregisterClassAtom(Atom);
|
||||
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
}
|
||||
|
||||
return Class;
|
||||
|
@ -1088,7 +1088,7 @@ IntGetAtomFromStringOrAtom(IN PUNICODE_STRING ClassName,
|
|||
/* FIXME - Don't limit to 64 characters! use SEH when allocating memory! */
|
||||
if (ClassName->Length / sizeof(WCHAR) >= sizeof(szBuf) / sizeof(szBuf[0]))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return (RTL_ATOM)0;
|
||||
}
|
||||
|
||||
|
@ -1117,7 +1117,7 @@ IntGetAtomFromStringOrAtom(IN PUNICODE_STRING ClassName,
|
|||
{
|
||||
if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
{
|
||||
SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1194,7 +1194,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
|
|||
Link);
|
||||
if (Class == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
return (RTL_ATOM)0;
|
||||
}else{DPRINT("Step 4: 0x%x\n",Class );}
|
||||
|
||||
|
@ -1240,7 +1240,7 @@ IntGetAndReferenceClass(PUNICODE_STRING ClassName, HINSTANCE hInstance)
|
|||
DPRINT1("Class \"%wZ\" not found\n", ClassName);
|
||||
}
|
||||
|
||||
SetLastWin32Error(ERROR_CANNOT_FIND_WND_CLASS);
|
||||
EngSetLastError(ERROR_CANNOT_FIND_WND_CLASS);
|
||||
return NULL;
|
||||
}
|
||||
DPRINT("ClassAtom %x\n", ClassAtom);
|
||||
|
@ -1289,7 +1289,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
|
|||
{
|
||||
// local class already exists
|
||||
DPRINT("Local Class 0x%p does already exist!\n", ClassAtom);
|
||||
SetLastWin32Error(ERROR_CLASS_ALREADY_EXISTS);
|
||||
EngSetLastError(ERROR_CLASS_ALREADY_EXISTS);
|
||||
return (RTL_ATOM)0;
|
||||
}
|
||||
|
||||
|
@ -1303,7 +1303,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
|
|||
if (Class != NULL && Class->Global)
|
||||
{
|
||||
DPRINT("Global Class 0x%p does already exist!\n", ClassAtom);
|
||||
SetLastWin32Error(ERROR_CLASS_ALREADY_EXISTS);
|
||||
EngSetLastError(ERROR_CLASS_ALREADY_EXISTS);
|
||||
return (RTL_ATOM)0;
|
||||
}
|
||||
}
|
||||
|
@ -1373,7 +1373,7 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
|
|||
Class->pclsClone != NULL)
|
||||
{
|
||||
DPRINT("UserUnregisterClass: Class has a Window. Ct %d : Clone 0x%x\n", Class->cWndReferenceCount, Class->pclsClone);
|
||||
SetLastWin32Error(ERROR_CLASS_HAS_WINDOWS);
|
||||
EngSetLastError(ERROR_CLASS_HAS_WINDOWS);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1445,7 +1445,7 @@ UserGetClassName(IN PCLS Class,
|
|||
USERTAG_CLASS);
|
||||
if (szTemp == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
_SEH2_LEAVE;
|
||||
}
|
||||
|
||||
|
@ -1589,7 +1589,7 @@ IntSetClassMenuName(IN PCLS Class,
|
|||
}
|
||||
}
|
||||
else
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1640,7 +1640,7 @@ UserSetClassLongPtr(IN PCLS Class,
|
|||
if (Index + sizeof(ULONG_PTR) < Index ||
|
||||
Index + sizeof(ULONG_PTR) > Class->cbclsExtra)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1680,7 +1680,7 @@ UserSetClassLongPtr(IN PCLS Class,
|
|||
break;
|
||||
|
||||
case GCL_CBCLSEXTRA:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
break;
|
||||
|
||||
case GCLP_HBRBACKGROUND:
|
||||
|
@ -1803,7 +1803,7 @@ UserSetClassLongPtr(IN PCLS Class,
|
|||
}
|
||||
|
||||
default:
|
||||
SetLastWin32Error(ERROR_INVALID_INDEX);
|
||||
EngSetLastError(ERROR_INVALID_INDEX);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1982,7 +1982,7 @@ NtUserRegisterClassExWOW(
|
|||
if (Flags & ~(CSF_ANSIPROC))
|
||||
{
|
||||
DPRINT1("NtUserRegisterClassExWOW Bad Flags!\n");
|
||||
SetLastWin32Error(ERROR_INVALID_FLAGS);
|
||||
EngSetLastError(ERROR_INVALID_FLAGS);
|
||||
return Ret;
|
||||
}
|
||||
|
||||
|
@ -2059,7 +2059,7 @@ NtUserRegisterClassExWOW(
|
|||
{
|
||||
DPRINT1("NtUserRegisterClassExWOW MenuName Error!\n");
|
||||
InvalidParameter:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
_SEH2_LEAVE;
|
||||
}
|
||||
|
||||
|
@ -2114,7 +2114,7 @@ NtUserSetClassLong(HWND hWnd,
|
|||
{
|
||||
if (Window->head.pti->ppi != pi)
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
|
@ -2146,7 +2146,7 @@ NtUserSetClassLong(HWND hWnd,
|
|||
else if (Offset == GCLP_MENUNAME && !IS_INTRESOURCE(Value.Buffer))
|
||||
{
|
||||
InvalidParameter:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
_SEH2_LEAVE;
|
||||
}
|
||||
}
|
||||
|
@ -2215,7 +2215,7 @@ NtUserUnregisterClass(IN PUNICODE_STRING ClassNameOrAtom,
|
|||
if (!IS_ATOM(CapturedClassName.Buffer))
|
||||
{
|
||||
InvalidParameter:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
_SEH2_LEAVE;
|
||||
}
|
||||
}
|
||||
|
@ -2274,7 +2274,7 @@ NtUserGetClassInfo(
|
|||
|
||||
if (CapturedClassName.Length & 1)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Ret = FALSE;
|
||||
_SEH2_LEAVE;
|
||||
}
|
||||
|
@ -2299,7 +2299,7 @@ NtUserGetClassInfo(
|
|||
if (!IS_ATOM(CapturedClassName.Buffer))
|
||||
{
|
||||
ERR("NtUserGetClassInfo() got ClassName instead of Atom!\n");
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Ret = FALSE;
|
||||
_SEH2_LEAVE;
|
||||
}
|
||||
|
@ -2342,7 +2342,7 @@ NtUserGetClassInfo(
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
Ret = FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -2363,7 +2363,7 @@ NtUserGetClassInfo(
|
|||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
Ret = FALSE;
|
||||
}
|
||||
_SEH2_END;
|
||||
|
@ -2465,7 +2465,7 @@ NtUserGetWOWClass(HINSTANCE hInstance,
|
|||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
Hit = TRUE;
|
||||
}
|
||||
_SEH2_END;
|
||||
|
@ -2479,7 +2479,7 @@ NtUserGetWOWClass(HINSTANCE hInstance,
|
|||
NULL);
|
||||
if (!ClassAtom)
|
||||
{
|
||||
SetLastWin32Error(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ IntAddWindowToChain(PWND window)
|
|||
wce = ExAllocatePoolWithTag(PagedPool, sizeof(CLIPBOARDCHAINELEMENT), USERTAG_CLIPBOARD);
|
||||
if (wce == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
goto exit_addChain;
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ intAddFormatedData(UINT format, HANDLE hData, DWORD size)
|
|||
ce = ExAllocatePoolWithTag(PagedPool, sizeof(CLIPBOARDELEMENT), USERTAG_CLIPBOARD);
|
||||
if (ce == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -483,7 +483,7 @@ NtUserCloseClipboard(VOID)
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_CLIPBOARD_NOT_OPEN);
|
||||
EngSetLastError(ERROR_CLIPBOARD_NOT_OPEN);
|
||||
}
|
||||
|
||||
recentlySetClipboard = FALSE;
|
||||
|
@ -595,7 +595,7 @@ NtUserEmptyClipboard(VOID)
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_CLIPBOARD_NOT_OPEN);
|
||||
EngSetLastError(ERROR_CLIPBOARD_NOT_OPEN);
|
||||
}
|
||||
|
||||
if (ret && ClipboardOwnerWindow)
|
||||
|
@ -718,7 +718,7 @@ NtUserGetClipboardData(UINT uFormat, PVOID pBuffer)
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_CLIPBOARD_NOT_OPEN);
|
||||
EngSetLastError(ERROR_CLIPBOARD_NOT_OPEN);
|
||||
}
|
||||
|
||||
UserLeave();
|
||||
|
@ -742,7 +742,7 @@ NtUserGetClipboardFormatName(UINT format, PUNICODE_STRING FormatName,
|
|||
|
||||
if((cchMaxCount < 1) || !FormatName)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ IntEnumClipboardFormats(UINT uFormat)
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_CLIPBOARD_NOT_OPEN);
|
||||
EngSetLastError(ERROR_CLIPBOARD_NOT_OPEN);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -83,7 +83,7 @@ PCURICON_OBJECT FASTCALL UserGetCurIconObject(HCURSOR hCurIcon)
|
|||
|
||||
if (!hCurIcon)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_CURSOR_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ PCURICON_OBJECT FASTCALL UserGetCurIconObject(HCURSOR hCurIcon)
|
|||
if (!CurIcon)
|
||||
{
|
||||
/* we never set ERROR_INVALID_ICON_HANDLE. lets hope noone ever checks for it */
|
||||
SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_CURSOR_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -347,7 +347,7 @@ IntCreateCurIconHandle()
|
|||
|
||||
if (!CurIcon)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -508,7 +508,7 @@ NtUserGetIconInfo(
|
|||
|
||||
if (!IconInfo)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
goto leave;
|
||||
}
|
||||
|
||||
|
@ -655,7 +655,7 @@ NtUserGetCursorInfo(
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
}
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
|
@ -727,7 +727,7 @@ NtUserClipCursor(
|
|||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
_SEH2_YIELD(return FALSE;)
|
||||
}
|
||||
_SEH2_END
|
||||
|
@ -806,7 +806,7 @@ NtUserFindExistingCursorIcon(
|
|||
RETURN(Ret);
|
||||
}
|
||||
|
||||
SetLastWin32Error(ERROR_INVALID_CURSOR_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_CURSOR_HANDLE);
|
||||
RETURN((HANDLE)0);
|
||||
|
||||
CLEANUP:
|
||||
|
|
|
@ -532,7 +532,7 @@ PWND FASTCALL UserGetDesktopWindow(VOID)
|
|||
HWND FASTCALL IntGetMessageWindow(VOID)
|
||||
{
|
||||
PDESKTOP pdo = IntGetActiveDesktop();
|
||||
|
||||
|
||||
if (!pdo)
|
||||
{
|
||||
DPRINT("No active desktop\n");
|
||||
|
@ -598,7 +598,7 @@ UserGetDesktopDC(ULONG DcType, BOOL EmptyDC, BOOL ValidatehWnd)
|
|||
HDC DesktopHDC = 0;
|
||||
|
||||
if (DcType == DC_TYPE_DIRECT)
|
||||
{
|
||||
{
|
||||
DesktopObject = UserGetDesktopWindow();
|
||||
DesktopHDC = (HDC)UserGetWindowDC(DesktopObject);
|
||||
}
|
||||
|
@ -724,7 +724,7 @@ VOID co_IntShellHookNotify(WPARAM Message, LPARAM lParam)
|
|||
|
||||
DPRINT("MsgType = %x\n", MsgType);
|
||||
if (!MsgType)
|
||||
DPRINT1("LastError: %x\n", GetLastNtError());
|
||||
DPRINT1("LastError: %x\n", EngGetLastError());
|
||||
}
|
||||
|
||||
if (!Desktop)
|
||||
|
@ -1703,14 +1703,14 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
|
|||
|
||||
if(!dwThreadId)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)dwThreadId, &Thread);
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -1903,7 +1903,7 @@ IntSetThreadDesktop(IN PDESKTOP DesktopObject,
|
|||
if (!IsListEmpty(&W32Thread->WindowListHead))
|
||||
{
|
||||
DPRINT1("Attempted to change thread desktop although the thread has windows!\n");
|
||||
SetLastWin32Error(ERROR_BUSY);
|
||||
EngSetLastError(ERROR_BUSY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1931,7 +1931,7 @@ IntSetThreadDesktop(IN PDESKTOP DesktopObject,
|
|||
}
|
||||
|
||||
if (!W32Thread->pcti && DesktopObject && NtCurrentTeb())
|
||||
{
|
||||
{
|
||||
DPRINT("Allocate ClientThreadInfo\n");
|
||||
W32Thread->pcti = DesktopHeapAlloc( DesktopObject,
|
||||
sizeof(CLIENTTHREADINFO));
|
||||
|
|
|
@ -809,7 +809,7 @@ NtUserChangeDisplaySettings(
|
|||
if ((dwflags != CDS_VIDEOPARAMETERS && lParam != NULL) ||
|
||||
(hwnd != NULL))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return DISP_CHANGE_BADPARAM;
|
||||
}
|
||||
|
||||
|
|
|
@ -345,7 +345,7 @@ NtUserSetWinEventHook(
|
|||
GlobalEvents = ExAllocatePoolWithTag(PagedPool, sizeof(EVENTTABLE), TAG_HOOK);
|
||||
if (GlobalEvents == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
goto SetEventExit;
|
||||
}
|
||||
GlobalEvents->Counts = 0;
|
||||
|
@ -354,19 +354,19 @@ NtUserSetWinEventHook(
|
|||
|
||||
if (eventMin > eventMax)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HOOK_FILTER);
|
||||
EngSetLastError(ERROR_INVALID_HOOK_FILTER);
|
||||
goto SetEventExit;
|
||||
}
|
||||
|
||||
if (!lpfnWinEventProc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_FILTER_PROC);
|
||||
EngSetLastError(ERROR_INVALID_FILTER_PROC);
|
||||
goto SetEventExit;
|
||||
}
|
||||
|
||||
if ((dwflags & WINEVENT_INCONTEXT) && !hmodWinEventProc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_HOOK_NEEDS_HMOD);
|
||||
EngSetLastError(ERROR_HOOK_NEEDS_HMOD);
|
||||
goto SetEventExit;
|
||||
}
|
||||
|
||||
|
@ -375,7 +375,7 @@ NtUserSetWinEventHook(
|
|||
Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)idThread, &Thread);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_THREAD_ID);
|
||||
EngSetLastError(ERROR_INVALID_THREAD_ID);
|
||||
goto SetEventExit;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -492,7 +492,7 @@ NtUserSetActiveWindow(HWND hWnd)
|
|||
|
||||
if (Window->head.pti->MessageQueue != ThreadQueue)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
RETURN( 0);
|
||||
}
|
||||
|
||||
|
@ -614,7 +614,7 @@ HWND FASTCALL co_UserSetFocus(PWND Wnd OPTIONAL)
|
|||
|
||||
if (Wnd->head.pti->MessageQueue != ThreadQueue)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return( 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -725,14 +725,14 @@ IntGetHookObject(HHOOK hHook)
|
|||
|
||||
if (!hHook)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HOOK_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HOOK_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Hook = (PHOOK)UserGetObject(gHandleTable, hHook, otHook);
|
||||
if (!Hook)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HOOK_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HOOK_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1120,7 +1120,7 @@ IntUnhookWindowsHook(int HookId, HOOKPROC pfnFilterProc)
|
|||
|
||||
if (HookId < WH_MINHOOK || WH_MAXHOOK < HookId )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HOOK_FILTER);
|
||||
EngSetLastError(ERROR_INVALID_HOOK_FILTER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1145,7 +1145,7 @@ IntUnhookWindowsHook(int HookId, HOOKPROC pfnFilterProc)
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -1260,13 +1260,13 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
|
||||
if (HookId < WH_MINHOOK || WH_MAXHOOK < HookId )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HOOK_FILTER);
|
||||
EngSetLastError(ERROR_INVALID_HOOK_FILTER);
|
||||
RETURN( NULL);
|
||||
}
|
||||
|
||||
if (!HookProc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_FILTER_PROC);
|
||||
EngSetLastError(ERROR_INVALID_FILTER_PROC);
|
||||
RETURN( NULL);
|
||||
}
|
||||
|
||||
|
@ -1280,14 +1280,14 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
{
|
||||
DPRINT1("Local hook installing Global HookId: %d\n",HookId);
|
||||
/* these can only be global */
|
||||
SetLastWin32Error(ERROR_GLOBAL_ONLY_HOOK);
|
||||
EngSetLastError(ERROR_GLOBAL_ONLY_HOOK);
|
||||
RETURN( NULL);
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(PsLookupThreadByThreadId((HANDLE)(DWORD_PTR) ThreadId, &Thread)))
|
||||
{
|
||||
DPRINT1("Invalid thread id 0x%x\n", ThreadId);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN( NULL);
|
||||
}
|
||||
|
||||
|
@ -1298,7 +1298,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
if ( pti->rpdesk != ptiCurrent->rpdesk) // gptiCurrent->rpdesk)
|
||||
{
|
||||
DPRINT1("Local hook wrong desktop HookId: %d\n",HookId);
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
RETURN( NULL);
|
||||
}
|
||||
|
||||
|
@ -1315,7 +1315,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
HookId == WH_CALLWNDPROCRET) )
|
||||
{
|
||||
DPRINT1("Local hook needs hMod HookId: %d\n",HookId);
|
||||
SetLastWin32Error(ERROR_HOOK_NEEDS_HMOD);
|
||||
EngSetLastError(ERROR_HOOK_NEEDS_HMOD);
|
||||
RETURN( NULL);
|
||||
}
|
||||
|
||||
|
@ -1329,7 +1329,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
HookId == WH_FOREGROUNDIDLE ||
|
||||
HookId == WH_CALLWNDPROCRET) )
|
||||
{
|
||||
SetLastWin32Error(ERROR_HOOK_TYPE_NOT_ALLOWED);
|
||||
EngSetLastError(ERROR_HOOK_TYPE_NOT_ALLOWED);
|
||||
RETURN( NULL);
|
||||
}
|
||||
}
|
||||
|
@ -1349,7 +1349,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
HookId == WH_CALLWNDPROCRET) )
|
||||
{
|
||||
DPRINT1("Global hook needs hMod HookId: %d\n",HookId);
|
||||
SetLastWin32Error(ERROR_HOOK_NEEDS_HMOD);
|
||||
EngSetLastError(ERROR_HOOK_NEEDS_HMOD);
|
||||
RETURN( NULL);
|
||||
}
|
||||
}
|
||||
|
@ -1460,7 +1460,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
|||
if (NULL == Hook->ModuleName.Buffer)
|
||||
{
|
||||
IntRemoveHook(Hook);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
RETURN( NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ NtUserGetLastInputInfo(PLASTINPUTINFO plii)
|
|||
{
|
||||
if (ProbeForReadUint(&plii->cbSize) != sizeof(LASTINPUTINFO))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
ret = FALSE;
|
||||
_SEH2_LEAVE;
|
||||
}
|
||||
|
@ -1027,7 +1027,7 @@ IntBlockInput(PTHREADINFO W32Thread, BOOL BlockIt)
|
|||
if(!ThreadHasInputAccess(W32Thread) ||
|
||||
!IntIsActiveDesktop(W32Thread->rpdesk))
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1037,7 +1037,7 @@ IntBlockInput(PTHREADINFO W32Thread, BOOL BlockIt)
|
|||
{
|
||||
if(OldBlock != W32Thread)
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
W32Thread->rpdesk->BlockInputThread = (BlockIt ? W32Thread : NULL);
|
||||
|
@ -1481,7 +1481,7 @@ NtUserSendInput(
|
|||
|
||||
if(!nInputs || !pInput || (cbSize != sizeof(INPUT)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN( 0);
|
||||
}
|
||||
|
||||
|
@ -1492,7 +1492,7 @@ NtUserSendInput(
|
|||
if(!ThreadHasInputAccess(W32Thread) ||
|
||||
!IntIsActiveDesktop(W32Thread->rpdesk))
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
RETURN( 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@ UserGetKeyboardLayout(
|
|||
Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)dwThreadId, &Thread);
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,14 +106,14 @@ PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu)
|
|||
|
||||
if (!hMenu)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_MENU_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_MENU_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Menu = (PMENU_OBJECT)UserGetObject(gHandleTable, hMenu, otMenu);
|
||||
if (!Menu)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_MENU_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_MENU_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -861,7 +861,7 @@ IntInsertMenuItem(PMENU_OBJECT MenuObject, UINT uItem, BOOL fByPosition,
|
|||
|
||||
if (MAX_MENU_ITEMS <= MenuObject->MenuInfo.MenuItemCount)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -894,7 +894,7 @@ IntInsertMenuItem(PMENU_OBJECT MenuObject, UINT uItem, BOOL fByPosition,
|
|||
MenuItem = ExAllocatePoolWithTag(PagedPool, sizeof(MENU_ITEM), TAG_MENUITEM);
|
||||
if (NULL == MenuItem)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1420,7 +1420,7 @@ intGetTitleBarInfo(PWND pWindowObject, PTITLEBARINFO bti)
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
retValue = FALSE;
|
||||
}
|
||||
|
||||
|
@ -1444,7 +1444,7 @@ UserInsertMenuItem(
|
|||
if (sizeof(MENUITEMINFOW) != ItemInfo.cbSize
|
||||
&& FIELD_OFFSET(MENUITEMINFOW, hbmpItem) != ItemInfo.cbSize)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
return IntInsertMenuItem(Menu, uItem, fByPosition, &ItemInfo);
|
||||
|
@ -1456,7 +1456,7 @@ UserInsertMenuItem(
|
|||
{
|
||||
if (FIELD_OFFSET(MENUITEMINFOW, hbmpItem) != ItemInfo.cbSize)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
ItemInfo.hbmpItem = (HBITMAP)0;
|
||||
|
@ -1584,7 +1584,7 @@ NtUserGetTitleBarInfo(
|
|||
/* Vaildate the windows handle */
|
||||
if (!(WindowObject = UserGetWindowObject(hwnd)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
retValue = FALSE;
|
||||
}
|
||||
|
||||
|
@ -1597,7 +1597,7 @@ NtUserGetTitleBarInfo(
|
|||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
/* Fail copy the data */
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
retValue = FALSE;
|
||||
}
|
||||
_SEH2_END
|
||||
|
@ -1617,7 +1617,7 @@ NtUserGetTitleBarInfo(
|
|||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
/* Fail copy the data */
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
retValue = FALSE;
|
||||
}
|
||||
_SEH2_END
|
||||
|
@ -1646,7 +1646,7 @@ BOOL FASTCALL UserDestroyMenu(HMENU hMenu)
|
|||
|
||||
if(Menu->Process != PsGetCurrentProcess())
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1673,7 +1673,7 @@ NtUserDestroyMenu(
|
|||
|
||||
if(Menu->Process != PsGetCurrentProcess())
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
RETURN( FALSE);
|
||||
}
|
||||
|
||||
|
@ -1738,7 +1738,7 @@ NtUserGetMenuBarInfo(
|
|||
|
||||
if (!(WindowObject = UserGetWindowObject(hwnd)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
|
@ -1746,13 +1746,13 @@ NtUserGetMenuBarInfo(
|
|||
|
||||
if (!(MenuObject = UserGetMenuObject(hMenu)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_MENU_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_MENU_HANDLE);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
if (pmbi->cbSize != sizeof(MENUBARINFO))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
|
@ -2097,7 +2097,7 @@ UserMenuInfo(
|
|||
}
|
||||
if(Size < sizeof(MENUINFO) || sizeof(ROSMENUINFO) < Size)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return( FALSE);
|
||||
}
|
||||
Status = MmCopyFromCaller(&MenuInfo, UnsafeMenuInfo, Size);
|
||||
|
@ -2205,7 +2205,7 @@ UserMenuItemInfo(
|
|||
&& FIELD_OFFSET(MENUITEMINFOW, hbmpItem) != Size
|
||||
&& sizeof(ROSMENUITEMINFO) != Size)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return( FALSE);
|
||||
}
|
||||
Status = MmCopyFromCaller(&ItemInfo, UnsafeItemInfo, Size);
|
||||
|
@ -2219,7 +2219,7 @@ UserMenuItemInfo(
|
|||
if (FIELD_OFFSET(MENUITEMINFOW, hbmpItem) == Size
|
||||
&& 0 != (ItemInfo.fMask & MIIM_BITMAP))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return( FALSE);
|
||||
}
|
||||
|
||||
|
@ -2227,7 +2227,7 @@ UserMenuItemInfo(
|
|||
(ByPosition ? MF_BYPOSITION : MF_BYCOMMAND),
|
||||
NULL, &MenuItem, NULL) < 0)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return( FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -529,7 +529,7 @@ IntDispatchMessage(PMSG pMsg)
|
|||
|
||||
if ( Window->head.pti != pti)
|
||||
{
|
||||
SetLastWin32Error( ERROR_MESSAGE_SYNC_ONLY );
|
||||
EngSetLastError( ERROR_MESSAGE_SYNC_ONLY );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -912,7 +912,7 @@ UserPostThreadMessage( DWORD idThread,
|
|||
|
||||
if (FindMsgMemory(Msg) != 0)
|
||||
{
|
||||
SetLastWin32Error(ERROR_MESSAGE_SYNC_ONLY );
|
||||
EngSetLastError(ERROR_MESSAGE_SYNC_ONLY );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -976,7 +976,7 @@ UserPostMessage( HWND Wnd,
|
|||
Status = CopyMsgToKernelMem(&KernelModeMsg, &Message, MsgMemoryEntry);
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
co_IntSendMessageNoWait(KernelModeMsg.hwnd,
|
||||
|
@ -992,7 +992,7 @@ UserPostMessage( HWND Wnd,
|
|||
|
||||
if (MsgMemoryEntry)
|
||||
{
|
||||
SetLastWin32Error(ERROR_MESSAGE_SYNC_ONLY );
|
||||
EngSetLastError(ERROR_MESSAGE_SYNC_ONLY );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1196,7 +1196,7 @@ MSDN says:
|
|||
To get extended error information, call GetLastError. If GetLastError
|
||||
returns ERROR_TIMEOUT, then the function timed out.
|
||||
*/
|
||||
SetLastWin32Error(ERROR_TIMEOUT);
|
||||
EngSetLastError(ERROR_TIMEOUT);
|
||||
RETURN( FALSE);
|
||||
}
|
||||
else if (! NT_SUCCESS(Status))
|
||||
|
@ -1233,7 +1233,7 @@ co_IntSendMessageTimeout( HWND hWnd,
|
|||
DesktopWindow = UserGetWindowObject(IntGetDesktopWindow());
|
||||
if (NULL == DesktopWindow)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INTERNAL_ERROR);
|
||||
EngSetLastError(ERROR_INTERNAL_ERROR);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1446,7 +1446,7 @@ co_IntDoSendMessage( HWND hWnd,
|
|||
Status = CopyMsgToKernelMem(&KernelModeMsg, &UserModeMsg, MsgMemoryEntry);
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return (dsm ? 0 : -1);
|
||||
}
|
||||
|
||||
|
@ -1471,7 +1471,7 @@ co_IntDoSendMessage( HWND hWnd,
|
|||
Status = CopyMsgToUserMem(&UserModeMsg, &KernelModeMsg);
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return(dsm ? 0 : -1);
|
||||
}
|
||||
|
||||
|
@ -1488,7 +1488,7 @@ UserSendNotifyMessage( HWND hWnd,
|
|||
|
||||
if (FindMsgMemory(Msg) != 0)
|
||||
{
|
||||
SetLastWin32Error(ERROR_MESSAGE_SYNC_ONLY );
|
||||
EngSetLastError(ERROR_MESSAGE_SYNC_ONLY );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1646,7 +1646,7 @@ NtUserGetMessage(PMSG pMsg,
|
|||
|
||||
if ( (MsgFilterMin|MsgFilterMax) & ~WM_MAXIMUM )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1688,7 +1688,7 @@ NtUserPeekMessage( PMSG pMsg,
|
|||
|
||||
if ( RemoveMsg & PM_BADMSGFLAGS )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_FLAGS);
|
||||
EngSetLastError(ERROR_INVALID_FLAGS);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2145,7 +2145,7 @@ NtUserWaitForInputIdle( IN HANDLE hProcess,
|
|||
{
|
||||
ObDereferenceObject(Process);
|
||||
UserLeave();
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return WAIT_FAILED;
|
||||
}
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ NtUserGetGUIThreadInfo(
|
|||
|
||||
if(SafeGui.cbSize != sizeof(GUITHREADINFO))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN( FALSE);
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ NtUserGetGUIThreadInfo(
|
|||
Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)idThread, &Thread);
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
RETURN( FALSE);
|
||||
}
|
||||
Desktop = ((PTHREADINFO)Thread->Tcb.Win32Thread)->rpdesk;
|
||||
|
@ -227,7 +227,7 @@ NtUserGetGUIThreadInfo(
|
|||
{
|
||||
if(idThread && Thread)
|
||||
ObDereferenceObject(Thread);
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
RETURN( FALSE);
|
||||
}
|
||||
|
||||
|
@ -305,7 +305,7 @@ NtUserGetGuiResources(
|
|||
if(!W32Process)
|
||||
{
|
||||
ObDereferenceObject(Process);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN( 0);
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ NtUserGetGuiResources(
|
|||
}
|
||||
default:
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,14 +101,14 @@ UserGetMonitorObject(IN HMONITOR hMonitor)
|
|||
|
||||
if (!hMonitor)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_MONITOR_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_MONITOR_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Monitor = (PMONITOR)UserGetObject(gHandleTable, hMonitor, otMonitor);
|
||||
if (!Monitor)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_MONITOR_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_MONITOR_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -523,7 +523,7 @@ NtUserEnumDisplayMonitors(
|
|||
safeHMonitorList = ExAllocatePoolWithTag(PagedPool, sizeof (HMONITOR) * listSize, USERTAG_MONITORRECTS);
|
||||
if (safeHMonitorList == NULL)
|
||||
{
|
||||
/* FIXME: SetLastWin32Error? */
|
||||
/* FIXME: EngSetLastError? */
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -533,7 +533,7 @@ NtUserEnumDisplayMonitors(
|
|||
if (safeRectList == NULL)
|
||||
{
|
||||
ExFreePoolWithTag(safeHMonitorList, USERTAG_MONITORRECTS);
|
||||
/* FIXME: SetLastWin32Error? */
|
||||
/* FIXME: EngSetLastError? */
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -773,7 +773,7 @@ NtUserMonitorFromRect(
|
|||
USERTAG_MONITORRECTS);
|
||||
if (hMonitorList == NULL)
|
||||
{
|
||||
/* FIXME: SetLastWin32Error? */
|
||||
/* FIXME: EngSetLastError? */
|
||||
return (HMONITOR)NULL;
|
||||
}
|
||||
|
||||
|
@ -783,7 +783,7 @@ NtUserMonitorFromRect(
|
|||
if (rectList == NULL)
|
||||
{
|
||||
ExFreePoolWithTag(hMonitorList, USERTAG_MONITORRECTS);
|
||||
/* FIXME: SetLastWin32Error? */
|
||||
/* FIXME: EngSetLastError? */
|
||||
return (HMONITOR)NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,13 +40,13 @@ NtUserAttachThreadInput(
|
|||
Status = PsLookupThreadByThreadId((HANDLE)idAttach, &Thread);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
goto Exit;
|
||||
}
|
||||
Status = PsLookupThreadByThreadId((HANDLE)idAttachTo, &ThreadTo);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
ObDereferenceObject(Thread);
|
||||
goto Exit;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ NtUserGetMouseMovePointsEx(
|
|||
if ((cbSize != sizeof(MOUSEMOVEPOINT)) || (nBufPoints < 0) || (nBufPoints > 64))
|
||||
{
|
||||
UserLeave();
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ NtUserGetMouseMovePointsEx(
|
|||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
SetLastNtError(_SEH2_GetExceptionCode());
|
||||
SetLastWin32Error(ERROR_NOACCESS);
|
||||
EngSetLastError(ERROR_NOACCESS);
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
|
@ -316,7 +316,7 @@ NtUserGetMouseMovePointsEx(
|
|||
case GMMP_USE_HIGH_RESOLUTION_POINTS:
|
||||
break;
|
||||
default:
|
||||
SetLastWin32Error(GMMP_ERR_POINT_NOT_FOUND);
|
||||
EngSetLastError(GMMP_ERR_POINT_NOT_FOUND);
|
||||
return GMMP_ERR_POINT_NOT_FOUND;
|
||||
}
|
||||
*/
|
||||
|
|
|
@ -220,7 +220,7 @@ PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type
|
|||
|
||||
if (!(entry = handle_to_entry(ht, handle )) || entry->type != type)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
return entry->ptr;
|
||||
|
|
|
@ -1083,7 +1083,7 @@ NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase)
|
|||
Status = MmCopyToCaller(UnsafeRect, &Rect, sizeof(RECTL));
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -1139,7 +1139,7 @@ NtUserRedrawWindow(
|
|||
_SEH2_END
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(RtlNtStatusToDosError(Status));
|
||||
EngSetLastError(RtlNtStatusToDosError(Status));
|
||||
RETURN( FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -1149,7 +1149,7 @@ NtUserRedrawWindow(
|
|||
RDW_ERASENOW|RDW_UPDATENOW|RDW_ALLCHILDREN|RDW_NOCHILDREN) )
|
||||
{
|
||||
/* RedrawWindow fails only in case that flags are invalid */
|
||||
SetLastWin32Error(ERROR_INVALID_FLAGS);
|
||||
EngSetLastError(ERROR_INVALID_FLAGS);
|
||||
RETURN( FALSE);
|
||||
}
|
||||
|
||||
|
@ -2075,7 +2075,7 @@ NtUserPrintWindow(
|
|||
if ( (nFlags & PW_CLIENTONLY) == nFlags)
|
||||
Ret = IntPrintWindow( Window, hdcBlt, nFlags);
|
||||
else
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ co_IntGetScrollInfo(PWND Window, INT nBar, LPSCROLLINFO lpsi)
|
|||
|
||||
if(!SBID_IS_VALID(nBar))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ NEWco_IntGetScrollInfo(
|
|||
|
||||
if (!SBID_IS_VALID(nBar))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
|
|||
|
||||
if(!SBID_IS_VALID(nBar))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", nBar);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -305,12 +305,12 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
|
|||
if (lpsi->cbSize != sizeof(SCROLLINFO) &&
|
||||
lpsi->cbSize != (sizeof(SCROLLINFO) - sizeof(lpsi->nTrackPos)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
if (lpsi->fMask & ~(SIF_ALL | SIF_DISABLENOSCROLL))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -442,7 +442,7 @@ co_IntGetScrollBarInfo(PWND Window, LONG idObject, PSCROLLBARINFO psbi)
|
|||
|
||||
if(!SBID_IS_VALID(Bar))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", Bar);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ NtUserEnableScrollBar(
|
|||
|
||||
if(wSBflags != SB_BOTH && !SBID_IS_VALID(wSBflags))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", wSBflags);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
@ -776,7 +776,7 @@ NtUserSetScrollBarInfo(
|
|||
Obj = SBOBJ_TO_SBID(idObject);
|
||||
if(!SBID_IS_VALID(Obj))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d\n", Obj);
|
||||
RETURN( FALSE);
|
||||
}
|
||||
|
@ -876,7 +876,7 @@ co_UserShowScrollBar(PWND Wnd, int wBar, DWORD bShow)
|
|||
Style = 0;
|
||||
break;
|
||||
default:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return( FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register)
|
|||
&Process);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(RtlNtStatusToDosError(Status));
|
||||
EngSetLastError(RtlNtStatusToDosError(Status));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ NtUserCallNoParam(DWORD Routine)
|
|||
|
||||
default:
|
||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
break;
|
||||
}
|
||||
RETURN(Result);
|
||||
|
@ -205,7 +205,7 @@ NtUserCallOneParam(
|
|||
|
||||
if (!(CurIcon = IntCreateCurIconHandle()))
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ NtUserCallOneParam(
|
|||
ppi->dwLayout = Param;
|
||||
RETURN(TRUE);
|
||||
}
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
case ONEPARAM_ROUTINE_GETPROCDEFLAYOUT:
|
||||
|
@ -322,7 +322,7 @@ NtUserCallOneParam(
|
|||
PDWORD pdwLayout;
|
||||
if ( PsGetCurrentProcess() == CsrProcess)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_ACCESS);
|
||||
EngSetLastError(ERROR_INVALID_ACCESS);
|
||||
RETURN(FALSE);
|
||||
}
|
||||
ppi = PsGetCurrentProcessWin32Process();
|
||||
|
@ -344,7 +344,7 @@ NtUserCallOneParam(
|
|||
}
|
||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
|
||||
Routine, Param);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN( 0);
|
||||
|
||||
CLEANUP:
|
||||
|
@ -466,7 +466,7 @@ NtUserCallTwoParam(
|
|||
}
|
||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
|
||||
Routine, Param1, Param2);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN( 0);
|
||||
|
||||
CLEANUP:
|
||||
|
|
|
@ -36,7 +36,7 @@ PWINSTATION_OBJECT gpwinstaCurrent = NULL;
|
|||
#define REQ_INTERACTIVE_WINSTA(err) \
|
||||
if (gpwinstaCurrent != InputWindowStation) \
|
||||
{ \
|
||||
SetLastWin32Error(err); \
|
||||
EngSetLastError(err); \
|
||||
return 0; \
|
||||
}
|
||||
|
||||
|
@ -1466,7 +1466,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
|
|||
|
||||
default:
|
||||
DPRINT1("Invalid SPI value: %d\n", uiAction);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ IntSetTimer( PWND Window,
|
|||
{
|
||||
IntUnlockWindowlessTimerBitmap();
|
||||
DPRINT1("Unable to find a free window-less timer id\n");
|
||||
SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
|
||||
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
||||
ASSERT(FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ SystemTimerSet( PWND Window,
|
|||
{
|
||||
if (Window && Window->head.pti->pEThread->ThreadsProcess != PsGetCurrentProcess())
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
DPRINT("SysemTimerSet: Access Denied!\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -57,14 +57,14 @@ BOOL FASTCALL UserUpdateUiState(PWND Wnd, WPARAM wParam)
|
|||
|
||||
if (Flags & ~(UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch (Action)
|
||||
{
|
||||
case UIS_INITIALIZE:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
|
||||
case UIS_SET:
|
||||
|
@ -112,21 +112,21 @@ PWND FASTCALL UserGetWindowObject(HWND hWnd)
|
|||
ti = GetW32ThreadInfo();
|
||||
if (ti == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hWnd)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Window = (PWND)UserGetObject(gHandleTable, hWnd, otWindow);
|
||||
if (!Window || 0 != (Window->state & WNDS_DESTROYED))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ IntWinListChildren(PWND Window)
|
|||
if(!List)
|
||||
{
|
||||
DPRINT1("Failed to allocate memory for children array\n");
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
for (Child = Window->spwndChild, Index = 0;
|
||||
|
@ -666,7 +666,7 @@ IntSetMenu(
|
|||
|
||||
if ((Wnd->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -695,7 +695,7 @@ IntSetMenu(
|
|||
{
|
||||
IntReleaseMenuObject(OldMenu);
|
||||
}
|
||||
SetLastWin32Error(ERROR_INVALID_MENU_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_MENU_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (NULL != NewMenu->MenuInfo.Wnd)
|
||||
|
@ -705,7 +705,7 @@ IntSetMenu(
|
|||
{
|
||||
IntReleaseMenuObject(OldMenu);
|
||||
}
|
||||
SetLastWin32Error(ERROR_INVALID_MENU_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_MENU_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1101,7 +1101,7 @@ co_IntSetParent(PWND Wnd, PWND WndNewParent)
|
|||
/* Some applications try to set a child as a parent */
|
||||
if (IntIsChildWindow(Wnd, WndNewParent))
|
||||
{
|
||||
SetLastWin32Error( ERROR_INVALID_PARAMETER );
|
||||
EngSetLastError( ERROR_INVALID_PARAMETER );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1736,7 +1736,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
|||
|
||||
if (!CallProc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
DPRINT1("Warning: Unable to create CallProc for edit control. Control may not operate correctly! hwnd %x\n",hWnd);
|
||||
}
|
||||
else
|
||||
|
@ -1903,7 +1903,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
|||
else if ((Cs->style & (WS_CHILD|WS_POPUP)) == WS_CHILD)
|
||||
{
|
||||
DPRINT1("Cannot create a child window without a parrent!\n");
|
||||
SetLastWin32Error(ERROR_TLW_WITH_WSCHILD);
|
||||
EngSetLastError(ERROR_TLW_WITH_WSCHILD);
|
||||
RETURN(NULL); /* WS_CHILD needs a parent, but WS_POPUP doesn't */
|
||||
}
|
||||
|
||||
|
@ -2373,7 +2373,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
|
|||
if ( (Window->head.pti->pEThread != PsGetCurrentThread()) ||
|
||||
Window->head.pti != PsGetCurrentThreadWin32Thread() )
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2652,7 +2652,7 @@ NtUserFindWindowEx(HWND hwndParent,
|
|||
}
|
||||
else if (!IS_ATOM(ClassName.Buffer))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
_SEH2_LEAVE;
|
||||
}
|
||||
|
||||
|
@ -2686,7 +2686,7 @@ NtUserFindWindowEx(HWND hwndParent,
|
|||
if (ClassName.Length == 0 && ClassName.Buffer != NULL &&
|
||||
!IS_ATOM(ClassName.Buffer))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN(NULL);
|
||||
}
|
||||
else if (ClassAtom == (RTL_ATOM)0)
|
||||
|
@ -3067,13 +3067,13 @@ co_UserSetParent(HWND hWndChild, HWND hWndNewParent)
|
|||
|
||||
if (IntIsBroadcastHwnd(hWndChild) || IntIsBroadcastHwnd(hWndNewParent))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return( NULL);
|
||||
}
|
||||
|
||||
if (hWndChild == IntGetDesktopWindow())
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return( NULL);
|
||||
}
|
||||
|
||||
|
@ -3396,7 +3396,7 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
|
|||
|
||||
if (hWnd == IntGetDesktopWindow())
|
||||
{
|
||||
SetLastWin32Error(STATUS_ACCESS_DENIED);
|
||||
EngSetLastError(STATUS_ACCESS_DENIED);
|
||||
return( 0);
|
||||
}
|
||||
|
||||
|
@ -3409,7 +3409,7 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
|
|||
{
|
||||
if ((Index + sizeof(LONG)) > Window->cbwndExtra)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_INDEX);
|
||||
EngSetLastError(ERROR_INVALID_INDEX);
|
||||
return( 0);
|
||||
}
|
||||
|
||||
|
@ -3463,7 +3463,7 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
|
|||
if ( Window->head.pti->ppi != PsGetCurrentProcessWin32Process() ||
|
||||
Window->fnid & FNID_FREED)
|
||||
{
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return( 0);
|
||||
}
|
||||
OldValue = (LONG)IntSetWindowProc(Window,
|
||||
|
@ -3497,7 +3497,7 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
|
|||
|
||||
default:
|
||||
DPRINT1("NtUserSetWindowLong(): Unsupported index %d\n", Index);
|
||||
SetLastWin32Error(ERROR_INVALID_INDEX);
|
||||
EngSetLastError(ERROR_INVALID_INDEX);
|
||||
OldValue = 0;
|
||||
break;
|
||||
}
|
||||
|
@ -3566,14 +3566,14 @@ NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewValue)
|
|||
default:
|
||||
if (Index < 0)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_INDEX);
|
||||
EngSetLastError(ERROR_INVALID_INDEX);
|
||||
RETURN( 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (Index > Window->cbwndExtra - sizeof(WORD))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN( 0);
|
||||
}
|
||||
|
||||
|
@ -3768,7 +3768,7 @@ NtUserRegisterWindowMessage(PUNICODE_STRING MessageNameUnsafe)
|
|||
|
||||
if(MessageNameUnsafe == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN( 0);
|
||||
}
|
||||
|
||||
|
@ -4328,7 +4328,7 @@ NtUserDefSetText(HWND hWnd, PLARGE_STRING WindowText)
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
Ret = FALSE;
|
||||
goto Exit;
|
||||
}
|
||||
|
@ -4378,7 +4378,7 @@ NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
|
|||
|
||||
if(lpString && (nMaxCount <= 1))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RETURN( 0);
|
||||
}
|
||||
|
||||
|
@ -4499,7 +4499,7 @@ NtUserValidateHandleSecure(
|
|||
PUSER_HANDLE_ENTRY entry;
|
||||
if (!(entry = handle_to_entry(gHandleTable, handle )))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
uType = entry->type;
|
||||
|
@ -4548,7 +4548,7 @@ NtUserValidateHandleSecure(
|
|||
return UserGetCallProcInfo( handle, &Proc );
|
||||
}
|
||||
default:
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -78,7 +78,7 @@ UserGetClientOrigin(PWND Window, LPPOINT Point)
|
|||
|
||||
if(!Point)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ UserGetClientOrigin(PWND Window, LPPOINT Point)
|
|||
|
||||
if(!Ret)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1011,14 +1011,14 @@ co_WinPosSetWindowPos(
|
|||
/* Fix up the flags. */
|
||||
if (!WinPosFixupFlags(&WinPos, Window))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Does the window still exist? */
|
||||
if (!IntIsWindow(WinPos.hwnd))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ IntValidateWindowStationHandle(
|
|||
if (WindowStation == NULL)
|
||||
{
|
||||
// DPRINT1("Invalid window station handle\n");
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return STATUS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
|
@ -1006,7 +1006,7 @@ NtUserSetProcessWindowStation(HWINSTA hWindowStation)
|
|||
if(PsGetCurrentProcess() == CsrProcess)
|
||||
{
|
||||
DPRINT1("CSRSS is not allowed to change it's window station!!!\n");
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1058,7 +1058,7 @@ NtUserLockWindowStation(HWINSTA hWindowStation)
|
|||
if(PsGetCurrentProcessWin32Process() != LogonProcess)
|
||||
{
|
||||
DPRINT1("Unauthorized process attempted to lock the window station!\n");
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1103,7 +1103,7 @@ NtUserUnlockWindowStation(HWINSTA hWindowStation)
|
|||
if(PsGetCurrentProcessWin32Process() != LogonProcess)
|
||||
{
|
||||
DPRINT1("Unauthorized process attempted to unlock the window station!\n");
|
||||
SetLastWin32Error(ERROR_ACCESS_DENIED);
|
||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ IntArc( DC *dc,
|
|||
if (!pbrushPen)
|
||||
{
|
||||
DPRINT1("Arc Fail 1\n");
|
||||
SetLastWin32Error(ERROR_INTERNAL_ERROR);
|
||||
EngSetLastError(ERROR_INTERNAL_ERROR);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ IntArc( DC *dc,
|
|||
{
|
||||
DPRINT1("Arc Fail 2\n");
|
||||
PEN_UnlockPen(pbrushPen);
|
||||
SetLastWin32Error(ERROR_INTERNAL_ERROR);
|
||||
EngSetLastError(ERROR_INTERNAL_ERROR);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ NtGdiAngleArc(
|
|||
pDC = DC_LockDc (hDC);
|
||||
if(!pDC)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (pDC->dctype == DC_TYPE_INFO)
|
||||
|
@ -355,7 +355,7 @@ NtGdiArcInternal(
|
|||
dc = DC_LockDc (hDC);
|
||||
if(!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (dc->dctype == DC_TYPE_INFO)
|
||||
|
|
|
@ -53,7 +53,7 @@ NtGdiAlphaBlend(
|
|||
|
||||
if (WidthDest < 0 || HeightDest < 0 || WidthSrc < 0 || HeightSrc < 0)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ NtGdiAlphaBlend(
|
|||
if ((NULL == DCDest) || (NULL == DCSrc))
|
||||
{
|
||||
DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to NtGdiAlphaBlend\n", hDCDest, hDCSrc);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
if(DCSrc) GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
|
||||
if(DCDest) GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
|
||||
return FALSE;
|
||||
|
@ -342,7 +342,7 @@ NtGdiTransparentBlt(
|
|||
if ((NULL == DCDest) || (NULL == DCSrc))
|
||||
{
|
||||
DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to NtGdiAlphaBlend\n", hdcDst, hdcSrc);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
if(DCSrc) GDIOBJ_UnlockObjByPtr(&DCSrc->BaseObject);
|
||||
if(DCDest) GDIOBJ_UnlockObjByPtr(&DCDest->BaseObject);
|
||||
return FALSE;
|
||||
|
@ -659,7 +659,7 @@ GreStretchBltMask(
|
|||
|
||||
if (0 == WidthDest || 0 == HeightDest || 0 == WidthSrc || 0 == HeightSrc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -958,7 +958,7 @@ IntGdiPolyPatBlt(
|
|||
pdc = DC_LockDc(hDC);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1017,7 +1017,7 @@ NtGdiPatBlt(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (dc == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (dc->dctype == DC_TYPE_INFO)
|
||||
|
@ -1035,7 +1035,7 @@ NtGdiPatBlt(
|
|||
pbrush = BRUSH_LockBrush(pdcattr->hbrush);
|
||||
if (pbrush == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
DC_UnlockDc(dc);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1065,7 +1065,7 @@ NtGdiPolyPatBlt(
|
|||
rb = ExAllocatePoolWithTag(PagedPool, sizeof(PATRECT) * cRects, TAG_PATBLT);
|
||||
if (!rb)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
_SEH2_TRY
|
||||
|
|
|
@ -174,14 +174,14 @@ NtGdiCreateBitmap(
|
|||
{
|
||||
DPRINT1("Width = %d, Height = %d BitsPixel = %d\n",
|
||||
nWidth, nHeight, cBitsPixel);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(WIDTH_BYTES_ALIGN16(nWidth, cBitsPixel)*nHeight >= 0x8000000)
|
||||
{
|
||||
/* I just can't get enough, I just can't get enough */
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -314,7 +314,7 @@ IntCreateCompatibleBitmap(
|
|||
|
||||
if (!psurf->ppal)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ NtGdiCreateCompatibleBitmap(
|
|||
|
||||
if (Width <= 0 || Height <= 0 || (Width * Height) > 0x3FFFFFFF)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -372,7 +372,7 @@ NtGdiCreateCompatibleBitmap(
|
|||
|
||||
if (NULL == Dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -397,7 +397,7 @@ NtGdiGetBitmapDimension(
|
|||
psurfBmp = SURFACE_LockSurface(hBitmap);
|
||||
if (psurfBmp == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -432,7 +432,7 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
|
|||
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
@ -604,7 +604,7 @@ NtGdiGetBitmapBits(
|
|||
psurf = SURFACE_LockSurface(hBitmap);
|
||||
if (!psurf)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -658,7 +658,7 @@ NtGdiSetBitmapBits(
|
|||
psurf = SURFACE_LockSurface(hBitmap);
|
||||
if (psurf == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -695,7 +695,7 @@ NtGdiSetBitmapDimension(
|
|||
psurf = SURFACE_LockSurface(hBitmap);
|
||||
if (psurf == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ IntGdiCreateDIBBrush(
|
|||
|
||||
if (BitmapInfo->bmiHeader.biSize < sizeof(BITMAPINFOHEADER))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ IntGdiCreateDIBBrush(
|
|||
hPattern = DIB_CreateDIBSection(NULL, BitmapInfo, ColorSpec, &pvDIBits, NULL, 0, 0);
|
||||
if (hPattern == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
RtlCopyMemory(pvDIBits,
|
||||
|
@ -282,7 +282,7 @@ IntGdiCreateDIBBrush(
|
|||
if (pbrush == NULL)
|
||||
{
|
||||
GreDeleteObject(hPattern);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
hBrush = pbrush->BaseObject.hHmgr;
|
||||
|
@ -316,7 +316,7 @@ IntGdiCreateHatchBrush(
|
|||
hPattern = GreCreateBitmap(8, 8, 1, 1, (LPBYTE)HatchBrushes[Style]);
|
||||
if (hPattern == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ IntGdiCreateHatchBrush(
|
|||
if (pbrush == NULL)
|
||||
{
|
||||
GreDeleteObject(hPattern);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
hBrush = pbrush->BaseObject.hHmgr;
|
||||
|
@ -352,7 +352,7 @@ IntGdiCreatePatternBrush(
|
|||
hPattern = BITMAP_CopyBitmap(hBitmap);
|
||||
if (hPattern == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,7 @@ IntGdiCreatePatternBrush(
|
|||
if (pbrush == NULL)
|
||||
{
|
||||
GreDeleteObject(hPattern);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
hBrush = pbrush->BaseObject.hHmgr;
|
||||
|
@ -387,7 +387,7 @@ IntGdiCreateSolidBrush(
|
|||
pbrush = BRUSH_AllocBrushWithHandle();
|
||||
if (pbrush == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
hBrush = pbrush->BaseObject.hHmgr;
|
||||
|
@ -412,7 +412,7 @@ IntGdiCreateNullBrush(VOID)
|
|||
pbrush = BRUSH_AllocBrushWithHandle();
|
||||
if (pbrush == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
hBrush = pbrush->BaseObject.hHmgr;
|
||||
|
@ -457,7 +457,7 @@ NtGdiCreateDIBBrush(
|
|||
SafeBitmapInfoAndData = EngAllocMem(FL_ZERO_MEMORY, BitmapInfoSize, TAG_DIB);
|
||||
if (SafeBitmapInfoAndData == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -535,7 +535,7 @@ NtGdiSetBrushOrg(HDC hDC, INT XOrg, INT YOrg, LPPOINT Point)
|
|||
dc = DC_LockDc(hDC);
|
||||
if (dc == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
|
|
@ -84,12 +84,12 @@ GdiSelectVisRgn(HDC hdc, HRGN hrgn)
|
|||
|
||||
if (!hrgn)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return ERROR;
|
||||
}
|
||||
if (!(dc = DC_LockDc(hdc)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ int FASTCALL GdiExtSelectClipRgn(PDC dc,
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return ERROR;
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ int APIENTRY NtGdiExtSelectClipRgn(HDC hDC,
|
|||
|
||||
if (!(dc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ int APIENTRY NtGdiExcludeClipRect(HDC hDC,
|
|||
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
@ -332,7 +332,7 @@ int APIENTRY NtGdiIntersectClipRect(HDC hDC,
|
|||
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
@ -375,7 +375,7 @@ int APIENTRY NtGdiOffsetClipRgn(HDC hDC,
|
|||
|
||||
if(!(dc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
@ -404,7 +404,7 @@ BOOL APIENTRY NtGdiPtVisible(HDC hDC,
|
|||
|
||||
if(!(dc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -425,7 +425,7 @@ BOOL APIENTRY NtGdiRectVisible(HDC hDC,
|
|||
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -526,7 +526,7 @@ int APIENTRY NtGdiSetMetaRgn(HDC hDC)
|
|||
|
||||
if (!pDC)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return ERROR;
|
||||
}
|
||||
Ret = IntGdiSetMetaRgn(pDC);
|
||||
|
|
|
@ -194,13 +194,13 @@ NtGdiGetTransform(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (!XForm)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -267,14 +267,14 @@ NtGdiTransformPoints(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!UnsafePtsIn || !UnsafePtOut || Count <= 0)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ NtGdiTransformPoints(
|
|||
if (!Points)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ NtGdiTransformPoints(
|
|||
{
|
||||
DC_UnlockDc(dc);
|
||||
ExFreePoolWithTag(Points, TAG_COORD);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ NtGdiModifyWorldTransform(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -410,7 +410,7 @@ NtGdiOffsetViewportOrgEx(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -467,7 +467,7 @@ NtGdiOffsetWindowOrgEx(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -523,7 +523,7 @@ NtGdiScaleViewportExtEx(
|
|||
pDC = DC_LockDc(hDC);
|
||||
if (!pDC)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = pDC->pdcattr;
|
||||
|
@ -608,7 +608,7 @@ NtGdiScaleWindowExtEx(
|
|||
pDC = DC_LockDc(hDC);
|
||||
if (!pDC)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = pDC->pdcattr;
|
||||
|
@ -766,7 +766,7 @@ NtGdiSetViewportOrgEx(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -818,7 +818,7 @@ NtGdiSetWindowOrgEx(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -948,7 +948,7 @@ NtGdiSetLayout(
|
|||
pdc = DC_LockDc(hdc);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
pdcattr = pdc->pdcattr;
|
||||
|
@ -973,7 +973,7 @@ NtGdiGetDeviceWidth(
|
|||
dc = DC_LockDc(hdc);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
Ret = dc->erclWindow.right - dc->erclWindow.left;
|
||||
|
@ -993,7 +993,7 @@ NtGdiMirrorWindowOrg(
|
|||
dc = DC_LockDc(hdc);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
IntMirrorWindowOrg(dc);
|
||||
|
@ -1250,14 +1250,14 @@ NtGdiGetDCPoint(
|
|||
|
||||
if (!Point)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pdc = DC_LockDc(hDC);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1293,7 +1293,7 @@ NtGdiGetDCPoint(
|
|||
break;
|
||||
|
||||
default:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Ret = FALSE;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -782,7 +782,7 @@ IntGdiDeleteDC(HDC hDC, BOOL Force)
|
|||
|
||||
if (DCToDelete == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -846,7 +846,7 @@ NtGdiDeleteObjectApp(HANDLE DCHandle)
|
|||
|
||||
if (!GDIOBJ_OwnedByCurrentProcess(DCHandle))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ NtGdiSelectClipPath(
|
|||
pdc = DC_LockDc(hDC);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = pdc->pdcattr;
|
||||
|
@ -367,7 +367,7 @@ NtGdiSelectClipPath(
|
|||
/* Check that path is closed */
|
||||
if (pPath->state != PATH_Closed)
|
||||
{
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
DC_UnlockDc(pdc);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -404,7 +404,7 @@ NtGdiGetDCObject(HDC hDC, INT ObjectType)
|
|||
|
||||
if(!(pdc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
pdcattr = pdc->pdcattr;
|
||||
|
@ -449,7 +449,7 @@ NtGdiGetDCObject(HDC hDC, INT ObjectType)
|
|||
|
||||
default:
|
||||
SelObject = NULL;
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ NtGdiRestoreDC(
|
|||
pdc = DC_LockDc(hdc);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ NtGdiRestoreDC(
|
|||
DPRINT("Illegal save level, requested: %ld, current: %ld\n",
|
||||
iSaveLevel, pdc->dclevel.lSaveDepth);
|
||||
DC_UnlockDc(pdc);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ NtGdiSaveDC(
|
|||
if (pdc == NULL)
|
||||
{
|
||||
DPRINT("Could not lock DC\n");
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ IntGdiSetBkColor(HDC hDC, COLORREF color)
|
|||
|
||||
if (!(dc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return CLR_INVALID;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -37,7 +37,7 @@ IntGdiSetBkMode(HDC hDC, INT Mode)
|
|||
|
||||
if (!(dc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return CLR_INVALID;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -60,7 +60,7 @@ IntGdiSetTextAlign(HDC hDC,
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -82,7 +82,7 @@ IntGdiSetTextColor(HDC hDC,
|
|||
pdc = DC_LockDc(hDC);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return CLR_INVALID;
|
||||
}
|
||||
pdcattr = pdc->pdcattr;
|
||||
|
@ -104,7 +104,7 @@ DCU_SetDcUndeletable(HDC hDC)
|
|||
PDC dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ IntGdiSetHookFlags(HDC hDC, WORD Flags)
|
|||
|
||||
if (NULL == dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -250,14 +250,14 @@ NtGdiGetDCDword(
|
|||
|
||||
if (!Result)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pdc = DC_LockDc(hDC);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = pdc->pdcattr;
|
||||
|
@ -306,7 +306,7 @@ NtGdiGetDCDword(
|
|||
break;
|
||||
|
||||
default:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Ret = FALSE;
|
||||
break;
|
||||
}
|
||||
|
@ -352,14 +352,14 @@ NtGdiGetAndSetDCDword(
|
|||
|
||||
if (!Result)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pdc = DC_LockDc(hDC);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = pdc->pdcattr;
|
||||
|
@ -393,7 +393,7 @@ NtGdiGetAndSetDCDword(
|
|||
case GdiGetSetMapperFlagsInternal:
|
||||
if (dwIn & ~1)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Ret = FALSE;
|
||||
break;
|
||||
}
|
||||
|
@ -408,7 +408,7 @@ NtGdiGetAndSetDCDword(
|
|||
case GdiGetSetArcDirection:
|
||||
if (dwIn != AD_COUNTERCLOCKWISE && dwIn != AD_CLOCKWISE)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Ret = FALSE;
|
||||
break;
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ NtGdiGetAndSetDCDword(
|
|||
break;
|
||||
|
||||
default:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Ret = FALSE;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -136,14 +136,14 @@ IntSetDIBColorTable(
|
|||
if (psurf == NULL)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (psurf->hSecure == NULL)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ IntSetDIBColorTable(
|
|||
if (psurf->ppal == NULL)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -208,14 +208,14 @@ IntGetDIBColorTable(
|
|||
if (psurf == NULL)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (psurf->hSecure == NULL)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ IntGetDIBColorTable(
|
|||
if (psurf->ppal == NULL)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,7 @@ IntSetDIBits(
|
|||
if (0 == SourceBitmap)
|
||||
{
|
||||
DPRINT1("Error : Could not create a DIBSection.\n");
|
||||
SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
|
||||
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -375,7 +375,7 @@ NtGdiSetDIBits(
|
|||
Dc = DC_LockDc(hDC);
|
||||
if (NULL == Dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
if (Dc->dctype == DC_TYPE_INFO)
|
||||
|
@ -447,7 +447,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
|||
pDC = DC_LockDc(hDC);
|
||||
if (!pDC)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
if (pDC->dctype == DC_TYPE_INFO)
|
||||
|
@ -490,7 +490,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
|||
(PVOID) Bits);
|
||||
if (!hSourceBitmap)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
|
||||
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
||||
Status = STATUS_NO_MEMORY;
|
||||
goto Exit;
|
||||
}
|
||||
|
@ -508,7 +508,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
|||
hpalDIB = BuildDIBPalette(bmi);
|
||||
if (!hpalDIB)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
|
||||
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
||||
Status = STATUS_NO_MEMORY;
|
||||
goto Exit;
|
||||
}
|
||||
|
@ -517,7 +517,7 @@ NtGdiSetDIBitsToDeviceInternal(
|
|||
ppalDIB = PALETTE_LockPalette(hpalDIB);
|
||||
if (!ppalDIB)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
goto Exit;
|
||||
}
|
||||
|
@ -624,7 +624,7 @@ NtGdiGetDIBitsInternal(
|
|||
if(bitmap_type == -1)
|
||||
{
|
||||
DPRINT("Wrong bitmap format\n");
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
else if(bitmap_type == 0)
|
||||
|
@ -939,7 +939,7 @@ NtGdiGetDIBitsInternal(
|
|||
if(!hBmpDest)
|
||||
{
|
||||
DPRINT1("Unable to create a DIB Section!\n");
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
ScanLines = 0;
|
||||
goto done ;
|
||||
}
|
||||
|
@ -1038,14 +1038,14 @@ NtGdiStretchDIBitsInternal(
|
|||
safeBits = ExAllocatePoolWithTag(PagedPool, cjMaxBits, TAG_DIB);
|
||||
if(!safeBits)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(pdc = DC_LockDc(hDC)))
|
||||
{
|
||||
ExFreePoolWithTag(safeBits, TAG_DIB);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1227,7 +1227,7 @@ NtGdiCreateDIBitmapInternal(
|
|||
safeBits = ExAllocatePoolWithTag(PagedPool, cjMaxBits, TAG_DIB);
|
||||
if(!safeBits)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
@ -1302,7 +1302,7 @@ GreCreateDIBitmapInternal(
|
|||
Dc = DC_LockDc(hdcDest);
|
||||
if (!Dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
/* It's OK to set bpp=0 here, as IntCreateDIBitmap will create a compatible Bitmap
|
||||
|
@ -1380,7 +1380,7 @@ NtGdiCreateDIBSection(
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
}
|
||||
|
||||
if (bDesktopDC)
|
||||
|
@ -1473,7 +1473,7 @@ DIB_CreateDIBSection(
|
|||
PAGE_READWRITE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1533,13 +1533,13 @@ DIB_CreateDIBSection(
|
|||
0);
|
||||
if (!res)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
|
||||
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
||||
goto cleanup;
|
||||
}
|
||||
bmp = SURFACE_LockSurface(res);
|
||||
if (NULL == bmp)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
|
@ -1202,7 +1202,7 @@ IntFillRect( DC *dc,
|
|||
psurf = dc->dclevel.pSurface;
|
||||
if (psurf == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1276,7 +1276,7 @@ IntFillArc( PDC dc,
|
|||
if (!pbrush)
|
||||
{
|
||||
DPRINT1("FillArc Fail\n");
|
||||
SetLastWin32Error(ERROR_INTERNAL_ERROR);
|
||||
EngSetLastError(ERROR_INTERNAL_ERROR);
|
||||
return FALSE;
|
||||
}
|
||||
// Sort out alignment here.
|
||||
|
|
|
@ -49,7 +49,7 @@ IntGdiPolygon(PDC dc,
|
|||
|
||||
if (!Points || Count < 2 )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ NtGdiEllipse(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (dc == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (dc->dctype == DC_TYPE_INFO)
|
||||
|
@ -253,7 +253,7 @@ NtGdiEllipse(
|
|||
{
|
||||
DPRINT1("Ellipse Fail 1\n");
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(ERROR_INTERNAL_ERROR);
|
||||
EngSetLastError(ERROR_INTERNAL_ERROR);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -301,7 +301,7 @@ NtGdiEllipse(
|
|||
if (NULL == pFillBrushObj)
|
||||
{
|
||||
DPRINT1("FillEllipse Fail\n");
|
||||
SetLastWin32Error(ERROR_INTERNAL_ERROR);
|
||||
EngSetLastError(ERROR_INTERNAL_ERROR);
|
||||
ret = FALSE;
|
||||
}
|
||||
else
|
||||
|
@ -418,7 +418,7 @@ NtGdiPolyPolyDraw( IN HDC hDC,
|
|||
if (nInvalid != 0)
|
||||
{
|
||||
/* If at least one poly count is 0 or 1, fail */
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -428,7 +428,7 @@ NtGdiPolyPolyDraw( IN HDC hDC,
|
|||
TAG_SHAPE);
|
||||
if (!pTemp)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -465,7 +465,7 @@ NtGdiPolyPolyDraw( IN HDC hDC,
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
ExFreePool(pTemp);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ NtGdiPolyPolyDraw( IN HDC hDC,
|
|||
Ret = IntGdiPolyBezierTo(dc, SafePoints, *SafeCounts);
|
||||
break;
|
||||
default:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Ret = FALSE;
|
||||
}
|
||||
|
||||
|
@ -667,7 +667,7 @@ NtGdiRectangle(HDC hDC,
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (dc->dctype == DC_TYPE_INFO)
|
||||
|
@ -751,7 +751,7 @@ IntRoundRect(
|
|||
if (!pbrushLine)
|
||||
{
|
||||
/* Nothing to do, as we don't have a bitmap */
|
||||
SetLastWin32Error(ERROR_INTERNAL_ERROR);
|
||||
EngSetLastError(ERROR_INTERNAL_ERROR);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -787,7 +787,7 @@ IntRoundRect(
|
|||
if (NULL == pbrushFill)
|
||||
{
|
||||
DPRINT1("FillRound Fail\n");
|
||||
SetLastWin32Error(ERROR_INTERNAL_ERROR);
|
||||
EngSetLastError(ERROR_INTERNAL_ERROR);
|
||||
ret = FALSE;
|
||||
}
|
||||
else
|
||||
|
@ -839,7 +839,7 @@ NtGdiRoundRect(
|
|||
if ( !dc )
|
||||
{
|
||||
DPRINT1("NtGdiRoundRect() - hDC is invalid\n");
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
}
|
||||
else if (dc->dctype == DC_TYPE_INFO)
|
||||
{
|
||||
|
@ -885,7 +885,7 @@ GreGradientFill(
|
|||
pTriangle->Vertex2 >= nVertex ||
|
||||
pTriangle->Vertex3 >= nVertex)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -897,7 +897,7 @@ GreGradientFill(
|
|||
{
|
||||
if (pRect->UpperLeft >= nVertex || pRect->LowerRight >= nVertex)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -907,7 +907,7 @@ GreGradientFill(
|
|||
pdc = DC_LockDc(hdc);
|
||||
if(!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -991,7 +991,7 @@ NtGdiGradientFill(
|
|||
/* Validate parameters */
|
||||
if (!pVertex || !nVertex || !pMesh || !nMesh)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1005,7 +1005,7 @@ NtGdiGradientFill(
|
|||
cbMesh = nMesh * sizeof(GRADIENT_TRIANGLE);
|
||||
break;
|
||||
default:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1020,7 +1020,7 @@ NtGdiGradientFill(
|
|||
SafeVertex = ExAllocatePoolWithTag(PagedPool, cbVertex + cbMesh, TAG_SHAPE);
|
||||
if(!SafeVertex)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1070,7 +1070,7 @@ NtGdiExtFloodFill(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (dc->dctype == DC_TYPE_INFO)
|
||||
|
|
|
@ -34,7 +34,7 @@ GreGetKerningPairs(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ GreGetKerningPairs(
|
|||
|
||||
if (!TextObj)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -57,13 +57,13 @@ GreGetKerningPairs(
|
|||
{
|
||||
if (Count > NumPairs)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INSUFFICIENT_BUFFER);
|
||||
EngSetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
return 0;
|
||||
}
|
||||
pKP = ExAllocatePoolWithTag(PagedPool, Count * sizeof(KERNINGPAIR), TAG_GDITEXT);
|
||||
if (!pKP)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
ftGdiGetKerningPairs(FontGDI,Count,pKP);
|
||||
|
@ -132,7 +132,7 @@ FontGetObject(PTEXTOBJ TFont, INT Count, PVOID Buffer)
|
|||
break;
|
||||
|
||||
default:
|
||||
SetLastWin32Error(ERROR_BUFFER_OVERFLOW);
|
||||
EngSetLastError(ERROR_BUFFER_OVERFLOW);
|
||||
return 0;
|
||||
}
|
||||
return Count;
|
||||
|
@ -323,7 +323,7 @@ NtGdiAddFontResourceW(
|
|||
SafeFileName.Buffer = (PWSTR)ExAllocatePoolWithTag(PagedPool, SafeFileName.MaximumLength, TAG_STRING);
|
||||
if(!SafeFileName.Buffer)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ NtGdiGetFontData(
|
|||
Dc = DC_LockDc(hDC);
|
||||
if (Dc == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
pdcattr = Dc->pdcattr;
|
||||
|
@ -407,7 +407,7 @@ NtGdiGetFontData(
|
|||
|
||||
if (TextObj == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
|
||||
|
@ -441,7 +441,7 @@ NtGdiGetFontUnicodeRanges(
|
|||
pDc = DC_LockDc(hdc);
|
||||
if (!pDc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ NtGdiGetFontUnicodeRanges(
|
|||
|
||||
if ( TextObj == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
goto Exit;
|
||||
}
|
||||
FontGdi = ObjToGDI(TextObj->Font, FONT);
|
||||
|
@ -464,7 +464,7 @@ NtGdiGetFontUnicodeRanges(
|
|||
pgsSafe = ExAllocatePoolWithTag(PagedPool, Size, TAG_GDITEXT);
|
||||
if (!pgsSafe)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
Size = 0;
|
||||
goto Exit;
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ NtGdiGetGlyphOutline(
|
|||
dc = DC_LockDc(hdc);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
|
||||
|
@ -524,7 +524,7 @@ NtGdiGetGlyphOutline(
|
|||
pvBuf = ExAllocatePoolWithTag(PagedPool, cjBuf, TAG_GDITEXT);
|
||||
if (!pvBuf)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
|
@ -570,7 +570,7 @@ NtGdiGetGlyphOutline(
|
|||
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Ret = GDI_ERROR;
|
||||
}
|
||||
|
||||
|
@ -596,7 +596,7 @@ NtGdiGetKerningPairs(HDC hDC,
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -606,7 +606,7 @@ NtGdiGetKerningPairs(HDC hDC,
|
|||
|
||||
if (!TextObj)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -619,13 +619,13 @@ NtGdiGetKerningPairs(HDC hDC,
|
|||
{
|
||||
if (Count > NumPairs)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INSUFFICIENT_BUFFER);
|
||||
EngSetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
return 0;
|
||||
}
|
||||
pKP = ExAllocatePoolWithTag(PagedPool, Count * sizeof(KERNINGPAIR), TAG_GDITEXT);
|
||||
if (!pKP)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
ftGdiGetKerningPairs(FontGDI,Count,pKP);
|
||||
|
@ -641,7 +641,7 @@ NtGdiGetKerningPairs(HDC hDC,
|
|||
_SEH2_END
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Count = 0;
|
||||
}
|
||||
ExFreePoolWithTag(pKP,TAG_GDITEXT);
|
||||
|
@ -672,7 +672,7 @@ NtGdiGetOutlineTextMetricsInternalW (HDC hDC,
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -681,7 +681,7 @@ NtGdiGetOutlineTextMetricsInternalW (HDC hDC,
|
|||
DC_UnlockDc(dc);
|
||||
if (!TextObj)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
FontGDI = ObjToGDI(TextObj->Font, FONT);
|
||||
|
@ -690,13 +690,13 @@ NtGdiGetOutlineTextMetricsInternalW (HDC hDC,
|
|||
if (!otm) return Size;
|
||||
if (Size > Data)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INSUFFICIENT_BUFFER);
|
||||
EngSetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
return 0;
|
||||
}
|
||||
potm = ExAllocatePoolWithTag(PagedPool, Size, TAG_GDITEXT);
|
||||
if (!potm)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
IntGetOutlineTextMetrics(FontGDI, Size, potm);
|
||||
|
@ -715,7 +715,7 @@ NtGdiGetOutlineTextMetricsInternalW (HDC hDC,
|
|||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Size = 0;
|
||||
}
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ NtGdiGetFontResourceInfoInternalW(
|
|||
dwType == 4 seems to be handled by gdi32 only */
|
||||
if (dwType == 4 || dwType > 5)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,7 @@ NtGdiGetFontResourceInfoInternalW(
|
|||
'RTSU');
|
||||
if (!SafeFileNames.Buffer)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -845,7 +845,7 @@ NtGdiGetRealizationInfo(
|
|||
pDc = DC_LockDc(hdc);
|
||||
if (!pDc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
pdcattr = pDc->pdcattr;
|
||||
|
|
|
@ -368,7 +368,7 @@ IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics)
|
|||
{
|
||||
FT_Done_Face(Face);
|
||||
ObDereferenceObject(SectionObject);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -378,7 +378,7 @@ IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics)
|
|||
FT_Done_Face(Face);
|
||||
ObDereferenceObject(SectionObject);
|
||||
ExFreePoolWithTag(Entry, TAG_FONT);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics)
|
|||
FT_Done_Face(Face);
|
||||
ObDereferenceObject(SectionObject);
|
||||
ExFreePoolWithTag(Entry, TAG_FONT);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
RtlCopyMemory(FontGDI->Filename, FileName->Buffer, FileName->Length);
|
||||
|
@ -1347,7 +1347,7 @@ ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS lprs)
|
|||
lprs->nLanguageID = gusLanguageID;
|
||||
return TRUE;
|
||||
}
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1538,7 +1538,7 @@ ftGdiGetGlyphOutline(
|
|||
|
||||
if (!TextObj)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
FontGDI = ObjToGDI(TextObj->Font, FONT);
|
||||
|
@ -1551,7 +1551,7 @@ ftGdiGetGlyphOutline(
|
|||
potm = ExAllocatePoolWithTag(PagedPool, Size, TAG_GDITEXT);
|
||||
if (!potm)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
TEXTOBJ_UnlockText(TextObj);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
|
@ -2280,7 +2280,7 @@ ftGdiGetTextCharsetInfo(
|
|||
|
||||
if (!TextObj)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return Ret;
|
||||
}
|
||||
FontGdi = ObjToGDI(TextObj->Font, FONT);
|
||||
|
@ -2452,13 +2452,13 @@ ftGdiGetTextMetricsW(
|
|||
|
||||
if (!ptmwi)
|
||||
{
|
||||
SetLastWin32Error(STATUS_INVALID_PARAMETER);
|
||||
EngSetLastError(STATUS_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!(dc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -2890,7 +2890,7 @@ IntGdiGetFontResourceInfo(
|
|||
NameInfo1 = ExAllocatePoolWithTag(PagedPool, Size, TAG_FINF);
|
||||
if (!NameInfo1)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2906,7 +2906,7 @@ IntGdiGetFontResourceInfo(
|
|||
if (!NameInfo2)
|
||||
{
|
||||
ExFreePool(NameInfo1);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3070,7 +3070,7 @@ NtGdiGetFontFamilyInfo(HDC Dc,
|
|||
Status = MmCopyFromCaller(&LogFont, UnsafeLogFont, sizeof(LOGFONTW));
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -3078,7 +3078,7 @@ NtGdiGetFontFamilyInfo(HDC Dc,
|
|||
Info = ExAllocatePoolWithTag(PagedPool, Size * sizeof(FONTFAMILYINFO), TAG_GDITEXT);
|
||||
if (NULL == Info)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -3120,7 +3120,7 @@ NtGdiGetFontFamilyInfo(HDC Dc,
|
|||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
ExFreePool(Info);
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -3182,7 +3182,7 @@ GreExtTextOutW(
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (dc->dctype == DC_TYPE_INFO)
|
||||
|
@ -3203,7 +3203,7 @@ GreExtTextOutW(
|
|||
/* Check if String is valid */
|
||||
if ((Count > 0xFFFF) || (Count > 0 && String == NULL))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
@ -3663,7 +3663,7 @@ NtGdiExtTextOutW(
|
|||
/* Check if String is valid */
|
||||
if ((Count > 0xFFFF) || (Count > 0 && UnsafeString == NULL))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3801,13 +3801,13 @@ NtGdiGetCharABCWidthsW(
|
|||
}
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(Status);
|
||||
EngSetLastError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!Buffer)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3816,7 +3816,7 @@ NtGdiGetCharABCWidthsW(
|
|||
if (!fl) SafeBuffF = (LPABCFLOAT) SafeBuff;
|
||||
if (SafeBuff == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3824,7 +3824,7 @@ NtGdiGetCharABCWidthsW(
|
|||
if (dc == NULL)
|
||||
{
|
||||
ExFreePool(SafeBuff);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -3835,7 +3835,7 @@ NtGdiGetCharABCWidthsW(
|
|||
if (TextObj == NULL)
|
||||
{
|
||||
ExFreePool(SafeBuff);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3858,7 +3858,7 @@ NtGdiGetCharABCWidthsW(
|
|||
{
|
||||
DPRINT1("WARNING: Could not find desired charmap!\n");
|
||||
ExFreePool(SafeBuff);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3974,7 +3974,7 @@ NtGdiGetCharWidthW(
|
|||
}
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(Status);
|
||||
EngSetLastError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3983,7 +3983,7 @@ NtGdiGetCharWidthW(
|
|||
if (!fl) SafeBuffF = (PFLOAT) SafeBuff;
|
||||
if (SafeBuff == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3991,7 +3991,7 @@ NtGdiGetCharWidthW(
|
|||
if (dc == NULL)
|
||||
{
|
||||
ExFreePool(SafeBuff);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -4002,7 +4002,7 @@ NtGdiGetCharWidthW(
|
|||
if (TextObj == NULL)
|
||||
{
|
||||
ExFreePool(SafeBuff);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -4025,7 +4025,7 @@ NtGdiGetCharWidthW(
|
|||
{
|
||||
DPRINT1("WARNING: Could not find desired charmap!\n");
|
||||
ExFreePool(SafeBuff);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -4098,7 +4098,7 @@ GreGetGlyphIndicesW(
|
|||
dc = DC_LockDc(hdc);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -4107,7 +4107,7 @@ GreGetGlyphIndicesW(
|
|||
DC_UnlockDc(dc);
|
||||
if (!TextObj)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
|
||||
|
@ -4117,7 +4117,7 @@ GreGetGlyphIndicesW(
|
|||
Buffer = ExAllocatePoolWithTag(PagedPool, cwc*sizeof(WORD), TAG_GDITEXT);
|
||||
if (!Buffer)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
|
||||
|
@ -4128,7 +4128,7 @@ GreGetGlyphIndicesW(
|
|||
potm = ExAllocatePoolWithTag(PagedPool, Size, TAG_GDITEXT);
|
||||
if (!potm)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
cwc = GDI_ERROR;
|
||||
goto ErrorRet;
|
||||
}
|
||||
|
@ -4194,7 +4194,7 @@ NtGdiGetGlyphIndicesW(
|
|||
dc = DC_LockDc(hdc);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -4203,7 +4203,7 @@ NtGdiGetGlyphIndicesW(
|
|||
DC_UnlockDc(dc);
|
||||
if (!TextObj)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
|
||||
|
@ -4213,7 +4213,7 @@ NtGdiGetGlyphIndicesW(
|
|||
Buffer = ExAllocatePoolWithTag(PagedPool, cwc*sizeof(WORD), TAG_GDITEXT);
|
||||
if (!Buffer)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
|
||||
|
@ -4284,7 +4284,7 @@ NtGdiGetGlyphIndicesW(
|
|||
ErrorRet:
|
||||
ExFreePoolWithTag(Buffer, TAG_GDITEXT);
|
||||
if (NT_SUCCESS(Status)) return cwc;
|
||||
SetLastWin32Error(Status);
|
||||
EngSetLastError(Status);
|
||||
return GDI_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -1904,7 +1904,7 @@ IntGdiGetObject(IN HANDLE Handle,
|
|||
pGdiObject = GDIOBJ_LockObj(Handle, GDI_OBJECT_TYPE_DONTCARE);
|
||||
if (!pGdiObject)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ IntGdiDeleteColorSpace(
|
|||
if ( hColorSpace != hStockColorSpace )
|
||||
{
|
||||
Ret = COLORSPACEOBJ_FreeCSByHandle(hColorSpace);
|
||||
if ( !Ret ) SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
if ( !Ret ) EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
}
|
||||
return Ret;
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ NtGdiGetDeviceGammaRamp(HDC hDC,
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ NtGdiGetDeviceGammaRamp(HDC hDC,
|
|||
if (!SafeRamp)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(STATUS_NO_MEMORY);
|
||||
EngSetLastError(STATUS_NO_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ NtGdiSetColorSpace(IN HDC hdc,
|
|||
pDC = DC_LockDc(hdc);
|
||||
if (!pDC)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = pDC->pdcattr;
|
||||
|
@ -210,7 +210,7 @@ NtGdiSetColorSpace(IN HDC hdc,
|
|||
pCS = COLORSPACEOBJ_LockCS(hColorSpace);
|
||||
if (!pCS)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ NtGdiSetDeviceGammaRamp(HDC hDC,
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -381,7 +381,7 @@ NtGdiSetDeviceGammaRamp(HDC hDC,
|
|||
if (!SafeRamp)
|
||||
{
|
||||
DC_UnlockDc(dc);
|
||||
SetLastWin32Error(STATUS_NO_MEMORY);
|
||||
EngSetLastError(STATUS_NO_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
_SEH2_TRY
|
||||
|
|
|
@ -116,7 +116,7 @@ IntGdiLineTo(DC *dc,
|
|||
psurf = dc->dclevel.pSurface;
|
||||
if (NULL == psurf)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ NtGdiLineTo(HDC hDC,
|
|||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (dc->dctype == DC_TYPE_INFO)
|
||||
|
|
|
@ -75,7 +75,7 @@ NtGdiCreateMetafileDC(IN HDC hdc)
|
|||
{
|
||||
NtGdiDeleteObjectApp(tempHDC);
|
||||
}
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ NtGdiCreateMetafileDC(IN HDC hdc)
|
|||
{
|
||||
NtGdiDeleteObjectApp(tempHDC);
|
||||
}
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ NtGdiCreateMetafileDC(IN HDC hdc)
|
|||
NtGdiDeleteObjectApp(tempHDC);
|
||||
}
|
||||
DPRINT1("Can not Create EnhMetaFile\n");
|
||||
SetLastWin32Error(ERROR_PATH_NOT_FOUND);
|
||||
EngSetLastError(ERROR_PATH_NOT_FOUND);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -194,11 +194,11 @@ NtGdiCreateMetafileDC(IN HDC hdc)
|
|||
NtGdiDeleteObjectApp(tempHDC);
|
||||
}
|
||||
DPRINT1("Create EnhMetaFile fail\n");
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SetLastWin32Error(IoStatusBlock.Information == FILE_OVERWRITTEN ? ERROR_ALREADY_EXISTS : 0);
|
||||
EngSetLastError(IoStatusBlock.Information == FILE_OVERWRITTEN ? ERROR_ALREADY_EXISTS : 0);
|
||||
|
||||
Status = NtWriteFile(Dc->hFile, NULL, NULL, NULL, &Iosb, (PVOID)&Dc->emh, Dc->emh->nSize, NULL, NULL);
|
||||
if (Status == STATUS_PENDING)
|
||||
|
@ -219,7 +219,7 @@ NtGdiCreateMetafileDC(IN HDC hdc)
|
|||
{
|
||||
Dc->hFile = NULL;
|
||||
DPRINT1("Write to EnhMetaFile fail\n");
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
ret = NULL;
|
||||
DC_UnlockDc(Dc);
|
||||
if (hDCRef == NULL)
|
||||
|
|
|
@ -890,7 +890,7 @@ IntGetSystemPaletteEntries(HDC hDC,
|
|||
|
||||
if (Entries == 0)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -900,14 +900,14 @@ IntGetSystemPaletteEntries(HDC hDC,
|
|||
if (Entries != EntriesSize / sizeof(pe[0]))
|
||||
{
|
||||
/* Integer overflow! */
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(dc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1123,7 +1123,7 @@ NtGdiUpdateColors(HDC hDC)
|
|||
Wnd = UserGetWindowObject(IntWindowFromDC(hDC));
|
||||
if (Wnd == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
|
||||
if (!calledFromUser){
|
||||
UserLeave();
|
||||
|
|
|
@ -107,7 +107,7 @@ PATH_FillPath( PDC dc, PPATH pPath )
|
|||
|
||||
if( pPath->state != PATH_Closed )
|
||||
{
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ PATH_PathToRegion ( PPATH pPath, INT nPolyFillMode, HRGN *pHrgn )
|
|||
pNumPointsInStroke = ExAllocatePoolWithTag(PagedPool, sizeof(ULONG) * numStrokes, TAG_PATH);
|
||||
if(!pNumPointsInStroke)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1103,7 +1103,7 @@ PATH_PathToRegion ( PPATH pPath, INT nPolyFillMode, HRGN *pHrgn )
|
|||
nPolyFillMode);
|
||||
if(hrgn==(HRGN)0)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1375,7 +1375,7 @@ BOOL FASTCALL PATH_StrokePath(DC *dc, PPATH pPath)
|
|||
if(!pLinePts)
|
||||
{
|
||||
DPRINT1("Can't allocate pool!\n");
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
goto end;
|
||||
}
|
||||
nLinePts = 0;
|
||||
|
@ -1520,7 +1520,7 @@ PATH_WidenPath(DC *dc)
|
|||
if(pPath->state == PATH_Open)
|
||||
{
|
||||
PATH_UnlockPath( pPath );
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1530,7 +1530,7 @@ PATH_WidenPath(DC *dc)
|
|||
if (!size)
|
||||
{
|
||||
PATH_UnlockPath( pPath );
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1548,7 +1548,7 @@ PATH_WidenPath(DC *dc)
|
|||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
ExFreePoolWithTag(elp, TAG_PATH);
|
||||
PATH_UnlockPath( pPath );
|
||||
return FALSE;
|
||||
|
@ -1565,7 +1565,7 @@ PATH_WidenPath(DC *dc)
|
|||
if(obj_type == GDI_OBJECT_TYPE_EXTPEN && penType == PS_COSMETIC)
|
||||
{
|
||||
PATH_UnlockPath( pPath );
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2113,7 +2113,7 @@ NtGdiAbortPath(HDC hDC)
|
|||
PDC dc = DC_LockDc ( hDC );
|
||||
if ( !dc )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2140,7 +2140,7 @@ NtGdiBeginPath( HDC hDC )
|
|||
dc = DC_LockDc ( hDC );
|
||||
if ( !dc )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2171,7 +2171,7 @@ NtGdiBeginPath( HDC hDC )
|
|||
pPath = PATH_AllocPathWithHandle();
|
||||
if (!pPath)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
dc->dclevel.flPath |= DCPATH_ACTIVE; // Set active ASAP!
|
||||
|
@ -2208,7 +2208,7 @@ NtGdiCloseFigure(HDC hDC)
|
|||
pDc = DC_LockDc(hDC);
|
||||
if (!pDc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
pPath = PATH_LockPath( pDc->dclevel.hPath );
|
||||
|
@ -2226,7 +2226,7 @@ NtGdiCloseFigure(HDC hDC)
|
|||
else
|
||||
{
|
||||
// FIXME: check if lasterror is set correctly
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
}
|
||||
|
||||
PATH_UnlockPath( pPath );
|
||||
|
@ -2244,7 +2244,7 @@ NtGdiEndPath(HDC hDC)
|
|||
|
||||
if ( !dc )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2258,7 +2258,7 @@ NtGdiEndPath(HDC hDC)
|
|||
if ( (pPath->state != PATH_Open) || !(dc->dclevel.flPath & DCPATH_ACTIVE) )
|
||||
{
|
||||
DPRINT1("EndPath ERROR! 0x%x\n", dc->dclevel.hPath);
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
ret = FALSE;
|
||||
}
|
||||
/* Set flag to indicate that path is finished */
|
||||
|
@ -2284,7 +2284,7 @@ NtGdiFillPath(HDC hDC)
|
|||
|
||||
if ( !dc )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
pPath = PATH_LockPath( dc->dclevel.hPath );
|
||||
|
@ -2332,7 +2332,7 @@ NtGdiFlattenPath(HDC hDC)
|
|||
pDc = DC_LockDc(hDC);
|
||||
if (!pDc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2363,7 +2363,7 @@ NtGdiGetMiterLimit(
|
|||
|
||||
if (!(pDc = DC_LockDc(hdc)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2411,7 +2411,7 @@ NtGdiGetPath(
|
|||
if (!dc)
|
||||
{
|
||||
DPRINT1("Can't lock dc!\n");
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -2424,7 +2424,7 @@ NtGdiGetPath(
|
|||
|
||||
if (pPath->state != PATH_Closed)
|
||||
{
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -2434,7 +2434,7 @@ NtGdiGetPath(
|
|||
}
|
||||
else if(nSize<pPath->numEntriesUsed)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
goto done;
|
||||
}
|
||||
else
|
||||
|
@ -2476,7 +2476,7 @@ NtGdiPathToRegion(HDC hDC)
|
|||
pDc = DC_LockDc(hDC);
|
||||
if (!pDc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -2492,7 +2492,7 @@ NtGdiPathToRegion(HDC hDC)
|
|||
if (pPath->state!=PATH_Closed)
|
||||
{
|
||||
//FIXME: check that setlasterror is being called correctly
|
||||
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
||||
EngSetLastError(ERROR_CAN_NOT_COMPLETE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2519,7 +2519,7 @@ NtGdiSetMiterLimit(
|
|||
|
||||
if (!(pDc = DC_LockDc(hdc)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2566,7 +2566,7 @@ NtGdiStrokeAndFillPath(HDC hDC)
|
|||
|
||||
if (!(pDc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
pPath = PATH_LockPath( pDc->dclevel.hPath );
|
||||
|
@ -2610,7 +2610,7 @@ NtGdiStrokePath(HDC hDC)
|
|||
|
||||
if (!(pDc = DC_LockDc(hDC)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
pPath = PATH_LockPath( pDc->dclevel.hPath );
|
||||
|
@ -2646,7 +2646,7 @@ NtGdiWidenPath(HDC hDC)
|
|||
PDC pdc = DC_LockDc ( hDC );
|
||||
if ( !pdc )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
Ret = PATH_WidenPath(pdc);
|
||||
|
|
|
@ -87,7 +87,7 @@ IntGdiExtCreatePen(
|
|||
|
||||
if (!pbrushPen)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
DPRINT("Can't allocate pen\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ IntGdiExtCreatePen(
|
|||
return hPen;
|
||||
|
||||
ExitCleanup:
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
pbrushPen->pStyle = NULL;
|
||||
PEN_UnlockPen(pbrushPen);
|
||||
if (bOldStylePen)
|
||||
|
@ -287,7 +287,7 @@ NtGdiCreatePen(
|
|||
{
|
||||
if ( PenStyle < PS_SOLID || PenStyle > PS_INSIDEFRAME )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ NtGdiExtCreatePen(
|
|||
if ((int)dwStyleCount < 0) return 0;
|
||||
if (dwStyleCount > 16)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ NtGdiEscape(HDC hDC,
|
|||
dc = DC_LockDc(hDC);
|
||||
if (dc == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return SP_ERROR;
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ NtGdiExtEscape(
|
|||
pDC = DC_LockDc(hDC);
|
||||
if ( pDC == NULL )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return -1;
|
||||
}
|
||||
if ( pDC->dctype == DC_TYPE_INFO)
|
||||
|
@ -178,7 +178,7 @@ NtGdiExtEscape(
|
|||
if ( !SafeInData )
|
||||
{
|
||||
DC_UnlockDc(pDC);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ NtGdiExtEscape(
|
|||
SafeOutData = ExAllocatePoolWithTag ( PagedPool, OutSize, TAG_PRINT );
|
||||
if ( !SafeOutData )
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
freeout:
|
||||
if ( SafeInData )
|
||||
ExFreePoolWithTag ( SafeInData, TAG_PRINT );
|
||||
|
|
|
@ -2336,20 +2336,20 @@ IntGdiCombineRgn(PROSRGNDATA destRgn,
|
|||
else if (src2Rgn == NULL)
|
||||
{
|
||||
DPRINT1("IntGdiCombineRgn requires hSrc2 != NULL for combine mode %d!\n", CombineMode);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT("IntGdiCombineRgn: hSrc1 unavailable\n");
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT("IntGdiCombineRgn: hDest unavailable\n");
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -3231,14 +3231,14 @@ NtGdiCombineRgn(HRGN hDest,
|
|||
|
||||
if ( CombineMode > RGN_COPY && CombineMode < RGN_AND)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
destRgn = RGNOBJAPI_Lock(hDest, NULL);
|
||||
if (!destRgn)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
@ -3246,7 +3246,7 @@ NtGdiCombineRgn(HRGN hDest,
|
|||
if (!src1Rgn)
|
||||
{
|
||||
RGNOBJAPI_Unlock(destRgn);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
@ -3285,7 +3285,7 @@ NtGdiCreateRectRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect)
|
|||
/* Allocate region data structure with space for 1 RECTL */
|
||||
if (!(pRgn = REGION_AllocUserRgnWithHandle(1)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return NULL;
|
||||
}
|
||||
hRgn = pRgn->BaseObject.hHmgr;
|
||||
|
@ -3518,7 +3518,7 @@ NtGdiExtCreateRegion(
|
|||
|
||||
if (Region == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
hRgn = Region->BaseObject.hHmgr;
|
||||
|
@ -3562,7 +3562,7 @@ NtGdiExtCreateRegion(
|
|||
_SEH2_END;
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
RGNOBJAPI_Unlock(Region);
|
||||
GreDeleteObject(hRgn);
|
||||
return NULL;
|
||||
|
@ -3667,7 +3667,7 @@ NtGdiGetRandomRgn(
|
|||
pDC = DC_LockDc(hDC);
|
||||
if (pDC == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -3768,7 +3768,7 @@ NtGdiInvertRgn(
|
|||
|
||||
if (!(RgnData = RGNOBJAPI_Lock(hRgn, NULL)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -3921,7 +3921,7 @@ NtGdiUnionRectWithRgn(
|
|||
|
||||
if (!(Rgn = RGNOBJAPI_Lock(hDest, NULL)))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ GreGetTextExtentW(
|
|||
pdc = DC_LockDc(hDC);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ GreGetTextExtentExW(
|
|||
|
||||
if ( (!String && Count ) || !pSize )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ GreGetTextExtentExW(
|
|||
pdc = DC_LockDc(hDC);
|
||||
if (NULL == pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = pdc->pdcattr;
|
||||
|
@ -148,7 +148,7 @@ NtGdiGetCharSet(HDC hDC)
|
|||
Dc = DC_LockDc(hDC);
|
||||
if (!Dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
cscp = ftGdiGetTextCharsetInfo(Dc,NULL,0);
|
||||
|
@ -214,7 +214,7 @@ NtGdiGetTextCharsetInfo(
|
|||
Dc = DC_LockDc(hdc);
|
||||
if (!Dc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return DEFAULT_CHARSET;
|
||||
}
|
||||
|
||||
|
@ -298,7 +298,7 @@ NtGdiGetTextExtentExW(
|
|||
String = ExAllocatePoolWithTag(PagedPool, Count * sizeof(WCHAR), TAG_GDITEXT);
|
||||
if (NULL == String)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ NtGdiGetTextExtentExW(
|
|||
if (NULL == Dx)
|
||||
{
|
||||
ExFreePoolWithTag(String, TAG_GDITEXT);
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ NtGdiGetTextExtentExW(
|
|||
ExFreePoolWithTag(Dx, TAG_GDITEXT);
|
||||
}
|
||||
ExFreePoolWithTag(String, TAG_GDITEXT);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
@ -440,7 +440,7 @@ NtGdiSetTextJustification(HDC hDC,
|
|||
pDc = DC_LockDc(hDC);
|
||||
if (!pDc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ NtGdiGetTextFaceW(
|
|||
Dc = DC_LockDc(hDC);
|
||||
if (Dc == NULL)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = Dc->pdcattr;
|
||||
|
|
|
@ -69,7 +69,7 @@ NtGdiDescribePixelFormat(HDC hDC,
|
|||
pdc = DC_LockDc(hDC);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ NtGdiDescribePixelFormat(HDC hDC,
|
|||
PixelFormat < 1 ||
|
||||
PixelFormat > pdc->ipfdDevMax )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ NtGdiSetPixelFormat(
|
|||
pdc = DC_LockDc(hdc);
|
||||
if (!pdc)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ NtGdiSetPixelFormat(
|
|||
if ( ipfd < 1 ||
|
||||
ipfd > pdc->ipfdDevMax )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ NtGdiSetPixelFormat(
|
|||
|
||||
if (!hWnd)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_WINDOW_STYLE);
|
||||
EngSetLastError(ERROR_INVALID_WINDOW_STYLE);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ NtGdiSetPixelFormat(
|
|||
if (pWndObj) pso = pWndObj->psoOwner;
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PIXEL_FORMAT);
|
||||
EngSetLastError(ERROR_INVALID_PIXEL_FORMAT);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,6 @@
|
|||
</directory>
|
||||
<directory name="misc">
|
||||
<file>driver.c</file>
|
||||
<file>err.c</file>
|
||||
<file>file.c</file>
|
||||
<file>math.c</file>
|
||||
<file>rtlstr.c</file>
|
||||
|
|
Loading…
Reference in a new issue