ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2008
----- 2024 -----
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
28 participants
657 discussions
Start a n
N
ew thread
[jimtabor] 37522: - Pass more bitmap cross tests, 16 bit is down to 52. I have more fixes that relate to that number, need more time to work on it. Fixed SEH abuse in CreateBitmap.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Fri Nov 21 12:34:31 2008 New Revision: 37522 URL:
http://svn.reactos.org/svn/reactos?rev=37522&view=rev
Log: - Pass more bitmap cross tests, 16 bit is down to 52. I have more fixes that relate to that number, need more time to work on it. Fixed SEH abuse in CreateBitmap. Modified: trunk/reactos/subsystems/win32/win32k/eng/surface.c trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/include/misc.h trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c Modified: trunk/reactos/subsystems/win32/win32k/eng/surface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] Fri Nov 21 12:34:31 2008 @@ -362,6 +362,7 @@ { BITMAPOBJ_UnlockBitmap(BitmapObj); BITMAPOBJ_FreeBitmapByHandle(NewBitmap); + SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); return 0; } } Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Fri Nov 21 12:34:31 2008 @@ -185,12 +185,12 @@ PVOID pvGammaRamp; // Gamma ramp pointer. + HSURF FillPatterns[HS_DDI_MAX]; + + ULONG DxDd_nCount; + DHPDEV hPDev; // DHPDEV for device. - - HSURF FillPatterns[HS_DDI_MAX]; - - ULONG DxDd_nCount; - + PVOID ppalSurf; // PEPALOBJ/PPALGDI for this device. DEVINFO DevInfo; GDIINFO GDIInfo; HSURF pSurface; // SURFACE for this device. Modified: trunk/reactos/subsystems/win32/win32k/include/misc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/misc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/misc.h [iso-8859-1] Fri Nov 21 12:34:31 2008 @@ -37,5 +37,7 @@ ULONG FASTCALL IntSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni); DWORD STDCALL IntGetQueueStatus(BOOL ClearChanges); VOID FASTCALL IntUserManualGuiCheck(LONG Check); +PVOID NTAPI HackSecureVirtualMemory(IN PVOID,IN SIZE_T,IN ULONG,OUT PVOID *); +VOID NTAPI HackUnsecureVirtualMemory(IN PVOID); #endif /* __WIN32K_MISC_H */ Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Fri Nov 21 12:34:31 2008 @@ -110,26 +110,25 @@ UINT BitsPixel, IN OPTIONAL LPBYTE pUnsafeBits) { - HBITMAP hBitmap; - - _SEH_TRY + if (pUnsafeBits) { - if (pUnsafeBits) + BOOL Hit = FALSE; + UINT cjBits = BITMAPOBJ_GetWidthBytes(Width, BitsPixel) * abs(Height); + + _SEH_TRY { - UINT cjBits = BITMAPOBJ_GetWidthBytes(Width, BitsPixel) * abs(Height); ProbeForRead(pUnsafeBits, cjBits, 1); } - - hBitmap = IntGdiCreateBitmap(Width, Height, Planes, BitsPixel, pUnsafeBits); - + _SEH_HANDLE + { + Hit = TRUE; + } + _SEH_END + + if (Hit) return 0; } - _SEH_HANDLE - { - hBitmap = 0; - } - _SEH_END - - return hBitmap; + + return IntGdiCreateBitmap(Width, Height, Planes, BitsPixel, pUnsafeBits); } BOOL INTERNAL_CALL @@ -195,6 +194,12 @@ { HBITMAP Bmp; PDC Dc; + + if ( Width <= 0 || Height <= 0 || (Width * Height) > 0x3FFFFFFF ) + { + SetLastWin32Error(ERROR_INVALID_PARAMETER); + return NULL; + } Dc = DC_LockDc(hDC);
15 years, 10 months
1
0
0
0
[sginsberg] 37521: - Move ntdef.h to DDK as that is where it belongs, and remove unnecessary system_header. Also fix a #endif (kudos to hto -- bug 3888) - Fix DDK to include ntdef.h instead of windef.h - Fix a check in debug.h
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Nov 21 12:18:12 2008 New Revision: 37521 URL:
http://svn.reactos.org/svn/reactos?rev=37521&view=rev
Log: - Move ntdef.h to DDK as that is where it belongs, and remove unnecessary system_header. Also fix a #endif (kudos to hto -- bug 3888) - Fix DDK to include ntdef.h instead of windef.h - Fix a check in debug.h Added: trunk/reactos/include/ddk/ntdef.h (with props) Removed: trunk/reactos/include/psdk/ntdef.h Modified: trunk/reactos/include/ddk/ntddk.h trunk/reactos/include/ddk/portcls.h trunk/reactos/include/ddk/punknown.h trunk/reactos/include/ddk/unknown.h trunk/reactos/include/reactos/debug.h Modified: trunk/reactos/include/ddk/ntddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntddk.h?rev=37…
============================================================================== --- trunk/reactos/include/ddk/ntddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/ntddk.h [iso-8859-1] Fri Nov 21 12:18:12 2008 @@ -32,7 +32,6 @@ #endif #include <stdarg.h> -#include <windef.h> #include <excpt.h> #include <ntdef.h> #include <basetyps.h> Added: trunk/reactos/include/ddk/ntdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntdef.h?rev=37…
============================================================================== --- trunk/reactos/include/ddk/ntdef.h (added) +++ trunk/reactos/include/ddk/ntdef.h [iso-8859-1] Fri Nov 21 12:18:12 2008 @@ -1,0 +1,137 @@ +#ifndef _NTDEF_H +#define _NTDEF_H + +#include <stdarg.h> +#include <windef.h> +#include <excpt.h> + +/* TODO: some compilers support this */ +#define RESTRICTED_POINTER + +#define NTAPI __stdcall +#if !defined(_M_CEE_PURE) +#define NTAPI_INLINE NTAPI +#else +#define NTAPI_INLINE +#endif + +#ifndef DECLSPEC_NOINLINE +#define DECLSPEC_NOINLINE __declspec(noinline) +#endif + +#define OBJ_INHERIT 0x00000002 +#define OBJ_PERMANENT 0x00000010 +#define OBJ_EXCLUSIVE 0x00000020 +#define OBJ_CASE_INSENSITIVE 0x00000040 +#define OBJ_OPENIF 0x00000080 +#define OBJ_OPENLINK 0x00000100 +#define OBJ_KERNEL_HANDLE 0x00000200 +#define OBJ_FORCE_ACCESS_CHECK 0x00000400 +#define OBJ_VALID_ATTRIBUTES 0x000007F2 +#define InitializeObjectAttributes(p,n,a,r,s) { \ + (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ + (p)->RootDirectory = (r); \ + (p)->Attributes = (a); \ + (p)->ObjectName = (n); \ + (p)->SecurityDescriptor = (s); \ + (p)->SecurityQualityOfService = NULL; \ +} +#ifndef NT_SUCCESS +#define NT_SUCCESS(x) ((x)>=0) +#endif +#define NT_WARNING(x) ((ULONG)(x)>>30==2) +#define NT_ERROR(x) ((ULONG)(x)>>30==3) +#if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H) +typedef LONG NTSTATUS, *PNTSTATUS; +typedef struct _UNICODE_STRING { + USHORT Length; + USHORT MaximumLength; + PWSTR Buffer; +} UNICODE_STRING, *PUNICODE_STRING; +typedef const UNICODE_STRING* PCUNICODE_STRING; +typedef struct _STRING { + USHORT Length; + USHORT MaximumLength; + PCHAR Buffer; +} STRING, *PSTRING; +typedef struct _CSTRING { + USHORT Length; + USHORT MaximumLength; + CONST CHAR *Buffer; +} CSTRING, *PCSTRING; +#endif +typedef STRING ANSI_STRING; +typedef PSTRING PANSI_STRING; +typedef STRING OEM_STRING; +typedef PSTRING POEM_STRING; +typedef CONST STRING* PCOEM_STRING; +typedef STRING CANSI_STRING; +typedef PSTRING PCANSI_STRING; +typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; +typedef CONST CHAR *LPCCH, *PCCH; +typedef signed char SCHAR; +typedef SCHAR *PSCHAR; +typedef enum _SECTION_INHERIT { + ViewShare = 1, + ViewUnmap = 2 +} SECTION_INHERIT; +typedef enum _NT_PRODUCT_TYPE { + NtProductWinNt = 1, + NtProductLanManNt, + NtProductServer +} NT_PRODUCT_TYPE, *PNT_PRODUCT_TYPE; +#if !defined(_NTSECAPI_H) +typedef struct _OBJECT_ATTRIBUTES { + ULONG Length; + HANDLE RootDirectory; + PUNICODE_STRING ObjectName; + ULONG Attributes; + PVOID SecurityDescriptor; + PVOID SecurityQualityOfService; +} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; +#endif + +typedef struct LIST_ENTRY32 +{ + ULONG Flink; + ULONG Blink; +} LIST_ENTRY32; +typedef LIST_ENTRY32 *PLIST_ENTRY32; + +typedef struct LIST_ENTRY64 +{ + ULONGLONG Flink; + ULONGLONG Blink; +} LIST_ENTRY64; +typedef LIST_ENTRY64 *PLIST_ENTRY64; + +#define NOTHING +#define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s } +#define TYPE_ALIGNMENT( t ) FIELD_OFFSET( struct { char x; t test; }, test ) +#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field)) +#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0])) +#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A) +#ifdef ENABLE_RTL_NUMBER_OF_V2 +#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A) +#else +#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A) +#endif +#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A) +#define MINCHAR 0x80 +#define MAXCHAR 0x7f +#define MINSHORT 0x8000 +#define MAXSHORT 0x7fff +#define MINLONG 0x80000000 +#define MAXLONG 0x7fffffff +#define MAXUCHAR 0xff +#define MAXUSHORT 0xffff +#define MAXULONG 0xffffffff +#define MAXLONGLONG (0x7fffffffffffffffLL) + +#define __C_ASSERT_JOIN(X, Y) __C_ASSERT_DO_JOIN(X, Y) +#define __C_ASSERT_DO_JOIN(X, Y) __C_ASSERT_DO_JOIN2(X, Y) +#define __C_ASSERT_DO_JOIN2(X, Y) X##Y + +#define C_ASSERT(e) typedef char __C_ASSERT_JOIN(__C_ASSERT__, __LINE__)[(e) ? 1 : -1] + +#endif /* _NTDEF_H */ Propchange: trunk/reactos/include/ddk/ntdef.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/ddk/portcls.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/portcls.h?rev=…
============================================================================== --- trunk/reactos/include/ddk/portcls.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/portcls.h [iso-8859-1] Fri Nov 21 12:18:12 2008 @@ -123,7 +123,6 @@ #ifndef PORTCLS_H #define PORTCLS_H -//#include <windef.h> #include <ks.h> #include <punknown.h> #include <ntddk.h> Modified: trunk/reactos/include/ddk/punknown.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/punknown.h?rev…
============================================================================== --- trunk/reactos/include/ddk/punknown.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/punknown.h [iso-8859-1] Fri Nov 21 12:18:12 2008 @@ -8,7 +8,7 @@ #ifndef _UNKNOWN_H_ #define _UNKNOWN_H_ -#include <windef.h> +#include <ntdef.h> #define COM_NO_WINDOWS_H #include <basetyps.h> Modified: trunk/reactos/include/ddk/unknown.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/unknown.h?rev=…
============================================================================== --- trunk/reactos/include/ddk/unknown.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/unknown.h [iso-8859-1] Fri Nov 21 12:18:12 2008 @@ -9,7 +9,7 @@ #include <wdm.h> #endif -#include <windef.h> +#include <ntdef.h> #define COM_NO_WINDOWS_H #include <basetyps.h> #ifdef PUT_GUIDS_HERE Removed: trunk/reactos/include/psdk/ntdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=3…
============================================================================== --- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntdef.h (removed) @@ -1,140 +1,0 @@ -#ifndef _NTDEF_H -#define _NTDEF_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif - -#include <stdarg.h> -#include <windef.h> -#include <excpt.h> - -/* TODO: some compilers support this */ -#define RESTRICTED_POINTER - -#define NTAPI __stdcall -#if !defined(_M_CEE_PURE) -#define NTAPI_INLINE NTAPI -#else -#define NTAPI_INLINE -#endif - -#ifndef DECLSPEC_NOINLINE -#define DECLSPEC_NOINLINE __declspec(noinline) -#endif - -#define OBJ_INHERIT 0x00000002 -#define OBJ_PERMANENT 0x00000010 -#define OBJ_EXCLUSIVE 0x00000020 -#define OBJ_CASE_INSENSITIVE 0x00000040 -#define OBJ_OPENIF 0x00000080 -#define OBJ_OPENLINK 0x00000100 -#define OBJ_KERNEL_HANDLE 0x00000200 -#define OBJ_FORCE_ACCESS_CHECK 0x00000400 -#define OBJ_VALID_ATTRIBUTES 0x000007F2 -#define InitializeObjectAttributes(p,n,a,r,s) { \ - (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ - (p)->RootDirectory = (r); \ - (p)->Attributes = (a); \ - (p)->ObjectName = (n); \ - (p)->SecurityDescriptor = (s); \ - (p)->SecurityQualityOfService = NULL; \ -} -#ifndef NT_SUCCESS -#define NT_SUCCESS(x) ((x)>=0) -#endif -#define NT_WARNING(x) ((ULONG)(x)>>30==2) -#define NT_ERROR(x) ((ULONG)(x)>>30==3) -#if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H) -typedef LONG NTSTATUS, *PNTSTATUS; -typedef struct _UNICODE_STRING { - USHORT Length; - USHORT MaximumLength; - PWSTR Buffer; -} UNICODE_STRING, *PUNICODE_STRING; -typedef const UNICODE_STRING* PCUNICODE_STRING; -typedef struct _STRING { - USHORT Length; - USHORT MaximumLength; - PCHAR Buffer; -} STRING, *PSTRING; -typedef struct _CSTRING { - USHORT Length; - USHORT MaximumLength; - CONST CHAR *Buffer; -} CSTRING, *PCSTRING; -#endif -typedef STRING ANSI_STRING; -typedef PSTRING PANSI_STRING; -typedef STRING OEM_STRING; -typedef PSTRING POEM_STRING; -typedef CONST STRING* PCOEM_STRING; -typedef STRING CANSI_STRING; -typedef PSTRING PCANSI_STRING; -typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; -typedef CONST CHAR *LPCCH, *PCCH; -typedef signed char SCHAR; -typedef SCHAR *PSCHAR; -typedef enum _SECTION_INHERIT { - ViewShare = 1, - ViewUnmap = 2 -} SECTION_INHERIT; -typedef enum _NT_PRODUCT_TYPE { - NtProductWinNt = 1, - NtProductLanManNt, - NtProductServer -} NT_PRODUCT_TYPE, *PNT_PRODUCT_TYPE; -#if !defined(_NTSECAPI_H) -typedef struct _OBJECT_ATTRIBUTES { - ULONG Length; - HANDLE RootDirectory; - PUNICODE_STRING ObjectName; - ULONG Attributes; - PVOID SecurityDescriptor; - PVOID SecurityQualityOfService; -} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES; -#endif - -typedef struct LIST_ENTRY32 -{ - ULONG Flink; - ULONG Blink; -} LIST_ENTRY32; -typedef LIST_ENTRY32 *PLIST_ENTRY32; - -typedef struct LIST_ENTRY64 -{ - ULONGLONG Flink; - ULONGLONG Blink; -} LIST_ENTRY64; -typedef LIST_ENTRY64 *PLIST_ENTRY64; - -#define NOTHING -#define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s } -#define TYPE_ALIGNMENT( t ) FIELD_OFFSET( struct { char x; t test; }, test ) -#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field)) -#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0])) -#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A) -#endif -#ifdef ENABLE_RTL_NUMBER_OF_V2 -#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V2(A) -#else -#define RTL_NUMBER_OF(A) RTL_NUMBER_OF_V1(A) -#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A) -#define MINCHAR 0x80 -#define MAXCHAR 0x7f -#define MINSHORT 0x8000 -#define MAXSHORT 0x7fff -#define MINLONG 0x80000000 -#define MAXLONG 0x7fffffff -#define MAXUCHAR 0xff -#define MAXUSHORT 0xffff -#define MAXULONG 0xffffffff -#define MAXLONGLONG (0x7fffffffffffffffLL) - -#define __C_ASSERT_JOIN(X, Y) __C_ASSERT_DO_JOIN(X, Y) -#define __C_ASSERT_DO_JOIN(X, Y) __C_ASSERT_DO_JOIN2(X, Y) -#define __C_ASSERT_DO_JOIN2(X, Y) X##Y - -#define C_ASSERT(e) typedef char __C_ASSERT_JOIN(__C_ASSERT__, __LINE__)[(e) ? 1 : -1] - -#endif /* _NTDEF_H */ Modified: trunk/reactos/include/reactos/debug.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/debug.h?re…
============================================================================== --- trunk/reactos/include/reactos/debug.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/debug.h [iso-8859-1] Fri Nov 21 12:18:12 2008 @@ -20,7 +20,7 @@ #if !defined(_RTLFUNCS_H) && (!defined(_NTDDK_) || !defined(__NTDDK_H)) /* Make sure we have basic types (some people include us *before* SDK... */ -#if !defined(_NTDEF_) && !defined(_WINDEF_) && !defined(_WINDEF_H) +#if !defined(_NTDEF_) && !defined(_NTDEF_H) && !defined(_WINDEF_) && !defined(_WINDEF_H) #error Please include SDK first. #endif
15 years, 10 months
1
0
0
0
[sginsberg] 37520: - Fix a warning
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Nov 21 11:53:10 2008 New Revision: 37520 URL:
http://svn.reactos.org/svn/reactos?rev=37520&view=rev
Log: - Fix a warning Modified: trunk/reactos/include/dxsdk/ddraw.h Modified: trunk/reactos/include/dxsdk/ddraw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/dxsdk/ddraw.h?rev=…
============================================================================== --- trunk/reactos/include/dxsdk/ddraw.h [iso-8859-1] (original) +++ trunk/reactos/include/dxsdk/ddraw.h [iso-8859-1] Fri Nov 21 11:53:10 2008 @@ -2557,6 +2557,7 @@ #define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a) #endif #endif +#undef INTERFACE #ifdef __cplusplus };
15 years, 10 months
1
0
0
0
[mjmartin] 37519: - Added EventSource structure for keeping track of EventLog Source name and associated Log File. - Added and Implemented ElfCreateEventLogHandle and ElfDeleteEventLogHandle.
by mjmartin@svn.reactos.org
Author: mjmartin Date: Fri Nov 21 09:40:47 2008 New Revision: 37519 URL:
http://svn.reactos.org/svn/reactos?rev=37519&view=rev
Log: - Added EventSource structure for keeping track of EventLog Source name and associated Log File. - Added and Implemented ElfCreateEventLogHandle and ElfDeleteEventLogHandle. Modified: trunk/reactos/base/services/eventlog/eventlog.h trunk/reactos/base/services/eventlog/rpc.c Modified: trunk/reactos/base/services/eventlog/eventlog.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/eve…
============================================================================== --- trunk/reactos/base/services/eventlog/eventlog.h [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/eventlog.h [iso-8859-1] Fri Nov 21 09:40:47 2008 @@ -94,6 +94,11 @@ LIST_ENTRY ListEntry; } LOGFILE, *PLOGFILE; +typedef struct +{ + PLOGFILE LogFile; + WCHAR *Name; +} EVENTSOURCE, *PEVENTSOURCE; /* file.c */ VOID LogfListInitialize(VOID); Modified: trunk/reactos/base/services/eventlog/rpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/rpc…
============================================================================== --- trunk/reactos/base/services/eventlog/rpc.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/rpc.c [iso-8859-1] Fri Nov 21 09:40:47 2008 @@ -41,6 +41,101 @@ return 0; } +IELF_HANDLE ElfCreateEventLogHandle(WCHAR *Name) +{ + PEVENTSOURCE EventSourceHandle; + PLOGFILE currentLogFile = NULL; + HKEY hLogSourceNameKey = NULL; + WCHAR *SourceNameRegKey = NULL; + DWORD dwError, dwSize; + INT i, LogsActive; + + EventSourceHandle = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTSOURCE)); + if (!EventSourceHandle) + { + DPRINT1("Failed to allocate Heap!\n"); + return NULL; + } + + EventSourceHandle->Name = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY ,(wcslen(Name) + 1) * sizeof(WCHAR)); + if (!EventSourceHandle->Name) + { + HeapFree(GetProcessHeap(),0, EventSourceHandle); + DPRINT1("Failed to allocate Heap!\n"); + return NULL; + } + + wcscpy(EventSourceHandle->Name, Name); + + /* Get the number of Log Files the EventLog service found */ + LogsActive = LogfListItemCount(); + if (LogsActive == 0) + { + DPRINT1("EventLog service reports no log files!\n"); + goto Cleanup; + } + + /* Default to the Application Log, as documented on MSDN */ + EventSourceHandle->LogFile = LogfListItemByName(L"Application"); + + for (i = 1; i <= LogsActive; i++) + { + currentLogFile = LogfListItemByIndex(i); + //DPRINT1("LogFile = %S\n",currentLogFile->LogName); + + dwSize = 90; + dwSize += (wcslen(currentLogFile->LogName) + 3) * sizeof(WCHAR); + dwSize += (wcslen(Name) + 1) * sizeof(WCHAR); + + SourceNameRegKey = HeapAlloc(GetProcessHeap(), 0, dwSize); + + wcscpy(SourceNameRegKey, L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\"); + wcsncat(SourceNameRegKey, currentLogFile->LogName, wcslen(currentLogFile->LogName)); + wcsncat(SourceNameRegKey, L"\\",2); + wcsncat(SourceNameRegKey, Name, wcslen(Name)); + + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + SourceNameRegKey, + 0, + KEY_READ, + &hLogSourceNameKey); + + HeapFree(GetProcessHeap(), 0, SourceNameRegKey); + + if (dwError == ERROR_SUCCESS) + { + EventSourceHandle->LogFile = currentLogFile; + break; + } + } + + /* If hLogSourceRegKey is NULL */ + if (!hLogSourceNameKey) + { + DPRINT1("Could not find subkey %S under any of the eventlog logfiles in registry. Using default of Application.\n",Name); + } + + if (hLogSourceNameKey) RegCloseKey(hLogSourceNameKey); + + return EventSourceHandle; + +Cleanup: + HeapFree(GetProcessHeap(), 0, EventSourceHandle->Name); + HeapFree(GetProcessHeap(), 0, EventSourceHandle); + return NULL; +} + +BOOL ElfDeleteEventLogHandle(IELF_HANDLE EventLogHandle) +{ + PEVENTSOURCE pHandle = (PEVENTSOURCE) EventLogHandle; + + if (pHandle->LogFile->Header.Signature != LOGFILE_SIGNATURE) + return FALSE; + + HeapFree(GetProcessHeap(),0,pHandle->Name); + HeapFree(GetProcessHeap(),0,pHandle); + return TRUE; +} /* Function 0 */ NTSTATUS ElfrClearELFW(
15 years, 10 months
1
0
0
0
[sginsberg] 37518: - Correct some constants so they don't conflict with aviriff.h
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Nov 21 09:32:18 2008 New Revision: 37518 URL:
http://svn.reactos.org/svn/reactos?rev=37518&view=rev
Log: - Correct some constants so they don't conflict with aviriff.h Modified: trunk/reactos/include/psdk/vfw.h Modified: trunk/reactos/include/psdk/vfw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/vfw.h?rev=375…
============================================================================== --- trunk/reactos/include/psdk/vfw.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/vfw.h [iso-8859-1] Fri Nov 21 09:32:18 2008 @@ -182,15 +182,7 @@ #define TWOCCFromFOURCC(fcc) HIWORD(fcc) #define ToHex(n) ((BYTE)(((n)>9)?((n)-10+'A'):((n)+'0'))) #define MAKEAVICKID(tcc, stream) MAKELONG((ToHex((stream)&0x0f)<<8)|(ToHex(((stream)&0xf0)>>4)),tcc) -#define AVIF_HASINDEX 0x10 -#define AVIF_MUSTUSEINDEX 0x20 -#define AVIF_ISINTERLEAVED 0x100 -#define AVIF_TRUSTCKTYPE 0x800 -#define AVIF_WASCAPTUREFILE 0x10000 -#define AVIF_COPYRIGHTED 0x20000 #define AVI_HEADERSIZE 2048 -#define AVISF_DISABLED 0x01 -#define AVISF_VIDEO_PALCHANGES 0x10000 #define AVIGETFRAMEF_BESTDISPLAYFMT 1 #define AVISTREAMINFO_DISABLED 0x01 #define AVISTREAMINFO_FORMATCHANGES 0x10000 @@ -518,6 +510,15 @@ LPVOID lpState; LONG cbState; } COMPVARS, *PCOMPVARS; + +/* flags for dwFlags member of MainAVIHeader */ +#define AVIF_HASINDEX 0x00000010 +#define AVIF_MUSTUSEINDEX 0x00000020 +#define AVIF_ISINTERLEAVED 0x00000100 +#define AVIF_TRUSTCKTYPE 0x00000800 +#define AVIF_WASCAPTUREFILE 0x00010000 +#define AVIF_COPYRIGHTED 0x00020000 + typedef struct _MainAVIHeader { DWORD dwMicroSecPerFrame; @@ -532,6 +533,11 @@ DWORD dwHeight; DWORD dwReserved[4]; } MainAVIHeader; + +/* flags for dwFlags member of AVIStreamHeader */ +#define AVISF_DISABLED 0x00000001 +#define AVISF_VIDEO_PALCHANGES 0x00010000 + typedef struct { FOURCC fccType; FOURCC fccHandler;
15 years, 10 months
1
0
0
0
[sginsberg] 37517: - Fix a bug
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Nov 21 09:23:27 2008 New Revision: 37517 URL:
http://svn.reactos.org/svn/reactos?rev=37517&view=rev
Log: - Fix a bug Modified: trunk/reactos/include/dxsdk/amaudio.h Modified: trunk/reactos/include/dxsdk/amaudio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/dxsdk/amaudio.h?re…
============================================================================== --- trunk/reactos/include/dxsdk/amaudio.h [iso-8859-1] (original) +++ trunk/reactos/include/dxsdk/amaudio.h [iso-8859-1] Fri Nov 21 09:23:27 2008 @@ -26,6 +26,7 @@ STDMETHOD(SetFocusWindow)(THIS_ HWND, BOOL) PURE ; STDMETHOD(GetFocusWindow)(THIS_ HWND *, BOOL*) PURE ; }; +#undef INTERFACE #ifdef __cplusplus }
15 years, 10 months
1
0
0
0
[sginsberg] 37516: - Fix double declarations/definitions and remove system_header
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Nov 21 09:12:00 2008 New Revision: 37516 URL:
http://svn.reactos.org/svn/reactos?rev=37516&view=rev
Log: - Fix double declarations/definitions and remove system_header Modified: trunk/reactos/include/psdk/vfw.h Modified: trunk/reactos/include/psdk/vfw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/vfw.h?rev=375…
============================================================================== --- trunk/reactos/include/psdk/vfw.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/vfw.h [iso-8859-1] Fri Nov 21 09:12:00 2008 @@ -1,8 +1,5 @@ #ifndef _VFW_H #define _VFW_H -#if __GNUC__ >= 3 -#pragma GCC system_header -#endif #ifndef _WINDOWS_H #include <windows.h> @@ -194,12 +191,6 @@ #define AVI_HEADERSIZE 2048 #define AVISF_DISABLED 0x01 #define AVISF_VIDEO_PALCHANGES 0x10000 -#define AVIIF_LIST 0x01 -#define AVIIF_TWOCC 0x02 -#define AVIIF_KEYFRAME 0x10 -#define AVIIF_NOTIME 0x100 -#define AVIIF_COMPUSE 0xfff0000 -#define AVIIF_KEYFRAME 0x10 #define AVIGETFRAMEF_BESTDISPLAYFMT 1 #define AVISTREAMINFO_DISABLED 0x01 #define AVISTREAMINFO_FORMATCHANGES 0x10000 @@ -720,7 +711,7 @@ STDMETHOD(WriteData)(THIS_ DWORD,LPVOID,LONG) PURE; STDMETHOD(SetInfo)(THIS_ AVISTREAMINFOW*,LONG) PURE; }; -typedef IAVIStream *PAVISTREAM; +#undef INTERFACE /***************************************************************************** * IAVIStreaming interface @@ -760,7 +751,7 @@ STDMETHOD(Clone)(THIS_ PAVISTREAM*) PURE; STDMETHOD(SetInfo)(THIS_ LPAVISTREAMINFOW,LONG) PURE; }; -typedef IAVIEditStream *PAVIEDITSTREAM; +#undef INTERFACE #define INTERFACE IAVIFile DECLARE_INTERFACE_(IAVIFile, IUnknown) @@ -777,7 +768,6 @@ STDMETHOD(DeleteStream)(THIS_ DWORD,LONG) PURE; }; #undef INTERFACE -typedef IAVIFile *PAVIFILE; #if !defined(__cplusplus) || defined(CINTERFACE) /*** IUnknown methods ***/
15 years, 10 months
1
0
0
0
[sginsberg] 37515: - woops. temporarily revert system_header to fix build
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Nov 21 09:02:06 2008 New Revision: 37515 URL:
http://svn.reactos.org/svn/reactos?rev=37515&view=rev
Log: - woops. temporarily revert system_header to fix build Modified: trunk/reactos/include/psdk/vfw.h Modified: trunk/reactos/include/psdk/vfw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/vfw.h?rev=375…
============================================================================== --- trunk/reactos/include/psdk/vfw.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/vfw.h [iso-8859-1] Fri Nov 21 09:02:06 2008 @@ -1,5 +1,8 @@ #ifndef _VFW_H #define _VFW_H +#if __GNUC__ >= 3 +#pragma GCC system_header +#endif #ifndef _WINDOWS_H #include <windows.h>
15 years, 10 months
1
0
0
0
[khornicek] 37514: - avoid losing pointer to the next bezier patch while freeing the current one (CID 1298)
by khornicek@svn.reactos.org
Author: khornicek Date: Fri Nov 21 09:01:01 2008 New Revision: 37514 URL:
http://svn.reactos.org/svn/reactos?rev=37514&view=rev
Log: - avoid losing pointer to the next bezier patch while freeing the current one (CID 1298) Modified: trunk/reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.cc Modified: trunk/reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.cc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/glu32/libnurbs/i…
============================================================================== --- trunk/reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.cc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/glu32/libnurbs/interface/bezierPatch.cc [iso-8859-1] Fri Nov 21 09:01:01 2008 @@ -111,8 +111,13 @@ void bezierPatchDeleteList(bezierPatch *b) { bezierPatch *temp; - for(temp = b; temp != NULL; temp = temp->next) - bezierPatchDelete(temp); + + while(b != NULL) + { + temp = b->next; + bezierPatchDelete(b); + b = temp; + } } bezierPatch* bezierPatchInsert(bezierPatch *list, bezierPatch *b)
15 years, 10 months
1
0
0
0
[sginsberg] 37513: - Remove some straggler system_header
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Nov 21 08:52:22 2008 New Revision: 37513 URL:
http://svn.reactos.org/svn/reactos?rev=37513&view=rev
Log: - Remove some straggler system_header Modified: trunk/reactos/include/psdk/raserror.h trunk/reactos/include/psdk/rassapi.h trunk/reactos/include/psdk/reason.h trunk/reactos/include/psdk/regstr.h trunk/reactos/include/psdk/vfw.h Modified: trunk/reactos/include/psdk/raserror.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/raserror.h?re…
============================================================================== --- trunk/reactos/include/psdk/raserror.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/raserror.h [iso-8859-1] Fri Nov 21 08:52:22 2008 @@ -1,8 +1,5 @@ #ifndef _RASERROR_H #define _RASERROR_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif #define RASBASE 600 #define SUCCESS 0 Modified: trunk/reactos/include/psdk/rassapi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/rassapi.h?rev…
============================================================================== --- trunk/reactos/include/psdk/rassapi.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/rassapi.h [iso-8859-1] Fri Nov 21 08:52:22 2008 @@ -1,8 +1,5 @@ #ifndef _RASSAPI_H #define _RASSAPI_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif #ifdef __cplusplus extern "C" { Modified: trunk/reactos/include/psdk/reason.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/reason.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/reason.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/reason.h [iso-8859-1] Fri Nov 21 08:52:22 2008 @@ -1,9 +1,5 @@ #ifndef _REASON_H #define _REASON_H - -#if __GNUC__ >=3 -#pragma GCC system_header -#endif #if _WIN32_WINNT >= 0x0501 Modified: trunk/reactos/include/psdk/regstr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/regstr.h?rev=…
============================================================================== --- trunk/reactos/include/psdk/regstr.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/regstr.h [iso-8859-1] Fri Nov 21 08:52:22 2008 @@ -1,8 +1,5 @@ #ifndef _REGSTR_H #define _REGSTR_H -#if __GNUC__ >=3 -#pragma GCC system_header -#endif #ifdef __cplusplus extern "C" { Modified: trunk/reactos/include/psdk/vfw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/vfw.h?rev=375…
============================================================================== --- trunk/reactos/include/psdk/vfw.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/vfw.h [iso-8859-1] Fri Nov 21 08:52:22 2008 @@ -1,8 +1,5 @@ #ifndef _VFW_H #define _VFW_H -#if __GNUC__ >= 3 -#pragma GCC system_header -#endif #ifndef _WINDOWS_H #include <windows.h>
15 years, 10 months
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
66
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Results per page:
10
25
50
100
200