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
December
November
October
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
September 2014
----- 2024 -----
December 2024
November 2024
October 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
16 participants
413 discussions
Start a n
N
ew thread
[akhaldi] 64270: [WINE/DEBUG] * Define debugstr_variant and co globally to avoid code duplication. CORE-8540
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Sep 25 14:59:07 2014 New Revision: 64270 URL:
http://svn.reactos.org/svn/reactos?rev=64270&view=rev
Log: [WINE/DEBUG] * Define debugstr_variant and co globally to avoid code duplication. CORE-8540 Modified: trunk/reactos/dll/win32/ieframe/ieframe_main.c trunk/reactos/dll/win32/jscript/jsutils.c trunk/reactos/dll/win32/mshtml/main.c trunk/reactos/dll/win32/msxml3/main.c trunk/reactos/dll/win32/vbscript/vbscript_main.c trunk/reactos/dll/win32/wbemprox/wbemprox_private.h trunk/reactos/include/reactos/wine/debug.h Modified: trunk/reactos/dll/win32/ieframe/ieframe_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/ieframe_…
============================================================================== --- trunk/reactos/dll/win32/ieframe/ieframe_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ieframe/ieframe_main.c [iso-8859-1] Thu Sep 25 14:59:07 2014 @@ -23,31 +23,6 @@ LONG module_ref = 0; HINSTANCE ieframe_instance; -const char *debugstr_variant(const VARIANT *v) -{ - if(!v) - return "(null)"; - - switch(V_VT(v)) { - case VT_EMPTY: - return "{VT_EMPTY}"; - case VT_NULL: - return "{VT_NULL}"; - case VT_I4: - return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v)); - case VT_R8: - return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v)); - case VT_BSTR: - return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v))); - case VT_DISPATCH: - return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v)); - case VT_BOOL: - return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v)); - default: - return wine_dbg_sprintf("{vt %d}", V_VT(v)); - } -} - static ITypeLib *typelib; static ITypeInfo *typeinfos[LAST_tid]; Modified: trunk/reactos/dll/win32/jscript/jsutils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/jsutils.…
============================================================================== --- trunk/reactos/dll/win32/jscript/jsutils.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/jscript/jsutils.c [iso-8859-1] Thu Sep 25 14:59:07 2014 @@ -20,35 +20,6 @@ WINE_DECLARE_DEBUG_CHANNEL(heap); -const char *debugstr_variant(const VARIANT *v) -{ - if(!v) - return "(null)"; - - switch(V_VT(v)) { - case VT_EMPTY: - return "{VT_EMPTY}"; - case VT_NULL: - return "{VT_NULL}"; - case VT_I4: - return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v)); - case VT_UI4: - return wine_dbg_sprintf("{VT_UI4: %u}", V_UI4(v)); - case VT_R8: - return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v)); - case VT_BSTR: - return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v))); - case VT_DISPATCH: - return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v)); - case VT_BOOL: - return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v)); - case VT_ARRAY|VT_VARIANT: - return "{VT_ARRAY|VT_VARIANT: ...}"; - default: - return wine_dbg_sprintf("{vt %d}", V_VT(v)); - } -} - const char *debugstr_jsval(const jsval_t v) { switch(jsval_type(v)) { Modified: trunk/reactos/dll/win32/mshtml/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/main.c?re…
============================================================================== --- trunk/reactos/dll/win32/mshtml/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mshtml/main.c [iso-8859-1] Thu Sep 25 14:59:07 2014 @@ -499,34 +499,3 @@ if(SUCCEEDED(hres)) hres = register_server(FALSE); return hres; } - -const char *debugstr_variant(const VARIANT *v) -{ - if(!v) - return "(null)"; - - switch(V_VT(v)) { - case VT_EMPTY: - return "{VT_EMPTY}"; - case VT_NULL: - return "{VT_NULL}"; - case VT_I2: - return wine_dbg_sprintf("{VT_I2: %d}", V_I2(v)); - case VT_I4: - return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v)); - case VT_R8: - return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v)); - case VT_BSTR: - return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v))); - case VT_DISPATCH: - return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v)); - case VT_ERROR: - return wine_dbg_sprintf("{VT_ERROR: %08x}", V_ERROR(v)); - case VT_BOOL: - return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v)); - case VT_UINT: - return wine_dbg_sprintf("{VT_UINT: %u}", V_UINT(v)); - default: - return wine_dbg_sprintf("{vt %d}", V_VT(v)); - } -} Modified: trunk/reactos/dll/win32/msxml3/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/main.c?re…
============================================================================== --- trunk/reactos/dll/win32/msxml3/main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msxml3/main.c [iso-8859-1] Thu Sep 25 14:59:07 2014 @@ -255,50 +255,6 @@ return TRUE; } -const char *debugstr_variant(const VARIANT *v) -{ - if(!v) - return "(null)"; - - switch(V_VT(v)) { - case VT_EMPTY: - return "{VT_EMPTY}"; - case VT_NULL: - return "{VT_NULL}"; - case VT_I1: - return wine_dbg_sprintf("{VT_I1: %d}", V_I1(v)); - case VT_I2: - return wine_dbg_sprintf("{VT_I2: %d}", V_I2(v)); - case VT_I4: - return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v)); - case VT_INT: - return wine_dbg_sprintf("{VT_INT: %d}", V_INT(v)); - case VT_R8: - return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v)); - case VT_BSTR: - return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v))); - case VT_DISPATCH: - return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v)); - case VT_BOOL: - return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v)); - case VT_UNKNOWN: - return wine_dbg_sprintf("{VT_UNKNOWN: %p}", V_UNKNOWN(v)); - case VT_UINT: - return wine_dbg_sprintf("{VT_UINT: %u}", V_UINT(v)); - case VT_BSTR|VT_BYREF: - return wine_dbg_sprintf("{VT_BSTR|VT_BYREF: ptr %p, data %s}", - V_BSTRREF(v), debugstr_w(V_BSTRREF(v) ? *V_BSTRREF(v) : NULL)); - case VT_ERROR: - return wine_dbg_sprintf("{VT_ERROR: 0x%08x}", V_ERROR(v)); - case VT_VARIANT|VT_BYREF: - return wine_dbg_sprintf("{VT_VARIANT|VT_BYREF: %s}", debugstr_variant(V_VARIANTREF(v))); - case VT_UI1|VT_ARRAY: - return "{VT_UI1|VT_ARRAY}"; - default: - return wine_dbg_sprintf("{vt %d}", V_VT(v)); - } -} - /*********************************************************************** * DllRegisterServer (MSXML3.@) */ Modified: trunk/reactos/dll/win32/vbscript/vbscript_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/vbscrip…
============================================================================== --- trunk/reactos/dll/win32/vbscript/vbscript_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/vbscript/vbscript_main.c [iso-8859-1] Thu Sep 25 14:59:07 2014 @@ -87,38 +87,6 @@ ITypeLib_Release(typelib); } -const char *debugstr_variant(const VARIANT *v) -{ - if(!v) - return "(null)"; - - if(V_ISBYREF(v)) - return wine_dbg_sprintf("{V_BYREF -> %s}", debugstr_variant(V_BYREF(v))); - - switch(V_VT(v)) { - case VT_EMPTY: - return "{VT_EMPTY}"; - case VT_NULL: - return "{VT_NULL}"; - case VT_I2: - return wine_dbg_sprintf("{VT_I2: %d}", V_I2(v)); - case VT_I4: - return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v)); - case VT_UI4: - return wine_dbg_sprintf("{VT_UI4: %u}", V_UI4(v)); - case VT_R8: - return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v)); - case VT_BSTR: - return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v))); - case VT_DISPATCH: - return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v)); - case VT_BOOL: - return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v)); - default: - return wine_dbg_sprintf("{vt %d}", V_VT(v)); - } -} - #define MIN_BLOCK_SIZE 128 #define ARENA_FREE_FILLER 0xaa Modified: trunk/reactos/dll/win32/wbemprox/wbemprox_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wbemprox/wbempro…
============================================================================== --- trunk/reactos/dll/win32/wbemprox/wbemprox_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wbemprox/wbemprox_private.h [iso-8859-1] Thu Sep 25 14:59:07 2014 @@ -280,37 +280,6 @@ return dst; } -static inline const char *debugstr_variant( const VARIANT *v ) -{ - if (!v) return "(null)"; - switch (V_VT(v)) - { - case VT_EMPTY: - return "{VT_EMPTY}"; - case VT_NULL: - return "{VT_NULL}"; - case VT_I4: - return wine_dbg_sprintf( "{VT_I4: %d}", V_I4(v) ); - case VT_R8: - return wine_dbg_sprintf( "{VT_R8: %lf}", V_R8(v) ); - case VT_BSTR: - return wine_dbg_sprintf( "{VT_BSTR: %s}", debugstr_w(V_BSTR(v)) ); - case VT_DISPATCH: - return wine_dbg_sprintf( "{VT_DISPATCH: %p}", V_DISPATCH(v) ); - case VT_BOOL: - return wine_dbg_sprintf( "{VT_BOOL: %x}", V_BOOL(v) ); - case VT_UNKNOWN: - return wine_dbg_sprintf( "{VT_UNKNOWN: %p}", V_UNKNOWN(v) ); - case VT_UINT: - return wine_dbg_sprintf( "{VT_UINT: %u}", V_UINT(v) ); - case VT_BSTR|VT_BYREF: - return wine_dbg_sprintf( "{VT_BSTR|VT_BYREF: ptr %p, data %s}", - V_BSTRREF(v), V_BSTRREF(v) ? debugstr_w( *V_BSTRREF(v) ) : NULL ); - default: - return wine_dbg_sprintf( "{vt %d}", V_VT(v) ); - } -} - static const WCHAR class_processW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s',0}; static const WCHAR class_serviceW[] = {'W','i','n','3','2','_','S','e','r','v','i','c','e',0}; static const WCHAR class_stdregprovW[] = {'S','t','d','R','e','g','P','r','o','v',0}; Modified: trunk/reactos/include/reactos/wine/debug.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/debug…
============================================================================== --- trunk/reactos/include/reactos/wine/debug.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/debug.h [iso-8859-1] Thu Sep 25 14:59:07 2014 @@ -231,6 +231,124 @@ else return wine_dbg_sprintf( "%lx", (unsigned long)ll ); } +#if defined(__oaidl_h__) && defined(V_VT) + +static inline const char *wine_dbgstr_vt( VARTYPE vt ) +{ + static const char *const variant_types[] = + { + "VT_EMPTY","VT_NULL","VT_I2","VT_I4","VT_R4","VT_R8","VT_CY","VT_DATE", + "VT_BSTR","VT_DISPATCH","VT_ERROR","VT_BOOL","VT_VARIANT","VT_UNKNOWN", + "VT_DECIMAL","15","VT_I1","VT_UI1","VT_UI2","VT_UI4","VT_I8","VT_UI8", + "VT_INT","VT_UINT","VT_VOID","VT_HRESULT","VT_PTR","VT_SAFEARRAY", + "VT_CARRAY","VT_USERDEFINED","VT_LPSTR","VT_LPWSTR","32","33","34","35", + "VT_RECORD","VT_INT_PTR","VT_UINT_PTR","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","VT_FILETIME","VT_BLOB","VT_STREAM","VT_STORAGE", + "VT_STREAMED_OBJECT","VT_STORED_OBJECT","VT_BLOB_OBJECT","VT_CF","VT_CLSID", + "VT_VERSIONED_STREAM" + }; + + static const char *const variant_flags[16] = + { + "", + "|VT_VECTOR", + "|VT_ARRAY", + "|VT_VECTOR|VT_ARRAY", + "|VT_BYREF", + "|VT_VECTOR|VT_ARRAY", + "|VT_ARRAY|VT_BYREF", + "|VT_VECTOR|VT_ARRAY|VT_BYREF", + "|VT_RESERVED", + "|VT_VECTOR|VT_RESERVED", + "|VT_ARRAY|VT_RESERVED", + "|VT_VECTOR|VT_ARRAY|VT_RESERVED", + "|VT_BYREF|VT_RESERVED", + "|VT_VECTOR|VT_ARRAY|VT_RESERVED", + "|VT_ARRAY|VT_BYREF|VT_RESERVED", + "|VT_VECTOR|VT_ARRAY|VT_BYREF|VT_RESERVED", + }; + + if (vt & ~VT_TYPEMASK) + return wine_dbg_sprintf( "%s%s", wine_dbgstr_vt(vt&VT_TYPEMASK), variant_flags[vt>>12] ); + + if (vt < sizeof(variant_types)/sizeof(*variant_types)) + return variant_types[vt]; + + if (vt == VT_BSTR_BLOB) + return "VT_BSTR_BLOB"; + + return wine_dbg_sprintf( "vt(invalid %x)", vt ); +} + +static inline const char *wine_dbgstr_variant( const VARIANT *v ) +{ + if (!v) + return "(null)"; + + if (V_VT(v) & VT_BYREF) { + if (V_VT(v) == (VT_VARIANT|VT_BYREF)) + return wine_dbg_sprintf( "%p {VT_VARIANT|VT_BYREF: %s}", v, wine_dbgstr_variant(V_VARIANTREF(v)) ); + return wine_dbg_sprintf( "%p {%s %p}", v, wine_dbgstr_vt(V_VT(v)), V_BYREF(v) ); + } + + if (V_ISARRAY(v) || V_ISVECTOR(v)) + return wine_dbg_sprintf( "%p {%s %p}", v, wine_dbgstr_vt(V_VT(v)), V_ARRAY(v) ); + + switch(V_VT(v)) { + case VT_EMPTY: + return wine_dbg_sprintf( "%p {VT_EMPTY}", v ); + case VT_NULL: + return wine_dbg_sprintf( "%p {VT_NULL}", v ); + case VT_I2: + return wine_dbg_sprintf( "%p {VT_I2: %d}", v, V_I2(v) ); + case VT_I4: + return wine_dbg_sprintf( "%p {VT_I4: %d}", v, V_I4(v) ); + case VT_R4: + return wine_dbg_sprintf( "%p {VT_R4: %f}", v, V_R4(v) ); + case VT_R8: + return wine_dbg_sprintf( "%p {VT_R8: %lf}", v, V_R8(v) ); + case VT_CY: + return wine_dbg_sprintf( "%p {VT_CY: %s}", v, wine_dbgstr_longlong(V_CY(v).int64) ); + case VT_DATE: + return wine_dbg_sprintf( "%p {VT_DATE: %lf}", v, V_DATE(v) ); + case VT_BSTR: + return wine_dbg_sprintf( "%p {VT_BSTR: %s}", v, wine_dbgstr_w(V_BSTR(v)) ); + case VT_DISPATCH: + return wine_dbg_sprintf( "%p {VT_DISPATCH: %p}", v, V_DISPATCH(v) ); + case VT_ERROR: + return wine_dbg_sprintf( "%p {VT_ERROR: %08x}", v, V_ERROR(v) ); + case VT_BOOL: + return wine_dbg_sprintf( "%p {VT_BOOL: %x}", v, V_BOOL(v) ); + case VT_UNKNOWN: + return wine_dbg_sprintf( "%p {VT_UNKNOWN: %p}", v, V_UNKNOWN(v) ); + case VT_I1: + return wine_dbg_sprintf( "%p {VT_I1: %d}", v, V_I1(v) ); + case VT_UI1: + return wine_dbg_sprintf( "%p {VT_UI1: %u}", v, V_UI1(v) ); + case VT_UI2: + return wine_dbg_sprintf( "%p {VT_UI2: %d}", v, V_UI2(v) ); + case VT_UI4: + return wine_dbg_sprintf( "%p {VT_UI4: %d}", v, V_UI4(v) ); + case VT_I8: + return wine_dbg_sprintf( "%p {VT_I8: %s}", v, wine_dbgstr_longlong(V_I8(v)) ); + case VT_UI8: + return wine_dbg_sprintf( "%p {VT_UI8: %s}", v, wine_dbgstr_longlong(V_UI8(v)) ); + case VT_INT: + return wine_dbg_sprintf( "%p {VT_INT: %d}", v, V_INT(v) ); + case VT_UINT: + return wine_dbg_sprintf( "%p {VT_UINT: %u}", v, V_UINT(v) ); + case VT_VOID: + return wine_dbg_sprintf( "%p {VT_VOID}", v ); + case VT_RECORD: + return wine_dbg_sprintf( "%p {VT_RECORD: %p %p}", v, V_UNION(v,brecVal).pvRecord, V_UNION(v,brecVal).pRecInfo ); + default: + return wine_dbg_sprintf( "%p {vt %s}", v, wine_dbgstr_vt(V_VT(v)) ); + } +} + +#endif /* defined(__oaidl_h__) && defined(V_VT) */ + #ifndef WINE_TRACE #define WINE_TRACE __WINE_DPRINTF(_TRACE,__wine_dbch___default) #define WINE_TRACE_(ch) __WINE_DPRINTF(_TRACE,&__wine_dbch_##ch) @@ -270,6 +388,11 @@ static __inline const char *debugstr_a( const char *s ) { return wine_dbgstr_an( s, -1 ); } static __inline const char *debugstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); } +#if defined(__oaidl_h__) && defined(V_VT) +static __inline const char *debugstr_vt( VARTYPE vt ) { return wine_dbgstr_vt( vt ); } +static __inline const char *debugstr_variant( const VARIANT *v ) { return wine_dbgstr_variant( v ); } +#endif + #define TRACE WINE_TRACE #define TRACE_(ch) WINE_TRACE_(ch) #define TRACE_ON(ch) WINE_TRACE_ON(ch)
10 years, 3 months
1
0
0
0
[tfaber] 64269: [SECURE32] - Avoid uninitialized variable use aka fix MSVC build
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Sep 25 14:53:32 2014 New Revision: 64269 URL:
http://svn.reactos.org/svn/reactos?rev=64269&view=rev
Log: [SECURE32] - Avoid uninitialized variable use aka fix MSVC build Modified: trunk/reactos/dll/win32/secur32/lsalpc.c Modified: trunk/reactos/dll/win32/secur32/lsalpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/secur32/lsalpc.c…
============================================================================== --- trunk/reactos/dll/win32/secur32/lsalpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/secur32/lsalpc.c [iso-8859-1] Thu Sep 25 14:53:32 2014 @@ -71,7 +71,7 @@ SecurityQos.EffectiveOnly = TRUE; RtlZeroMemory(&ConnectInfo, - ConnectInfoLength); + sizeof(ConnectInfo)); ConnectInfo.CreateContext = FALSE;
10 years, 3 months
1
0
0
0
[akhaldi] 64268: [PSDK] * Add AutoProxyHelperVtbl, AutoProxyHelperFunctions and AUTO_PROXY_SCRIPT_BUFFER. CORE-8540
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Sep 25 14:43:29 2014 New Revision: 64268 URL:
http://svn.reactos.org/svn/reactos?rev=64268&view=rev
Log: [PSDK] * Add AutoProxyHelperVtbl, AutoProxyHelperFunctions and AUTO_PROXY_SCRIPT_BUFFER. CORE-8540 Modified: trunk/reactos/include/psdk/wininet.h Modified: trunk/reactos/include/psdk/wininet.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wininet.h?rev…
============================================================================== --- trunk/reactos/include/psdk/wininet.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/wininet.h [iso-8859-1] Thu Sep 25 14:43:29 2014 @@ -2559,6 +2559,31 @@ #define InternetGetConnectedStateEx WINELIB_NAME_AW(InternetGetConnectedStateEx) +typedef struct AutoProxyHelperVtbl +{ + BOOL (WINAPI *IsResolvable)(LPSTR); + DWORD (WINAPI *GetIPAddress)(LPSTR, LPDWORD); + DWORD (WINAPI *ResolveHostName)(LPSTR, LPSTR, LPDWORD); + BOOL (WINAPI *IsInNet)(LPSTR, LPSTR, LPSTR); + BOOL (WINAPI *IsResolvableEx)(LPSTR); + DWORD (WINAPI *GetIPAddressEx)(LPSTR, LPDWORD); + DWORD (WINAPI *ResolveHostNameEx)(LPSTR, LPSTR, LPDWORD); + BOOL (WINAPI *IsInNetEx)(LPSTR, LPSTR); + DWORD (WINAPI *SortIpList)(LPSTR, LPSTR, LPDWORD); +} AutoProxyHelperVtbl; + +typedef struct AutoProxyHelperFunctions +{ + const struct AutoProxyHelperVtbl *lpVtbl; +} AutoProxyHelperFunctions; + +typedef struct +{ + DWORD dwStructSize; + LPSTR lpszScriptBuffer; + DWORD dwScriptBufferSize; +} AUTO_PROXY_SCRIPT_BUFFER, *LPAUTO_PROXY_SCRIPT_BUFFER; + BOOLAPI InternetInitializeAutoProxyDll(_In_ DWORD); BOOLAPI
10 years, 3 months
1
0
0
0
[tfaber] 64267: [USBHUB][USBUHCI][CDROM_NEW] - Remove dead code. By Kudratov Olimjon. CORE-8545
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Sep 25 12:41:40 2014 New Revision: 64267 URL:
http://svn.reactos.org/svn/reactos?rev=64267&view=rev
Log: [USBHUB][USBUHCI][CDROM_NEW] - Remove dead code. By Kudratov Olimjon. CORE-8545 Modified: trunk/reactos/drivers/storage/class/cdrom_new/ioctl.c trunk/reactos/drivers/usb/usbhub/pdo.c trunk/reactos/drivers/usb/usbuhci/usb_queue.cpp Modified: trunk/reactos/drivers/storage/class/cdrom_new/ioctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/cdro…
============================================================================== --- trunk/reactos/drivers/storage/class/cdrom_new/ioctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/cdrom_new/ioctl.c [iso-8859-1] Thu Sep 25 12:41:40 2014 @@ -1197,7 +1197,6 @@ IoMarkIrpPending(Irp); IoStartPacket(DeviceObject, Irp, NULL, NULL); return STATUS_PENDING; - break; } case IOCTL_DVD_READ_KEY: { Modified: trunk/reactos/drivers/usb/usbhub/pdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/pdo.c?r…
============================================================================== --- trunk/reactos/drivers/usb/usbhub/pdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbhub/pdo.c [iso-8859-1] Thu Sep 25 12:41:40 2014 @@ -294,7 +294,6 @@ // Status = FowardUrbToRootHub(RootHubDeviceObject, IOCTL_INTERNAL_USB_SUBMIT_URB, Irp, Urb, NULL); return Status; - break; } // // FIXME: Can these be sent to RootHub? Modified: trunk/reactos/drivers/usb/usbuhci/usb_queue.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbuhci/usb_qu…
============================================================================== --- trunk/reactos/drivers/usb/usbuhci/usb_queue.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbuhci/usb_queue.cpp [iso-8859-1] Thu Sep 25 12:41:40 2014 @@ -143,13 +143,6 @@ // use full speed queue // m_Hardware->GetQueueHead(UHCI_BULK_QUEUE, &QueueHead); - } - else if (Request->GetTransferType() == USB_ENDPOINT_TYPE_INTERRUPT) - { - // - // use full speed queue - // - m_Hardware->GetQueueHead(UHCI_INTERRUPT_QUEUE, &QueueHead); } else if (Request->GetTransferType() == USB_ENDPOINT_TYPE_INTERRUPT) {
10 years, 3 months
1
0
0
0
[ekohl] 64266: [SECUR32][LSASRV][LSALIB] - Move the stubs LsaEnumerateLogonSessions, LsaGetLogonSessionData, LsaRegisterPolicyChangeNotification and LsaUnregisterPolicyChangeNotification from lsali...
by ekohl@svn.reactos.org
Author: ekohl Date: Thu Sep 25 12:37:19 2014 New Revision: 64266 URL:
http://svn.reactos.org/svn/reactos?rev=64266&view=rev
Log: [SECUR32][LSASRV][LSALIB] - Move the stubs LsaEnumerateLogonSessions, LsaGetLogonSessionData, LsaRegisterPolicyChangeNotification and LsaUnregisterPolicyChangeNotification from lsalib to secur32, because these functions are exported by secur32.dll only. - Add new LPC connection code to secur32.dll for use by non-logon related functions. - Implement LsaEnumerateLogonSessions in secur32.dll and LsapEnumLogonSessions in lsasrv.dll. Added: trunk/reactos/dll/win32/secur32/lsalpc.c (with props) Modified: trunk/reactos/dll/win32/lsasrv/authpackage.c trunk/reactos/dll/win32/lsasrv/authport.c trunk/reactos/dll/win32/lsasrv/lsasrv.h trunk/reactos/dll/win32/lsasrv/session.c trunk/reactos/dll/win32/secur32/CMakeLists.txt trunk/reactos/dll/win32/secur32/dllmain.c trunk/reactos/include/psdk/ntsecapi.h trunk/reactos/include/reactos/subsys/lsass/lsass.h trunk/reactos/lib/lsalib/lsa.c Modified: trunk/reactos/dll/win32/lsasrv/authpackage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/authpacka…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/authpackage.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/authpackage.c [iso-8859-1] Thu Sep 25 12:37:19 2014 @@ -8,7 +8,6 @@ #include "lsasrv.h" -#include <ndk/mmfuncs.h> #include <ndk/sefuncs.h> #include <ndk/umfuncs.h> Modified: trunk/reactos/dll/win32/lsasrv/authport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/authport.…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/authport.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/authport.c [iso-8859-1] Thu Sep 25 12:37:19 2014 @@ -9,7 +9,6 @@ #include "lsasrv.h" #include <ndk/lpcfuncs.h> -#include <ndk/psfuncs.h> static LIST_ENTRY LsapLogonContextList; @@ -92,18 +91,21 @@ HANDLE ConnectionHandle = NULL; BOOLEAN Accept; REMOTE_PORT_VIEW RemotePortView; - NTSTATUS Status; + NTSTATUS Status = STATUS_SUCCESS; TRACE("(%p)\n", RequestMsg); TRACE("Logon Process Name: %s\n", RequestMsg->ConnectInfo.LogonProcessNameBuffer); - Status = LsapCheckLogonProcess(RequestMsg, - &LogonContext); - - RequestMsg->ConnectInfo.OperationalMode = 0x43218765; - - RequestMsg->ConnectInfo.Status = Status; + if (RequestMsg->ConnectInfo.CreateContext == TRUE) + { + Status = LsapCheckLogonProcess(RequestMsg, + &LogonContext); + + RequestMsg->ConnectInfo.OperationalMode = 0x43218765; + + RequestMsg->ConnectInfo.Status = Status; + } if (NT_SUCCESS(Status)) { @@ -129,10 +131,13 @@ if (Accept == TRUE) { - LogonContext->ConnectionHandle = ConnectionHandle; - - InsertHeadList(&LsapLogonContextList, - &LogonContext->Entry); + if (LogonContext != NULL) + { + LogonContext->ConnectionHandle = ConnectionHandle; + + InsertHeadList(&LsapLogonContextList, + &LogonContext->Entry); + } Status = NtCompleteConnectPort(ConnectionHandle); if (!NT_SUCCESS(Status)) @@ -227,6 +232,11 @@ ReplyMsg = &RequestMsg; break; + case LSASS_REQUEST_ENUM_LOGON_SESSIONS: + RequestMsg.Status = LsapEnumLogonSessions(&RequestMsg); + ReplyMsg = &RequestMsg; + break; + default: RequestMsg.Status = STATUS_INVALID_SYSTEM_SERVICE; ReplyMsg = &RequestMsg; Modified: trunk/reactos/dll/win32/lsasrv/lsasrv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsasrv.h?…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/lsasrv.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/lsasrv.h [iso-8859-1] Thu Sep 25 12:37:19 2014 @@ -23,7 +23,9 @@ #define NTOS_MODE_USER #include <ndk/cmfuncs.h> #include <ndk/kefuncs.h> +#include <ndk/mmfuncs.h> #include <ndk/obfuncs.h> +#include <ndk/psfuncs.h> #include <ndk/rtlfuncs.h> #include <ndk/setypes.h> @@ -402,6 +404,9 @@ NTSTATUS LsapSetLogonSessionData(IN PLUID LogonId); +NTSTATUS +LsapEnumLogonSessions(IN OUT PLSA_API_MSG RequestMsg); + /* utils.c */ INT LsapLoadString(HINSTANCE hInstance, Modified: trunk/reactos/dll/win32/lsasrv/session.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/session.c…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/session.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/session.c [iso-8859-1] Thu Sep 25 12:37:19 2014 @@ -122,4 +122,93 @@ return STATUS_SUCCESS; } + +NTSTATUS +LsapEnumLogonSessions(IN OUT PLSA_API_MSG RequestMsg) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE ProcessHandle = NULL; + PLIST_ENTRY SessionEntry; + PLSAP_LOGON_SESSION CurrentSession; + PLUID SessionList; + ULONG i, Length; + PVOID ClientBaseAddress; + NTSTATUS Status; + + TRACE("LsapEnumLogonSessions()\n"); + + Length = SessionCount * sizeof(LUID); + SessionList = RtlAllocateHeap(RtlGetProcessHeap(), + HEAP_ZERO_MEMORY, + Length); + if (SessionList == NULL) + return STATUS_INSUFFICIENT_RESOURCES; + + i = 0; + SessionEntry = SessionListHead.Flink; + while (SessionEntry != &SessionListHead) + { + CurrentSession = CONTAINING_RECORD(SessionEntry, + LSAP_LOGON_SESSION, + Entry); + + RtlCopyLuid(&SessionList[i], + &CurrentSession->LogonId); + + SessionEntry = SessionEntry->Flink; + i++; + } + + InitializeObjectAttributes(&ObjectAttributes, + NULL, + 0, + NULL, + NULL); + + Status = NtOpenProcess(&ProcessHandle, + PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION | PROCESS_DUP_HANDLE, + &ObjectAttributes, + &RequestMsg->h.ClientId); + if (!NT_SUCCESS(Status)) + { + TRACE("NtOpenProcess() failed (Status %lx)\n", Status); + goto done; + } + + Status = NtAllocateVirtualMemory(ProcessHandle, + &ClientBaseAddress, + 0, + &Length, + MEM_COMMIT, + PAGE_READWRITE); + if (!NT_SUCCESS(Status)) + { + TRACE("NtAllocateVirtualMemory() failed (Status %lx)\n", Status); + goto done; + } + + Status = NtWriteVirtualMemory(ProcessHandle, + ClientBaseAddress, + SessionList, + Length, + NULL); + if (!NT_SUCCESS(Status)) + { + TRACE("NtWriteVirtualMemory() failed (Status %lx)\n", Status); + goto done; + } + + RequestMsg->EnumLogonSessions.Reply.LogonSessionCount = SessionCount; + RequestMsg->EnumLogonSessions.Reply.LogonSessionBuffer = ClientBaseAddress; + +done: + if (ProcessHandle != NULL) + NtClose(ProcessHandle); + + if (SessionList != NULL) + RtlFreeHeap(RtlGetProcessHeap(), 0, SessionList); + + return Status; +} + /* EOF */ Modified: trunk/reactos/dll/win32/secur32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/secur32/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/secur32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/secur32/CMakeLists.txt [iso-8859-1] Thu Sep 25 12:37:19 2014 @@ -6,6 +6,7 @@ list(APPEND SOURCE dllmain.c + lsalpc.c secext.c sspi.c stubs.c Modified: trunk/reactos/dll/win32/secur32/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/secur32/dllmain.…
============================================================================== --- trunk/reactos/dll/win32/secur32/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/secur32/dllmain.c [iso-8859-1] Thu Sep 25 12:37:19 2014 @@ -8,6 +8,9 @@ */ #include "precomp.h" + +VOID LsapInitLsaPort(VOID); +VOID LsapCloseLsaPort(VOID); /* GLOBALS *******************************************************************/ @@ -29,9 +32,11 @@ { return FALSE; } + LsapInitLsaPort(); break; case DLL_PROCESS_DETACH: + LsapCloseLsaPort(); if (!RtlDestroyHeap(Secur32Heap)) { return FALSE; Added: trunk/reactos/dll/win32/secur32/lsalpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/secur32/lsalpc.c…
============================================================================== --- trunk/reactos/dll/win32/secur32/lsalpc.c (added) +++ trunk/reactos/dll/win32/secur32/lsalpc.c [iso-8859-1] Thu Sep 25 12:37:19 2014 @@ -0,0 +1,188 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: dll/win32/secur32/lsalpc.c + * PURPOSE: LSA LPC port functions + */ + +/* INCLUDES ******************************************************************/ + +#include "precomp.h" + +#include <ndk/lpctypes.h> +#include <ndk/lpcfuncs.h> +#include <ndk/mmfuncs.h> +#include <ndk/rtlfuncs.h> +#include <ndk/obfuncs.h> +#include <psdk/ntsecapi.h> +#include <lsass/lsass.h> + +#include <wine/debug.h> +WINE_DEFAULT_DEBUG_CHANNEL(secur32); + + +/* GLOBALS *******************************************************************/ + +HANDLE LsaPortHandle; + +extern HANDLE Secur32Heap; + + +/* FUNCTIONS *****************************************************************/ + +VOID +LsapInitLsaPort(VOID) +{ + LsaPortHandle = NULL; +} + + +VOID +LsapCloseLsaPort(VOID) +{ + if (LsaPortHandle != NULL) + { + NtClose(LsaPortHandle); + LsaPortHandle = NULL; + } +} + + +NTSTATUS +LsapOpenLsaPort(VOID) +{ + UNICODE_STRING PortName; + SECURITY_QUALITY_OF_SERVICE SecurityQos; + LSA_CONNECTION_INFO ConnectInfo; + ULONG ConnectInfoLength; + NTSTATUS Status; + + TRACE("LsapOpenLsaPort()\n"); + + if (LsaPortHandle != NULL) + return STATUS_SUCCESS; + + RtlInitUnicodeString(&PortName, + L"\\LsaAuthenticationPort"); + + SecurityQos.Length = sizeof(SecurityQos); + SecurityQos.ImpersonationLevel = SecurityIdentification; + SecurityQos.ContextTrackingMode = SECURITY_DYNAMIC_TRACKING; + SecurityQos.EffectiveOnly = TRUE; + + RtlZeroMemory(&ConnectInfo, + ConnectInfoLength); + + ConnectInfo.CreateContext = FALSE; + + ConnectInfoLength = sizeof(LSA_CONNECTION_INFO); + Status = NtConnectPort(&LsaPortHandle, + &PortName, + &SecurityQos, + NULL, + NULL, + NULL, + &ConnectInfo, + &ConnectInfoLength); + if (!NT_SUCCESS(Status)) + { + TRACE("NtConnectPort failed (Status 0x%08lx)\n", Status); + } + + return Status; +/* + if (!NT_SUCCESS(ConnectInfo.Status)) + { + DPRINT1("ConnectInfo.Status: 0x%08lx\n", ConnectInfo.Status); + } + + return ConnectInfo.Status; +*/ +} + + +/* PUBLIC FUNCTIONS **********************************************************/ + +/* + * @implemented + */ +NTSTATUS +NTAPI +LsaEnumerateLogonSessions(PULONG LogonSessionCount, + PLUID *LogonSessionList) +{ + LSA_API_MSG ApiMessage; + NTSTATUS Status; + + TRACE("LsaEnumerateLogonSessions(%p %p)\n", LogonSessionCount, LogonSessionList); + + Status = LsapOpenLsaPort(); + if (!NT_SUCCESS(Status)) + return Status; + + ApiMessage.ApiNumber = LSASS_REQUEST_ENUM_LOGON_SESSIONS; + ApiMessage.h.u1.s1.DataLength = LSA_PORT_DATA_SIZE(ApiMessage.EnumLogonSessions); + ApiMessage.h.u1.s1.TotalLength = LSA_PORT_MESSAGE_SIZE; + ApiMessage.h.u2.ZeroInit = 0; + + Status = NtRequestWaitReplyPort(LsaPortHandle, + (PPORT_MESSAGE)&ApiMessage, + (PPORT_MESSAGE)&ApiMessage); + if (!NT_SUCCESS(Status)) + { + ERR("NtRequestWaitReplyPort() failed (Status 0x%08lx)\n", Status); + return Status; + } + + if (!NT_SUCCESS(ApiMessage.Status)) + { + ERR("NtRequestWaitReplyPort() failed (ApiMessage.Status 0x%08lx)\n", ApiMessage.Status); + return ApiMessage.Status; + } + + *LogonSessionCount = ApiMessage.EnumLogonSessions.Reply.LogonSessionCount; + *LogonSessionList = ApiMessage.EnumLogonSessions.Reply.LogonSessionBuffer; + + return Status; +} + + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +LsaGetLogonSessionData(PLUID LogonId, + PSECURITY_LOGON_SESSION_DATA *ppLogonSessionData) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +LsaRegisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS InformationClass, + HANDLE NotificationEventHandle) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +LsaUnregisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS InformationClass, + HANDLE NotificationEventHandle) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +/* EOF */ Propchange: trunk/reactos/dll/win32/secur32/lsalpc.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/psdk/ntsecapi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntsecapi.h?re…
============================================================================== --- trunk/reactos/include/psdk/ntsecapi.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntsecapi.h [iso-8859-1] Thu Sep 25 12:37:19 2014 @@ -699,6 +699,7 @@ ULONG,PULONG); NTSTATUS NTAPI LsaEnumerateAccountsWithUserRight(LSA_HANDLE,PLSA_UNICODE_STRING, PVOID*,PULONG); +NTSTATUS NTAPI LsaEnumerateLogonSessions(PULONG,PLUID*); NTSTATUS NTAPI LsaEnumeratePrivileges(LSA_HANDLE,PLSA_ENUMERATION_HANDLE, PVOID*,ULONG,PULONG); NTSTATUS NTAPI LsaEnumeratePrivilegesOfAccount(LSA_HANDLE,PPRIVILEGE_SET*); Modified: trunk/reactos/include/reactos/subsys/lsass/lsass.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/lsa…
============================================================================== --- trunk/reactos/include/reactos/subsys/lsass/lsass.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/subsys/lsass/lsass.h [iso-8859-1] Thu Sep 25 12:37:19 2014 @@ -21,6 +21,7 @@ LSASS_REQUEST_DEREGISTER_LOGON_PROCESS, LSASS_REQUEST_LOGON_USER, LSASS_REQUEST_LOOKUP_AUTHENTICATION_PACKAGE, + LSASS_REQUEST_ENUM_LOGON_SESSIONS, LSASS_REQUEST_MAXIMUM } LSA_API_NUMBER, *PLSA_API_NUMBER; @@ -31,6 +32,7 @@ LSA_OPERATIONAL_MODE OperationalMode; ULONG Length; CHAR LogonProcessNameBuffer[LSASS_MAX_LOGON_PROCESS_NAME_LENGTH + 1]; + BOOL CreateContext; } LSA_CONNECTION_INFO, *PLSA_CONNECTION_INFO; @@ -69,21 +71,12 @@ { struct { -#if 0 - ULONG AuthenticationPackage; - ULONG InBufferLength; - UCHAR InBuffer[0]; -#endif ULONG AuthenticationPackage; PVOID ProtocolSubmitBuffer; ULONG SubmitBufferLength; } Request; struct { -#if 0 - ULONG OutBufferLength; - UCHAR OutBuffer[0]; -#endif PVOID ProtocolReturnBuffer; ULONG ReturnBufferLength; NTSTATUS ProtocolStatus; @@ -125,6 +118,24 @@ } LSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG, *PLSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG; +typedef struct _LSA_ENUM_LOGON_SESSIONS_MSG +{ + union + { + struct + { + ULONG Dummy; + } Request; + struct + { + ULONG LogonSessionCount; + ULONG LogonSessionBufferLength; + PVOID LogonSessionBuffer; + } Reply; + }; +} LSA_ENUM_LOGON_SESSIONS_MSG, *PLSA_ENUM_LOGON_SESSIONS_MSG; + + typedef struct _LSA_API_MSG { PORT_MESSAGE h; @@ -141,6 +152,7 @@ LSA_CALL_AUTHENTICATION_PACKAGE_MSG CallAuthenticationPackage; LSA_DEREGISTER_LOGON_PROCESS_MSG DeregisterLogonProcess; LSA_LOOKUP_AUTHENTICATION_PACKAGE_MSG LookupAuthenticationPackage; + LSA_ENUM_LOGON_SESSIONS_MSG EnumLogonSessions; }; }; }; Modified: trunk/reactos/lib/lsalib/lsa.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/lsalib/lsa.c?rev=64266…
============================================================================== --- trunk/reactos/lib/lsalib/lsa.c [iso-8859-1] (original) +++ trunk/reactos/lib/lsalib/lsa.c [iso-8859-1] Thu Sep 25 12:37:19 2014 @@ -91,6 +91,8 @@ RtlZeroMemory(&ConnectInfo, ConnectInfoLength); + + ConnectInfo.CreateContext = TRUE; Status = ZwConnectPort(LsaHandle, &PortName, @@ -328,6 +330,7 @@ LsaLogonProcessName->Length); ConnectInfo.Length = LsaLogonProcessName->Length; ConnectInfo.LogonProcessNameBuffer[ConnectInfo.Length] = '\0'; + ConnectInfo.CreateContext = TRUE; Status = ZwConnectPort(Handle, &PortName, @@ -354,54 +357,3 @@ return ConnectInfo.Status; } - -/* - * @unimplemented - */ -NTSTATUS -WINAPI -LsaEnumerateLogonSessions(PULONG LogonSessionCount, - PLUID *LogonSessionList) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -} - - -/* - * @unimplemented - */ -NTSTATUS -WINAPI -LsaGetLogonSessionData(PLUID LogonId, - PSECURITY_LOGON_SESSION_DATA *ppLogonSessionData) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -} - - -/* - * @unimplemented - */ -NTSTATUS -WINAPI -LsaRegisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS InformationClass, - HANDLE NotificationEventHandle) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -} - - -/* - * @unimplemented - */ -NTSTATUS -WINAPI -LsaUnregisterPolicyChangeNotification(POLICY_NOTIFICATION_INFORMATION_CLASS InformationClass, - HANDLE NotificationEventHandle) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -}
10 years, 3 months
1
0
0
0
[pschweitzer] 64265: [NTFS] Compute index record size on mount and save it.
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Thu Sep 25 06:36:14 2014 New Revision: 64265 URL:
http://svn.reactos.org/svn/reactos?rev=64265&view=rev
Log: [NTFS] Compute index record size on mount and save it. Modified: trunk/reactos/drivers/filesystems/ntfs/fsctl.c trunk/reactos/drivers/filesystems/ntfs/ntfs.h Modified: trunk/reactos/drivers/filesystems/ntfs/fsctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/fsctl.c [iso-8859-1] Thu Sep 25 06:36:14 2014 @@ -232,6 +232,10 @@ NtfsInfo->BytesPerFileRecord = BootSector->EBPB.ClustersPerMftRecord * NtfsInfo->BytesPerCluster; else NtfsInfo->BytesPerFileRecord = 1 << (-BootSector->EBPB.ClustersPerMftRecord); + if (BootSector->EBPB.ClustersPerIndexRecord > 0) + NtfsInfo->BytesPerIndexRecord = BootSector->EBPB.ClustersPerIndexRecord * NtfsInfo->BytesPerCluster; + else + NtfsInfo->BytesPerIndexRecord = 1 << (-BootSector->EBPB.ClustersPerIndexRecord); DPRINT("Boot sector information:\n"); DPRINT(" BytesPerSector: %hu\n", BootSector->BPB.BytesPerSector); Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Thu Sep 25 06:36:14 2014 @@ -63,6 +63,7 @@ ULARGE_INTEGER MftStart; ULARGE_INTEGER MftMirrStart; ULONG BytesPerFileRecord; + ULONG BytesPerIndexRecord; ULONGLONG SerialNumber; USHORT VolumeLabelLength;
10 years, 3 months
1
0
0
0
[tkreuzer] 64264: [CRT] Add arm stub for __chkstk, dedicated to Z98
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 24 23:12:34 2014 New Revision: 64264 URL:
http://svn.reactos.org/svn/reactos?rev=64264&view=rev
Log: [CRT] Add arm stub for __chkstk, dedicated to Z98 Added: trunk/reactos/lib/sdk/crt/except/arm/ (with props) trunk/reactos/lib/sdk/crt/except/arm/chkstk_asm.s (with props) Propchange: trunk/reactos/lib/sdk/crt/except/arm/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Wed Sep 24 23:12:34 2014 @@ -0,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/reactos/lib/sdk/crt/except/arm/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/reactos/lib/sdk/crt/except/arm/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/lib/sdk/crt/except/arm/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/reactos/lib/sdk/crt/except/arm/chkstk_asm.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/arm/chk…
============================================================================== --- trunk/reactos/lib/sdk/crt/except/arm/chkstk_asm.s (added) +++ trunk/reactos/lib/sdk/crt/except/arm/chkstk_asm.s [iso-8859-1] Wed Sep 24 23:12:34 2014 @@ -0,0 +1,32 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of _chkstk and _alloca_probe + * FILE: lib/sdk/crt/math/amd64/chkstk_asm.s + * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) + */ + +/* INCLUDES ******************************************************************/ + +#include <asm.inc> + +/* CODE **********************************************************************/ +.code64 + +MsgUnimplemented: + .ascii "Unimplemented", CR, LF, NUL + +FUNC __chkstk + .endprolog + UNIMPLEMENTED chkstk + ret +ENDFUNC + +FUNC __alloca_probe + .endprolog + UNIMPLEMENTED alloca_probe + ret +ENDFUNC + +END +/* EOF */ Propchange: trunk/reactos/lib/sdk/crt/except/arm/chkstk_asm.s ------------------------------------------------------------------------------ svn:eol-style = native
10 years, 3 months
1
0
0
0
[spetreolle] 64263: [BUTTERFLIES] Fix MSVC build. Dedicated to Hermès :p
by spetreolle@svn.reactos.org
Author: spetreolle Date: Wed Sep 24 22:18:51 2014 New Revision: 64263 URL:
http://svn.reactos.org/svn/reactos?rev=64263&view=rev
Log: [BUTTERFLIES] Fix MSVC build. Dedicated to Hermès :p Modified: trunk/rosapps/applications/screensavers/butterflies/rsrc.rc Modified: trunk/rosapps/applications/screensavers/butterflies/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/screensavers/…
============================================================================== --- trunk/rosapps/applications/screensavers/butterflies/rsrc.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/screensavers/butterflies/rsrc.rc [iso-8859-1] Wed Sep 24 22:18:51 2014 @@ -10,4 +10,4 @@ #include "lang/uk-UA.rc" /* UTF-8 */ -#include "lang/ro-RO.rc" +#include "lang/ro-RO.rc"
10 years, 3 months
1
0
0
0
[jgardou] 64262: [NTOS/MM] - First try at creating and adding pages to the working set of processes in ARM3. Limited to 1k pages for now. CORE-8553
by jgardou@svn.reactos.org
Author: jgardou Date: Wed Sep 24 21:55:37 2014 New Revision: 64262 URL:
http://svn.reactos.org/svn/reactos?rev=64262&view=rev
Log: [NTOS/MM] - First try at creating and adding pages to the working set of processes in ARM3. Limited to 1k pages for now. CORE-8553 Modified: branches/TransitionPte/ntoskrnl/mm/ARM3/miarm.h branches/TransitionPte/ntoskrnl/mm/ARM3/pagfault.c branches/TransitionPte/ntoskrnl/mm/ARM3/procsup.c branches/TransitionPte/ntoskrnl/mm/ARM3/virtual.c Modified: branches/TransitionPte/ntoskrnl/mm/ARM3/miarm.h URL:
http://svn.reactos.org/svn/reactos/branches/TransitionPte/ntoskrnl/mm/ARM3/…
============================================================================== --- branches/TransitionPte/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original) +++ branches/TransitionPte/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Wed Sep 24 21:55:37 2014 @@ -2321,6 +2321,19 @@ IN KIRQL OldIrql ); +VOID +NTAPI +MiDeleteFromWorkingSetList( + _Inout_ PMMSUPPORT Vm, + _In_ PVOID Address); + +VOID +NTAPI +MiInsertInWorkingSetList( + _Inout_ PMMSUPPORT Vm, + _In_ PVOID Address, + _In_ ULONG Protection); + // // MiRemoveZeroPage will use inline code to zero out the page manually if only // free pages are available. In some scenarios, we don't/can't run that piece of Modified: branches/TransitionPte/ntoskrnl/mm/ARM3/pagfault.c URL:
http://svn.reactos.org/svn/reactos/branches/TransitionPte/ntoskrnl/mm/ARM3/…
============================================================================== --- branches/TransitionPte/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] (original) +++ branches/TransitionPte/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] Wed Sep 24 21:55:37 2014 @@ -2247,6 +2247,9 @@ MiCopyPfn(PageFrameIndex, OldPageFrameIndex); + /* Delete the WS entry, we will soon replace it */ + MiDeleteFromWorkingSetList(&CurrentProcess->Vm, Address); + /* Dereference whatever this PTE is referencing */ Pfn1 = MI_PFN_ELEMENT(OldPageFrameIndex); ASSERT(Pfn1->u3.e1.PrototypePte == 1); @@ -2262,6 +2265,9 @@ MI_WRITE_VALID_PTE(PointerPte, TempPte); + /* Insert into the WS again */ + MiInsertInWorkingSetList(&CurrentProcess->Vm, Address, ProtectionCode); + KeReleaseQueuedSpinLock(LockQueuePfnLock, LockIrql); /* Return the status */ @@ -2293,6 +2299,9 @@ PointerPte, CurrentProcess, MM_NOIRQL); + + /* Insert into the WS */ + MiInsertInWorkingSetList(&CurrentProcess->Vm, Address, ProtectionCode); /* Return the status */ MiUnlockProcessWorkingSet(CurrentProcess, CurrentThread); @@ -2528,6 +2537,12 @@ TrapInformation, Vad); + /* Add it to the WS */ + if (NT_SUCCESS(Status)) + { + MiInsertInWorkingSetList(&CurrentProcess->Vm, Address, ProtectionCode); + } + /* Return the status */ ASSERT(KeGetCurrentIrql() <= APC_LEVEL); MiUnlockProcessWorkingSet(CurrentProcess, CurrentThread); Modified: branches/TransitionPte/ntoskrnl/mm/ARM3/procsup.c URL:
http://svn.reactos.org/svn/reactos/branches/TransitionPte/ntoskrnl/mm/ARM3/…
============================================================================== --- branches/TransitionPte/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original) +++ branches/TransitionPte/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Wed Sep 24 21:55:37 2014 @@ -896,25 +896,155 @@ VOID NTAPI +MiDeleteFromWorkingSetList( + _Inout_ PMMSUPPORT Vm, + _In_ PVOID Address) +{ + ULONG i; + PMMWSLE Wsle = NULL; + + /* Only the virtual page number is interesting */ + Address = PAGE_ALIGN(Address); + + /* Check we got the right lock */ + NT_ASSERT((PsGetCurrentThread()->OwnsSessionWorkingSetExclusive) || !MI_IS_SESSION_ADDRESS(Address)); + NT_ASSERT((PsGetCurrentThread()->OwnsSystemWorkingSetExclusive) || (Address < MmSystemRangeStart) || + MI_IS_SESSION_ADDRESS(Address)); + NT_ASSERT((PsGetCurrentThread()->OwnsProcessWorkingSetExclusive) || (Address > MmSystemRangeStart)); + + /* Loop over the entries */ + for (i = 0; i < Vm->VmWorkingSetList->LastInitializedWsle; i++) + { + if (!Vm->VmWorkingSetList->Wsle[i].u1.e1.Valid) + continue; + + if (PAGE_ALIGN(Vm->VmWorkingSetList->Wsle[i].u1.VirtualAddress) == Address) + { + Wsle = &Vm->VmWorkingSetList->Wsle[i]; + break; + } + } + + if (Wsle == NULL) + { + /* Most likely because we don't expand the thing */ + DPRINT1("Address %p not found in Vm %p.\n", Address, Vm); + return; + } + + /* Simply relink it and voilà */ + Wsle->u1.Long = Vm->VmWorkingSetList->FirstFree << 1; + Vm->VmWorkingSetList->FirstFree = i; + Vm->WorkingSetSize--; +} + +VOID +NTAPI +MiInsertInWorkingSetList( + _Inout_ PMMSUPPORT Vm, + _In_ PVOID Address, + _In_ ULONG Protection) +{ + PMMWSLE Wsle = Vm->VmWorkingSetList->Wsle; + PMMPFN Pfn1; + PMMPTE PointerPte; + + /* Only the virtual page number is interesting */ + Address = PAGE_ALIGN(Address); + + /* Check we got the right lock */ + NT_ASSERT((PsGetCurrentThread()->OwnsSessionWorkingSetExclusive) || !MI_IS_SESSION_ADDRESS(Address)); + NT_ASSERT((PsGetCurrentThread()->OwnsSystemWorkingSetExclusive) || (Address < MmSystemRangeStart) || + MI_IS_SESSION_ADDRESS(Address)); + NT_ASSERT((PsGetCurrentThread()->OwnsProcessWorkingSetExclusive) || (Address > MmSystemRangeStart)); + + /* Get the entry where we will insert it */ + if (Vm->VmWorkingSetList->FirstFree == Vm->VmWorkingSetList->LastInitializedWsle) + { + ULONG i; + + if (Vm->VmWorkingSetList->FirstFree == Vm->VmWorkingSetList->LastEntry) + { + DPRINT1("FIXME: Could not add address %p to Vm %p because it is FULL!\n", Address, Vm); + return; + } + + /* Double that */ + Vm->VmWorkingSetList->LastInitializedWsle *= 2; + if (Vm->VmWorkingSetList->LastInitializedWsle > Vm->VmWorkingSetList->LastEntry) + Vm->VmWorkingSetList->LastInitializedWsle = Vm->VmWorkingSetList->LastEntry; + + /* Initialize them */ + for (i = Vm->VmWorkingSetList->FirstFree; i < Vm->VmWorkingSetList->LastInitializedWsle; i++) + Wsle[i].u1.Long = (i + 1) << 1; + } + + /* Get the entry where we will insert it */ + Wsle = &Vm->VmWorkingSetList->Wsle[Vm->VmWorkingSetList->FirstFree]; + + /* See if the PFN deserves to have an entry into the WS */ + PointerPte = MiAddressToPte(Address); + NT_ASSERT(PointerPte->u.Hard.Valid); + Pfn1 = MiGetPfnEntry(PFN_FROM_PTE(PointerPte)); + if ((Address >= MmSystemRangeStart) || (Pfn1->u3.e1.PrototypePte == 0)) + { + Pfn1->u1.WsIndex = Vm->VmWorkingSetList->FirstFree; + } + + /* Update the list head */ + Vm->VmWorkingSetList->FirstFree = Wsle->u1.Long >> 1; + + /* Set the entry address */ + Wsle->u1.VirtualAddress = Address; + + Wsle->u1.e1.Valid = 1; + Wsle->u1.e1.Protection = Protection; + + /* Bump it */ + Vm->WorkingSetSize++; +} + +VOID +NTAPI MiInitializeWorkingSetList(IN PEPROCESS CurrentProcess) { PMMPFN Pfn1; PMMPTE sysPte; MMPTE tempPte; - - /* Setup some bogus list data */ - MmWorkingSetList->LastEntry = CurrentProcess->Vm.MinimumWorkingSetSize; + ULONG i; + PFN_NUMBER WslePageIndex; + + /* Initialize the WS sizes */ + // FIXME: hardcoded for now + CurrentProcess->Vm.MinimumWorkingSetSize = 50; + CurrentProcess->Vm.MaximumWorkingSetSize = 345; + + /* Setup list data */ + MmWorkingSetList->LastEntry = PAGE_SIZE / sizeof(MMWSLE); MmWorkingSetList->HashTable = NULL; MmWorkingSetList->HashTableSize = 0; MmWorkingSetList->NumberOfImageWaiters = 0; - MmWorkingSetList->Wsle = (PVOID)0xDEADBABE; MmWorkingSetList->VadBitMapHint = 1; - MmWorkingSetList->HashTableStart = (PVOID)0xBADAB00B; - MmWorkingSetList->HighestPermittedHashAddress = (PVOID)0xCAFEBABE; + MmWorkingSetList->HashTableStart = NULL; + MmWorkingSetList->HighestPermittedHashAddress = NULL; MmWorkingSetList->FirstFree = 1; - MmWorkingSetList->FirstDynamic = 2; - MmWorkingSetList->NextSlot = 3; - MmWorkingSetList->LastInitializedWsle = 4; + MmWorkingSetList->FirstDynamic = 0; + MmWorkingSetList->NextSlot = 0; + MmWorkingSetList->LastInitializedWsle = CurrentProcess->Vm.MaximumWorkingSetSize; + + /* Reserve a page for the entries */ + WslePageIndex = MiRemoveAnyPage(MI_GET_NEXT_COLOR()); + sysPte = MiReserveSystemPtes(1, SystemPteSpace); + MI_MAKE_HARDWARE_PTE_KERNEL(&tempPte, sysPte, MM_READWRITE, WslePageIndex); + MiInitializePfnAndMakePteValid(WslePageIndex, sysPte, tempPte); + MmWorkingSetList->Wsle = MiPteToAddress(sysPte); + + /* Initialize the linked-list of free entries */ + for (i = 0; i < MmWorkingSetList->LastInitializedWsle; i++) + { + /* Save LSB to keep track of active/non active state */ + MmWorkingSetList->Wsle[i].u1.Long = (i + 1) << 1; + } /* The rule is that the owner process is always in the FLINK of the PDE's PFN entry */ Pfn1 = MiGetPfnEntry(CurrentProcess->Pcb.DirectoryTableBase[0] >> PAGE_SHIFT); @@ -926,6 +1056,20 @@ MI_MAKE_HARDWARE_PTE_KERNEL(&tempPte, sysPte, MM_READWRITE, CurrentProcess->WorkingSetPage); MI_WRITE_VALID_PTE(sysPte, tempPte); CurrentProcess->Vm.VmWorkingSetList = MiPteToAddress(sysPte); +} + +VOID +NTAPI +MiDeleteWorkingSetList(PMMWSL WorkingSetList) +{ + PMMPTE SysPte; + PMMPFN Pfn1; + + SysPte = MiAddressToPte(WorkingSetList->Wsle); + Pfn1 = MiGetPfnEntry(PFN_FROM_PTE(SysPte)); + MI_SET_PFN_DELETED(Pfn1); + MiDecrementShareCount(Pfn1, PFN_FROM_PTE(SysPte)); + MiReleaseSystemPtes(SysPte, 1, SystemPteSpace); } NTSTATUS @@ -1387,6 +1531,9 @@ /* Check for fully initialized process */ if (Process->AddressSpaceInitialized == 2) { + /* Free the working set list entries */ + MiDeleteWorkingSetList(Process->Vm.VmWorkingSetList); + /* Map the working set page and its page table */ Pfn1 = MiGetPfnEntry(Process->WorkingSetPage); Pfn2 = MiGetPfnEntry(Pfn1->u4.PteFrame); Modified: branches/TransitionPte/ntoskrnl/mm/ARM3/virtual.c URL:
http://svn.reactos.org/svn/reactos/branches/TransitionPte/ntoskrnl/mm/ARM3/…
============================================================================== --- branches/TransitionPte/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original) +++ branches/TransitionPte/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Wed Sep 24 21:55:37 2014 @@ -721,6 +721,11 @@ } else { + if (TempPte.u.Hard.Valid == 1) + { + MiDeleteFromWorkingSetList(&CurrentProcess->Vm, MiPteToAddress(PointerPte)); + } + /* Delete the PTE proper */ MiDeletePte(PointerPte, (PVOID)Va, @@ -2360,9 +2365,12 @@ PteContents.u.Hard.Valid = 0; PteContents.u.Soft.Transition = 1; PteContents.u.Trans.Protection = ProtectionMask; + + /* Remove it from the WS */ + MiDeleteFromWorkingSetList(&Process->Vm, MiPteToAddress(PointerPte)); + /* Decrease PFN share count and write the PTE */ MiDecrementShareCount(Pfn1, PFN_FROM_PTE(&PteContents)); - // FIXME: remove the page from the WS MI_WRITE_INVALID_PTE(PointerPte, PteContents); #ifdef CONFIG_SMP // FIXME: Should invalidate entry in every CPU TLB
10 years, 3 months
1
0
0
0
[tkreuzer] 64261: [WIN32K] - Improve performance of XFORMOBJ_bXformFixPoints by getting the integer values from the FLOATOBJ once instead of on every iteration
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 24 21:27:47 2014 New Revision: 64261 URL:
http://svn.reactos.org/svn/reactos?rev=64261&view=rev
Log: [WIN32K] - Improve performance of XFORMOBJ_bXformFixPoints by getting the integer values from the FLOATOBJ once instead of on every iteration Modified: trunk/reactos/win32ss/gdi/ntgdi/xformobj.c Modified: trunk/reactos/win32ss/gdi/ntgdi/xformobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/xformobj…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/xformobj.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/xformobj.c [iso-8859-1] Wed Sep 24 21:27:47 2014 @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS win32 kernel mode subsystem * LICENSE: GPL - See COPYING in the top level directory - * FILE: subsystems/win32/win32k/objects/xformobj.c + * FILE: win32ss/gdi/ntgdi/xformobj.c * PURPOSE: XFORMOBJ API * PROGRAMMER: Timo Kreuzer */ @@ -195,8 +195,8 @@ MATRIX mx; PMATRIX pmx, pmx1, pmx2; - pmx = XFORMOBJ_pmx(pxo); - pmx1 =XFORMOBJ_pmx(pxo1); + /* Get the source matrices */ + pmx1 = XFORMOBJ_pmx(pxo1); pmx2 = XFORMOBJ_pmx(pxo2); /* Do a 3 x 3 matrix multiplication with mx as destinantion */ @@ -210,6 +210,7 @@ FLOATOBJ_Add(&mx.efDy, &pmx2->efDy); /* Copy back */ + pmx = XFORMOBJ_pmx(pxo); *pmx = mx; /* Update accelerators and return complexity */ @@ -322,11 +323,14 @@ if (flAccel & XFORM_UNITY) { /* 1-scale integer transform */ + LONG lM12 = FLOATOBJ_GetLong(&pmx->efM12); + LONG lM21 = FLOATOBJ_GetLong(&pmx->efM21); + i = cPoints - 1; do { - LONG x = pptIn[i].x + pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM21); - LONG y = pptIn[i].y + pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM12); + LONG x = pptIn[i].x + pptIn[i].y * lM21; + LONG y = pptIn[i].y + pptIn[i].x * lM12; pptOut[i].y = y; pptOut[i].x = x; } @@ -335,25 +339,33 @@ else if (flAccel & XFORM_SCALE) { /* Diagonal integer transform */ + LONG lM11 = FLOATOBJ_GetLong(&pmx->efM11); + LONG lM22 = FLOATOBJ_GetLong(&pmx->efM22); + i = cPoints - 1; do { - pptOut[i].x = pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM11); - pptOut[i].y = pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM22); + pptOut[i].x = pptIn[i].x * lM11; + pptOut[i].y = pptIn[i].y * lM22; } while (--i >= 0); } else { /* Full integer transform */ + LONG lM11 = FLOATOBJ_GetLong(&pmx->efM11); + LONG lM12 = FLOATOBJ_GetLong(&pmx->efM12); + LONG lM21 = FLOATOBJ_GetLong(&pmx->efM21); + LONG lM22 = FLOATOBJ_GetLong(&pmx->efM22); + i = cPoints - 1; do { LONG x; - x = pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM11); - x += pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM21); - pptOut[i].y = pptIn[i].y * FLOATOBJ_GetLong(&pmx->efM22); - pptOut[i].y += pptIn[i].x * FLOATOBJ_GetLong(&pmx->efM12); + x = pptIn[i].x * lM11; + x += pptIn[i].y * lM21; + pptOut[i].y = pptIn[i].y * lM22; + pptOut[i].y += pptIn[i].x * lM12; pptOut[i].x = x; } while (--i >= 0);
10 years, 3 months
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
42
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
Results per page:
10
25
50
100
200