mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
- Win32k: DC_ATTR: Moved to it.
- We need to decide how to optimize the syncing. CreateD/IC/CompatibleDC, GetDCState and SelectObject use the sync in one form. This can become ugly. Some DC handles do not belong to the current process. We need to reorder the mess in dc.c and clean it up. - Gdi32: The only ones using it are GetCurrentObject and with out updates Get/SetDCBrush/PenColor. - Implemented an example of RealizePalette. Moved SetBk/TextColor into dc.c, don't use them. - Update gdi32.def. svn path=/trunk/; revision=28797
This commit is contained in:
@@ -520,7 +520,7 @@ PolylineTo@12
|
||||
PtInRegion@12=NtGdiPtInRegion@12
|
||||
PtVisible@12=NtGdiPtVisible@12
|
||||
QueryFontAssocStatus@0
|
||||
RealizePalette@4=NtGdiRealizePalette@4
|
||||
RealizePalette@4
|
||||
RectInRegion@8=NtGdiRectInRegion@8
|
||||
RectVisible@8=NtGdiRectVisible@8
|
||||
Rectangle@20
|
||||
@@ -588,7 +588,7 @@ SetStretchBltMode@8=NtGdiSetStretchBltMode@8
|
||||
SetSystemPaletteUse@8
|
||||
SetTextAlign@8=NtGdiSetTextAlign@8
|
||||
SetTextCharacterExtra@8
|
||||
SetTextColor@8=NtGdiSetTextColor@8
|
||||
SetTextColor@8
|
||||
SetTextJustification@12
|
||||
SetViewportExtEx@16=NtGdiSetViewportExtEx@16
|
||||
SetViewportOrgEx@16=NtGdiSetViewportOrgEx@16
|
||||
|
||||
@@ -104,18 +104,6 @@ SetBkMode(HDC hdc,
|
||||
return NtGdiSetBkMode(hdc,iBkMode);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*
|
||||
*/
|
||||
COLORREF
|
||||
STDCALL
|
||||
SetBkColor(HDC hdc,
|
||||
COLORREF crColor)
|
||||
{
|
||||
return NtGdiSetBkColor(hdc,crColor);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*
|
||||
|
||||
@@ -320,13 +320,13 @@ HGDIOBJ
|
||||
STDCALL
|
||||
GetDCObject( HDC hDC, INT iType)
|
||||
{
|
||||
#if 0
|
||||
//#if 0
|
||||
if((iType == GDI_OBJECT_TYPE_BRUSH) ||
|
||||
(iType == GDI_OBJECT_TYPE_EXTPEN)||
|
||||
(iType == GDI_OBJECT_TYPE_PEN) ||
|
||||
(iType == GDI_OBJECT_TYPE_COLORSPACE))
|
||||
{
|
||||
HGDIOBJ hGO;
|
||||
HGDIOBJ hGO = NULL;
|
||||
PDC_ATTR Dc_Attr;
|
||||
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hDC, (PVOID) &Dc_Attr)) return NULL;
|
||||
@@ -348,7 +348,7 @@ GetDCObject( HDC hDC, INT iType)
|
||||
}
|
||||
return hGO;
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
return NtGdiGetDCObject( hDC, iType );
|
||||
}
|
||||
|
||||
@@ -691,12 +691,12 @@ GetDCBrushColor(
|
||||
HDC hdc
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
//#if 0
|
||||
PDC_ATTR Dc_Attr;
|
||||
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return CLR_INVALID;
|
||||
return (COLORREF) Dc_Attr->ulPenClr;
|
||||
#endif
|
||||
//#endif
|
||||
return NtUserGetDCBrushColor(hdc);
|
||||
}
|
||||
|
||||
@@ -709,12 +709,12 @@ GetDCPenColor(
|
||||
HDC hdc
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
//#if 0
|
||||
PDC_ATTR Dc_Attr;
|
||||
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return CLR_INVALID;
|
||||
return (COLORREF) Dc_Attr->ulPenClr;
|
||||
#endif
|
||||
//#endif
|
||||
return NtUserGetDCPenColor(hdc);
|
||||
}
|
||||
|
||||
@@ -728,7 +728,7 @@ SetDCBrushColor(
|
||||
COLORREF crColor
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
//#if 0
|
||||
PDC_ATTR Dc_Attr;
|
||||
COLORREF OldColor = CLR_INVALID;
|
||||
|
||||
@@ -745,7 +745,7 @@ SetDCBrushColor(
|
||||
}
|
||||
}
|
||||
return OldColor;
|
||||
#endif
|
||||
//#endif
|
||||
return NtUserSetDCBrushColor(hdc, crColor);
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ SetDCPenColor(
|
||||
COLORREF crColor
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
//#if 0
|
||||
PDC_ATTR Dc_Attr;
|
||||
COLORREF OldColor = CLR_INVALID;
|
||||
|
||||
@@ -776,10 +776,105 @@ SetDCPenColor(
|
||||
}
|
||||
}
|
||||
return OldColor;
|
||||
#endif
|
||||
//#endif
|
||||
return NtUserSetDCPenColor(hdc, crColor);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
COLORREF
|
||||
STDCALL
|
||||
SetTextColor(
|
||||
HDC hdc,
|
||||
COLORREF crColor
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
PDC_ATTR Dc_Attr;
|
||||
COLORREF OldColor = CLR_INVALID;
|
||||
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return OldColor;
|
||||
#if 0
|
||||
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
|
||||
{
|
||||
if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
|
||||
return MFDRV_SetTextColor( hDC, crColor );
|
||||
else
|
||||
{
|
||||
PLDC pLDC = Dc_Attr->pvLDC;
|
||||
if ( !pLDC )
|
||||
{
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (pLDC->iType == LDC_EMFLDC)
|
||||
{
|
||||
if return EMFDRV_SetTextColor( hDC, crColor );
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
OldColor = (COLORREF) Dc_Attr->ulForegroundClr;
|
||||
Dc_Attr->ulForegroundClr = (ULONG) crColor;
|
||||
|
||||
if ( Dc_Attr->crForegroundClr != crColor )
|
||||
{
|
||||
Dc_Attr->ulDirty_ |= DIRTY_TEXT;
|
||||
Dc_Attr->crForegroundClr = crColor;
|
||||
}
|
||||
return OldColor;
|
||||
#endif
|
||||
return NtGdiSetTextColor(hdc, crColor);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
COLORREF
|
||||
STDCALL
|
||||
SetBkColor(
|
||||
HDC hdc,
|
||||
COLORREF crColor
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
PDC_ATTR Dc_Attr;
|
||||
COLORREF OldColor = CLR_INVALID;
|
||||
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return OldColor;
|
||||
#if 0
|
||||
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
|
||||
{
|
||||
if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
|
||||
return MFDRV_SetBkColor( hDC, crColor );
|
||||
else
|
||||
{
|
||||
PLDC pLDC = Dc_Attr->pvLDC;
|
||||
if ( !pLDC )
|
||||
{
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (pLDC->iType == LDC_EMFLDC)
|
||||
{
|
||||
if return EMFDRV_SetBkColor( hDC, crColor );
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
OldColor = (COLORREF) Dc_Attr->ulBackgroundClr;
|
||||
Dc_Attr->ulBackgroundClr = (ULONG) crColor;
|
||||
|
||||
if ( Dc_Attr->crBackgroundClr != crColor )
|
||||
{
|
||||
Dc_Attr->ulDirty_ |= DIRTY_LINE;
|
||||
Dc_Attr->crBackgroundClr = crColor;
|
||||
}
|
||||
return OldColor;
|
||||
#endif
|
||||
return NtGdiSetBkColor(hdc, crColor);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
|
||||
@@ -63,6 +63,36 @@ GetDIBColorTable(HDC hDC,
|
||||
return NtGdiDoPalette(hDC, iStartIndex, cEntries, pColors, GdiPalGetColorTable, FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
UINT
|
||||
WINAPI
|
||||
RealizePalette(HDC hDC) /* [in] Handle of device context */
|
||||
{
|
||||
#if 0
|
||||
// Handle something other than a normal dc object.
|
||||
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
|
||||
{
|
||||
if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
|
||||
return MFDRV_(hDC);
|
||||
else
|
||||
{
|
||||
HPALETTE Pal = GetDCObject(hDC, GDI_OBJECT_TYPE_PALETTE);
|
||||
PLDC pLDC = GdiGetLDC((HDC) Pal);
|
||||
if ( !pLDC ) return FALSE;
|
||||
if (pLDC->iType == LDC_EMFLDC) return EMFDRV_(Pal);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// return UserRealizePalette(hDC);
|
||||
|
||||
//HACK!!!!!
|
||||
return NtGdiRealizePalette(hDC);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
||||
@@ -252,6 +252,7 @@ NtGdiCreateCompatibleDC(HDC hDC)
|
||||
NewDC->Dc_Attr.crBackgroundClr = OrigDC->Dc_Attr.crBackgroundClr;
|
||||
NewDC->Dc_Attr.jBkMode = OrigDC->Dc_Attr.jBkMode;
|
||||
NewDC->Dc_Attr.jROP2 = OrigDC->Dc_Attr.jROP2;
|
||||
|
||||
DC_UnlockDc(NewDC);
|
||||
DC_UnlockDc(OrigDC);
|
||||
if (NULL != DisplayDC)
|
||||
@@ -264,6 +265,7 @@ NtGdiCreateCompatibleDC(HDC hDC)
|
||||
NtGdiDeleteObject(hVisRgn);
|
||||
|
||||
DC_InitDC(hNewDC);
|
||||
DCU_SynchDcAttrtoUser(hNewDC, -1);
|
||||
|
||||
return hNewDC;
|
||||
}
|
||||
@@ -933,9 +935,17 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
|
||||
NtGdiSetTextAlign(hNewDC, TA_TOP);
|
||||
NtGdiSetBkColor(hNewDC, RGB(255, 255, 255));
|
||||
NtGdiSetBkMode(hNewDC, OPAQUE);
|
||||
DCU_SynchDcAttrtoUser(hNewDC, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* From MSDN2:
|
||||
The CreateIC function creates an information context for the specified device.
|
||||
The information context provides a fast way to get information about the
|
||||
device without creating a device context (DC). However, GDI drawing functions
|
||||
cannot accept a handle to an information context.
|
||||
*/
|
||||
NewDC->DC_Type = DC_TYPE_INFO;
|
||||
DC_UnlockDc( NewDC );
|
||||
}
|
||||
|
||||
@@ -1360,6 +1370,7 @@ IntGdiGetDCState(HDC hDC)
|
||||
newdc->w.hClipRgn = NtGdiCreateRectRgn( 0, 0, 0, 0 );
|
||||
NtGdiCombineRgn( newdc->w.hClipRgn, dc->w.hClipRgn, 0, RGN_COPY );
|
||||
}
|
||||
DCU_SyncDcAttrtoUser(newdc, -1);
|
||||
DC_UnlockDc( newdc );
|
||||
DC_UnlockDc( dc );
|
||||
return hnewdc;
|
||||
@@ -2101,6 +2112,7 @@ NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
DCU_SyncDcAttrtoUser(dc, -1);
|
||||
DC_UnlockDc( dc );
|
||||
return objOrg;
|
||||
}
|
||||
@@ -2335,7 +2347,6 @@ DC_AllocDC(PUNICODE_STRING Driver)
|
||||
PDC NewDC;
|
||||
HDC hDC;
|
||||
PWSTR Buf = NULL;
|
||||
// PDC_ATTR DC_Attr = NULL;
|
||||
|
||||
if (Driver != NULL)
|
||||
{
|
||||
@@ -2356,7 +2367,7 @@ DC_AllocDC(PUNICODE_STRING Driver)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#if 0
|
||||
//#if 0
|
||||
PVOID NewMem = NULL;
|
||||
ULONG MemSize = sizeof(DC_ATTR); //PAGE_SIZE it will allocate that size
|
||||
NTSTATUS Status = ZwAllocateVirtualMemory(NtCurrentProcess(),
|
||||
@@ -2382,16 +2393,15 @@ DC_AllocDC(PUNICODE_STRING Driver)
|
||||
}
|
||||
}
|
||||
KeLeaveCriticalRegion();
|
||||
#endif
|
||||
//#endif
|
||||
NewDC = DC_LockDc(hDC);
|
||||
/* FIXME - Handle NewDC == NULL! */
|
||||
#if 0
|
||||
//#if 0
|
||||
if(NewMem)
|
||||
{
|
||||
NewDC->pDc_Attr = NewMem; // Store pointer
|
||||
DC_Attr = NewMem;
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
if (Driver != NULL)
|
||||
{
|
||||
RtlCopyMemory(&NewDC->DriverName, Driver, sizeof(UNICODE_STRING));
|
||||
@@ -2408,39 +2418,31 @@ DC_AllocDC(PUNICODE_STRING Driver)
|
||||
NewDC->w.xformVport2World = NewDC->w.xformWorld2Wnd;
|
||||
NewDC->w.vport2WorldValid = TRUE;
|
||||
|
||||
// XForm2MatrixS( &DC_Attr->mxWorldToDevice, &NewDC->w.xformWorld2Vport);
|
||||
// XForm2MatrixS( &DC_Attr->mxDevicetoWorld, &NewDC->w.xformVport2World);
|
||||
// XForm2MatrixS( &DC_Attr->mxWorldToPage, &NewDC->w.xformWorld2Wnd);
|
||||
|
||||
// Setup syncing bits for the dcattr data packets.
|
||||
// NewDC->Dc_Attr.flXform = DEVICE_TO_PAGE_INVALID;
|
||||
// DC_Attr->flXform = NewDC->Dc_Attr.flXform;
|
||||
// NewDC->Dc_Attr.ulDirty_ = 0; // Server side
|
||||
// DC_Attr->ulDirty_ = 0; // Client side
|
||||
NewDC->Dc_Attr.flXform = DEVICE_TO_PAGE_INVALID;
|
||||
|
||||
NewDC->Dc_Attr.ulDirty_ = 0; // Server side
|
||||
|
||||
NewDC->Dc_Attr.iMapMode = MM_TEXT;
|
||||
// DC_Attr->iMapMode = MM_TEXT;
|
||||
|
||||
NewDC->Dc_Attr.szlWindowExt.cx = 1; // Float to Int,,, WRONG!
|
||||
NewDC->Dc_Attr.szlWindowExt.cy = 1;
|
||||
NewDC->Dc_Attr.szlViewportExt.cx = 1;
|
||||
NewDC->Dc_Attr.szlViewportExt.cy = 1;
|
||||
// DC_Attr->szlWindowExt.cx = 1;
|
||||
// DC_Attr->szlWindowExt.cy = 1;
|
||||
// DC_Attr->szlViewportExt.cx = 1;
|
||||
// DC_Attr->szlViewportExt.cy = 1;
|
||||
|
||||
|
||||
NewDC->Dc_Attr.crForegroundClr = 0;
|
||||
NewDC->Dc_Attr.ulForegroundClr = 0;
|
||||
|
||||
NewDC->Dc_Attr.ulBackgroundClr = 0xffffff;
|
||||
NewDC->Dc_Attr.crBackgroundClr = 0xffffff;
|
||||
// DC_Attr->ulBackgroundClr = 0xffffff;
|
||||
// DC_Attr->crBackgroundClr = 0xffffff;
|
||||
|
||||
NewDC->Dc_Attr.ulPenClr = RGB( 0, 0, 0 );
|
||||
NewDC->Dc_Attr.crPenClr = RGB( 0, 0, 0 );
|
||||
|
||||
NewDC->Dc_Attr.ulBrushClr = RGB( 255, 255, 255 ); // Do this way too.
|
||||
NewDC->Dc_Attr.crBrushClr = RGB( 255, 255, 255 );
|
||||
|
||||
NewDC->Dc_Attr.hlfntNew = NtGdiGetStockObject(SYSTEM_FONT);
|
||||
// DC_Attr->hlfntNew = NewDC->Dc_Attr.hlfntNew; // It's a service to the user.
|
||||
TextIntRealizeFont(NewDC->Dc_Attr.hlfntNew);
|
||||
|
||||
NewDC->w.hPalette = NtGdiGetStockObject(DEFAULT_PALETTE);
|
||||
@@ -2477,10 +2479,10 @@ DC_InitDC(HDC DCHandle)
|
||||
*/
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
DC_FreeDC(HDC DCToFree)
|
||||
VOID
|
||||
FASTCALL
|
||||
DC_FreeDcAttr(HDC DCToFree)
|
||||
{
|
||||
#if 0
|
||||
KeEnterCriticalRegion();
|
||||
{
|
||||
INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)DCToFree);
|
||||
@@ -2500,7 +2502,14 @@ DC_FreeDC(HDC DCToFree)
|
||||
}
|
||||
}
|
||||
KeLeaveCriticalRegion();
|
||||
#endif
|
||||
}
|
||||
|
||||
VOID FASTCALL
|
||||
DC_FreeDC(HDC DCToFree)
|
||||
{
|
||||
//#if 0
|
||||
DC_FreeDcAttr(DCToFree);
|
||||
//#endif
|
||||
if (!GDIOBJ_FreeObj(GdiHandleTable, DCToFree, GDI_OBJECT_TYPE_DC))
|
||||
{
|
||||
DPRINT("DC_FreeDC failed\n");
|
||||
|
||||
@@ -8,7 +8,6 @@ static
|
||||
VOID
|
||||
CopytoUserDcAttr(PDC dc, PDC_ATTR Dc_Attr, FLONG Dirty)
|
||||
{
|
||||
|
||||
Dc_Attr->hpen = dc->Dc_Attr.hpen;
|
||||
Dc_Attr->hbrush = dc->Dc_Attr.hbrush;
|
||||
Dc_Attr->hColorSpace = dc->Dc_Attr.hColorSpace;
|
||||
@@ -67,10 +66,18 @@ CopyFromUserDcAttr(PDC dc, PDC_ATTR Dc_Attr, FLONG Dirty)
|
||||
}
|
||||
if ( Dirty & DIRTY_LINE || (Dc_Attr->ulDirty_ & DIRTY_LINE))
|
||||
{
|
||||
dc->Dc_Attr.ulPenClr = Dc_Attr->ulPenClr;
|
||||
dc->Dc_Attr.crPenClr = Dc_Attr->crPenClr;
|
||||
dc->Dc_Attr.crBackgroundClr = Dc_Attr->crBackgroundClr;
|
||||
dc->Dc_Attr.ulBackgroundClr = Dc_Attr->ulBackgroundClr;
|
||||
dc->Dc_Attr.ulPenClr = Dc_Attr->ulPenClr;
|
||||
dc->Dc_Attr.crPenClr = Dc_Attr->crPenClr;
|
||||
Dc_Attr->ulDirty_ &= ~DIRTY_LINE;
|
||||
}
|
||||
if ( Dirty & DIRTY_TEXT || (Dc_Attr->ulDirty_ & DIRTY_TEXT))
|
||||
{
|
||||
dc->Dc_Attr.crForegroundClr = Dc_Attr->crForegroundClr;
|
||||
dc->Dc_Attr.ulForegroundClr = Dc_Attr->ulForegroundClr;
|
||||
Dc_Attr->ulDirty_ &= ~DIRTY_TEXT;
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
@@ -133,6 +140,7 @@ DCU_UpdateUserXForms(PDC pDC, ULONG uMask)
|
||||
else
|
||||
{
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
KeEnterCriticalRegion();
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForWrite(DC_Attr,
|
||||
@@ -152,6 +160,7 @@ DCU_UpdateUserXForms(PDC pDC, ULONG uMask)
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
KeLeaveCriticalRegion();
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
@@ -173,6 +182,7 @@ DCU_SyncDcAttrtoUser(PDC dc, FLONG Dirty)
|
||||
else
|
||||
{
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
KeEnterCriticalRegion();
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForWrite(Dc_Attr,
|
||||
@@ -185,14 +195,9 @@ DCU_SyncDcAttrtoUser(PDC dc, FLONG Dirty)
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
TryHarder = TRUE;
|
||||
}
|
||||
if (TryHarder)
|
||||
{
|
||||
return ReadWriteVMDcAttr( dc, Dirty, TRUE);
|
||||
}
|
||||
KeLeaveCriticalRegion();
|
||||
if(!NT_SUCCESS(Status)) TryHarder = TRUE;
|
||||
if (TryHarder) return ReadWriteVMDcAttr( dc, Dirty, TRUE);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -218,6 +223,7 @@ DCU_SyncDcAttrtoW32k(PDC dc, FLONG Dirty)
|
||||
else
|
||||
{
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
KeEnterCriticalRegion();
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForRead(Dc_Attr,
|
||||
@@ -230,14 +236,9 @@ DCU_SyncDcAttrtoW32k(PDC dc, FLONG Dirty)
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
TryHarder = TRUE;
|
||||
}
|
||||
if (TryHarder)
|
||||
{
|
||||
return ReadWriteVMDcAttr( dc, Dirty, FALSE);
|
||||
}
|
||||
KeLeaveCriticalRegion();
|
||||
if(!NT_SUCCESS(Status)) TryHarder = TRUE;
|
||||
if (TryHarder) return ReadWriteVMDcAttr( dc, Dirty, FALSE);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user