mirror of
https://github.com/reactos/reactos.git
synced 2025-05-31 06:58:10 +00:00
Implement Information Contexts
svn path=/trunk/; revision=13870
This commit is contained in:
parent
8399d9c123
commit
49bf05dfb5
13 changed files with 366 additions and 97 deletions
|
@ -104,6 +104,7 @@ typedef struct _DC
|
||||||
XLATEOBJ *XlatePen;
|
XLATEOBJ *XlatePen;
|
||||||
|
|
||||||
INT saveLevel;
|
INT saveLevel;
|
||||||
|
BOOL IsIC;
|
||||||
|
|
||||||
WIN_DC_INFO w;
|
WIN_DC_INFO w;
|
||||||
} DC, *PDC;
|
} DC, *PDC;
|
||||||
|
@ -136,6 +137,8 @@ typedef struct
|
||||||
DEVINFO DevInfo;
|
DEVINFO DevInfo;
|
||||||
DRIVER_FUNCTIONS DriverFunctions;
|
DRIVER_FUNCTIONS DriverFunctions;
|
||||||
PFILE_OBJECT VideoFileObject;
|
PFILE_OBJECT VideoFileObject;
|
||||||
|
BOOLEAN PreparedDriver;
|
||||||
|
ULONG DisplayNumber;
|
||||||
|
|
||||||
GDIPOINTER Pointer;
|
GDIPOINTER Pointer;
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,8 @@ HDC FASTCALL
|
||||||
IntGdiCreateDC(PUNICODE_STRING Driver,
|
IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
PUNICODE_STRING Device,
|
PUNICODE_STRING Device,
|
||||||
PUNICODE_STRING Output,
|
PUNICODE_STRING Output,
|
||||||
CONST PDEVMODEW InitData);
|
CONST PDEVMODEW InitData,
|
||||||
|
BOOL CreateAsIC);
|
||||||
|
|
||||||
COLORREF FASTCALL
|
COLORREF FASTCALL
|
||||||
IntGetDCColor(HDC hDC, ULONG Object);
|
IntGetDCColor(HDC hDC, ULONG Object);
|
||||||
|
|
|
@ -42,7 +42,6 @@ NtUserGetSystemMetrics(ULONG Index)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PWINSTATION_OBJECT WinStaObject;
|
PWINSTATION_OBJECT WinStaObject;
|
||||||
PWINDOW_OBJECT DesktopWindow;
|
|
||||||
ULONG Width, Height, Result;
|
ULONG Width, Height, Result;
|
||||||
|
|
||||||
Result = 0;
|
Result = 0;
|
||||||
|
@ -156,19 +155,26 @@ NtUserGetSystemMetrics(ULONG Index)
|
||||||
return(27);
|
return(27);
|
||||||
case SM_CXSCREEN:
|
case SM_CXSCREEN:
|
||||||
case SM_CYSCREEN:
|
case SM_CYSCREEN:
|
||||||
DesktopWindow = IntGetWindowObject(IntGetDesktopWindow());
|
|
||||||
if (NULL != DesktopWindow)
|
|
||||||
{
|
|
||||||
Width = DesktopWindow->WindowRect.right;
|
|
||||||
Height = DesktopWindow->WindowRect.bottom;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
HDC ScreenDCHandle;
|
||||||
|
PDC ScreenDC;
|
||||||
|
|
||||||
Width = 640;
|
Width = 640;
|
||||||
Height = 480;
|
Height = 480;
|
||||||
|
ScreenDCHandle = IntGdiCreateDC(NULL, NULL, NULL, NULL, TRUE);
|
||||||
|
if (NULL != ScreenDCHandle)
|
||||||
|
{
|
||||||
|
ScreenDC = DC_LockDc(ScreenDCHandle);
|
||||||
|
if (NULL != ScreenDC)
|
||||||
|
{
|
||||||
|
Width = ScreenDC->DMW.dmPelsWidth;
|
||||||
|
Height = ScreenDC->DMW.dmPelsHeight;
|
||||||
|
DC_UnlockDc(ScreenDCHandle);
|
||||||
|
}
|
||||||
|
NtGdiDeleteDC(ScreenDCHandle);
|
||||||
}
|
}
|
||||||
IntReleaseWindowObject(DesktopWindow);
|
|
||||||
return SM_CXSCREEN == Index ? Width : Height;
|
return SM_CXSCREEN == Index ? Width : Height;
|
||||||
|
}
|
||||||
case SM_CXSIZE:
|
case SM_CXSIZE:
|
||||||
case SM_CYSIZE:
|
case SM_CYSIZE:
|
||||||
return(18);
|
return(18);
|
||||||
|
|
|
@ -132,7 +132,7 @@ DceAllocDCE(HWND hWnd, DCE_TYPE Type)
|
||||||
/* No real locking, just get the pointer */
|
/* No real locking, just get the pointer */
|
||||||
DCEOBJ_UnlockDCE(DceHandle);
|
DCEOBJ_UnlockDCE(DceHandle);
|
||||||
Dce->Self = DceHandle;
|
Dce->Self = DceHandle;
|
||||||
Dce->hDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL);
|
Dce->hDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL, FALSE);
|
||||||
if (NULL == defaultDCstate)
|
if (NULL == defaultDCstate)
|
||||||
{
|
{
|
||||||
defaultDCstate = NtGdiGetDCState(Dce->hDC);
|
defaultDCstate = NtGdiGetDCState(Dce->hDC);
|
||||||
|
|
|
@ -189,7 +189,7 @@ IntInitializeDesktopGraphics(VOID)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
RtlInitUnicodeString(&DriverName, L"DISPLAY");
|
RtlInitUnicodeString(&DriverName, L"DISPLAY");
|
||||||
ScreenDeviceContext = IntGdiCreateDC(&DriverName, NULL, NULL, NULL);
|
ScreenDeviceContext = IntGdiCreateDC(&DriverName, NULL, NULL, NULL, FALSE);
|
||||||
if (NULL == ScreenDeviceContext)
|
if (NULL == ScreenDeviceContext)
|
||||||
{
|
{
|
||||||
IntDestroyPrimarySurface();
|
IntDestroyPrimarySurface();
|
||||||
|
|
|
@ -59,6 +59,12 @@ NtGdiBitBlt(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (DCDest->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDCDest);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (UsesSource)
|
if (UsesSource)
|
||||||
{
|
{
|
||||||
|
@ -72,6 +78,13 @@ NtGdiBitBlt(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (DCSrc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDCSrc);
|
||||||
|
DC_UnlockDc(hDCDest);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -258,6 +271,12 @@ NtGdiTransparentBlt(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (DCDest->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hdcDst);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if((hdcDst != hdcSrc) && !(DCSrc = DC_LockDc(hdcSrc)))
|
if((hdcDst != hdcSrc) && !(DCSrc = DC_LockDc(hdcSrc)))
|
||||||
{
|
{
|
||||||
|
@ -270,6 +289,16 @@ NtGdiTransparentBlt(
|
||||||
{
|
{
|
||||||
DCSrc = DCDest;
|
DCSrc = DCDest;
|
||||||
}
|
}
|
||||||
|
if (DCSrc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hdcSrc);
|
||||||
|
if(hdcDst != hdcSrc)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hdcDst);
|
||||||
|
}
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Offset positions */
|
/* Offset positions */
|
||||||
xDst += DCDest->w.DCOrgX;
|
xDst += DCDest->w.DCOrgX;
|
||||||
|
@ -575,6 +604,11 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos)
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
return Result;
|
||||||
|
}
|
||||||
XPos += dc->w.DCOrgX;
|
XPos += dc->w.DCOrgX;
|
||||||
YPos += dc->w.DCOrgY;
|
YPos += dc->w.DCOrgY;
|
||||||
if ( IN_RECT(dc->CombinedClip->rclBounds,XPos,YPos) )
|
if ( IN_RECT(dc->CombinedClip->rclBounds,XPos,YPos) )
|
||||||
|
@ -1039,6 +1073,12 @@ NtGdiStretchBlt(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (DCDest->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDCDest);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (UsesSource)
|
if (UsesSource)
|
||||||
{
|
{
|
||||||
|
@ -1052,6 +1092,13 @@ NtGdiStretchBlt(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (DCSrc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDCSrc);
|
||||||
|
DC_UnlockDc(hDCDest);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -266,6 +266,12 @@ IntGdiPolyPatBlt(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
for (r = pRects, i = 0; i < cRects; i++)
|
for (r = pRects, i = 0; i < cRects; i++)
|
||||||
{
|
{
|
||||||
|
@ -466,6 +472,12 @@ NtGdiPatBlt(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
BrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
BrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
||||||
if (BrushObj == NULL)
|
if (BrushObj == NULL)
|
||||||
|
|
|
@ -136,7 +136,7 @@ NtGdiCreateCompatableDC(HDC hDC)
|
||||||
if (hDC == NULL)
|
if (hDC == NULL)
|
||||||
{
|
{
|
||||||
RtlInitUnicodeString(&DriverName, L"DISPLAY");
|
RtlInitUnicodeString(&DriverName, L"DISPLAY");
|
||||||
DisplayDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL);
|
DisplayDC = IntGdiCreateDC(&DriverName, NULL, NULL, NULL, TRUE);
|
||||||
if (NULL == DisplayDC)
|
if (NULL == DisplayDC)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -169,6 +169,7 @@ NtGdiCreateCompatableDC(HDC hDC)
|
||||||
|
|
||||||
/* Copy information from original DC to new DC */
|
/* Copy information from original DC to new DC */
|
||||||
NewDC->hSelf = hNewDC;
|
NewDC->hSelf = hNewDC;
|
||||||
|
NewDC->IsIC = FALSE;
|
||||||
|
|
||||||
NewDC->PDev = OrigDC->PDev;
|
NewDC->PDev = OrigDC->PDev;
|
||||||
NewDC->DMW = OrigDC->DMW;
|
NewDC->DMW = OrigDC->DMW;
|
||||||
|
@ -454,19 +455,16 @@ SetupDevMode(PDEVMODEW DevMode, ULONG DisplayNumber)
|
||||||
return Valid;
|
return Valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL FASTCALL
|
static BOOL FASTCALL
|
||||||
IntCreatePrimarySurface()
|
IntPrepareDriver()
|
||||||
{
|
{
|
||||||
PGD_ENABLEDRIVER GDEnableDriver;
|
PGD_ENABLEDRIVER GDEnableDriver;
|
||||||
DRVENABLEDATA DED;
|
DRVENABLEDATA DED;
|
||||||
SURFOBJ *SurfObj;
|
|
||||||
SIZEL SurfSize;
|
|
||||||
UNICODE_STRING DriverFileNames;
|
UNICODE_STRING DriverFileNames;
|
||||||
PWSTR CurrentName;
|
PWSTR CurrentName;
|
||||||
BOOL GotDriver;
|
BOOL GotDriver;
|
||||||
BOOL DoDefault;
|
BOOL DoDefault;
|
||||||
ULONG DisplayNumber;
|
ULONG DisplayNumber;
|
||||||
RECTL SurfaceRect;
|
|
||||||
|
|
||||||
for (DisplayNumber = 0; ; DisplayNumber++)
|
for (DisplayNumber = 0; ; DisplayNumber++)
|
||||||
{
|
{
|
||||||
|
@ -488,7 +486,6 @@ IntCreatePrimarySurface()
|
||||||
if (!FindDriverFileNames(&DriverFileNames, DisplayNumber))
|
if (!FindDriverFileNames(&DriverFileNames, DisplayNumber))
|
||||||
{
|
{
|
||||||
DPRINT1("FindDriverFileNames failed\n");
|
DPRINT1("FindDriverFileNames failed\n");
|
||||||
/* return FALSE; */
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,7 +540,6 @@ IntCreatePrimarySurface()
|
||||||
{
|
{
|
||||||
ObDereferenceObject(PrimarySurface.VideoFileObject);
|
ObDereferenceObject(PrimarySurface.VideoFileObject);
|
||||||
DPRINT1("No suitable DDI driver found\n");
|
DPRINT1("No suitable DDI driver found\n");
|
||||||
/* return FALSE; */
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -608,7 +604,6 @@ IntCreatePrimarySurface()
|
||||||
ObDereferenceObject(PrimarySurface.VideoFileObject);
|
ObDereferenceObject(PrimarySurface.VideoFileObject);
|
||||||
DPRINT1("DrvEnablePDEV with default parameters failed\n");
|
DPRINT1("DrvEnablePDEV with default parameters failed\n");
|
||||||
DPRINT1("Perhaps DDI driver doesn't match miniport driver?\n");
|
DPRINT1("Perhaps DDI driver doesn't match miniport driver?\n");
|
||||||
/* return FALSE; */
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -637,8 +632,34 @@ IntCreatePrimarySurface()
|
||||||
|
|
||||||
DRIVER_ReferenceDriver(L"DISPLAY");
|
DRIVER_ReferenceDriver(L"DISPLAY");
|
||||||
|
|
||||||
DPRINT("calling EnableSurface\n");
|
PrimarySurface.PreparedDriver = TRUE;
|
||||||
|
PrimarySurface.DisplayNumber = DisplayNumber;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL FASTCALL
|
||||||
|
IntPrepareDriverIfNeeded()
|
||||||
|
{
|
||||||
|
return (PrimarySurface.PreparedDriver ? TRUE : IntPrepareDriver());
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL FASTCALL
|
||||||
|
IntCreatePrimarySurface()
|
||||||
|
{
|
||||||
|
SIZEL SurfSize;
|
||||||
|
RECTL SurfaceRect;
|
||||||
|
SURFOBJ *SurfObj;
|
||||||
|
|
||||||
|
if (! IntPrepareDriverIfNeeded())
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DPRINT("calling EnableSurface\n");
|
||||||
/* Enable the drawing surface */
|
/* Enable the drawing surface */
|
||||||
PrimarySurface.Handle =
|
PrimarySurface.Handle =
|
||||||
PrimarySurface.DriverFunctions.EnableSurface(PrimarySurface.PDev);
|
PrimarySurface.DriverFunctions.EnableSurface(PrimarySurface.PDev);
|
||||||
|
@ -648,12 +669,11 @@ IntCreatePrimarySurface()
|
||||||
PrimarySurface.DriverFunctions.DisablePDEV(PrimarySurface.PDev);
|
PrimarySurface.DriverFunctions.DisablePDEV(PrimarySurface.PDev);
|
||||||
ObDereferenceObject(PrimarySurface.VideoFileObject);
|
ObDereferenceObject(PrimarySurface.VideoFileObject);
|
||||||
DPRINT1("DrvEnableSurface failed\n");
|
DPRINT1("DrvEnableSurface failed\n");
|
||||||
/* return FALSE; */
|
return FALSE;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* attach monitor */
|
/* attach monitor */
|
||||||
IntAttachMonitor(&PrimarySurface, DisplayNumber);
|
IntAttachMonitor(&PrimarySurface, PrimarySurface.DisplayNumber);
|
||||||
|
|
||||||
SurfObj = EngLockSurface((HSURF)PrimarySurface.Handle);
|
SurfObj = EngLockSurface((HSURF)PrimarySurface.Handle);
|
||||||
SurfObj->dhpdev = PrimarySurface.PDev;
|
SurfObj->dhpdev = PrimarySurface.PDev;
|
||||||
|
@ -671,8 +691,6 @@ IntCreatePrimarySurface()
|
||||||
|
|
||||||
EngUnlockSurface(SurfObj);
|
EngUnlockSurface(SurfObj);
|
||||||
IntShowDesktop(IntGetActiveDesktop(), SurfSize.cx, SurfSize.cy);
|
IntShowDesktop(IntGetActiveDesktop(), SurfSize.cx, SurfSize.cy);
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -694,6 +712,7 @@ IntDestroyPrimarySurface()
|
||||||
PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.PDev, FALSE);
|
PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.PDev, FALSE);
|
||||||
PrimarySurface.DriverFunctions.DisableSurface(PrimarySurface.PDev);
|
PrimarySurface.DriverFunctions.DisableSurface(PrimarySurface.PDev);
|
||||||
PrimarySurface.DriverFunctions.DisablePDEV(PrimarySurface.PDev);
|
PrimarySurface.DriverFunctions.DisablePDEV(PrimarySurface.PDev);
|
||||||
|
PrimarySurface.PreparedDriver = FALSE;
|
||||||
|
|
||||||
DceEmptyCache();
|
DceEmptyCache();
|
||||||
|
|
||||||
|
@ -704,7 +723,8 @@ HDC FASTCALL
|
||||||
IntGdiCreateDC(PUNICODE_STRING Driver,
|
IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
PUNICODE_STRING Device,
|
PUNICODE_STRING Device,
|
||||||
PUNICODE_STRING Output,
|
PUNICODE_STRING Output,
|
||||||
CONST PDEVMODEW InitData)
|
CONST PDEVMODEW InitData,
|
||||||
|
BOOL CreateAsIC)
|
||||||
{
|
{
|
||||||
HDC hNewDC;
|
HDC hNewDC;
|
||||||
PDC NewDC;
|
PDC NewDC;
|
||||||
|
@ -717,7 +737,15 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
|
|
||||||
if (NULL == Driver || 0 == RtlCompareUnicodeString(Driver, &StdDriver, TRUE))
|
if (NULL == Driver || 0 == RtlCompareUnicodeString(Driver, &StdDriver, TRUE))
|
||||||
{
|
{
|
||||||
if (! IntGraphicsCheck(TRUE))
|
if (CreateAsIC)
|
||||||
|
{
|
||||||
|
if (! IntPrepareDriverIfNeeded())
|
||||||
|
{
|
||||||
|
DPRINT1("Unable to prepare graphics driver, returning NULL ic\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (! IntGraphicsCheck(TRUE))
|
||||||
{
|
{
|
||||||
DPRINT1("Unable to initialize graphics, returning NULL dc\n");
|
DPRINT1("Unable to initialize graphics, returning NULL dc\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -750,6 +778,7 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NewDC->IsIC = CreateAsIC;
|
||||||
NewDC->DMW = PrimarySurface.DMW;
|
NewDC->DMW = PrimarySurface.DMW;
|
||||||
NewDC->DevInfo = &PrimarySurface.DevInfo;
|
NewDC->DevInfo = &PrimarySurface.DevInfo;
|
||||||
NewDC->GDIInfo = &PrimarySurface.GDIInfo;
|
NewDC->GDIInfo = &PrimarySurface.GDIInfo;
|
||||||
|
@ -763,9 +792,12 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
NewDC->DMW.dmSize = sizeof(NewDC->DMW);
|
NewDC->DMW.dmSize = sizeof(NewDC->DMW);
|
||||||
NewDC->DMW.dmFields = 0x000fc000;
|
NewDC->DMW.dmFields = 0x000fc000;
|
||||||
|
|
||||||
/* FIXME: get mode selection information from somewhere */
|
|
||||||
|
|
||||||
NewDC->DMW.dmLogPixels = 96;
|
NewDC->DMW.dmLogPixels = 96;
|
||||||
|
NewDC->w.bitsPerPixel = NewDC->DMW.dmBitsPerPel; // FIXME: set this here??
|
||||||
|
DPRINT("Bits per pel: %u\n", NewDC->w.bitsPerPixel);
|
||||||
|
|
||||||
|
if (! CreateAsIC)
|
||||||
|
{
|
||||||
SurfObj = EngLockSurface((HSURF)PrimarySurface.Handle);
|
SurfObj = EngLockSurface((HSURF)PrimarySurface.Handle);
|
||||||
if ( !SurfObj )
|
if ( !SurfObj )
|
||||||
{
|
{
|
||||||
|
@ -773,18 +805,13 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
DC_FreeDC ( hNewDC) ;
|
DC_FreeDC ( hNewDC) ;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
NewDC->DMW.dmBitsPerPel = BitsPerFormat(SurfObj->iBitmapFormat);
|
ASSERT(NewDC->DMW.dmBitsPerPel == BitsPerFormat(SurfObj->iBitmapFormat));
|
||||||
NewDC->DMW.dmPelsWidth = SurfObj->sizlBitmap.cx;
|
ASSERT(NewDC->DMW.dmPelsWidth == SurfObj->sizlBitmap.cx);
|
||||||
NewDC->DMW.dmPelsHeight = SurfObj->sizlBitmap.cy;
|
ASSERT(NewDC->DMW.dmPelsHeight == SurfObj->sizlBitmap.cy);
|
||||||
NewDC->DMW.dmDisplayFlags = 0;
|
|
||||||
NewDC->DMW.dmDisplayFrequency = 0;
|
|
||||||
|
|
||||||
NewDC->w.bitsPerPixel = NewDC->DMW.dmBitsPerPel; // FIXME: set this here??
|
|
||||||
NewDC->w.hPalette = NewDC->DevInfo->hpalDefault;
|
NewDC->w.hPalette = NewDC->DevInfo->hpalDefault;
|
||||||
NewDC->w.ROPmode = R2_COPYPEN;
|
NewDC->w.ROPmode = R2_COPYPEN;
|
||||||
|
|
||||||
DPRINT("Bits per pel: %u\n", NewDC->w.bitsPerPixel);
|
|
||||||
|
|
||||||
DC_UnlockDc( hNewDC );
|
DC_UnlockDc( hNewDC );
|
||||||
|
|
||||||
hVisRgn = NtGdiCreateRectRgn(0, 0, SurfObj->sizlBitmap.cx,
|
hVisRgn = NtGdiCreateRectRgn(0, 0, SurfObj->sizlBitmap.cx,
|
||||||
|
@ -800,6 +827,11 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
NtGdiSetBkMode(hNewDC, OPAQUE);
|
NtGdiSetBkMode(hNewDC, OPAQUE);
|
||||||
|
|
||||||
EngUnlockSurface(SurfObj);
|
EngUnlockSurface(SurfObj);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DC_UnlockDc( hNewDC );
|
||||||
|
}
|
||||||
|
|
||||||
return hNewDC;
|
return hNewDC;
|
||||||
}
|
}
|
||||||
|
@ -847,7 +879,7 @@ NtGdiCreateDC(PUNICODE_STRING Driver,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ret = IntGdiCreateDC(&SafeDriver, &SafeDevice, NULL, &SafeInitData);
|
Ret = IntGdiCreateDC(&SafeDriver, &SafeDevice, NULL, &SafeInitData, FALSE);
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
@ -856,10 +888,50 @@ HDC STDCALL
|
||||||
NtGdiCreateIC(PUNICODE_STRING Driver,
|
NtGdiCreateIC(PUNICODE_STRING Driver,
|
||||||
PUNICODE_STRING Device,
|
PUNICODE_STRING Device,
|
||||||
PUNICODE_STRING Output,
|
PUNICODE_STRING Output,
|
||||||
CONST PDEVMODEW DevMode)
|
CONST PDEVMODEW InitData)
|
||||||
{
|
{
|
||||||
/* FIXME: this should probably do something else... */
|
UNICODE_STRING SafeDriver, SafeDevice;
|
||||||
return NtGdiCreateDC(Driver, Device, Output, DevMode);
|
DEVMODEW SafeInitData;
|
||||||
|
HDC Ret;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
if(InitData)
|
||||||
|
{
|
||||||
|
Status = MmCopyFromCaller(&SafeInitData, InitData, sizeof(DEVMODEW));
|
||||||
|
if(!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastNtError(Status);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
/* FIXME - InitData can have some more bytes! */
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Driver)
|
||||||
|
{
|
||||||
|
Status = IntSafeCopyUnicodeString(&SafeDriver, Driver);
|
||||||
|
if(!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
SetLastNtError(Status);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Device)
|
||||||
|
{
|
||||||
|
Status = IntSafeCopyUnicodeString(&SafeDevice, Device);
|
||||||
|
if(!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
RtlFreeUnicodeString(&SafeDriver);
|
||||||
|
SetLastNtError(Status);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ret = IntGdiCreateDC(NULL == Driver ? NULL : &SafeDriver,
|
||||||
|
NULL == Device ? NULL : &SafeDevice, NULL,
|
||||||
|
NULL == InitData ? NULL : &SafeInitData, TRUE);
|
||||||
|
|
||||||
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL STDCALL
|
BOOL STDCALL
|
||||||
|
@ -1144,6 +1216,7 @@ NtGdiGetDCState(HDC hDC)
|
||||||
|
|
||||||
newdc->hSelf = hnewdc;
|
newdc->hSelf = hnewdc;
|
||||||
newdc->saveLevel = 0;
|
newdc->saveLevel = 0;
|
||||||
|
newdc->IsIC = dc->IsIC;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
PATH_InitGdiPath( &newdc->w.path );
|
PATH_InitGdiPath( &newdc->w.path );
|
||||||
|
|
|
@ -27,6 +27,11 @@ NtGdiSetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, CONST RGBQUAD *Col
|
||||||
PBITMAPOBJ BitmapObj;
|
PBITMAPOBJ BitmapObj;
|
||||||
|
|
||||||
if (!(dc = DC_LockDc(hDC))) return 0;
|
if (!(dc = DC_LockDc(hDC))) return 0;
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
|
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
|
||||||
if (BitmapObj == NULL)
|
if (BitmapObj == NULL)
|
||||||
|
@ -73,6 +78,11 @@ NtGdiGetDIBColorTable(HDC hDC, UINT StartIndex, UINT Entries, RGBQUAD *Colors)
|
||||||
PBITMAPOBJ BitmapObj;
|
PBITMAPOBJ BitmapObj;
|
||||||
|
|
||||||
if (!(dc = DC_LockDc(hDC))) return 0;
|
if (!(dc = DC_LockDc(hDC))) return 0;
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
|
BitmapObj = BITMAPOBJ_LockBitmap(dc->w.hBitmap);
|
||||||
if (BitmapObj == NULL)
|
if (BitmapObj == NULL)
|
||||||
|
@ -264,6 +274,11 @@ NtGdiSetDIBits(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (Dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
Ret = IntSetDIBits(Dc, hBitmap, StartScan, ScanLines, Bits, bmi, ColorUse);
|
Ret = IntSetDIBits(Dc, hBitmap, StartScan, ScanLines, Bits, bmi, ColorUse);
|
||||||
|
|
||||||
|
@ -325,6 +340,11 @@ NtGdiGetDIBits(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (Dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
hSourcePalette = Dc->w.hPalette;
|
hSourcePalette = Dc->w.hPalette;
|
||||||
/* FIXME: This is incorrect. hDestPalette should be something other. */
|
/* FIXME: This is incorrect. hDestPalette should be something other. */
|
||||||
hDestPalette = Dc->DevInfo->hpalDefault;
|
hDestPalette = Dc->DevInfo->hpalDefault;
|
||||||
|
|
|
@ -237,6 +237,12 @@ NtGdiEllipse(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
FillBrush = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
FillBrush = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
||||||
if (NULL == FillBrush)
|
if (NULL == FillBrush)
|
||||||
|
@ -664,6 +670,12 @@ NtGdiPie(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
FillBrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
FillBrushObj = BRUSHOBJ_LockBrush(dc->w.hBrush);
|
||||||
if (NULL == FillBrushObj)
|
if (NULL == FillBrushObj)
|
||||||
|
@ -844,6 +856,12 @@ NtGdiPolygon(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
Safept = ExAllocatePoolWithTag(PagedPool, sizeof(POINT) * Count, TAG_SHAPE);
|
Safept = ExAllocatePoolWithTag(PagedPool, sizeof(POINT) * Count, TAG_SHAPE);
|
||||||
if(!Safept)
|
if(!Safept)
|
||||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
|
@ -883,6 +901,12 @@ NtGdiPolyPolygon(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if(Count > 0)
|
if(Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -1061,6 +1085,12 @@ NtGdiRectangle(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
ret = IntRectangle ( dc, LeftRect, TopRect, RightRect, BottomRect );
|
ret = IntRectangle ( dc, LeftRect, TopRect, RightRect, BottomRect );
|
||||||
DC_UnlockDc ( hDC );
|
DC_UnlockDc ( hDC );
|
||||||
|
@ -1358,6 +1388,12 @@ NtGdiRoundRect(
|
||||||
DPRINT1("NtGdiRoundRect() - hDC is invalid\n");
|
DPRINT1("NtGdiRoundRect() - hDC is invalid\n");
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
}
|
}
|
||||||
|
else if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
ret = TRUE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret = IntRoundRect ( dc, LeftRect, TopRect, RightRect, BottomRect, Width, Height );
|
ret = IntRoundRect ( dc, LeftRect, TopRect, RightRect, BottomRect, Width, Height );
|
||||||
|
@ -1490,6 +1526,12 @@ NtGdiGradientFill(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hdc);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
if(!pVertex || !uVertex || !pMesh || !uMesh)
|
if(!pVertex || !uVertex || !pMesh || !uMesh)
|
||||||
{
|
{
|
||||||
DC_UnlockDc(hdc);
|
DC_UnlockDc(hdc);
|
||||||
|
|
|
@ -368,6 +368,12 @@ NtGdiArc(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
Ret = IntGdiArc(dc,
|
Ret = IntGdiArc(dc,
|
||||||
LeftRect,
|
LeftRect,
|
||||||
|
@ -404,6 +410,12 @@ NtGdiArcTo(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// Line from current position to starting point of arc
|
// Line from current position to starting point of arc
|
||||||
if ( !IntGdiLineTo(dc, XRadial1, YRadial1) )
|
if ( !IntGdiLineTo(dc, XRadial1, YRadial1) )
|
||||||
|
@ -466,6 +478,12 @@ NtGdiLineTo(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
Ret = IntGdiLineTo(dc, XEnd, YEnd);
|
Ret = IntGdiLineTo(dc, XEnd, YEnd);
|
||||||
|
|
||||||
|
@ -491,6 +509,12 @@ NtGdiMoveToEx(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if(Point)
|
if(Point)
|
||||||
{
|
{
|
||||||
|
@ -526,6 +550,12 @@ NtGdiPolyBezier(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if(Count > 0)
|
if(Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -577,6 +607,12 @@ NtGdiPolyBezierTo(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if(Count > 0)
|
if(Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -639,6 +675,12 @@ NtGdiPolyline(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if(Count >= 2)
|
if(Count >= 2)
|
||||||
{
|
{
|
||||||
|
@ -690,6 +732,12 @@ NtGdiPolylineTo(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if(Count > 0)
|
if(Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -743,6 +791,12 @@ NtGdiPolyPolyline(HDC hDC,
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if(Count > 0)
|
if(Count > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -158,6 +158,11 @@ NtGdiExtEscape(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if ( pDC->IsIC )
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ( InSize && UnsafeInData )
|
if ( InSize && UnsafeInData )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1534,6 +1534,12 @@ NtGdiExtTextOut(
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (dc->IsIC)
|
||||||
|
{
|
||||||
|
DC_UnlockDc(hDC);
|
||||||
|
/* Yes, Windows really returns TRUE in this case */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (NULL != UnsafeDx && Count > 0)
|
if (NULL != UnsafeDx && Count > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue