Author: tkreuzer
Date: Tue Jan 1 09:40:48 2013
New Revision: 58076
URL:
http://svn.reactos.org/svn/reactos?rev=58076&view=rev
Log:
{WIN32K]
- Add some annotations
- Fix some 64bit issues
- Fix a typo
- reduce ENUM_RECT_LIMIT to 32, which is more than enough and doesn't waste as much
stack space
- remove some unused macros
Modified:
trunk/reactos/win32ss/gdi/eng/alphablend.c
trunk/reactos/win32ss/gdi/eng/bitblt.c
trunk/reactos/win32ss/gdi/eng/clip.c
trunk/reactos/win32ss/gdi/eng/copybits.c
trunk/reactos/win32ss/gdi/eng/debug.c
trunk/reactos/win32ss/gdi/eng/device.c
trunk/reactos/win32ss/gdi/eng/driverobj.c
trunk/reactos/win32ss/gdi/eng/engbrush.c
trunk/reactos/win32ss/gdi/eng/engevent.c
trunk/reactos/win32ss/gdi/eng/engmisc.c
trunk/reactos/win32ss/gdi/eng/error.c
trunk/reactos/win32ss/gdi/eng/float.c
trunk/reactos/win32ss/gdi/eng/gradient.c
trunk/reactos/win32ss/gdi/eng/inteng.h
trunk/reactos/win32ss/gdi/eng/ldevobj.c
trunk/reactos/win32ss/gdi/eng/lineto.c
trunk/reactos/win32ss/gdi/eng/mapping.c
trunk/reactos/win32ss/gdi/eng/surface.c
trunk/reactos/win32ss/gdi/eng/xlateobj.c
trunk/reactos/win32ss/gdi/ntgdi/gdifloat.h
trunk/reactos/win32ss/user/ntuser/object.h
Modified: trunk/reactos/win32ss/gdi/eng/alphablend.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/alphablend…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/alphablend.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/alphablend.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -17,13 +17,14 @@
*/
BOOL
APIENTRY
-EngAlphaBlend(IN SURFOBJ *psoDest,
- IN SURFOBJ *psoSource,
- IN CLIPOBJ *ClipRegion,
- IN XLATEOBJ *ColorTranslation,
- IN PRECTL DestRect,
- IN PRECTL SourceRect,
- IN BLENDOBJ *BlendObj)
+EngAlphaBlend(
+ _Inout_ SURFOBJ *psoDest,
+ _In_ SURFOBJ *psoSource,
+ _In_opt_ CLIPOBJ *ClipRegion,
+ _In_opt_ XLATEOBJ *ColorTranslation,
+ _In_ RECTL *DestRect,
+ _In_ RECTL *SourceRect,
+ _In_ BLENDOBJ *BlendObj)
{
RECTL InputRect;
RECTL OutputRect;
Modified: trunk/reactos/win32ss/gdi/eng/bitblt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/bitblt.c?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/bitblt.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/bitblt.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -296,18 +296,20 @@
/*
* @implemented
*/
-BOOL APIENTRY
-EngBitBlt(SURFOBJ *DestObj,
- SURFOBJ *SourceObj,
- SURFOBJ *Mask,
- CLIPOBJ *ClipRegion,
- XLATEOBJ *ColorTranslation,
- RECTL *DestRect,
- POINTL *SourcePoint,
- POINTL *MaskOrigin,
- BRUSHOBJ *pbo,
- POINTL *BrushOrigin,
- ROP4 Rop4)
+BOOL
+APIENTRY
+EngBitBlt(
+ _Inout_ SURFOBJ *psoTrg,
+ _In_opt_ SURFOBJ *psoSrc,
+ _In_opt_ SURFOBJ *psoMask,
+ _In_opt_ CLIPOBJ *pco,
+ _In_opt_ XLATEOBJ *pxlo,
+ _In_ RECTL *prclTrg,
+ _When_(psoSrc, _In_) POINTL *pptlSrc,
+ _When_(psoMask, _In_) POINTL *pptlMask,
+ _In_opt_ BRUSHOBJ *pbo,
+ _When_(pbo, _In_) POINTL *pptlBrush,
+ _In_ ROP4 rop4)
{
BYTE clippingType;
RECTL CombinedRect;
@@ -321,36 +323,36 @@
PBLTRECTFUNC BltRectFunc;
BOOLEAN Ret = TRUE;
RECTL ClipRect;
- unsigned i;
+ ULONG i;
POINTL Pt;
ULONG Direction;
BOOL UsesSource, UsesMask;
POINTL AdjustedBrushOrigin;
- UsesSource = ROP4_USES_SOURCE(Rop4);
- UsesMask = ROP4_USES_MASK(Rop4);
-
- if (Rop4 == ROP4_NOOP)
+ UsesSource = ROP4_USES_SOURCE(rop4);
+ UsesMask = ROP4_USES_MASK(rop4);
+
+ if (rop4 == ROP4_NOOP)
{
/* Copy destination onto itself: nop */
return TRUE;
}
- //DPRINT1("Rop4 : 0x%08x\n", Rop4);
-
- OutputRect = *DestRect;
+ //DPRINT1("rop4 : 0x%08x\n", rop4);
+
+ OutputRect = *prclTrg;
RECTL_vMakeWellOrdered(&OutputRect);
if (UsesSource)
{
- if (NULL == SourcePoint)
+ if (!psoSrc || !pptlSrc)
{
return FALSE;
}
/* Make sure we don't try to copy anything outside the valid source
region */
- InputPoint = *SourcePoint;
+ InputPoint = *pptlSrc;
if (InputPoint.x < 0)
{
OutputRect.left -= InputPoint.x;
@@ -361,17 +363,17 @@
OutputRect.top -= InputPoint.y;
InputPoint.y = 0;
}
- if (SourceObj->sizlBitmap.cx < InputPoint.x +
+ if (psoSrc->sizlBitmap.cx < InputPoint.x +
OutputRect.right - OutputRect.left)
{
OutputRect.right = OutputRect.left +
- SourceObj->sizlBitmap.cx - InputPoint.x;
- }
- if (SourceObj->sizlBitmap.cy < InputPoint.y +
+ psoSrc->sizlBitmap.cx - InputPoint.x;
+ }
+ if (psoSrc->sizlBitmap.cy < InputPoint.y +
OutputRect.bottom - OutputRect.top)
{
OutputRect.bottom = OutputRect.top +
- SourceObj->sizlBitmap.cy - InputPoint.y;
+ psoSrc->sizlBitmap.cy - InputPoint.y;
}
InputRect.left = InputPoint.x;
@@ -379,40 +381,40 @@
InputRect.top = InputPoint.y;
InputRect.bottom = InputPoint.y + (OutputRect.bottom - OutputRect.top);
- InputObj = SourceObj;
+ InputObj = psoSrc;
}
else
{
InputPoint.x = InputPoint.y = 0;
InputRect.left = 0;
- InputRect.right = DestRect->right - DestRect->left;
+ InputRect.right = prclTrg->right - prclTrg->left;
InputRect.top = 0;
- InputRect.bottom = DestRect->bottom - DestRect->top;
- }
-
- if (NULL != ClipRegion)
- {
- if (OutputRect.left < ClipRegion->rclBounds.left)
- {
- InputRect.left += ClipRegion->rclBounds.left - OutputRect.left;
- InputPoint.x += ClipRegion->rclBounds.left - OutputRect.left;
- OutputRect.left = ClipRegion->rclBounds.left;
- }
- if (ClipRegion->rclBounds.right < OutputRect.right)
- {
- InputRect.right -= OutputRect.right - ClipRegion->rclBounds.right;
- OutputRect.right = ClipRegion->rclBounds.right;
- }
- if (OutputRect.top < ClipRegion->rclBounds.top)
- {
- InputRect.top += ClipRegion->rclBounds.top - OutputRect.top;
- InputPoint.y += ClipRegion->rclBounds.top - OutputRect.top;
- OutputRect.top = ClipRegion->rclBounds.top;
- }
- if (ClipRegion->rclBounds.bottom < OutputRect.bottom)
- {
- InputRect.bottom -= OutputRect.bottom - ClipRegion->rclBounds.bottom;
- OutputRect.bottom = ClipRegion->rclBounds.bottom;
+ InputRect.bottom = prclTrg->bottom - prclTrg->top;
+ }
+
+ if (NULL != pco)
+ {
+ if (OutputRect.left < pco->rclBounds.left)
+ {
+ InputRect.left += pco->rclBounds.left - OutputRect.left;
+ InputPoint.x += pco->rclBounds.left - OutputRect.left;
+ OutputRect.left = pco->rclBounds.left;
+ }
+ if (pco->rclBounds.right < OutputRect.right)
+ {
+ InputRect.right -= OutputRect.right - pco->rclBounds.right;
+ OutputRect.right = pco->rclBounds.right;
+ }
+ if (OutputRect.top < pco->rclBounds.top)
+ {
+ InputRect.top += pco->rclBounds.top - OutputRect.top;
+ InputPoint.y += pco->rclBounds.top - OutputRect.top;
+ OutputRect.top = pco->rclBounds.top;
+ }
+ if (pco->rclBounds.bottom < OutputRect.bottom)
+ {
+ InputRect.bottom -= OutputRect.bottom - pco->rclBounds.bottom;
+ OutputRect.bottom = pco->rclBounds.bottom;
}
}
@@ -424,12 +426,12 @@
return TRUE;
}
- OutputObj = DestObj;
-
- if (BrushOrigin)
- {
- AdjustedBrushOrigin.x = BrushOrigin->x;
- AdjustedBrushOrigin.y = BrushOrigin->y;
+ OutputObj = psoTrg;
+
+ if (pptlBrush)
+ {
+ AdjustedBrushOrigin.x = pptlBrush->x;
+ AdjustedBrushOrigin.y = pptlBrush->y;
}
else
{
@@ -438,20 +440,20 @@
}
/* Determine clipping type */
- if (ClipRegion == (CLIPOBJ *) NULL)
+ if (pco == (CLIPOBJ *) NULL)
{
clippingType = DC_TRIVIAL;
}
else
{
- clippingType = ClipRegion->iDComplexity;
+ clippingType = pco->iDComplexity;
}
if (UsesMask)
{
BltRectFunc = BltMask;
}
- else if ((Rop4 & 0xFF) == R3_OPINDEX_PATCOPY)
+ else if ((rop4 & 0xFF) == R3_OPINDEX_PATCOPY)
{
if (pbo && pbo->iSolidColor == 0xFFFFFFFF)
BltRectFunc = CallDibBitBlt;
@@ -512,10 +514,10 @@
{
Direction = CD_ANY;
}
- CLIPOBJ_cEnumStart(ClipRegion, FALSE, CT_RECTANGLES, Direction, 0);
+ CLIPOBJ_cEnumStart(pco, FALSE, CT_RECTANGLES, Direction, 0);
do
{
- EnumMore = CLIPOBJ_bEnum(ClipRegion,(ULONG) sizeof(RectEnum),
+ EnumMore = CLIPOBJ_bEnum(pco, sizeof(RectEnum),
(PVOID) &RectEnum);
for (i = 0; i < RectEnum.c; i++)
@@ -535,10 +537,16 @@
#endif
Pt.x = InputPoint.x + CombinedRect.left - OutputRect.left;
Pt.y = InputPoint.y + CombinedRect.top - OutputRect.top;
- Ret = (*BltRectFunc)(OutputObj, InputObj, Mask,
- ColorTranslation, &CombinedRect,
&Pt,
- MaskOrigin, pbo, &AdjustedBrushOrigin,
- Rop4) && Ret;
+ Ret = (*BltRectFunc)(OutputObj,
+ InputObj,
+ psoMask,
+ pxlo,
+ &CombinedRect,
+ &Pt,
+ pptlMask,
+ pbo,
+ &AdjustedBrushOrigin,
+ rop4) && Ret;
}
}
}
@@ -965,7 +973,7 @@
{
BOOLEAN ret;
RECTL OutputRect;
- POINTL InputPoint;
+ POINTL InputPoint = {0,0};
//SURFACE *psurfDest;
ASSERT(psoMask);
Modified: trunk/reactos/win32ss/gdi/eng/clip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/clip.c?rev…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/clip.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/clip.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -188,13 +188,15 @@
return Cmp;
}
-VOID FASTCALL
+VOID
+FASTCALL
IntEngDeleteClipRegion(CLIPOBJ *ClipObj)
{
EngFreeMem(ObjToGDI(ClipObj, CLIP));
}
-CLIPOBJ* FASTCALL
+CLIPOBJ*
+FASTCALL
IntEngCreateClipRegion(ULONG count, PRECTL pRect, PRECTL rcBounds)
{
CLIPGDI *Clip;
@@ -250,7 +252,8 @@
/*
* @implemented
*/
-CLIPOBJ * APIENTRY
+CLIPOBJ *
+APIENTRY
EngCreateClip(VOID)
{
CLIPGDI *Clip = EngAllocMem(FL_ZERO_MEMORY, sizeof(CLIPGDI), GDITAG_CLIPOBJ);
@@ -265,32 +268,35 @@
/*
* @implemented
*/
-VOID APIENTRY
-EngDeleteClip(CLIPOBJ *ClipRegion)
-{
- EngFreeMem(ObjToGDI(ClipRegion, CLIP));
+VOID
+APIENTRY
+EngDeleteClip(
+ _In_ _Post_ptr_invalid_ CLIPOBJ *pco)
+{
+ EngFreeMem(ObjToGDI(pco, CLIP));
}
/*
* @implemented
*/
-ULONG APIENTRY
+ULONG
+APIENTRY
CLIPOBJ_cEnumStart(
- IN CLIPOBJ* ClipObj,
- IN BOOL ShouldDoAll,
- IN ULONG ClipType,
- IN ULONG BuildOrder,
- IN ULONG MaxRects)
-{
- CLIPGDI *ClipGDI = ObjToGDI(ClipObj, CLIP);
+ _Inout_ CLIPOBJ *pco,
+ _In_ BOOL bAll,
+ _In_ ULONG iType,
+ _In_ ULONG iDirection,
+ _In_ ULONG cMaxRects)
+{
+ CLIPGDI *ClipGDI = ObjToGDI(pco, CLIP);
SORTCOMP CompareFunc;
ClipGDI->EnumPos = 0;
- ClipGDI->EnumMax = (MaxRects > 0) ? MaxRects : ClipGDI->EnumRects.c;
-
- if (CD_ANY != BuildOrder && ClipGDI->EnumOrder != BuildOrder)
- {
- switch (BuildOrder)
+ ClipGDI->EnumMax = (cMaxRects > 0) ? cMaxRects : ClipGDI->EnumRects.c;
+
+ if (CD_ANY != iDirection && ClipGDI->EnumOrder != iDirection)
+ {
+ switch (iDirection)
{
case CD_RIGHTDOWN:
CompareFunc = (SORTCOMP) CompareRightDown;
@@ -320,11 +326,11 @@
EngSort((PBYTE) ClipGDI->EnumRects.arcl, sizeof(RECTL),
ClipGDI->EnumRects.c, CompareFunc);
}
- ClipGDI->EnumOrder = BuildOrder;
+ ClipGDI->EnumOrder = iDirection;
}
/* Return the number of rectangles enumerated */
- if ((MaxRects > 0) && (ClipGDI->EnumRects.c > MaxRects))
+ if ((cMaxRects > 0) && (ClipGDI->EnumRects.c > cMaxRects))
{
return 0xFFFFFFFF;
}
@@ -335,21 +341,22 @@
/*
* @implemented
*/
-BOOL APIENTRY
+BOOL
+APIENTRY
CLIPOBJ_bEnum(
- IN CLIPOBJ* ClipObj,
- IN ULONG ObjSize,
- OUT ULONG *EnumRects)
+ _In_ CLIPOBJ *pco,
+ _In_ ULONG cj,
+ _Out_bytecap_(cj) ULONG *pulEnumRects)
{
RECTL *dest, *src;
- CLIPGDI *ClipGDI = ObjToGDI(ClipObj, CLIP);
+ CLIPGDI *ClipGDI = ObjToGDI(pco, CLIP);
ULONG nCopy, i;
- ENUMRECTS* pERects = (ENUMRECTS*)EnumRects;
+ ENUMRECTS* pERects = (ENUMRECTS*)pulEnumRects;
// Calculate how many rectangles we should copy
nCopy = min( ClipGDI->EnumMax - ClipGDI->EnumPos,
min( ClipGDI->EnumRects.c - ClipGDI->EnumPos,
- (ObjSize - sizeof(ULONG)) / sizeof(RECTL)));
+ (cj - sizeof(ULONG)) / sizeof(RECTL)));
if(nCopy == 0)
{
Modified: trunk/reactos/win32ss/gdi/eng/copybits.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/copybits.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/copybits.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/copybits.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -15,12 +15,13 @@
* @implemented
*/
BOOL APIENTRY
-EngCopyBits(SURFOBJ *psoDest,
- SURFOBJ *psoSource,
- CLIPOBJ *Clip,
- XLATEOBJ *ColorTranslation,
- RECTL *DestRect,
- POINTL *SourcePoint)
+EngCopyBits(
+ _In_ SURFOBJ *psoDest,
+ _In_ SURFOBJ *psoSource,
+ _In_opt_ CLIPOBJ *Clip,
+ _In_opt_ XLATEOBJ *ColorTranslation,
+ _In_ RECTL *DestRect,
+ _In_ POINTL *SourcePoint)
{
BOOL ret;
BYTE clippingType;
@@ -50,7 +51,7 @@
rclDest.bottom = psoDest->sizlBitmap.cy;
if (RECTL_bIsEmptyRect(&rclDest)) return TRUE;
DestRect = &rclDest;
-
+
// FIXME: Don't punt to the driver's DrvCopyBits immediately. Instead,
// mark the copy block function to be DrvCopyBits instead of the
// GDI's copy bit function so as to remove clipping from the
Modified: trunk/reactos/win32ss/gdi/eng/debug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/debug.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/debug.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/debug.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -1,4 +1,4 @@
-/*
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE:
@@ -14,10 +14,12 @@
/*
* @implemented
*/
-VOID APIENTRY
-EngDebugPrint(PCHAR StandardPrefix,
- PCHAR DebugMessage,
- va_list ap)
+VOID
+APIENTRY
+EngDebugPrint(
+ _In_z_ PCHAR StandardPrefix,
+ _In_z_ PCHAR DebugMessage,
+ _In_ va_list ap)
{
vDbgPrintExWithPrefix(StandardPrefix,
-1,
Modified: trunk/reactos/win32ss/gdi/eng/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/device.c?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/device.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/device.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -47,6 +47,7 @@
NTSTATUS Status;
PWSTR pwsz;
ULONG i, cj, cModes = 0;
+ SIZE_T cjWritten;
BOOL bEnable = TRUE;
PDEVMODEINFO pdminfo;
PDEVMODEW pdm, pdmEnd;
@@ -77,7 +78,7 @@
}
/* Enable the device */
- EngFileWrite(pFileObject, &bEnable, sizeof(BOOL), &cj);
+ EngFileWrite(pFileObject, &bEnable, sizeof(BOOL), &cjWritten);
/* Copy the device and file object pointers */
pGraphicsDevice->DeviceObject = pDeviceObject;
@@ -288,11 +289,11 @@
NTSTATUS
EngpFileIoRequest(
PFILE_OBJECT pFileObject,
- ULONG ulMajorFunction,
- LPVOID lpBuffer,
- DWORD nBufferSize,
- ULONGLONG ullStartOffset,
- OUT LPDWORD lpInformation)
+ ULONG ulMajorFunction,
+ LPVOID lpBuffer,
+ SIZE_T nBufferSize,
+ ULONGLONG ullStartOffset,
+ OUT PULONG_PTR lpInformation)
{
PDEVICE_OBJECT pDeviceObject;
KEVENT Event;
@@ -316,7 +317,7 @@
pIrp = IoBuildSynchronousFsdRequest(ulMajorFunction,
pDeviceObject,
lpBuffer,
- nBufferSize,
+ (ULONG)nBufferSize,
&liStartOffset,
&Event,
&Iosb);
@@ -367,7 +368,7 @@
IN SIZE_T nInBufferSize,
OUT PVOID lpOutBuffer,
IN SIZE_T nOutBufferSize,
- OUT LPDWORD lpInformation)
+ OUT PULONG_PTR lpInformation)
{
PDEVICE_OBJECT pDeviceObject;
KEVENT Event;
@@ -389,9 +390,9 @@
pIrp = IoBuildDeviceIoControlRequest(dwIoControlCode,
pDeviceObject,
lpInBuffer,
- nInBufferSize,
+ (ULONG)nInBufferSize,
lpOutBuffer,
- nOutBufferSize,
+ (ULONG)nOutBufferSize,
FALSE,
&Event,
&Iosb);
@@ -422,13 +423,13 @@
*/
DWORD APIENTRY
EngDeviceIoControl(
- HANDLE hDevice,
- DWORD dwIoControlCode,
- LPVOID lpInBuffer,
- DWORD nInBufferSize,
- LPVOID lpOutBuffer,
- DWORD nOutBufferSize,
- DWORD *lpBytesReturned)
+ _In_ HANDLE hDevice,
+ _In_ DWORD dwIoControlCode,
+ _In_opt_bytecount_(cjInBufferSize) LPVOID lpInBuffer,
+ _In_ DWORD cjInBufferSize,
+ _Out_opt_bytecap_(cjOutBufferSize) LPVOID lpOutBuffer,
+ _In_ DWORD cjOutBufferSize,
+ _Out_ LPDWORD lpBytesReturned)
{
PIRP Irp;
NTSTATUS Status;
@@ -445,9 +446,12 @@
Irp = IoBuildDeviceIoControlRequest(dwIoControlCode,
DeviceObject,
lpInBuffer,
- nInBufferSize,
+ cjInBufferSize,
lpOutBuffer,
- nOutBufferSize, FALSE, &Event, &Iosb);
+ cjOutBufferSize,
+ FALSE,
+ &Event,
+ &Iosb);
if (!Irp) return ERROR_NOT_ENOUGH_MEMORY;
Status = IoCallDriver(DeviceObject, Irp);
@@ -462,7 +466,7 @@
Iosb.Information);
/* Return information to the caller about the operation. */
- *lpBytesReturned = Iosb.Information;
+ *lpBytesReturned = (DWORD)Iosb.Information;
/* Convert NT status values to win32 error codes. */
switch (Status)
Modified: trunk/reactos/win32ss/gdi/eng/driverobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/driverobj.…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/driverobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/driverobj.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -36,12 +36,13 @@
/** Public interface **********************************************************/
+_Must_inspect_result_
HDRVOBJ
APIENTRY
EngCreateDriverObj(
- IN PVOID pvObj,
- IN FREEOBJPROC pFreeObjProc,
- IN HDEV hdev)
+ _In_ PVOID pvObj,
+ _In_opt_ FREEOBJPROC pFreeObjProc,
+ _In_ HDEV hdev)
{
PEDRIVEROBJ pedo;
HDRVOBJ hdo;
@@ -72,9 +73,9 @@
BOOL
APIENTRY
EngDeleteDriverObj(
- IN HDRVOBJ hdo,
- IN BOOL bCallBack,
- IN BOOL bLocked)
+ _In_ _Post_ptr_invalid_ HDRVOBJ hdo,
+ _In_ BOOL bCallBack,
+ _In_ BOOL bLocked)
{
PEDRIVEROBJ pedo;
@@ -111,7 +112,7 @@
PDRIVEROBJ
APIENTRY
EngLockDriverObj(
- IN HDRVOBJ hdo)
+ _In_ HDRVOBJ hdo)
{
PEDRIVEROBJ pedo;
@@ -126,7 +127,7 @@
BOOL
APIENTRY
EngUnlockDriverObj(
- IN HDRVOBJ hdo)
+ _In_ _Post_ptr_invalid_ HDRVOBJ hdo)
{
PEDRIVEROBJ pedo;
ULONG cLocks;
Modified: trunk/reactos/win32ss/gdi/eng/engbrush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engbrush.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/engbrush.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/engbrush.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -287,7 +287,7 @@
EBRUSHOBJ_bRealizeBrush(EBRUSHOBJ *pebo, BOOL bCallDriver)
{
BOOL bResult;
- PFN_DrvRealizeBrush pfnRealzizeBrush = NULL;
+ PFN_DrvRealizeBrush pfnRealizeBrush = NULL;
PSURFACE psurfPattern, psurfMask;
PPDEVOBJ ppdev;
EXLATEOBJ exlo;
@@ -303,10 +303,10 @@
if (!ppdev) ppdev = gppdevPrimary;
if (bCallDriver)
- pfnRealzizeBrush = ppdev->DriverFunctions.RealizeBrush;
-
- if (!pfnRealzizeBrush)
- pfnRealzizeBrush = EngRealizeBrush;
+ pfnRealizeBrush = ppdev->DriverFunctions.RealizeBrush;
+
+ if (!pfnRealizeBrush)
+ pfnRealizeBrush = EngRealizeBrush;
/* Check if this is a hatch brush */
if (pbr->flAttrs & BR_IS_HATCH)
@@ -351,12 +351,12 @@
pebo->crCurrentText);
/* Create the realization */
- bResult = pfnRealzizeBrush(&pebo->BrushObject,
- &pebo->psurfTrg->SurfObj,
- &psurfPattern->SurfObj,
- psurfMask ? &psurfMask->SurfObj : NULL,
- &exlo.xlo,
- iHatch);
+ bResult = pfnRealizeBrush(&pebo->BrushObject,
+ &pebo->psurfTrg->SurfObj,
+ &psurfPattern->SurfObj,
+ psurfMask ? &psurfMask->SurfObj : NULL,
+ &exlo.xlo,
+ iHatch);
/* Cleanup the XLATEOBJ */
EXLATEOBJ_vCleanup(&exlo);
Modified: trunk/reactos/win32ss/gdi/eng/engevent.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engevent.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/engevent.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/engevent.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -17,7 +17,8 @@
BOOL
APIENTRY
-EngCreateEvent(OUT PEVENT* Event)
+EngCreateEvent(
+ _Deref_out_opt_ PEVENT* Event)
{
BOOLEAN Result = TRUE;
PENG_EVENT EngEvent;
@@ -54,7 +55,8 @@
BOOL
APIENTRY
-EngDeleteEvent(IN PEVENT Event)
+EngDeleteEvent(
+ _In_ _Post_ptr_invalid_ PEVENT Event)
{
DPRINT("EngDeleteEvent(%p)\n", Event);
@@ -75,7 +77,8 @@
VOID
APIENTRY
-EngClearEvent(IN PEVENT Event)
+EngClearEvent(
+ _In_ PEVENT Event)
{
/* Clear the event */
KeClearEvent(Event->pKEvent);
@@ -83,7 +86,8 @@
LONG
APIENTRY
-EngSetEvent(IN PEVENT Event)
+EngSetEvent(
+ _In_ PEVENT Event)
{
/* Set the event */
return KeSetEvent(Event->pKEvent,
@@ -93,7 +97,8 @@
LONG
APIENTRY
-EngReadStateEvent(IN PEVENT Event)
+EngReadStateEvent(
+ _In_ PEVENT Event)
{
/* Read the event state */
return KeReadStateEvent(Event->pKEvent);
@@ -101,11 +106,12 @@
PEVENT
APIENTRY
-EngMapEvent(IN HDEV hDev,
- IN HANDLE hUserObject,
- IN PVOID Reserved1,
- IN PVOID Reserved2,
- IN PVOID Reserved3)
+EngMapEvent(
+ _In_ HDEV hDev,
+ _In_ HANDLE hUserObject,
+ _Reserved_ PVOID Reserved1,
+ _Reserved_ PVOID Reserved2,
+ _Reserved_ PVOID Reserved3)
{
PENG_EVENT EngEvent;
NTSTATUS Status;
@@ -147,7 +153,8 @@
BOOL
APIENTRY
-EngUnmapEvent(IN PEVENT Event)
+EngUnmapEvent(
+ _In_ PEVENT Event)
{
/* Must be a usermapped event */
if (!(Event->fFlags & ENG_EVENT_USERMAPPED)) return FALSE;
@@ -162,8 +169,9 @@
BOOL
APIENTRY
-EngWaitForSingleObject(IN PEVENT Event,
- IN PLARGE_INTEGER TimeOut)
+EngWaitForSingleObject(
+ _In_ PEVENT Event,
+ _In_opt_ PLARGE_INTEGER TimeOut)
{
NTSTATUS Status;
DPRINT("EngWaitForSingleObject(%p %I64d)\n", Event, TimeOut->QuadPart);
Modified: trunk/reactos/win32ss/gdi/eng/engmisc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engmisc.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/engmisc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/engmisc.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -229,8 +229,9 @@
VOID
APIENTRY
-EngGetCurrentCodePage(OUT PUSHORT OemCodePage,
- OUT PUSHORT AnsiCodePage)
+EngGetCurrentCodePage(
+ _Out_ PUSHORT OemCodePage,
+ _Out_ PUSHORT AnsiCodePage)
{
/* Forward to kernel */
RtlGetDefaultCodePage(AnsiCodePage, OemCodePage);
@@ -239,8 +240,8 @@
BOOL
APIENTRY
EngQuerySystemAttribute(
- IN ENG_SYSTEM_ATTRIBUTE CapNum,
- OUT PDWORD pCapability)
+ _In_ ENG_SYSTEM_ATTRIBUTE CapNum,
+ _Out_ PDWORD pCapability)
{
SYSTEM_BASIC_INFORMATION sbi;
SYSTEM_PROCESSOR_INFORMATION spi;
Modified: trunk/reactos/win32ss/gdi/eng/error.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/error.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/error.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/error.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -24,7 +24,7 @@
*/
VOID
APIENTRY
-EngSetLastError(IN ULONG iError)
+EngSetLastError(_In_ ULONG iError)
{
PTEB pTeb = NtCurrentTeb();
if (pTeb)
Modified: trunk/reactos/win32ss/gdi/eng/float.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/float.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/float.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/float.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -18,7 +18,7 @@
BOOL
APIENTRY
EngRestoreFloatingPointState(
- IN VOID *Buffer)
+ _In_ VOID *Buffer)
{
NTSTATUS Status;
@@ -34,8 +34,8 @@
ULONG
APIENTRY
EngSaveFloatingPointState(
- OUT VOID *Buffer,
- IN ULONG BufferSize)
+ _Out_ VOID *Buffer,
+ _In_ ULONG BufferSize)
{
KFLOATING_SAVE TempBuffer;
NTSTATUS Status;
Modified: trunk/reactos/win32ss/gdi/eng/gradient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/gradient.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/gradient.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/gradient.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -1,4 +1,4 @@
-/*
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: GDI Driver Gradient Functions
@@ -443,16 +443,16 @@
BOOL APIENTRY
EngGradientFill(
- IN SURFOBJ *psoDest,
- IN CLIPOBJ *pco,
- IN XLATEOBJ *pxlo,
- IN TRIVERTEX *pVertex,
- IN ULONG nVertex,
- IN PVOID pMesh,
- IN ULONG nMesh,
- IN RECTL *prclExtents,
- IN POINTL *pptlDitherOrg,
- IN ULONG ulMode)
+ _Inout_ SURFOBJ *psoDest,
+ _In_ CLIPOBJ *pco,
+ _In_opt_ XLATEOBJ *pxlo,
+ _In_ TRIVERTEX *pVertex,
+ _In_ ULONG nVertex,
+ _In_ PVOID pMesh,
+ _In_ ULONG nMesh,
+ _In_ RECTL *prclExtents,
+ _In_ POINTL *pptlDitherOrg,
+ _In_ ULONG ulMode)
{
ULONG i;
BOOL ret = FALSE;
Modified: trunk/reactos/win32ss/gdi/eng/inteng.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/inteng.h?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/inteng.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/inteng.h [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -2,7 +2,7 @@
typedef ULONG HCLIP;
-#define ENUM_RECT_LIMIT 50
+#define ENUM_RECT_LIMIT 32
typedef struct _RECT_ENUM
{
Modified: trunk/reactos/win32ss/gdi/eng/ldevobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/ldevobj.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/ldevobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/ldevobj.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -324,7 +324,7 @@
WCHAR acwBuffer[MAX_PATH];
PLDEVOBJ pldev;
UNICODE_STRING strDriverName;
- ULONG cwcLength;
+ SIZE_T cwcLength;
LPWSTR pwsz;
DPRINT("EngLoadImageEx(%ls, %lu)\n", pwszDriverName, ldevtype);
@@ -442,7 +442,7 @@
HANDLE
APIENTRY
EngLoadImage(
- LPWSTR pwszDriverName)
+ _In_ LPWSTR pwszDriverName)
{
return (HANDLE)EngLoadImageEx(pwszDriverName, LDEV_IMAGE);
}
@@ -451,7 +451,7 @@
VOID
APIENTRY
EngUnloadImage(
- IN HANDLE hModule)
+ _In_ HANDLE hModule)
{
PLDEVOBJ pldev = (PLDEVOBJ)hModule;
@@ -486,8 +486,8 @@
PVOID
APIENTRY
EngFindImageProcAddress(
- IN HANDLE hModule,
- IN LPSTR lpProcName)
+ _In_ HANDLE hModule,
+ _In_ LPSTR lpProcName)
{
PLDEVOBJ pldev = (PLDEVOBJ)hModule;
Modified: trunk/reactos/win32ss/gdi/eng/lineto.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/lineto.c?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/lineto.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/lineto.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -316,15 +316,16 @@
* @implemented
*/
BOOL APIENTRY
-EngLineTo(SURFOBJ *DestObj,
- CLIPOBJ *Clip,
- BRUSHOBJ *pbo,
- LONG x1,
- LONG y1,
- LONG x2,
- LONG y2,
- RECTL *RectBounds,
- MIX mix)
+EngLineTo(
+ _Inout_ SURFOBJ *DestObj,
+ _In_ CLIPOBJ *Clip,
+ _In_ BRUSHOBJ *pbo,
+ _In_ LONG x1,
+ _In_ LONG y1,
+ _In_ LONG x2,
+ _In_ LONG y2,
+ _In_opt_ RECTL *RectBounds,
+ _In_ MIX mix)
{
LONG x, y, deltax, deltay, xchange, ychange, hx, vy;
ULONG i;
Modified: trunk/reactos/win32ss/gdi/eng/mapping.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/mapping.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/mapping.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/mapping.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -419,7 +419,8 @@
HANDLE
APIENTRY
-EngLoadModule(LPWSTR pwsz)
+EngLoadModule(
+ _In_ LPWSTR pwsz)
{
/* Forward to EngLoadModuleEx */
return (HANDLE)EngLoadModuleEx(pwsz, 0, FVF_READONLY | FVF_SYSTEMROOT);
@@ -428,8 +429,8 @@
HANDLE
APIENTRY
EngLoadModuleForWrite(
- IN LPWSTR pwsz,
- IN ULONG cjSizeOfModule)
+ _In_ LPWSTR pwsz,
+ _In_ ULONG cjSizeOfModule)
{
/* Forward to EngLoadModuleEx */
return (HANDLE)EngLoadModuleEx(pwsz, cjSizeOfModule, FVF_SYSTEMROOT);
@@ -438,15 +439,15 @@
PVOID
APIENTRY
EngMapModule(
- IN HANDLE h,
- OUT PULONG pulSize)
+ _In_ HANDLE h,
+ _Out_ PULONG pulSize)
{
PFILEVIEW pFileView = (PFILEVIEW)h;
NTSTATUS Status;
pFileView->cjView = 0;
- /* FIXME: Use system space because ARM3 doesn't support executable sections yet */
+ /* FIXME: Use system space because ARM3 doesn't support executable sections yet
*/
Status = MmMapViewInSystemSpace(pFileView->pSection,
&pFileView->pvKView,
&pFileView->cjView);
@@ -457,18 +458,19 @@
return NULL;
}
- *pulSize = pFileView->cjView;
+ *pulSize = (ULONG)pFileView->cjView;
return pFileView->pvKView;
}
VOID
APIENTRY
-EngFreeModule(IN HANDLE h)
+EngFreeModule(
+ _In_ HANDLE h)
{
PFILEVIEW pFileView = (PFILEVIEW)h;
NTSTATUS Status;
- /* FIXME: Use system space because ARM3 doesn't support executable sections yet */
+ /* FIXME: Use system space because ARM3 doesn't support executable sections yet
*/
Status = MmUnmapViewInSystemSpace(pFileView->pvKView);
if (!NT_SUCCESS(Status))
{
@@ -483,12 +485,14 @@
EngFreeMem(pFileView);
}
+_Success_(return != 0)
+_When_(cjSize != 0, _At_(return, _Out_writes_bytes_(cjSize)))
PVOID
APIENTRY
EngMapFile(
- IN LPWSTR pwsz,
- IN ULONG cjSize,
- OUT ULONG_PTR *piFile)
+ _In_ LPWSTR pwsz,
+ _In_ ULONG cjSize,
+ _Out_ ULONG_PTR *piFile)
{
HANDLE hModule;
PVOID pvBase;
@@ -517,7 +521,7 @@
BOOL
APIENTRY
EngUnmapFile(
- IN ULONG_PTR iFile)
+ _In_ ULONG_PTR iFile)
{
HANDLE hModule = (HANDLE)iFile;
@@ -530,9 +534,9 @@
BOOL
APIENTRY
EngMapFontFileFD(
- IN ULONG_PTR iFile,
- OUT PULONG *ppjBuf,
- OUT ULONG *pcjBuf)
+ _In_ ULONG_PTR iFile,
+ _Outptr_result_bytebuffer_(*pcjBuf) PULONG *ppjBuf,
+ _Out_ ULONG *pcjBuf)
{
//
www.osr.com/ddk/graphics/gdifncs_0co7.htm
UNIMPLEMENTED;
@@ -542,7 +546,7 @@
VOID
APIENTRY
EngUnmapFontFileFD(
- IN ULONG_PTR iFile)
+ _In_ ULONG_PTR iFile)
{
//
http://www.osr.com/ddk/graphics/gdifncs_6wbr.htm
UNIMPLEMENTED;
@@ -551,9 +555,9 @@
BOOL
APIENTRY
EngMapFontFile(
- ULONG_PTR iFile,
- PULONG *ppjBuf,
- ULONG *pcjBuf)
+ _In_ ULONG_PTR iFile,
+ _Outptr_result_bytebuffer_(*pcjBuf) PULONG *ppjBuf,
+ _Out_ ULONG *pcjBuf)
{
//
www.osr.com/ddk/graphics/gdifncs_3up3.htm
return EngMapFontFileFD(iFile, ppjBuf, pcjBuf);
@@ -562,7 +566,7 @@
VOID
APIENTRY
EngUnmapFontFile(
- IN ULONG_PTR iFile)
+ _In_ ULONG_PTR iFile)
{
//
www.osr.com/ddk/graphics/gdifncs_09wn.htm
EngUnmapFontFileFD(iFile);
Modified: trunk/reactos/win32ss/gdi/eng/surface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/surface.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/surface.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/surface.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -275,11 +275,11 @@
HBITMAP
APIENTRY
EngCreateBitmap(
- IN SIZEL sizl,
- IN LONG lWidth,
- IN ULONG iFormat,
- IN ULONG fl,
- IN PVOID pvBits)
+ _In_ SIZEL sizl,
+ _In_ LONG lWidth,
+ _In_ ULONG iFormat,
+ _In_ ULONG fl,
+ _In_ PVOID pvBits)
{
PSURFACE psurf;
HBITMAP hbmp;
@@ -315,9 +315,9 @@
HBITMAP
APIENTRY
EngCreateDeviceBitmap(
- IN DHSURF dhsurf,
- IN SIZEL sizl,
- IN ULONG iFormat)
+ _In_ DHSURF dhsurf,
+ _In_ SIZEL sizl,
+ _In_ ULONG iFormat)
{
PSURFACE psurf;
HBITMAP hbmp;
@@ -353,9 +353,9 @@
HSURF
APIENTRY
EngCreateDeviceSurface(
- IN DHSURF dhsurf,
- IN SIZEL sizl,
- IN ULONG iFormat)
+ _In_ DHSURF dhsurf,
+ _In_ SIZEL sizl,
+ _In_ ULONG iFormat)
{
PSURFACE psurf;
HSURF hsurf;
@@ -391,9 +391,9 @@
BOOL
APIENTRY
EngAssociateSurface(
- IN HSURF hsurf,
- IN HDEV hdev,
- IN FLONG flHooks)
+ _In_ HSURF hsurf,
+ _In_ HDEV hdev,
+ _In_ FLONG flHooks)
{
SURFOBJ *pso;
PSURFACE psurf;
@@ -431,14 +431,14 @@
BOOL
APIENTRY
EngModifySurface(
- IN HSURF hsurf,
- IN HDEV hdev,
- IN FLONG flHooks,
- IN FLONG flSurface,
- IN DHSURF dhsurf,
- OUT VOID *pvScan0,
- IN LONG lDelta,
- IN VOID *pvReserved)
+ _In_ HSURF hsurf,
+ _In_ HDEV hdev,
+ _In_ FLONG flHooks,
+ _In_ FLONG flSurface,
+ _In_ DHSURF dhsurf,
+ _In_ VOID *pvScan0,
+ _In_ LONG lDelta,
+ _Reserved_ VOID *pvReserved)
{
SURFOBJ *pso;
PSURFACE psurf;
@@ -478,7 +478,8 @@
BOOL
APIENTRY
-EngDeleteSurface(IN HSURF hsurf)
+EngDeleteSurface(
+ _In_ HSURF hsurf)
{
PSURFACE psurf;
@@ -496,9 +497,9 @@
BOOL
APIENTRY
EngEraseSurface(
- SURFOBJ *pso,
- RECTL *prcl,
- ULONG iColor)
+ _In_ SURFOBJ *pso,
+ _In_ RECTL *prcl,
+ _In_ ULONG iColor)
{
ASSERT(pso);
ASSERT(prcl);
@@ -517,7 +518,8 @@
SURFOBJ *
APIENTRY
-EngLockSurface(IN HSURF hsurf)
+EngLockSurface(
+ _In_ HSURF hsurf)
{
SURFACE *psurf = SURFACE_ShareLockSurface(hsurf);
@@ -534,7 +536,8 @@
VOID
APIENTRY
-EngUnlockSurface(IN SURFOBJ *pso)
+EngUnlockSurface(
+ _In_ SURFOBJ *pso)
{
if (pso != NULL)
{
Modified: trunk/reactos/win32ss/gdi/eng/xlateobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/xlateobj.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/xlateobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/xlateobj.c [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -42,7 +42,9 @@
_Function_class_(FN_XLATE)
ULONG
FASTCALL
-EXLATEOBJ_iXlateTrivial(PEXLATEOBJ pexlo, ULONG iColor)
+EXLATEOBJ_iXlateTrivial(
+ _In_ PEXLATEOBJ pexlo,
+ _In_ ULONG iColor)
{
return iColor;
}
@@ -50,7 +52,7 @@
_Function_class_(FN_XLATE)
ULONG
FASTCALL
-EXLATEOBJ_iXlateToMono(PEXLATEOBJ pexlo, ULONG iColor)
+EXLATEOBJ_iXlateToMono(_In_ PEXLATEOBJ pexlo, ULONG iColor)
{
return (iColor == pexlo->xlo.pulXlate[0]);
}
@@ -354,12 +356,12 @@
VOID
NTAPI
EXLATEOBJ_vInitialize(
- PEXLATEOBJ pexlo,
- PALETTE *ppalSrc,
- PALETTE *ppalDst,
- COLORREF crSrcBackColor,
- COLORREF crDstBackColor,
- COLORREF crDstForeColor)
+ _Out_ PEXLATEOBJ pexlo,
+ _In_opt_ PALETTE *ppalSrc,
+ _In_opt_ PALETTE *ppalDst,
+ _In_ COLORREF crSrcBackColor,
+ _In_ COLORREF crDstBackColor,
+ _In_ COLORREF crDstForeColor)
{
ULONG cEntries;
ULONG i, ulColor;
@@ -607,9 +609,9 @@
VOID
NTAPI
EXLATEOBJ_vInitXlateFromDCs(
- EXLATEOBJ* pexlo,
- PDC pdcSrc,
- PDC pdcDst)
+ _Out_ EXLATEOBJ* pexlo,
+ _In_ PDC pdcSrc,
+ _In_ PDC pdcDst)
{
PSURFACE psurfDst, psurfSrc;
@@ -644,7 +646,8 @@
VOID
NTAPI
-EXLATEOBJ_vCleanup(PEXLATEOBJ pexlo)
+EXLATEOBJ_vCleanup(
+ _Inout_ PEXLATEOBJ pexlo)
{
if (pexlo->xlo.pulXlate != pexlo->aulXlate)
{
@@ -658,7 +661,9 @@
#undef XLATEOBJ_iXlate
ULONG
NTAPI
-XLATEOBJ_iXlate(XLATEOBJ *pxlo, ULONG iColor)
+XLATEOBJ_iXlate(
+ _In_ XLATEOBJ *pxlo,
+ _In_ ULONG iColor)
{
PEXLATEOBJ pexlo = (PEXLATEOBJ)pxlo;
@@ -671,7 +676,11 @@
ULONG
NTAPI
-XLATEOBJ_cGetPalette(XLATEOBJ *pxlo, ULONG iPal, ULONG cPal, ULONG *pPalOut)
+XLATEOBJ_cGetPalette(
+ _In_ XLATEOBJ *pxlo,
+ _In_ ULONG iPal,
+ _In_ ULONG cPal,
+ _Out_cap_(cPal) ULONG *pPalOut)
{
PEXLATEOBJ pexlo = (PEXLATEOBJ)pxlo;
PPALETTE ppal;
@@ -741,7 +750,8 @@
HANDLE
NTAPI
-XLATEOBJ_hGetColorTransform(XLATEOBJ *pxlo)
+XLATEOBJ_hGetColorTransform(
+ _In_ XLATEOBJ *pxlo)
{
PEXLATEOBJ pexlo = (PEXLATEOBJ)pxlo;
return pexlo->hColorTransform;
@@ -749,7 +759,8 @@
PULONG
NTAPI
-XLATEOBJ_piVector(XLATEOBJ *pxlo)
+XLATEOBJ_piVector(
+ _In_ XLATEOBJ *pxlo)
{
if (pxlo->iSrcType == PAL_INDEXED)
{
Modified: trunk/reactos/win32ss/gdi/ntgdi/gdifloat.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/gdifloat…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/gdifloat.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/gdifloat.h [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -1,4 +1,9 @@
#pragma once
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:28110) // disable "Drivers must protect floating point
hardware state" warning
+#endif
typedef struct tagFLOAT_POINT
{
@@ -99,3 +104,7 @@
MulDiv((tx), (pdcattr)->szlViewportExt.cx, (pdcattr)->szlWindowExt.cx)
#define YLSTODS(pdcattr,ty) \
MulDiv((ty), (pdcattr)->szlViewportExt.cy, (pdcattr)->szlWindowExt.cy)
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
Modified: trunk/reactos/win32ss/user/ntuser/object.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/object…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/object.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/object.h [iso-8859-1] Tue Jan 1 09:40:48 2013
@@ -5,29 +5,6 @@
SINGLE_LIST_ENTRY Entry;
PVOID obj;
} USER_REFERENCE_ENTRY, *PUSER_REFERENCE_ENTRY;
-
-#define USER_ASSERT(exp,file,line) \
- if (!(exp)) {RtlAssert(#exp,(PVOID)file,line,"");}
-
-static __inline VOID
-UserAssertLastRef(PVOID obj, const char *file, int line)
-{
- PTHREADINFO W32Thread;
- PSINGLE_LIST_ENTRY ReferenceEntry;
- PUSER_REFERENCE_ENTRY UserReferenceEntry;
-
- USER_ASSERT(obj != NULL, file, line);
- W32Thread = PsGetCurrentThreadWin32Thread();
- USER_ASSERT(W32Thread != NULL, file, line);
- ReferenceEntry = W32Thread->ReferencesList.Next;
- USER_ASSERT(ReferenceEntry != NULL, file, line);
- UserReferenceEntry = CONTAINING_RECORD(ReferenceEntry, USER_REFERENCE_ENTRY, Entry);
- USER_ASSERT(UserReferenceEntry != NULL, file, line);
- USER_ASSERT(obj == UserReferenceEntry->obj, file, line);
-}
-#define ASSERT_LAST_REF(_obj_) UserAssertLastRef(_obj,__FILE__,__LINE__)
-
-#undef USER_ASSERT
extern PUSER_HANDLE_TABLE gHandleTable;
VOID FASTCALL UserReferenceObject(PVOID obj);