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
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 2011
----- 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
20 participants
399 discussions
Start a n
N
ew thread
[akhaldi] 53820: [PSDK] * Bring-in some idl changes from Wine. These changes (and the related changes below) are to allow us to sync shell32 tests to Wine 1.3.29. [UUID] * CLSID_TaskbarList is no l...
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Sep 23 23:12:53 2011 New Revision: 53820 URL:
http://svn.reactos.org/svn/reactos?rev=53820&view=rev
Log: [PSDK] * Bring-in some idl changes from Wine. These changes (and the related changes below) are to allow us to sync shell32 tests to Wine 1.3.29. [UUID] * CLSID_TaskbarList is no longer needed in here. [ACTXPRXY] * Sync with Wine 1.3.29. Added: trunk/reactos/dll/win32/actxprxy/actxprxy_shldisp.idl (with props) trunk/reactos/include/psdk/knownfolders.h (with props) trunk/reactos/include/psdk/objectarray.idl (with props) Modified: trunk/reactos/dll/win32/actxprxy/CMakeLists.txt trunk/reactos/dll/win32/actxprxy/actxprxy.rbuild trunk/reactos/dll/win32/actxprxy/actxprxy_activscp.idl trunk/reactos/dll/win32/actxprxy/actxprxy_comcat.idl trunk/reactos/dll/win32/actxprxy/actxprxy_docobj.idl trunk/reactos/dll/win32/actxprxy/actxprxy_hlink.idl trunk/reactos/dll/win32/actxprxy/actxprxy_htiframe.idl trunk/reactos/dll/win32/actxprxy/actxprxy_objsafe.idl trunk/reactos/dll/win32/actxprxy/actxprxy_ocmm.idl trunk/reactos/dll/win32/actxprxy/actxprxy_servprov.idl trunk/reactos/dll/win32/actxprxy/actxprxy_shobjidl.idl trunk/reactos/dll/win32/actxprxy/actxprxy_urlhist.idl trunk/reactos/dll/win32/actxprxy/usrmarshal.c trunk/reactos/include/psdk/CMakeLists.txt trunk/reactos/include/psdk/propsys.idl trunk/reactos/include/psdk/psdk.rbuild trunk/reactos/include/psdk/shldisp.idl trunk/reactos/include/psdk/shlguid.h trunk/reactos/include/psdk/shobjidl.idl trunk/reactos/include/psdk/shtypes.idl trunk/reactos/lib/sdk/uuid/uuid.c Modified: trunk/reactos/dll/win32/actxprxy/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/CMakeLists.txt [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -13,6 +13,7 @@ actxprxy_objsafe.idl actxprxy_ocmm.idl actxprxy_servprov.idl + actxprxy_shldisp.idl actxprxy_shobjidl.idl actxprxy_urlhist.idl) @@ -26,6 +27,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_objsafe_p.c ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_ocmm_p.c ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_servprov_p.c + ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_shldisp_p.c ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_shobjidl_p.c ${CMAKE_CURRENT_BINARY_DIR}/actxprxy_urlhist_p.c ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c Modified: trunk/reactos/dll/win32/actxprxy/actxprxy.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy.rbuild [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -30,6 +30,7 @@ <file>actxprxy_objsafe.idl</file> <file>actxprxy_ocmm.idl</file> <file>actxprxy_servprov.idl</file> + <file>actxprxy_shldisp.idl</file> <file>actxprxy_shobjidl.idl</file> <file>actxprxy_urlhist.idl</file> </module> Modified: trunk/reactos/dll/win32/actxprxy/actxprxy_activscp.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_activscp.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_activscp.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -19,3 +19,9 @@ /* just a wrapper for activscp.idl */ #include "activscp.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Modified: trunk/reactos/dll/win32/actxprxy/actxprxy_comcat.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_comcat.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_comcat.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -19,3 +19,9 @@ /* just a wrapper for comcat.idl */ #include "comcat.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Modified: trunk/reactos/dll/win32/actxprxy/actxprxy_docobj.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_docobj.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_docobj.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -19,3 +19,9 @@ /* just a wrapper for docobj.idl */ #include "docobj.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Modified: trunk/reactos/dll/win32/actxprxy/actxprxy_hlink.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_hlink.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_hlink.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -19,3 +19,9 @@ /* just a wrapper for hlink.idl */ #include "hlink.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Modified: trunk/reactos/dll/win32/actxprxy/actxprxy_htiframe.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_htiframe.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_htiframe.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -19,3 +19,9 @@ /* just a wrapper for htiframe.idl */ #include "htiframe.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Modified: trunk/reactos/dll/win32/actxprxy/actxprxy_objsafe.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_objsafe.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_objsafe.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -19,3 +19,9 @@ /* just a wrapper for objsafe.idl */ #include "objsafe.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Modified: trunk/reactos/dll/win32/actxprxy/actxprxy_ocmm.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_ocmm.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_ocmm.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -19,3 +19,9 @@ /* just a wrapper for ocmm.idl */ #include "ocmm.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Modified: trunk/reactos/dll/win32/actxprxy/actxprxy_servprov.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_servprov.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_servprov.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -1,1 +1,7 @@ #include "servprov.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Added: trunk/reactos/dll/win32/actxprxy/actxprxy_shldisp.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_shldisp.idl (added) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_shldisp.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -1,0 +1,27 @@ +/* + * Copyright 2011 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/* just a wrapper for shldisp.idl */ + +#include "shldisp.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Propchange: trunk/reactos/dll/win32/actxprxy/actxprxy_shldisp.idl ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/actxprxy/actxprxy_shobjidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_shobjidl.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_shobjidl.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -19,3 +19,9 @@ /* just a wrapper for shobjidl.idl */ #include "shobjidl.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Modified: trunk/reactos/dll/win32/actxprxy/actxprxy_urlhist.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/actxprx…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/actxprxy_urlhist.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/actxprxy_urlhist.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -19,3 +19,9 @@ /* just a wrapper for urlhist.idl */ #include "urlhist.idl" + +[ + threading(both), + uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */ +] +coclass PSFactoryBuffer { interface IFactoryBuffer; } Modified: trunk/reactos/dll/win32/actxprxy/usrmarshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/actxprxy/usrmars…
============================================================================== --- trunk/reactos/dll/win32/actxprxy/usrmarshal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/actxprxy/usrmarshal.c [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -34,6 +34,7 @@ #include "servprov.h" #include "comcat.h" #include "docobj.h" +#include "shobjidl.h" #include "wine/debug.h" @@ -168,3 +169,45 @@ TRACE("(%p)\n", This); return IEnumOleDocumentViews_Next( This, cViews, rgpView, pcFetched ); } + +HRESULT CALLBACK IEnumShellItems_Next_Proxy( + IEnumShellItems *This, + ULONG celt, + IShellItem **rgelt, + ULONG *pceltFetched) +{ + ULONG fetched; + TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched); + if (!pceltFetched) pceltFetched = &fetched; + return IEnumShellItems_RemoteNext_Proxy(This, celt, rgelt, pceltFetched); +} + +HRESULT __RPC_STUB IEnumShellItems_Next_Stub( + IEnumShellItems *This, + ULONG celt, + IShellItem **rgelt, + ULONG *pceltFetched) +{ + HRESULT hr; + TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched); + *pceltFetched = 0; + hr = IEnumShellItems_Next(This, celt, rgelt, pceltFetched); + if (hr == S_OK) *pceltFetched = celt; + return hr; +} + +HRESULT CALLBACK IModalWindow_Show_Proxy( + IModalWindow *This, + HWND hwndOwner) +{ + TRACE("(%p)->(%p)\n", This, hwndOwner); + return IModalWindow_RemoteShow_Proxy(This, hwndOwner); +} + +HRESULT __RPC_STUB IModalWindow_Show_Stub( + IModalWindow *This, + HWND hwndOwner) +{ + TRACE("(%p)->(%p)\n", This, hwndOwner); + return IModalWindow_Show(This, hwndOwner); +} Modified: trunk/reactos/include/psdk/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/CMakeLists.tx…
============================================================================== --- trunk/reactos/include/psdk/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/include/psdk/CMakeLists.txt [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -59,6 +59,7 @@ netcon.idl netfw.idl oaidl.idl + objectarray.idl objidl.idl objsafe.idl ocidl.idl Added: trunk/reactos/include/psdk/knownfolders.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/knownfolders.…
============================================================================== --- trunk/reactos/include/psdk/knownfolders.h (added) +++ trunk/reactos/include/psdk/knownfolders.h [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -1,0 +1,142 @@ +/* + * Copyright 2010 Hans Leidekker for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifdef DEFINE_KNOWN_FOLDER +#undef DEFINE_KNOWN_FOLDER +#endif + +#ifdef INITGUID +#ifdef __cplusplus +#define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + EXTERN_C const GUID name DECLSPEC_HIDDEN; \ + EXTERN_C const GUID name = \ + { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } +#else +#define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + const GUID name DECLSPEC_HIDDEN; \ + const GUID name = \ + { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } +#endif +#else +#define DEFINE_KNOWN_FOLDER(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + EXTERN_C const GUID name DECLSPEC_HIDDEN +#endif + +DEFINE_KNOWN_FOLDER(FOLDERID_AddNewPrograms, 0xde61d971, 0x5ebc, 0x4f02, 0xa3, 0xa9, 0x6c, 0x82, 0x89, 0x5e, 0x5c, 0x04); +DEFINE_KNOWN_FOLDER(FOLDERID_AdminTools, 0x724ef170, 0xa42d, 0x4fef, 0x9f, 0x26, 0xb6, 0x0e, 0x84, 0x6f, 0xba, 0x4f); +DEFINE_KNOWN_FOLDER(FOLDERID_AppUpdates, 0xa305ce99, 0xf527, 0x492b, 0x8b, 0x1a, 0x7e, 0x76, 0xfa, 0x98, 0xd6, 0xe4); +DEFINE_KNOWN_FOLDER(FOLDERID_CDBurning, 0x9e52ab10, 0xf80d, 0x49df, 0xac, 0xb8, 0x43, 0x30, 0xf5, 0x68, 0x78, 0x55); +DEFINE_KNOWN_FOLDER(FOLDERID_ChangeRemovePrograms, 0xdf7266ac, 0x9274, 0x4867, 0x8d, 0x55, 0x3b, 0xd6, 0x61, 0xde, 0x87, 0x2d); +DEFINE_KNOWN_FOLDER(FOLDERID_CommonAdminTools, 0xd0384e7d, 0xbac3, 0x4797, 0x8f, 0x14, 0xcb, 0xa2, 0x29, 0xb3, 0x92, 0xb5); +DEFINE_KNOWN_FOLDER(FOLDERID_CommonOEMLinks, 0xc1bae2d0, 0x10df, 0x4334, 0xbe, 0xdd, 0x7a, 0xa2, 0x0b, 0x22, 0x7a, 0x9d); +DEFINE_KNOWN_FOLDER(FOLDERID_CommonPrograms, 0x0139d44e, 0x6afe, 0x49f2, 0x86, 0x90, 0x3d, 0xaf, 0xca, 0xe6, 0xff, 0xb8); +DEFINE_KNOWN_FOLDER(FOLDERID_CommonStartMenu, 0xa4115719, 0xd62e, 0x491d, 0xaa, 0x7c, 0xe7, 0x4b, 0x8b, 0xe3, 0xb0, 0x67); +DEFINE_KNOWN_FOLDER(FOLDERID_CommonStartup, 0x82a5ea35, 0xd9cd, 0x47c5, 0x96, 0x29, 0xe1, 0x5d, 0x2f, 0x71, 0x4e, 0x6e); +DEFINE_KNOWN_FOLDER(FOLDERID_CommonTemplates, 0xb94237e7, 0x57ac, 0x4347, 0x91, 0x51, 0xb0, 0x8c, 0x6c, 0x32, 0xd1, 0xf7); +DEFINE_KNOWN_FOLDER(FOLDERID_ComputerFolder, 0x0ac0837c, 0xbbf8, 0x452a, 0x85, 0x0d, 0x79, 0xd0, 0x8e, 0x66, 0x7c, 0xa7); +DEFINE_KNOWN_FOLDER(FOLDERID_ConflictFolder, 0x4bfefb45, 0x347d, 0x4006, 0xa5, 0xbe, 0xac, 0x0c, 0xb0, 0x56, 0x71, 0x92); +DEFINE_KNOWN_FOLDER(FOLDERID_ConnectionsFolder, 0x6f0cd92b, 0x2e97, 0x45d1, 0x88, 0xff, 0xb0, 0xd1, 0x86, 0xb8, 0xde, 0xdd); +DEFINE_KNOWN_FOLDER(FOLDERID_Contacts, 0x56784854, 0xc6cb, 0x462b, 0x81, 0x69, 0x88, 0xe3, 0x50, 0xac, 0xb8, 0x82); +DEFINE_KNOWN_FOLDER(FOLDERID_ControlPanelFolder, 0x82a74aeb, 0xaeb4, 0x465c, 0xa0, 0x14, 0xd0, 0x97, 0xee, 0x34, 0x6d, 0x63); +DEFINE_KNOWN_FOLDER(FOLDERID_Cookies, 0x2b0f765d, 0xc0e9, 0x4171, 0x90, 0x8e, 0x08, 0xa6, 0x11, 0xb8, 0x4f, 0xf6); +DEFINE_KNOWN_FOLDER(FOLDERID_Desktop, 0xb4bfcc3a, 0xdb2c, 0x424c, 0xb0, 0x29, 0x7f, 0xe9, 0x9a, 0x87, 0xc6, 0x41); +DEFINE_KNOWN_FOLDER(FOLDERID_DeviceMetadataStore, 0x5ce4a5e9, 0xe4eb, 0x479d, 0xb8, 0x9f, 0x13, 0x0c, 0x02, 0x88, 0x61, 0x55); +DEFINE_KNOWN_FOLDER(FOLDERID_Documents, 0xfdd39ad0, 0x238f, 0x46af, 0xad, 0xb4, 0x6c, 0x85, 0x48, 0x03, 0x69, 0xc7); +DEFINE_KNOWN_FOLDER(FOLDERID_DocumentsLibrary, 0x7b0db17d, 0x9cd2, 0x4a93, 0x97, 0x33, 0x46, 0xcc, 0x89, 0x02, 0x2e, 0x7c); +DEFINE_KNOWN_FOLDER(FOLDERID_Downloads, 0x374de290, 0x123f, 0x4565, 0x91, 0x64, 0x39, 0xc4, 0x92, 0x5e, 0x46, 0x7b); +DEFINE_KNOWN_FOLDER(FOLDERID_Favorites, 0x1777f761, 0x68ad, 0x4d8a, 0x87, 0xbd, 0x30, 0xb7, 0x59, 0xfa, 0x33, 0xdd); +DEFINE_KNOWN_FOLDER(FOLDERID_Fonts, 0xfd228cb7, 0xae11, 0x4ae3, 0x86, 0x4c, 0x16, 0xf3, 0x91, 0x0a, 0xb8, 0xfe); +DEFINE_KNOWN_FOLDER(FOLDERID_Games, 0xcac52c1a, 0xb53d, 0x4edc, 0x92, 0xd7, 0x6b, 0x2e, 0x8a, 0xc1, 0x94, 0x34); +DEFINE_KNOWN_FOLDER(FOLDERID_GameTasks, 0x054fae61, 0x4dd8, 0x4787, 0x80, 0xb6, 0x09, 0x02, 0x20, 0xc4, 0xb7, 0x00); +DEFINE_KNOWN_FOLDER(FOLDERID_History, 0xd9dc8a3b, 0xb784, 0x432e, 0xa7, 0x81, 0x5a, 0x11, 0x30, 0xa7, 0x59, 0x63); +DEFINE_KNOWN_FOLDER(FOLDERID_HomeGroup, 0x52528a6b, 0xb9e3, 0x4add, 0xb6, 0x0d, 0x58, 0x8c, 0x2d, 0xba, 0x84, 0x2d); +DEFINE_KNOWN_FOLDER(FOLDERID_ImplicitAppShortcuts, 0xbcb5256f, 0x79f6, 0x4cee, 0xb7, 0x25, 0xdc, 0x34, 0xe4, 0x02, 0xfd, 0x46); +DEFINE_KNOWN_FOLDER(FOLDERID_InternetCache, 0x352481e8, 0x33be, 0x4251, 0xba, 0x85, 0x60, 0x07, 0xca, 0xed, 0xcf, 0x9d); +DEFINE_KNOWN_FOLDER(FOLDERID_InternetFolder, 0x4d9f7874, 0x4e0c, 0x4904, 0x96, 0x7b, 0x40, 0xb0, 0xd2, 0x0c, 0x3e, 0x4b); +DEFINE_KNOWN_FOLDER(FOLDERID_Libraries, 0x1b3ea5dc, 0xb587, 0x4786, 0xb4, 0xef, 0xbd, 0x1d, 0xc3, 0x32, 0xae, 0xae); +DEFINE_KNOWN_FOLDER(FOLDERID_Links, 0xbfb9d5e0, 0xc6a9, 0x404c, 0xb2, 0xb2, 0xae, 0x6d, 0xb6, 0xaf, 0x49, 0x68); +DEFINE_KNOWN_FOLDER(FOLDERID_LocalAppData, 0xf1b32785, 0x6fba, 0x4fcf, 0x9d, 0x55, 0x7b, 0x8e, 0x7f, 0x15, 0x70, 0x91); +DEFINE_KNOWN_FOLDER(FOLDERID_LocalAppDataLow, 0xa520a1a4, 0x1780, 0x4ff6, 0xbd, 0x18, 0x16, 0x73, 0x43, 0xc5, 0xaf, 0x16); +DEFINE_KNOWN_FOLDER(FOLDERID_LocalizedResourcesDir, 0x2a00375e, 0x224c, 0x49de, 0xb8, 0xd1, 0x44, 0x0d, 0xf7, 0xef, 0x3d, 0xdc); +DEFINE_KNOWN_FOLDER(FOLDERID_Music, 0x4bd8d571, 0x6d19, 0x48d3, 0xbe, 0x97, 0x42, 0x22, 0x20, 0x08, 0x0e, 0x43); +DEFINE_KNOWN_FOLDER(FOLDERID_MusicLibrary, 0x2112ab0a, 0xc86a, 0x4ffe, 0xa3, 0x68, 0x0d, 0xe9, 0x6e, 0x47, 0x01, 0x2e); +DEFINE_KNOWN_FOLDER(FOLDERID_NetHood, 0xc5abbf53, 0xe17f, 0x4121, 0x89, 0x00, 0x86, 0x62, 0x6f, 0xc2, 0xc9, 0x73); +DEFINE_KNOWN_FOLDER(FOLDERID_NetworkFolder, 0xd20beec4, 0x5ca8, 0x4905, 0xae, 0x3b, 0xbf, 0x25, 0x1e, 0xa0, 0x9b, 0x53); +DEFINE_KNOWN_FOLDER(FOLDERID_OriginalImages, 0x2c36c0aa, 0x5812, 0x4b87, 0xbf, 0xd0, 0x4c, 0xd0, 0xdf, 0xb1, 0x9b, 0x39); +DEFINE_KNOWN_FOLDER(FOLDERID_PhotoAlbums, 0x69d2cf90, 0xfc33, 0x4fb7, 0x9a, 0x0c, 0xeb, 0xb0, 0xf0, 0xfc, 0xb4, 0x3c); +DEFINE_KNOWN_FOLDER(FOLDERID_Pictures, 0x33e28130, 0x4e1e, 0x4676, 0x83, 0x5a, 0x98, 0x39, 0x5c, 0x3b, 0xc3, 0xbb); +DEFINE_KNOWN_FOLDER(FOLDERID_PicturesLibrary, 0xa990ae9f, 0xa03b, 0x4e80, 0x94, 0xbc, 0x99, 0x12, 0xd7, 0x50, 0x41, 0x04); +DEFINE_KNOWN_FOLDER(FOLDERID_Playlists, 0xde92c1c7, 0x837f, 0x4f69, 0xa3, 0xbb, 0x86, 0xe6, 0x31, 0x20, 0x4a, 0x23); +DEFINE_KNOWN_FOLDER(FOLDERID_PrintersFolder, 0x76fc4e2d, 0xd6ad, 0x4519, 0xa6, 0x63, 0x37, 0xbd, 0x56, 0x06, 0x81, 0x85); +DEFINE_KNOWN_FOLDER(FOLDERID_PrintHood, 0x9274bd8d, 0xcfd1, 0x41c3, 0xb3, 0x5e, 0xb1, 0x3f, 0x55, 0xa7, 0x58, 0xf4); +DEFINE_KNOWN_FOLDER(FOLDERID_Profile, 0x5e6c858f, 0x0e22, 0x4760, 0x9a, 0xfe, 0xea, 0x33, 0x17, 0xb6, 0x71, 0x73); +DEFINE_KNOWN_FOLDER(FOLDERID_ProgramData, 0x62ab5d82, 0xfdc1, 0x4dc3, 0xa9, 0xdd, 0x07, 0x0d, 0x1d, 0x49, 0x5d, 0x97); +DEFINE_KNOWN_FOLDER(FOLDERID_ProgramFiles, 0x905e63b6, 0xc1bf, 0x494e, 0xb2, 0x9c, 0x65, 0xb7, 0x32, 0xd3, 0xd2, 0x1a); +DEFINE_KNOWN_FOLDER(FOLDERID_ProgramFilesCommon, 0xf7f1ed05, 0x9f6d, 0x47a2, 0xaa, 0xae, 0x29, 0xd3, 0x17, 0xc6, 0xf0, 0x66); +DEFINE_KNOWN_FOLDER(FOLDERID_ProgramFilesCommonX64, 0x6365d5a7, 0x0f0d, 0x45e5, 0x87, 0xf6, 0x0d, 0xa5, 0x6b, 0x6a, 0x4f, 0x7d); +DEFINE_KNOWN_FOLDER(FOLDERID_ProgramFilesCommonX86, 0xde974d24, 0xd9c6, 0x4d3e, 0xbf, 0x91, 0xf4, 0x45, 0x51, 0x20, 0xb9, 0x17); +DEFINE_KNOWN_FOLDER(FOLDERID_ProgramFilesX64, 0x6d809377, 0x6af0, 0x444b, 0x89, 0x57, 0xa3, 0x77, 0x3f, 0x02, 0x20, 0x0e); +DEFINE_KNOWN_FOLDER(FOLDERID_ProgramFilesX86, 0x7c5a40ef, 0xa0fb, 0x4bfc, 0x87, 0x4a, 0xc0, 0xf2, 0xe0, 0xb9, 0xfa, 0x8e); +DEFINE_KNOWN_FOLDER(FOLDERID_Programs, 0xa77f5d77, 0x2e2b, 0x44c3, 0xa6, 0xa2, 0xab, 0xa6, 0x01, 0x05, 0x4a, 0x51); +DEFINE_KNOWN_FOLDER(FOLDERID_Public, 0xdfdf76a2, 0xc82a, 0x4d63, 0x90, 0x6a, 0x56, 0x44, 0xac, 0x45, 0x73, 0x85); +DEFINE_KNOWN_FOLDER(FOLDERID_PublicDesktop, 0xc4aa340d, 0xf20f, 0x4863, 0xaf, 0xef, 0xf8, 0x7e, 0xf2, 0xe6, 0xba, 0x25); +DEFINE_KNOWN_FOLDER(FOLDERID_PublicDocuments, 0xed4824af, 0xdce4, 0x45a8, 0x81, 0xe2, 0xfc, 0x79, 0x65, 0x08, 0x36, 0x34); +DEFINE_KNOWN_FOLDER(FOLDERID_PublicDownloads, 0x3d644c9b, 0x1fb8, 0x4f30, 0x9b, 0x45, 0xf6, 0x70, 0x23, 0x5f, 0x79, 0xc0); +DEFINE_KNOWN_FOLDER(FOLDERID_PublicGameTasks, 0xdebf2536, 0xe1a8, 0x4c59, 0xb6, 0xa2, 0x41, 0x45, 0x86, 0x47, 0x6a, 0xea); +DEFINE_KNOWN_FOLDER(FOLDERID_PublicLibraries, 0x48daf80b, 0xe6cf, 0x4f4e, 0xb8, 0x00, 0x0e, 0x69, 0xd8, 0x4e, 0xe3, 0x84); +DEFINE_KNOWN_FOLDER(FOLDERID_PublicMusic, 0x3214fab5, 0x9757, 0x4298, 0xbb, 0x61, 0x92, 0xa9, 0xde, 0xaa, 0x44, 0xff); +DEFINE_KNOWN_FOLDER(FOLDERID_PublicPictures, 0xb6ebfb86, 0x6907, 0x413c, 0x9a, 0xf7, 0x4f, 0xc2, 0xab, 0xf0, 0x7c, 0xc5); +DEFINE_KNOWN_FOLDER(FOLDERID_PublicRingtones, 0xe555ab60, 0x153b, 0x4d17, 0x9f, 0x04, 0xa5, 0xfe, 0x99, 0xfc, 0x15, 0xec); +DEFINE_KNOWN_FOLDER(FOLDERID_PublicVideos, 0x2400183a, 0x6185, 0x49fb, 0xa2, 0xd8, 0x4a, 0x39, 0x2a, 0x60, 0x2b, 0xa3); +DEFINE_KNOWN_FOLDER(FOLDERID_QuickLaunch, 0x52a4f021, 0x7b75, 0x48a9, 0x9f, 0x6b, 0x4b, 0x87, 0xa2, 0x10, 0xbc, 0x8f); +DEFINE_KNOWN_FOLDER(FOLDERID_Recent, 0xae50c081, 0xebd2, 0x438a, 0x86, 0x55, 0x8a, 0x09, 0x2e, 0x34, 0x98, 0x7a); +DEFINE_KNOWN_FOLDER(FOLDERID_RecordedTV, 0xbd85e001, 0x112e, 0x431e, 0x98, 0x3b, 0x7b, 0x15, 0xac, 0x09, 0xff, 0xf1); +DEFINE_KNOWN_FOLDER(FOLDERID_RecordedTVLibrary, 0x1a6fdba2, 0xf42d, 0x4358, 0xa7, 0x98, 0xb7, 0x4d, 0x74, 0x59, 0x26, 0xc5); +DEFINE_KNOWN_FOLDER(FOLDERID_RecycleBinFolder, 0xb7534046, 0x3ecb, 0x4c18, 0xbe, 0x4e, 0x64, 0xcd, 0x4c, 0xb7, 0xd6, 0xac); +DEFINE_KNOWN_FOLDER(FOLDERID_ResourceDir, 0x8ad10c31, 0x2adb, 0x4296, 0xa8, 0xf7, 0xe4, 0x70, 0x12, 0x32, 0xc9, 0x72); +DEFINE_KNOWN_FOLDER(FOLDERID_Ringtones, 0xc870044b, 0xf49e, 0x4126, 0xa9, 0xc3, 0xb5, 0x2a, 0x1f, 0xf4, 0x11, 0xe8); +DEFINE_KNOWN_FOLDER(FOLDERID_RoamingAppData, 0x3eb685db, 0x65f9, 0x4cf6, 0xa0, 0x3a, 0xe3, 0xef, 0x65, 0x72, 0x9f, 0x3d); +DEFINE_KNOWN_FOLDER(FOLDERID_SampleMusic, 0xb250c668, 0xf57d, 0x4ee1, 0xa6, 0x3c, 0x29, 0x0e, 0xe7, 0xd1, 0xaa, 0x1f); +DEFINE_KNOWN_FOLDER(FOLDERID_SamplePictures, 0xc4900540, 0x2379, 0x4c75, 0x84, 0x4b, 0x64, 0xe6, 0xfa, 0xf8, 0x71, 0x6b); +DEFINE_KNOWN_FOLDER(FOLDERID_SamplePlaylists, 0x15ca69b3, 0x30ee, 0x49c1, 0xac, 0xe1, 0x6b, 0x5e, 0xc3, 0x72, 0xaf, 0xb5); +DEFINE_KNOWN_FOLDER(FOLDERID_SampleVideos, 0x859ead94, 0x2e85, 0x48ad, 0xa7, 0x1a, 0x09, 0x69, 0xcb, 0x56, 0xa6, 0xcd); +DEFINE_KNOWN_FOLDER(FOLDERID_SavedGames, 0x4c5c32ff, 0xbb9d, 0x43b0, 0xb5, 0xb4, 0x2d, 0x72, 0xe5, 0x4e, 0xaa, 0xa4); +DEFINE_KNOWN_FOLDER(FOLDERID_SavedSearches, 0x7d1d3a04, 0xdebb, 0x4115, 0x95, 0xcf, 0x2f, 0x29, 0xda, 0x29, 0x20, 0xda); +DEFINE_KNOWN_FOLDER(FOLDERID_SEARCH_CSC, 0xee32e446, 0x31ca, 0x4aba, 0x81, 0x4f, 0xa5, 0xeb, 0xd2, 0xfd, 0x6d, 0x5e); +DEFINE_KNOWN_FOLDER(FOLDERID_SearchHome, 0x190337d1, 0xb8ca, 0x4121, 0xa6, 0x39, 0x6d, 0x47, 0x2d, 0x16, 0x97, 0x2a); +DEFINE_KNOWN_FOLDER(FOLDERID_SEARCH_MAPI, 0x98ec0e18, 0x2098, 0x4d44, 0x86, 0x44, 0x66, 0x97, 0x93, 0x15, 0xa2, 0x81); +DEFINE_KNOWN_FOLDER(FOLDERID_SendTo, 0x8983036c, 0x27c0, 0x404b, 0x8f, 0x08, 0x10, 0x2d, 0x10, 0xdc, 0xfd, 0x74); +DEFINE_KNOWN_FOLDER(FOLDERID_SidebarDefaultParts, 0x7b396e54, 0x9ec5, 0x4300, 0xbe, 0x0a, 0x24, 0x82, 0xeb, 0xae, 0x1a, 0x26); +DEFINE_KNOWN_FOLDER(FOLDERID_SidebarParts, 0xa75d362e, 0x50fc, 0x4fb7, 0xac, 0x2c, 0xa8, 0xbe, 0xaa, 0x31, 0x44, 0x93); +DEFINE_KNOWN_FOLDER(FOLDERID_StartMenu, 0x625b53c3, 0xab48, 0x4ec1, 0xba, 0x1f, 0xa1, 0xef, 0x41, 0x46, 0xfc, 0x19); +DEFINE_KNOWN_FOLDER(FOLDERID_Startup, 0xb97d20bb, 0xf46a, 0x4c97, 0xba, 0x10, 0x5e, 0x36, 0x08, 0x43, 0x08, 0x54); +DEFINE_KNOWN_FOLDER(FOLDERID_SyncManagerFolder, 0x43668bf8, 0xc14e, 0x49b2, 0x97, 0xc9, 0x74, 0x77, 0x84, 0xd7, 0x84, 0xb7); +DEFINE_KNOWN_FOLDER(FOLDERID_SyncResultsFolder, 0x289a9a43, 0xbe44, 0x4057, 0xa4, 0x1b, 0x58, 0x7a, 0x76, 0xd7, 0xe7, 0xf9); +DEFINE_KNOWN_FOLDER(FOLDERID_SyncSetupFolder, 0x0f214138, 0xb1d3, 0x4a90, 0xbb, 0xa9, 0x27, 0xcb, 0xc0, 0xc5, 0x38, 0x9a); +DEFINE_KNOWN_FOLDER(FOLDERID_System, 0x1ac14e77, 0x02e7, 0x4e5d, 0xb7, 0x44, 0x2e, 0xb1, 0xae, 0x51, 0x98, 0xb7); +DEFINE_KNOWN_FOLDER(FOLDERID_SystemX86, 0xd65231b0, 0xb2f1, 0x4857, 0xa4, 0xce, 0xa8, 0xe7, 0xc6, 0xea, 0x7d, 0x27); +DEFINE_KNOWN_FOLDER(FOLDERID_Templates, 0xa63293e8, 0x664e, 0x48db, 0xa0, 0x79, 0xdf, 0x75, 0x9e, 0x05, 0x09, 0xf7); +DEFINE_KNOWN_FOLDER(FOLDERID_UserPinned, 0x9e3995ab, 0x1f9c, 0x4f13, 0xb8, 0x27, 0x48, 0xb2, 0x4b, 0x6c, 0x71, 0x74); +DEFINE_KNOWN_FOLDER(FOLDERID_UserProfiles, 0x0762d272, 0xc50a, 0x4bb0, 0xa3, 0x82, 0x69, 0x7d, 0xcd, 0x72, 0x9b, 0x80); +DEFINE_KNOWN_FOLDER(FOLDERID_UserProgramFiles, 0x5cd7aee2, 0x2219, 0x4a67, 0xb8, 0x5d, 0x6c, 0x9c, 0xe1, 0x56, 0x60, 0xcb); +DEFINE_KNOWN_FOLDER(FOLDERID_UserProgramFilesCommon, 0xbcbd3057, 0xca5c, 0x4622, 0xb4, 0x2d, 0xbc, 0x56, 0xdb, 0x0a, 0xe5, 0x16); +DEFINE_KNOWN_FOLDER(FOLDERID_UsersFiles, 0xf3ce0f7c, 0x4901, 0x4acc, 0x86, 0x48, 0xd5, 0xd4, 0x4b, 0x04, 0xef, 0x8f); +DEFINE_KNOWN_FOLDER(FOLDERID_UsersLibraries, 0xa302545d, 0xdeff, 0x464b, 0xab, 0xe8, 0x61, 0xc8, 0x64, 0x8d, 0x93, 0x9b); +DEFINE_KNOWN_FOLDER(FOLDERID_Videos, 0x18989b1d, 0x99b5, 0x455b, 0x84, 0x1c, 0xab, 0x7c, 0x74, 0xe4, 0xdd, 0xfc); +DEFINE_KNOWN_FOLDER(FOLDERID_VideosLibrary, 0x491e922f, 0x5643, 0x4af4, 0xa7, 0xeb, 0x4e, 0x7a, 0x13, 0x8d, 0x81, 0x74); +DEFINE_KNOWN_FOLDER(FOLDERID_Windows, 0xf38bf404, 0x1d43, 0x42f2, 0x93, 0x05, 0x67, 0xde, 0x0b, 0x28, 0xfc, 0x23); Propchange: trunk/reactos/include/psdk/knownfolders.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/include/psdk/objectarray.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/objectarray.i…
============================================================================== --- trunk/reactos/include/psdk/objectarray.idl (added) +++ trunk/reactos/include/psdk/objectarray.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -1,0 +1,47 @@ +/* + * Copyright 2011 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "oaidl.idl"; +import "ocidl.idl"; + +[ + uuid(92ca9dcd-5622-4bba-a805-5e9f541bd8c9), + object, + pointer_default(unique) +] +interface IObjectArray : IUnknown +{ + HRESULT GetCount([out] UINT *pcObjects); + HRESULT GetAt( + [in] UINT uiIndex, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); +} + +[ + uuid(5632b1a4-e38a-400a-928a-d4cd63230295), + object, + pointer_default(unique) +] +interface IObjectCollection : IObjectArray +{ + HRESULT AddObject([in] IUnknown *punk); + HRESULT AddFromArray([in] IObjectArray *poaSource); + HRESULT RemoveObjectAt([in] UINT uiIndex); + HRESULT Clear(); +} Propchange: trunk/reactos/include/psdk/objectarray.idl ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/psdk/propsys.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/propsys.idl?r…
============================================================================== --- trunk/reactos/include/psdk/propsys.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/propsys.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -802,6 +802,7 @@ cpp_quote("HRESULT WINAPI PSStringFromPropertyKey(REFPROPERTYKEY,LPWSTR,UINT);") cpp_quote("HRESULT WINAPI PSPropertyKeyFromString(LPCWSTR,PROPERTYKEY*);") cpp_quote("HRESULT WINAPI PSGetPropertyDescription(REFPROPERTYKEY,REFIID,void **);") +cpp_quote("HRESULT WINAPI PSRefreshPropertySchema(void);") /* TODO: Add remainder of the C api here */ Modified: trunk/reactos/include/psdk/psdk.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/psdk.rbuild?r…
============================================================================== --- trunk/reactos/include/psdk/psdk.rbuild [iso-8859-1] (original) +++ trunk/reactos/include/psdk/psdk.rbuild [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -38,6 +38,7 @@ <file>netfw.idl</file> <file>netcon.idl</file> <file>oaidl.idl</file> + <file>objectarray.idl</file> <file>objidl.idl</file> <file>objsafe.idl</file> <file>ocidl.idl</file> Modified: trunk/reactos/include/psdk/shldisp.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shldisp.idl?r…
============================================================================== --- trunk/reactos/include/psdk/shldisp.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/shldisp.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -31,6 +31,7 @@ * IAutoComplete interface */ [ + local, object, uuid(00bb2762-6a77-11d0-a535-00c04fd7d062), pointer_default(unique) @@ -51,6 +52,7 @@ * IAutoComplete2 interface */ [ + local, object, uuid(eac04bc0-3791-11d2-bb95-0060977b464c), pointer_default(unique) @@ -77,7 +79,17 @@ } [ - object, + uuid(50a7e9b0-70ef-11d1-b75a-00a0c90564fe), + version(1.0) +] +library Shell32 +{ + +importlib("stdole2.tlb"); + +[ + object, + oleautomation, uuid(9ba05970-f6a8-11cf-a442-00a0c90a8f39), pointer_default(unique) ] @@ -119,6 +131,363 @@ [default, source] dispinterface DShellFolderViewEvents; } +interface FolderItem; +interface FolderItems; +interface FolderItemVerb; +interface FolderItemVerbs; + +/***************************************************************************** + * Folder interface + */ +[ + object, + uuid(bbcbde60-c3ff-11ce-8350-444553540000), + oleautomation, + dual +] +interface Folder : IDispatch +{ + [propget, id(DISPID_VALUE)] + HRESULT Title( [out, retval] BSTR *pbs ); + + [propget] + HRESULT Application( [out, retval] IDispatch **ppid ); + + [propget] + HRESULT Parent( [out, retval] IDispatch **ppid ); + + [propget] + HRESULT ParentFolder( [out, retval] Folder **ppsf ); + + HRESULT Items( [out, retval] FolderItems **ppid ); + + HRESULT ParseName( [in] BSTR bName, [out, retval] FolderItem **ppid ); + + HRESULT NewFolder( [in] BSTR bName, [in, optional] VARIANT vOptions ); + + HRESULT MoveHere( [in] VARIANT vItem, [in, optional] VARIANT vOptions ); + + HRESULT CopyHere( [in] VARIANT vItem, [in, optional] VARIANT vOptions ); + + HRESULT GetDetailsOf( [in] VARIANT vItem, + [in] int iColumn, + [out, retval] BSTR *pbs ); +} + +/***************************************************************************** + * Folder2 interface + */ +[ + object, + uuid(f0d2d8ef-3890-11d2-bf8b-00c04fb93661), + oleautomation, + dual +] +interface Folder2 : Folder +{ + [propget] + HRESULT Self( [out, retval] FolderItem **ppfi ); + + [propget] + HRESULT OfflineStatus( [out, retval] LONG *pul ); + + HRESULT Synchronize(); + + [propget, id(1)] + HRESULT HaveToShowWebViewBarricade( + [out, retval] VARIANT_BOOL *pbHaveToShowWebViewBarricade ); + + HRESULT DismissedWebViewBarricade(); +} + +/***************************************************************************** + * Folder3 interface + */ +[ + object, + uuid(a7ae5f64-c4d7-4d7f-9307-4d24ee54b841), + oleautomation, + dual +] +interface Folder3 : Folder2 +{ + [propget, id(2)] + HRESULT ShowWebViewBarricade( + [out, retval] VARIANT_BOOL *pbShowWebViewBarricade ); + + [propput, id(2)] + HRESULT ShowWebViewBarricade( [in] VARIANT_BOOL bShowWebViewBarricade ); +} + +/***************************************************************************** + * FolderItem interface + */ +[ + object, + uuid(fac32c80-cbe4-11ce-8350-444553540000), + oleautomation, + dual +] +interface FolderItem : IDispatch +{ + typedef FolderItem *LPFOLDERITEM; + + [propget] + HRESULT Application( [out, retval] IDispatch **ppid ); + + [propget] + HRESULT Parent( [out, retval] IDispatch **ppid ); + + [propget, id(DISPID_VALUE)] + HRESULT Name( [out, retval] BSTR *pbs ); + + [propput, id(DISPID_VALUE)] + HRESULT Name( [in] BSTR bs ); + + [propget] + HRESULT Path( [out, retval] BSTR *pbs ); + + [propget] + HRESULT GetLink( [out, retval] IDispatch **ppid ); + + [propget] + HRESULT GetFolder( [out, retval] IDispatch **ppid ); + + [propget] + HRESULT IsLink( [out, retval] VARIANT_BOOL *pb ); + + [propget] + HRESULT IsFolder( [out, retval] VARIANT_BOOL *pb ); + + [propget] + HRESULT IsFileSystem( [out, retval] VARIANT_BOOL *pb ); + + [propget] + HRESULT IsBrowsable( [out, retval] VARIANT_BOOL *pb ); + + [propget] + HRESULT ModifyDate( [out, retval] DATE *pdt ); + + [propput] + HRESULT ModifyDate( [in] DATE dt ); + + [propget] + HRESULT Size( [out, retval] LONG *pul ); + + [propget] + HRESULT Type( [out, retval] BSTR *pbs ); + + HRESULT Verbs( [out, retval] FolderItemVerbs **ppfic ); + + HRESULT InvokeVerb( [in, optional] VARIANT vVerb ); +} + +/***************************************************************************** + * FolderItems interface + */ +[ + object, + uuid(744129e0-cbe5-11ce-8350-444553540000), + oleautomation, + dual +] +interface FolderItems : IDispatch +{ + [propget] + HRESULT Count( [out, retval] long *plCount ); + + [propget] + HRESULT Application( [out, retval] IDispatch **ppid ); + + [propget] + HRESULT Parent( [out, retval] IDispatch **ppid ); + + HRESULT Item( [in, optional] VARIANT index, + [out, retval] FolderItem **ppid ); + + [id(DISPID_NEWENUM)] + HRESULT _NewEnum( [out, retval] IUnknown **ppunk ); +} + +/***************************************************************************** + * FolderItemVerb interface + */ +[ + object, + uuid(08ec3e00-50b0-11cf-960c-0080c7f4ee85), + oleautomation, + dual +] +interface FolderItemVerb : IDispatch +{ + [propget] + HRESULT Application( [out, retval] IDispatch **ppid ); + + [propget] + HRESULT Parent( [out, retval] IDispatch **ppid ); + + [propget, id(DISPID_VALUE)] + HRESULT Name( [out, retval] BSTR *pbs ); + + HRESULT DoIt(); +} + +/***************************************************************************** + * FolderItemVerbs interface + */ +[ + object, + uuid(1f8352c0-50b0-11cf-960c-0080c7f4ee85), + oleautomation, + dual +] +interface FolderItemVerbs : IDispatch +{ + [propget] + HRESULT Count( [out, retval] long *plCount ); + + [propget] + HRESULT Application( [out, retval] IDispatch **ppid ); + + [propget] + HRESULT Parent( [out, retval] IDispatch **ppid ); + + HRESULT Item( [in, optional] VARIANT index, + [out, retval] FolderItemVerb **ppid ); + + [id(DISPID_NEWENUM)] + HRESULT _NewEnum( [out, retval] IUnknown **ppunk ); +} + +/***************************************************************************** + * IShellDispatch interface + */ +[ + object, + uuid(d8f015c0-c278-11ce-a49e-444553540000), + oleautomation, + hidden, + dual +] +interface IShellDispatch : IDispatch +{ + [propget] + HRESULT Application( [out, retval] IDispatch **ppid ); + + [propget] + HRESULT Parent( [out, retval] IDispatch **ppid ); + + HRESULT NameSpace( [in] VARIANT vDir, [out, retval] Folder **ppsdf ); + + HRESULT BrowseForFolder( [in] long Hwnd, + [in] BSTR Title, + [in] long Options, + [in, optional] VARIANT RootFolder, + [out, retval] Folder **ppsdf ); + + HRESULT Windows( [out, retval] IDispatch **ppid ); + + HRESULT Open( [in] VARIANT vDir ); + + HRESULT Explore( [in] VARIANT vDir ); + + HRESULT MinimizeAll(); + + HRESULT UndoMinimizeALL(); + + HRESULT FileRun(); + + HRESULT CascadeWindows(); + + HRESULT TileVertically(); + + HRESULT TileHorizontally(); + + HRESULT ShutdownWindows(); + + HRESULT Suspend(); + + HRESULT EjectPC(); + + HRESULT SetTime(); + + HRESULT TrayProperties(); + + HRESULT Help(); + + HRESULT FindFiles(); + + HRESULT FindComputer(); + + HRESULT RefreshMenu(); + + HRESULT ControlPanelItem( [in] BSTR szDir ); +} + +[ + uuid(13709620-c279-11ce-a49e-444553540000) +] +coclass Shell +{ + [default] interface IShellDispatch; +} + +[ + uuid(0a89a860-d7b1-11ce-8350-444553540000), + hidden +] +coclass ShellDispatchInproc +{ + interface IUnknown; +} + +typedef +[ + uuid(ca31ea20-48d0-11cf-8350-444553540000) +] +enum ShellSpecialFolderConstants { + ssfDESKTOP = 0x00, + ssfPROGRAMS = 0x02, + ssfCONTROLS = 0x03, + ssfPRINTERS = 0x04, + ssfPERSONAL = 0x05, + ssfFAVORITES = 0x06, + ssfSTARTUP = 0x07, + ssfRECENT = 0x08, + ssfSENDTO = 0x09, + ssfBITBUCKET = 0x0a, + ssfSTARTMENU = 0x0b, + ssfDESKTOPDIRECTORY = 0x10, + ssfDRIVES = 0x11, + ssfNETWORK = 0x12, + ssfNETHOOD = 0x13, + ssfFONTS = 0x14, + ssfTEMPLATES = 0x15, + ssfCOMMONSTARTMENU = 0x16, + ssfCOMMONPROGRAMS = 0x17, + ssfCOMMONSTARTUP = 0x18, + ssfCOMMONDESKTOPDIR = 0x19, + ssfAPPDATA = 0x1a, + ssfPRINTHOOD = 0x1b, + ssfLOCALAPPDATA = 0x1c, + ssfALTSTARTUP = 0x1d, + ssfCOMMONALTSTARTUP = 0x1e, + ssfCOMMONFAVORITES = 0x1f, + ssfINTERNETCACHE = 0x20, + ssfCOOKIES = 0x21, + ssfHISTORY = 0x22, + ssfCOMMONAPPDATA = 0x23, + ssfWINDOWS = 0x24, + ssfSYSTEM = 0x25, + ssfPROGRAMFILES = 0x26, + ssfMYPICTURES = 0x27, + ssfPROFILE = 0x28, + ssfSYSTEMx86 = 0x29, + ssfPROGRAMFILESx86 = 0x30 +} ShellSpecialFolderConstants; + +} /* library Shell32 */ + /***************************************************************************** * IAsyncOperation interface */ Modified: trunk/reactos/include/psdk/shlguid.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shlguid.h?rev…
============================================================================== --- trunk/reactos/include/psdk/shlguid.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/shlguid.h [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -20,7 +20,6 @@ #define __WINE_SHLGUID_H DEFINE_OLEGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0); -DEFINE_OLEGUID(CLSID_ShellLink, 0x00021401L, 0, 0); DEFINE_OLEGUID(CATID_BrowsableShellExt, 0x00021490L, 0, 0); DEFINE_OLEGUID(CATID_BrowseInPlace, 0x00021491L, 0, 0); @@ -184,8 +183,6 @@ /* END REACTOS ONLY */ /* IExplorerBrowser */ -DEFINE_GUID(CLSID_ExplorerBrowser, 0x71F96385, 0xDDD6, 0x48D3, 0xA0, 0xC1, 0xAE, 0x06, 0xE8, 0xB0, 0x55, 0xFB); - DEFINE_GUID(EP_NavPane, 0xCB316B22, 0x25F7, 0x42B8, 0x8A, 0x09, 0x54, 0x0D, 0x23, 0xA4, 0x3C, 0x2F); DEFINE_GUID(EP_Commands,0xD9745868, 0xCA5F, 0x4A76, 0x91, 0xCD, 0xF5, 0xA1, 0x29, 0xFB, 0xB0, 0x76); DEFINE_GUID(EP_Commands_Organize, 0x72E81700, 0xE3EC, 0x4660, 0xBF, 0x24, 0x3C, 0x3B, 0x7B, 0x64, 0x88, 0x06); @@ -195,4 +192,21 @@ DEFINE_GUID(EP_QueryPane, 0x65BCDE4F, 0x4F07, 0x4F27, 0x83, 0xA7, 0x1A, 0xFC, 0xA4, 0xDF, 0x7D, 0xDD); DEFINE_GUID(EP_AdvQueryPane, 0xB4E9DB8B, 0x34BA, 0x4C39, 0xB5, 0xCC, 0x16, 0xA1, 0xBD, 0x2C, 0x41, 0x1C); +/* IShellItem/IShellItemArray BindToHandler */ +DEFINE_GUID(BHID_SFObject, 0x3981E224, 0xF559, 0x11D3, 0x8E,0x3A, 0x00,0xC0,0x4F,0x68,0x37,0xD5); +DEFINE_GUID(BHID_SFUIObject, 0x3981E225, 0xF559, 0x11D3, 0x8E,0x3A, 0x00,0xC0,0x4F,0x68,0x37,0xD5); +DEFINE_GUID(BHID_SFViewObject,0x3981E226, 0xF559, 0x11D3, 0x8E,0x3A, 0x00,0xC0,0x4F,0x68,0x37,0xD5); +DEFINE_GUID(BHID_Storage, 0x3981E227, 0xF559, 0x11D3, 0x8E,0x3A, 0x00,0xC0,0x4F,0x68,0x37,0xD5); +DEFINE_GUID(BHID_Stream, 0x1CEBB3AB, 0x7C10, 0x499A, 0xA4,0x17, 0x92,0xCA,0x16,0xC4,0xCB,0x83); +DEFINE_GUID(BHID_StorageEnum, 0x4621A4E3, 0xF0D6, 0x4773, 0x8A,0x9C, 0x46,0xE7,0x7B,0x17,0x48,0x40); +DEFINE_GUID(BHID_Transfer, 0xD5E346A1, 0xF753, 0x4932, 0xB4,0x03, 0x45,0x74,0x80,0x0E,0x24,0x98); +DEFINE_GUID(BHID_EnumItems, 0x94F60519, 0x2850, 0x4924, 0xAA,0x5A, 0xD1,0x5E,0x84,0x86,0x80,0x39); +DEFINE_GUID(BHID_DataObject, 0xB8C0BD9F, 0xED24, 0x455C, 0x83,0xE6, 0xD5,0x39,0x0C,0x4F,0xE8,0xC4); +DEFINE_GUID(BHID_Filter, 0x38D08778, 0xF557, 0x4690, 0x9E,0xBF, 0xBA,0x54,0x70,0x6A,0xD8,0xF7); +DEFINE_GUID(BHID_LinkTargetItem, 0x3981E228, 0xF559, 0x11D3, 0x8E,0x3A, 0x00,0xC0,0x4F,0x68,0x37,0xD5); +DEFINE_GUID(BHID_PropertyStore, 0x0384E1A4, 0x1523, 0x439C, 0xA4,0xC8, 0xAB,0x91,0x10,0x52,0xF5,0x86); +DEFINE_GUID(BHID_ThumbnailHandler, 0x7B2E650A, 0x8E20, 0x4F4A, 0xB0,0x9E, 0x65,0x97,0xAF,0xC7,0x2F,0xB0); +DEFINE_GUID(BHID_AssociationArray, 0xBEA9EF17, 0x82F1, 0x4F60, 0x92,0x84, 0x4F,0x8D,0xB7,0x5C,0x3B,0xE9); +DEFINE_GUID(BHID_EnumAssocHandlers,0xB8AB0B9C, 0xC2EC, 0x4F7A, 0x91,0x8D, 0x31,0x49,0x00,0xE6,0x28,0x0A); + #endif /* __WINE_SHLGUID_H */ Modified: trunk/reactos/include/psdk/shobjidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shobjidl.idl?…
============================================================================== --- trunk/reactos/include/psdk/shobjidl.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/shobjidl.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -30,7 +30,8 @@ /* FIXME: import "prsht.idl";*/ import "msxml.idl"; import "wtypes.idl"; -/* FIXME: import "propsys.idl"; */ +import "propsys.idl"; +import "objectarray.idl"; /* FIXME: import "structuredquery.idl"; */ cpp_quote("/* FIXME: #include <sherrors.h> */") @@ -346,8 +347,25 @@ ] interface IShellItem : IUnknown { - typedef DWORD SIGDN; - + typedef [v1_enum] enum { + SIGDN_NORMALDISPLAY = 0, + SIGDN_PARENTRELATIVEPARSING = 0x80018001, + SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000, + SIGDN_PARENTRELATIVEEDITING = 0x80031001, + SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000, + SIGDN_FILESYSPATH = 0x80058000, + SIGDN_URL = 0x80068000, + SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8007c001, + SIGDN_PARENTRELATIVE = 0x80080001 + } SIGDN; /* & 0xFFFF => SHGDN */ + + [v1_enum] enum _SICHINTF + { + SICHINT_DISPLAY = 0x00000000, + SICHINT_CANONICAL = 0x10000000, + SICHINT_TEST_FILESYSPATH_IF_NOT_EQUAL = 0x20000000, + SICHINT_ALLFIELDS = 0x80000000 + }; typedef DWORD SICHINTF; HRESULT BindToHandler( @@ -370,6 +388,75 @@ [in] IShellItem *psi, [in] SICHINTF hint, [out] int *piOrder); +} + +/***************************************************************************** + * IShellItem2 interface + */ +[ + object, + uuid(7E9FB0D3-919F-4307-AB2E-9B1860310C93), + pointer_default(unique) +] +interface IShellItem2 : IShellItem +{ + HRESULT GetPropertyStore( + [in] GETPROPERTYSTOREFLAGS flags, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT GetPropertyStoreWithCreateObject( + [in] GETPROPERTYSTOREFLAGS flags, + [in] IUnknown *punkCreateObject, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT GetPropertyStoreForKeys( + [in, size_is(cKeys)] const PROPERTYKEY *rgKeys, + [in] UINT cKeys, + [in] GETPROPERTYSTOREFLAGS flags, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT GetPropertyDescriptionList( + [in] REFPROPERTYKEY keyType, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT Update( + [in, unique] IBindCtx *pbc); + + HRESULT GetProperty( + [in] REFPROPERTYKEY key, + [out] PROPVARIANT *ppropvar); + + HRESULT GetCLSID( + [in] REFPROPERTYKEY key, + [out] CLSID *pclsid); + + HRESULT GetFileTime ( + [in] REFPROPERTYKEY key, + [out] FILETIME *pft); + + HRESULT GetInt32( + [in] REFPROPERTYKEY key, + [out] int *pi); + + HRESULT GetString( + [in] REFPROPERTYKEY key, + [out, string] LPWSTR *ppsz); + + HRESULT GetUInt32( + [in] REFPROPERTYKEY key, + [out] ULONG *pui); + + HRESULT GetUInt64( + [in] REFPROPERTYKEY key, + [out] ULONGLONG *pull); + + HRESULT GetBool( + [in] REFPROPERTYKEY key, + [out] BOOL *pf); } typedef enum tagNWMF { @@ -402,6 +489,125 @@ } cpp_quote("#define SID_SNewWindowManager IID_INewWindowManager") + +/***************************************************************************** + * IEnumShellItems interface + */ +[ + object, + uuid(70629033-E363-4A28-A567-0DB78006E6D7), + pointer_default(unique) +] +interface IEnumShellItems : IUnknown +{ + [local] HRESULT Next( + [in] ULONG celt, + [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt, + [out] ULONG *pceltFetched); + + [call_as(Next)] HRESULT RemoteNext( + [in] ULONG celt, + [out, size_is(celt), length_is(*pceltFetched)] IShellItem **rgelt, + [out] ULONG *pceltFetched); + + HRESULT Skip( + [in] ULONG celt); + + HRESULT Reset(); + + HRESULT Clone( + [out] IEnumShellItems **ppenum); +} + +/***************************************************************************** + * IShellItemArray interface + */ +[ + object, + uuid(B63EA76D-1F85-456F-A19C-48159EFA858B), + pointer_default(unique) +] +interface IShellItemArray : IUnknown +{ + typedef [v1_enum] enum SIATTRIBFLAGS { + SIATTRIBFLAGS_AND = 0x0001, + SIATTRIBFLAGS_OR = 0x0002, + SIATTRIBFLAGS_APPCOMPAT = 0x0003, + SIATTRIBFLAGS_MASK = 0x0003, + SIATTRIBFLAGS_ALLITEMS = 0x4000 + } SIATTRIBFLAGS; + cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(SIATTRIBFLAGS)") + + HRESULT BindToHandler( + [in, unique] IBindCtx *pbc, + [in] REFGUID bhid, + [in] REFIID riid, + [out, iid_is(riid)] void **ppvOut); + + HRESULT GetPropertyStore( + [in] GETPROPERTYSTOREFLAGS flags, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT GetPropertyDescriptionList( + [in] REFPROPERTYKEY keyType, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT GetAttributes( + [in] SIATTRIBFLAGS AttribFlags, + [in] SFGAOF sfgaoMask, + [out] SFGAOF *psfgaoAttribs); + + HRESULT GetCount( + [out] DWORD *pdwNumItems); + + HRESULT GetItemAt( + [in] DWORD dwIndex, + [out] IShellItem **ppsi); + + HRESULT EnumItems( + [out] IEnumShellItems **ppenumShellItems); + +} + +typedef [v1_enum] enum DATAOBJ_GET_ITEM_FLAGS +{ + DOGIF_DEFAULT = 0x0, + DOGIF_TRAVERSE_LINK = 0x1, + DOGIF_NO_HDROP = 0x2, + DOGIF_NO_URL = 0x4, + DOGIF_ONLY_IF_ONE = 0x8 +} DATAOBJ_GET_ITEM_FLAGS; +cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(DATAOBJ_GET_ITEM_FLAGS)") + +cpp_quote("HRESULT WINAPI SHGetNameFromIDList(PCIDLIST_ABSOLUTE pidl, SIGDN sigdnName, PWSTR *ppszName);") +cpp_quote("HRESULT WINAPI SHCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv);") +cpp_quote("HRESULT WINAPI SHCreateItemFromIDList(PCIDLIST_ABSOLUTE pidl, REFIID riid, void **ppv);") +cpp_quote("HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj, DATAOBJ_GET_ITEM_FLAGS dwFlags, REFIID riid, void **ppv);") +cpp_quote("HRESULT WINAPI SHGetIDListFromObject(IUnknown *punk, PIDLIST_ABSOLUTE *ppidl);") +cpp_quote("HRESULT WINAPI SHGetItemFromObject(IUnknown *punk, REFIID riid, void **ppv);") +cpp_quote("HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent, IShellFolder* psf, UINT cidl, PCUITEMID_CHILD_ARRAY ppidl, IShellItemArray **ppsiItemArray);") +cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromShellItem(IShellItem *psi, REFIID riid, void **ppv);") +cpp_quote("HRESULT WINAPI SHCreateShellItemArrayFromDataObject(IDataObject *pdo, REFIID riid, void **ppv);") + +/***************************************************************************** + * IShellItemFilter interface + */ +[ + object, + uuid(2659B475-EEB8-48B7-8F07-B378810F48CF), + pointer_default(unique) +] +interface IShellItemFilter : IUnknown +{ + HRESULT IncludeItem( + [in] IShellItem *psi); + + HRESULT GetEnumFlagsForItem( + [in] IShellItem *psi, + [out] SHCONTF *pgrfFlags); +} /***************************************************************************** * FOLDERSETTINGS @@ -1103,6 +1309,27 @@ [in] IShellView *ppshv); } +/***************************************************************************** + * IDockingWindow interface + */ +[ + object, + uuid(012dd920-7b26-11d0-8ca9-00a0c92dbfe8) +] +interface IDockingWindow : IOleWindow +{ + HRESULT ShowDW( + [in] BOOL fShow); + + HRESULT CloseDW( + [in] DWORD dwReserved); + + HRESULT ResizeBorderDW( + [in] LPCRECT prcBorder, + [in] IUnknown *punkToolbarSite, + [in] BOOL fReserved); +}; + /***************************************************************************** * IDockingWindowFrame interface @@ -1259,6 +1486,7 @@ cpp_quote("#define CMIC_MASK_FLAG_SEP_VDM SEE_MASK_FLAG_SEPVDM") cpp_quote("#define CMIC_MASK_HASTITLE SEE_MASK_HASTITLE") cpp_quote("#define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK") +cpp_quote("#define CMIC_MASK_NOASYNC SEE_MASK_NOASYNC") cpp_quote("#define CMIC_MASK_SHIFT_DOWN 0x10000000") cpp_quote("#define CMIC_MASK_PTINVOKE 0x20000000") cpp_quote("#define CMIC_MASK_CONTROL_DOWN 0x40000000") @@ -1357,6 +1585,26 @@ [out] LRESULT *plResult); } +/***************************************************************************** + * IContextMenuCB interface + */ + +[ + object, + uuid(3409e930-5a39-11d1-83fa-00a0c90dc849), + pointer_default(unique), + local +] +interface IContextMenuCB : IUnknown +{ + HRESULT CallBack( + [in] IShellFolder *psf, + [in] HWND hwndOwner, + [in] IDataObject *pdtobj, + [in] UINT uMsg, + [in] WPARAM wParam, + [in] LPARAM lParam); +} /***************************************************************************** * IShellExecuteHookA interface @@ -1439,7 +1687,7 @@ object, uuid(ac60f6a0-0fd9-11d0-99cb-00c04fd64497), pointer_default(unique), - local + local ] interface IURLSearchHook : IUnknown { @@ -1476,7 +1724,7 @@ object, uuid(5ee44da4-6d32-46e3-86bc-07540dedd0e0), pointer_default(unique), - local + local ] interface IURLSearchHook2 : IURLSearchHook { @@ -1496,7 +1744,7 @@ object, uuid(000214e1-0000-0000-c000-000000000046), pointer_default(unique), - local + local ] interface INewShortcutHookA : IUnknown { @@ -1527,7 +1775,7 @@ object, uuid(000214f7-0000-0000-c000-000000000046), pointer_default(unique), - local + local ] interface INewShortcutHookW : IUnknown { @@ -1627,28 +1875,6 @@ [in] HWND hwnd); } -cpp_quote("EXTERN_C const CLSID CLSID_TaskbarList;") - -/***************************************************************************** - * IContextMenuCB interface - */ - -[ - object, - uuid(3409e930-5a39-11d1-83fa-00a0c90dc849), - pointer_default(unique) -] -interface IContextMenuCB : IUnknown -{ - HRESULT CallBack( - [in] IShellFolder *psf, - [in] HWND hwndOwner, - [in] IDataObject *pdtobj, - [in] UINT uMsg, - [in] WPARAM wParam, - [in] LPARAM lParam); -} - /***************************************************************************** * IDefaultExtractIconInit interface */ @@ -1678,27 +1904,6 @@ [in] LPCWSTR pszFile, [in] int iIcon); } - - -/***************************************************************************** - * IDockingWindow interface - */ -[ - uuid(012dd920-7b26-11d0-8ca9-00a0c92dbfe8), - object -] -interface IDockingWindow : IOleWindow -{ - HRESULT ShowDW([in] BOOL fShow); - - HRESULT CloseDW([in] DWORD dwReserved); - - HRESULT ResizeBorderDW( - [in] LPCRECT prcBorder, - [in] IUnknown* punkToolbarSite, - [in] BOOL fReserved); -} - /***************************************************************************** * IDeskBand interface @@ -2817,6 +3022,145 @@ cpp_quote("#endif /* _WIN32_IE_IE60 */") +cpp_quote("#ifdef MIDL_PASS") +typedef IUnknown* HIMAGELIST; +cpp_quote("#endif") + +typedef [v1_enum] enum THUMBBUTTONFLAGS { + THBF_ENABLED = 0x0000, + THBF_DISABLED = 0x0001, + THBF_DISMISSONCLICK = 0x0002, + THBF_NOBACKGROUND = 0x0004, + THBF_HIDDEN = 0x0008, + THBF_NONINTERACTIVE = 0x0010 +} THUMBBUTTONFLAGS; + +cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(THUMBBUTTONFLAGS)") + +typedef [v1_enum] enum THUMBBUTTONMASK { + THB_BITMAP = 0x0001, + THB_ICON = 0x0002, + THB_TOOLTIP = 0x0004, + THB_FLAGS = 0x0008 +} THUMBBUTTONMASK; + +cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(THUMBBUTTONMASK)") + +cpp_quote("#include <pshpack8.h>") +typedef struct THUMBBUTTON { + THUMBBUTTONMASK dwMask; + UINT iId; + UINT iBitmap; + HICON hIcon; + WCHAR szTip[260]; + THUMBBUTTONFLAGS dwFlags; +} THUMBBUTTON, *LPTHUMBBUTTON; +cpp_quote("#include <poppack.h>") + +/***************************************************************************** + * ITaskbarList2 interface + */ +[ + object, + uuid(602D4995-B13A-429B-A66E-1935E44F4317), + pointer_default(unique) +] +interface ITaskbarList2 : ITaskbarList +{ + HRESULT MarkFullscreenWindow( + [in] HWND hwnd, + [in] BOOL fullscreen); +} + +[ + uuid(ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf), + object +] +interface ITaskbarList3 : ITaskbarList2 +{ + typedef [v1_enum] enum TBPFLAG { + TBPF_NOPROGRESS = 0x0000, + TBPF_INDETERMINATE = 0x0001, + TBPF_NORMAL = 0x0002, + TBPF_ERROR = 0x0004, + TBPF_PAUSED = 0x0008 + } TBPFLAG; + + cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(TBPFLAG)") + + HRESULT SetProgressValue( + [in] HWND hwnd, + [in] ULONGLONG ullCompleted, + [in] ULONGLONG ullTotal); + + HRESULT SetProgressState( + [in] HWND hwnd, + [in] TBPFLAG tbpFlags); + + HRESULT RegisterTab( + [in] HWND hwndTab, + [in] HWND hwndMDI); + + HRESULT UnregisterTab([in] HWND hwndTab); + + HRESULT SetTabOrder( + [in] HWND hwndTab, + [in] HWND hwndInsertBefore); + + HRESULT SetTabActive( + [in] HWND hwndTab, + [in] HWND hwndMDI, + [in] DWORD dwReserved); + + HRESULT ThumbBarAddButtons( + [in] HWND hwnd, + [in] UINT cButtons, + [in, size_is(cButtons)] LPTHUMBBUTTON pButton); + + HRESULT ThumbBarUpdateButtons( + [in] HWND hwnd, + [in] UINT cButtons, + [in, size_is(cButtons)] LPTHUMBBUTTON pButton); + + HRESULT ThumbBarSetImageList( + [in] HWND hwnd, + [in] HIMAGELIST himl); + + HRESULT SetOverlayIcon( + [in] HWND hwnd, + [in] HICON hIcon, + [in, unique, string] LPCWSTR pszDescription); + + HRESULT SetThumbnailTooltip( + [in] HWND hwnd, + [in, unique, string] LPCWSTR pszTip); + + HRESULT SetThumbnailClip( + [in] HWND hwnd, + [in] RECT *prcClip); +} + +[ + uuid(c43dc798-95d1-4bea-9030-bb99e2983a1a), + object +] +interface ITaskbarList4 : ITaskbarList3 +{ + typedef [v1_enum] enum STPFLAG { + STPF_NONE = 0x0000, + STPF_USEAPPTHUMBNAILALWAYS = 0x0001, + STPF_USEAPPTHUMBNAILWHENACTIVE = 0x0002, + STPF_USEAPPPEEKALWAYS = 0x0004, + STPF_USEAPPPEEKWHENACTIVE = 0x0008 + } STPFLAG; + + cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(STPFLAG)") + + HRESULT SetTabProperties( + [in] HWND hwndTab, + [in] STPFLAG stpFlags); +} + /***************************************************************************** * IAutoCompleteDropDown interface */ @@ -2964,5 +3308,974 @@ HRESULT GetCurrentView( [in] REFIID riid, - [out, iid_is(riid)] IUnknown **ppv); -} + [out, iid_is(riid)] void **ppv); +} + +/***************************************************************************** + * INameSpaceTreeControl interface + */ +[ + object, + uuid(028212A3-B627-47E9-8856-C14265554E4F) +] +interface INameSpaceTreeControl : IUnknown +{ + [v1_enum] enum _NSTCSTYLE { + NSTCS_HASEXPANDOS = 0x00000001, + NSTCS_HASLINES = 0x00000002, + NSTCS_SINGLECLICKEXPAND = 0x00000004, + NSTCS_FULLROWSELECT = 0x00000008, + NSTCS_SPRINGEXPAND = 0x00000010, + NSTCS_HORIZONTALSCROLL = 0x00000020, + NSTCS_ROOTHASEXPANDO = 0x00000040, + NSTCS_SHOWSELECTIONALWAYS = 0x00000080, + NSTCS_NOINFOTIP = 0x00000200, + NSTCS_EVENHEIGHT = 0x00000400, + NSTCS_NOREPLACEOPEN = 0x00000800, + NSTCS_DISABLEDRAGDROP = 0x00001000, + NSTCS_NOORDERSTREAM = 0x00002000, + NSTCS_RICHTOOLTIP = 0x00004000, + NSTCS_BORDER = 0x00008000, + NSTCS_NOEDITLABELS = 0x00010000, + NSTCS_TABSTOP = 0x00020000, + NSTCS_FAVORITESMODE = 0x00080000, + NSTCS_AUTOHSCROLL = 0x00100000, + NSTCS_FADEINOUTEXPANDOS = 0x00200000, + NSTCS_EMPTYTEXT = 0x00400000, + NSTCS_CHECKBOXES = 0x00800000, + NSTCS_PARTIALCHECKBOXES = 0x01000000, + NSTCS_EXCLUSIONCHECKBOXES = 0x02000000, + NSTCS_DIMMEDCHECKBOXES = 0x04000000, + NSTCS_NOINDENTCHECKS = 0x08000000, + NSTCS_ALLOWJUNCTIONS = 0x10000000, + NSTCS_SHOWTABSBUTTON = 0x20000000, + NSTCS_SHOWDELETEBUTTON = 0x40000000, + NSTCS_SHOWREFRESHBUTTON = (int)0x80000000 + }; + typedef DWORD NSTCSTYLE; + + [v1_enum] enum _NSTCROOTSTYLE { + NSTCRS_VISIBLE = 0x0000, + NSTCRS_HIDDEN = 0x0001, + NSTCRS_EXPANDED = 0x0002 + }; + typedef DWORD NSTCROOTSTYLE; + + [v1_enum] enum _NSTCITEMSTATE { + NSTCIS_NONE = 0x0000, + NSTCIS_SELECTED = 0x0001, + NSTCIS_EXPANDED = 0x0002, + NSTCIS_BOLD = 0x0004, + NSTCIS_DISABLED = 0x0008, + NSTCIS_SELECTEDNOEXPAND = 0x0010 + }; + typedef DWORD NSTCITEMSTATE; + + typedef [v1_enum] enum NSTCGNI { + NSTCGNI_NEXT = 0, + NSTCGNI_NEXTVISIBLE = 1, + NSTCGNI_PREV = 2, + NSTCGNI_PREVVISIBLE = 3, + NSTCGNI_PARENT = 4, + NSTCGNI_CHILD = 5, + NSTCGNI_FIRSTVISIBLE = 6, + NSTCGNI_LASTVISIBLE = 7 + } NSTCGNI; + + HRESULT Initialize( + [in] HWND hwndParent, + [in, unique] RECT *prc, + [in] NSTCSTYLE nstcsFlags); + + HRESULT TreeAdvise( + [in] IUnknown *punk, + [out] DWORD *pdwCookie); + + HRESULT TreeUnadvise( + [in] DWORD dwCookie); + + HRESULT AppendRoot( + [in] IShellItem *psiRoot, + [in] SHCONTF grfEnumFlags, + [in] NSTCROOTSTYLE grfRootStyle, + [in, unique] IShellItemFilter *pif); + + HRESULT InsertRoot( + [in] int iIndex, + [in] IShellItem *psiRoot, + [in] SHCONTF grfEnumFlags, + [in] NSTCROOTSTYLE grfRootStyle, + [in, unique] IShellItemFilter *pif); + + HRESULT RemoveRoot( + [in] IShellItem *psiRoot); + + HRESULT RemoveAllRoots(); + + HRESULT GetRootItems( + [out] IShellItemArray **ppsiaRootItems); + + HRESULT SetItemState( + [in] IShellItem *psi, + [in] NSTCITEMSTATE nstcisMask, + [in] NSTCITEMSTATE nstcisFlags); + + HRESULT GetItemState( + [in] IShellItem *psi, + [in] NSTCITEMSTATE nstcismask, + [out] NSTCITEMSTATE *pnstcisFlags); + + HRESULT GetSelectedItems( + [out] IShellItemArray **psiaItems); + + HRESULT GetItemCustomState( + [in] IShellItem *psi, + [out] int *piStateNumber); + + HRESULT SetItemCustomState( + [in] IShellItem *psi, + [in] int iStateNumber); + + HRESULT EnsureItemVisible( + [in] IShellItem *psi); + + HRESULT SetTheme( + [in, string] LPCWSTR pszTheme); + + HRESULT GetNextItem( + [in, unique] IShellItem *psi, + [in] NSTCGNI nstcgi, + [out] IShellItem **ppsiNext); + + HRESULT HitTest( + [in] POINT *ppt, + [out] IShellItem **ppsiOut); + + HRESULT GetItemRect( + [in] IShellItem *psi, + [out] RECT *prect); + + HRESULT CollapseAll(); +} + +/***************************************************************************** + * INameSpaceTreeControl2 interface + */ +[ + object, + uuid(7CC7AED8-290E-49BC-8945-C1401CC9306C) +] +interface INameSpaceTreeControl2 : INameSpaceTreeControl +{ + typedef [v1_enum] enum NSTCSTYLE2 { + NSTCS2_DEFAULT = 0x00, + NSTCS2_INTERRUPTNOTIFICATIONS = 0x01, + NSTCS2_SHOWNULLSPACEMENU = 0x02, + NSTCS2_DISPLAYPADDING = 0x04, + NSTCS2_DISPLAYPINNEDONLY = 0x08, + NTSCS2_NOSINGLETONAUTOEXPAND = 0x10, /* The apparent typo here is */ + NTSCS2_NEVERINSERTNONENUMERATED = 0x20 /* present also in the Win SDK */ + } NSTCSTYLE2; + cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(NSTCSTYLE2)") + + HRESULT SetControlStyle( + [in] NSTCSTYLE nstcsMask, + [in] NSTCSTYLE nstcsStyle); + + HRESULT GetControlStyle( + [in] NSTCSTYLE nstcsMask, + [out] NSTCSTYLE *pnstcsStyle); + + HRESULT SetControlStyle2( + [in] NSTCSTYLE2 nstcsMask, + [in] NSTCSTYLE2 nstcsStyle); + + HRESULT GetControlStyle2( + [in] NSTCSTYLE2 nstcsMask, + [out] NSTCSTYLE2 *pnstcsStyle); +} + +/***************************************************************************** + * INameSpaceTreeControlEvents interface + */ + +[ + object, + uuid(93D77985-B3D8-4484-8318-672CDDA002CE), + local +] +interface INameSpaceTreeControlEvents : IUnknown +{ + [v1_enum] enum _NSTCEHITTEST { + NSTCEHT_NOWHERE = 0x0001, + NSTCEHT_ONITEMICON = 0x0002, + NSTCEHT_ONITEMLABEL = 0x0004, + NSTCEHT_ONITEMIDENT = 0x0008, + NSTCEHT_ONITEMBUTTON = 0x0010, + NSTCEHT_ONITEMRIGHT = 0x0020, + NSTCEHT_ONITEMSTATEICON = 0x0040, + NSTCEHT_ONITEM = 0x0046, + NSTCEHT_ONITEMTABBUTTON = 0x1000 + }; + typedef DWORD NSTCEHITTEST; + + [v1_enum] enum _NSTCECLICKTYPE { + NSTCECT_LBUTTON = 0x1, + NSTCECT_MBUTTON = 0x2, + NSTCECT_RBUTTON = 0x3, + NSTCECT_BUTTON = 0x3, + NSTCECT_DBLCLICK = 0x4 + }; + typedef DWORD NSTCECLICKTYPE; + + HRESULT OnItemClick( + [in] IShellItem *psi, + [in] NSTCEHITTEST nstceHitTest, + [in] NSTCECLICKTYPE nstceClickType); + + HRESULT OnPropertyItemCommit( + [in] IShellItem *psi); + + HRESULT OnItemStateChanging( + [in] IShellItem *psi, + [in] NSTCITEMSTATE nstcisMask, + [in] NSTCITEMSTATE nstcisState); + + HRESULT OnItemStateChanged( + [in] IShellItem *psi, + [in] NSTCITEMSTATE nstcisMask, + [in] NSTCITEMSTATE nstcisState); + + HRESULT OnSelectionChanged( + [in] IShellItemArray *psiaSelection); + + HRESULT OnKeyboardInput( + [in] UINT uMsg, + [in] WPARAM wParam, + [in] LPARAM lParam); + + HRESULT OnBeforeExpand( + [in] IShellItem *psi); + + HRESULT OnAfterExpand( + [in] IShellItem *psi); + + HRESULT OnBeginLabelEdit( + [in] IShellItem *psi); + + HRESULT OnEndLabelEdit( + [in] IShellItem *psi); + + HRESULT OnGetToolTip( + [in] IShellItem *psi, + [out, string, size_is(cchTip)] LPWSTR pszTip, + [in] int cchTip); + + HRESULT OnBeforeItemDelete( + [in] IShellItem *psi); + + HRESULT OnItemAdded( + [in] IShellItem *psi, + [in] BOOL fIsRoot); + + HRESULT OnItemDeleted( + [in] IShellItem *psi, + [in] BOOL fIsRoot); + + HRESULT OnBeforeContextMenu( + [in, unique] IShellItem *psi, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT OnAfterContextMenu( + [in] IShellItem *psi, + [in] IContextMenu *pcmIn, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT OnBeforeStateImageChange( + [in] IShellItem *psi); + + HRESULT OnGetDefaultIconIndex( + [in] IShellItem *psi, + [out] int *piDefaultIcon, + [out] int *piOpenIcon); +} +interface IFileDialog; + +typedef [v1_enum] enum FDE_OVERWRITE_RESPONSE +{ + FDEOR_DEFAULT = 0, + FDEOR_ACCCEP = 1, + FDEOR_REFUSE = 2 +} FDE_OVERWRITE_RESPONSE; + +typedef [v1_enum] enum FDE_SHAREVIOLATION_RESPONSE +{ + FDESVR_DEFAULT = 0, + FDESVR_ACCEPT = 1, + FDESVR_REFUSE = 2 +} FDE_SHAREVIOLATION_RESPONSE; + +/***************************************************************************** + * IFileDialogEvents interface + */ +[ + object, + uuid(973510DB-7D7F-452B-8975-74A85828D354), + pointer_default(unique) +] +interface IFileDialogEvents : IUnknown +{ + HRESULT OnFileOk( + [in] IFileDialog *pfd); + + HRESULT OnFolderChanging( + [in] IFileDialog *pfd, + [in] IShellItem *psiFolder); + + HRESULT OnFolderChange( + [in] IFileDialog *pfd); + + HRESULT OnSelectionChange( + [in] IFileDialog *pfd); + + HRESULT OnShareViolation( + [in] IFileDialog *pfd, + [in] IShellItem *psi, + [out] FDE_SHAREVIOLATION_RESPONSE *pResponse); + + HRESULT OnTypeChange( + [in] IFileDialog *pfd); + + HRESULT OnOverwrite( + [in] IFileDialog *pfd, + [in] IShellItem *psi, + [out] FDE_OVERWRITE_RESPONSE *pResponse); +} + +/***************************************************************************** + * IModalWindow interface + */ +[ + object, + uuid(B4DB1657-70D7-485E-8E3E-6FCB5A5C1802), + pointer_default(unique) +] +interface IModalWindow : IUnknown +{ + [local] + HRESULT Show( + [in, unique] HWND hwndOwner); + + [call_as(Show)] + HRESULT RemoteShow( + [in, unique] HWND hwndOwner); +} + +typedef [v1_enum] enum FDAP +{ + FDAP_BOTTOM = 0, + FDAP_TOP = 1 +} FDAP; + +/***************************************************************************** + * IFileDialog interface + */ +[ + object, + uuid(42F85136-DB7E-439C-85F1-E4075D135FC8), + pointer_default(unique) +] +interface IFileDialog : IModalWindow +{ + [v1_enum] enum _FILEOPENDIALOGOPTIONS + { + FOS_OVERWRITEPROMPT = 0x00000002, + FOS_STRICTFILETYPES = 0x00000004, + FOS_NOCHANGEDIR = 0x00000008, + FOS_PICKFOLDERS = 0x00000020, + FOS_FORCEFILESYSTEM = 0x00000040, + FOS_ALLNONSTORAGEITEMS = 0x00000080, + FOS_NOVALIDATE = 0x00000100, + FOS_ALLOWMULTISELECT = 0x00000200, + FOS_PATHMUSTEXIST = 0x00000800, + FOS_FILEMUSTEXIST = 0x00001000, + FOS_CREATEPROMPT = 0x00002000, + FOS_SHAREAWARE = 0x00004000, + FOS_NOREADONLYRETURN = 0x00008000, + FOS_NOTESTFILECREATE = 0x00010000, + FOS_HIDEMRUPLACES = 0x00020000, + FOS_HIDEPINNEDPLACES = 0x00040000, + FOS_NODEREFERENCELINKS = 0x00100000, + FOS_DONTADDTORECENT = 0x02000000, + FOS_FORCESHOWHIDDEN = 0x10000000, + FOS_DEFAULTNOMINIMODE = 0x20000000, + FOS_FORCEPREVIEWPANEON = 0x40000000 + }; + typedef DWORD FILEOPENDIALOGOPTIONS; + + HRESULT SetFileTypes( + [in] UINT cFileTypes, + [in, size_is(cFileTypes)] const COMDLG_FILTERSPEC *rgFilterSpec); + + HRESULT SetFileTypeIndex( + [in] UINT iFileType); + + HRESULT GetFileTypeIndex( + [out] UINT *piFileType); + + HRESULT Advise( + [in] IFileDialogEvents *pfde, + [out] DWORD *pdwCookie); + + HRESULT Unadvise( + [in] DWORD dwCookie); + + HRESULT SetOptions( + [in] FILEOPENDIALOGOPTIONS fos); + + HRESULT GetOptions( + [in] FILEOPENDIALOGOPTIONS *pfos); + + HRESULT SetDefaultFolder( + [in] IShellItem *psi); + + HRESULT SetFolder( + [in] IShellItem *psi); + + HRESULT GetFolder( + [out] IShellItem **ppsi); + + HRESULT GetCurrentSelection( + [out] IShellItem **ppsi); + + HRESULT SetFileName( + [in, string] LPCWSTR pszName); + + HRESULT GetFileName( + [out, string] LPWSTR *pszName); + + HRESULT SetTitle( + [in, string] LPCWSTR pszTitle); + + HRESULT SetOkButtonLabel( + [in, string] LPCWSTR pszText); + + HRESULT SetFileNameLabel( + [in, string] LPCWSTR pszLabel); + + HRESULT GetResult( + [out] IShellItem **ppsi); + + HRESULT AddPlace( + [in] IShellItem *psi, + [in] FDAP fdap); + + HRESULT SetDefaultExtension( + [in, string] LPCWSTR pszDefaultExtension); + + HRESULT Close( + [in] HRESULT hr); + + HRESULT SetClientGuid( + [in] REFGUID guid); + + HRESULT ClearClientData(); + + HRESULT SetFilter( + [in] IShellItemFilter *pFilter); +} + +/***************************************************************************** + * IFileDialog2 interface + */ +[ + object, + uuid(61744FC7-85B5-4791-A9B0-272276309B13), + pointer_default(unique) +] +interface IFileDialog2 : IFileDialog +{ + HRESULT SetCancelButtonLabel( + [in] LPCWSTR pszLabel); + + HRESULT SetNavigationRoot( + [in] IShellItem *psi); +} + +/***************************************************************************** + * IFileOperationProgressSink interface + */ +[ + object, + uuid(04B0F1A7-9490-44BC-96E1-4296A31252E2), + pointer_default(unique) +] +interface IFileOperationProgressSink : IUnknown +{ + HRESULT StartOperations(); + + HRESULT FinishOperations( + [in] HRESULT hrResult); + + HRESULT PreRenameItem( + [in] DWORD dwFlags, + [in] IShellItem *psiItem, + [in, unique, string] LPCWSTR pszNewName); + + HRESULT PostRenameItem( + [in] DWORD dwFlags, + [in] IShellItem *psiItem, + [in, string] LPCWSTR pszNewName, + [in] HRESULT hrRename, + [in] IShellItem *psiNewlyCreated); + + HRESULT PreMoveItem( + [in] DWORD dwFlags, + [in] IShellItem *psiItem, + [in] IShellItem *psiDestinationFolder, + [in, unique, string] LPCWSTR pszNewName); + + HRESULT PostMoveItem( + [in] DWORD dwFlags, + [in] IShellItem *psiItem, + [in] IShellItem *psiDestinationFolder, + [in, unique, string] LPCWSTR pszNewName, + [in] HRESULT hrMove, + [in] IShellItem *psiNewlyCreated); + + HRESULT PreCopyItem( + [in] DWORD dwFlags, + [in] IShellItem *psiItem, + [in] IShellItem *psiDestinationFolder, + [in, unique, string] LPCWSTR pszNewName); + + HRESULT PostCopyItem( + [in] DWORD dwFlags, + [in] IShellItem *psiItem, + [in] IShellItem *psiDestinationFolder, + [in, unique, string] LPCWSTR pszNewName, + [in] HRESULT hrCopy, + [in] IShellItem *psiNewlyCreated); + + HRESULT PreDeleteItem( + [in] DWORD dwFlags, + [in] IShellItem *psiItem); + + HRESULT PostDeleteItem( + [in] DWORD dwFlags, + [in] IShellItem *psiItem, + [in] HRESULT hrDelete, + [in] IShellItem *psiNewlyCreated); + + HRESULT PreNewItem( + [in] DWORD dwFlags, + [in] IShellItem *psiDestinationFolder, + [in, unique, string] LPCWSTR pszNewName); + + HRESULT PostNewItem( + [in] DWORD dwFlags, + [in] IShellItem *psiDestinationFolder, + [in, unique, string] LPCWSTR pszNewName, + [in, unique, string] LPCWSTR pszTemplateName, + [in] DWORD dwFileAttributes, + [in] HRESULT hrNew, + [in] IShellItem *psiNewItem); + + HRESULT UpdateProgress( + [in] UINT iWorkTotal, + [in] UINT iWorkSoFar); + + HRESULT ResetTimer(); + + HRESULT PauseTimer(); + + HRESULT ResumeTimer(); +} + +/***************************************************************************** + * IFileSaveDialog interface + */ +[ + object, + uuid(84BCCD23-5FDE-4CDB-AEA4-AF64B83D78AB), + pointer_default(unique) +] +interface IFileSaveDialog : IFileDialog +{ + HRESULT SetSaveAsItem( + [in] IShellItem *psi); + + HRESULT SetProperties( + [in] IPropertyStore *pStore); + + HRESULT SetCollectedProperties( + [in] IPropertyDescriptionList *pList, + [in] BOOL fAppendDefault); + + HRESULT GetProperties( + [in] IPropertyStore **ppStore); + + HRESULT ApplyProperties( + [in] IShellItem *psi, + [in] IPropertyStore *pStore, + [in, unique] HWND hwnd, + [in, unique] IFileOperationProgressSink *pSink); +} + + +/***************************************************************************** + * IFileOpenDialog interface + */ +[ + object, + uuid(D57C7288-D4AD-4768-BE02-9D969532D960), + pointer_default(unique) +] +interface IFileOpenDialog : IFileDialog +{ + HRESULT GetResults( + [out] IShellItemArray **ppenum); + + HRESULT GetSelectedItems( + [out] IShellItemArray **ppsai); +} + +typedef [v1_enum] enum tagKF_CATEGORY +{ + KF_CATEGORY_VIRTUAL = 0x00000001, + KF_CATEGORY_FIXED = 0x00000002, + KF_CATEGORY_COMMON = 0x00000003, + KF_CATEGORY_PERUSER = 0x00000004 +} KF_CATEGORY; + +typedef [v1_enum] enum tagKF_REDIRECTION_CAPABILITIES +{ + KF_REDIRECTION_CAPABILITIES_ALLOW_ALL = 0x000000ff, + KF_REDIRECTION_CAPABILITIES_REDIRECTABLE = 0x00000001, + KF_REDIRECTION_CAPABILITIES_DENY_ALL = 0x000fff00, + KF_REDIRECTION_CAPABILITIES_DENY_POLICY_REDIRECTED = 0x00000100, + KF_REDIRECTION_CAPABILITIES_DENY_POLICY = 0x00000200, + KF_REDIRECTION_CAPABILITIES_DENY_PERMISSIONS = 0x00000400 +} KF_REDIRECTION_CAPABILITIES; + +typedef [v1_enum] enum tagKF_DEFINITION_FLAGS +{ + KFDF_LOCAL_REDIRECT_ONLY = 0x00000002, + KFDF_ROAMABLE = 0x00000004, + KFDF_PRECREATE = 0x00000008, + KFDF_STREAM = 0x00000010, + KFDF_PUBLISHEXPANDEDPATH = 0x00000020 +} KF_DEFINITION_FLAGS; + +typedef struct tagKNOWNFOLDER_DEFINITION +{ + KF_CATEGORY category; + LPWSTR pszName; + LPWSTR pszDescription; + KNOWNFOLDERID fidParent; + LPWSTR pszRelativePath; + LPWSTR pszParsingName; + LPWSTR pszTooltip; + LPWSTR pszLocalizedName; + LPWSTR pszIcon; + LPWSTR pszSecurity; + DWORD dwAttributes; + KF_DEFINITION_FLAGS kfdFlags; + FOLDERTYPEID ftidType; +} KNOWNFOLDER_DEFINITION; + +[ + object, + uuid(3aa7af7e-9b36-420C-a8e3-f77d4674a488), + pointer_default(ref) +] +interface IKnownFolder : IUnknown +{ + HRESULT GetId( + [out] KNOWNFOLDERID *pkfid); + + HRESULT GetCategory( + [out] KF_CATEGORY *pCategory); + + HRESULT GetShellItem( + [in] DWORD dwFlags, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT GetPath( + [in] DWORD dwFlags, + [out, string] LPWSTR *ppszPath); + + HRESULT SetPath( + [in] DWORD dwFlags, + [in, string] LPCWSTR pszPath); + + HRESULT GetIDList( + [in] DWORD dwFlags, + [out] PIDLIST_ABSOLUTE *ppidl); + + HRESULT GetFolderType( + [out] FOLDERTYPEID *pftid); + + HRESULT GetRedirectionCapabilities( + [out] KF_REDIRECTION_CAPABILITIES *pCapabilities); + + HRESULT GetFolderDefinition( + [out] KNOWNFOLDER_DEFINITION *pKFD); +} + +typedef [v1_enum] enum tagKF_REDIRECT_FLAGS +{ + KF_REDIRECT_USER_EXCLUSIVE = 0x00000001, + KF_REDIRECT_COPY_SOURCE_DACL = 0x00000002, + KF_REDIRECT_OWNER_USER = 0x00000004, + KF_REDIRECT_SET_OWNER_EXPLICIT = 0x00000008, + KF_REDIRECT_CHECK_ONLY = 0x00000010, + KF_REDIRECT_WITH_UI = 0x00000020, + KF_REDIRECT_UNPIN = 0x00000040, + KF_REDIRECT_PIN = 0x00000080, + KF_REDIRECT_COPY_CONTENTS = 0x00000200, + KF_REDIRECT_DEL_SOURCE_CONTENTS = 0x00000400, + KF_REDIRECT_EXCLUDE_ALL_KNOWN_SUBFOLDERS = 0x00000800 +} KF_REDIRECT_FLAGS; + +[ + object, + uuid(8BE2D872-86AA-4d47-B776-32CCA40C7018), + pointer_default(ref) +] +interface IKnownFolderManager : IUnknown +{ + typedef [v1_enum] enum tagFFFP_MODE + { + FFFP_EXACTMATCH, + FFFP_NEARESTPARENTMATCH + } FFFP_MODE; + + HRESULT FolderIdFromCsidl( + [in] int nCsidl, + [out] KNOWNFOLDERID *pfid); + + HRESULT FolderIdToCsidl( + [in] REFKNOWNFOLDERID rfid, + [out] int *pnCsidl); + + HRESULT GetFolderIds( + [out, size_is(, *pCount)] KNOWNFOLDERID **ppKFId, + [in, out] UINT *pCount); + + HRESULT GetFolder( + [in] REFKNOWNFOLDERID rfid, + [out] IKnownFolder **ppkf); + + HRESULT GetFolderByName( + [in, string] LPCWSTR pszCanonicalName, + [out] IKnownFolder **ppkf); + + HRESULT RegisterFolder( + [in] REFKNOWNFOLDERID rfid, + [in] KNOWNFOLDER_DEFINITION const *pKFD); + + HRESULT UnregisterFolder( + [in] REFKNOWNFOLDERID rfid); + + HRESULT FindFolderFromPath( + [in, string] LPCWSTR pszPath, + [in] FFFP_MODE mode, + [out] IKnownFolder **ppkf); + + HRESULT FindFolderFromIDList( + [in] PCIDLIST_ABSOLUTE pidl, + [out] IKnownFolder **ppkf); + + HRESULT Redirect( + [in] REFKNOWNFOLDERID rfid, + [in, unique] HWND hwnd, + [in] KF_REDIRECT_FLAGS flags, + [in, unique, string] LPCWSTR pszTargetPath, + [in] UINT cFolders, + [in, size_is(cFolders), unique] KNOWNFOLDERID const *pExclusion, + [out, string] LPWSTR *ppszError); +} + +/* function for releasing structure returned from IKnownFolder::GetFolderDefinition */ +cpp_quote("static inline void FreeKnownFolderDefinitionFields(KNOWNFOLDER_DEFINITION *pKFD)") +cpp_quote("{") +cpp_quote(" CoTaskMemFree(pKFD->pszName);") +cpp_quote(" CoTaskMemFree(pKFD->pszDescription);") +cpp_quote(" CoTaskMemFree(pKFD->pszRelativePath);") +cpp_quote(" CoTaskMemFree(pKFD->pszParsingName);") +cpp_quote(" CoTaskMemFree(pKFD->pszTooltip);") +cpp_quote(" CoTaskMemFree(pKFD->pszLocalizedName);") +cpp_quote(" CoTaskMemFree(pKFD->pszIcon);") +cpp_quote(" CoTaskMemFree(pKFD->pszSecurity);") +cpp_quote("}") + +typedef [v1_enum] enum ASSOCIATIONLEVEL { + AL_MACHINE, + AL_EFFECTIVE, + AL_USER +} ASSOCIATIONLEVEL; + +typedef [v1_enum] enum ASSOCIATIONTYPE { + AT_FILEEXTENSION, + AT_URLPROTOCOL, + AT_STARTMENUCLIENT, + AT_MIMETYPE +} ASSOCIATIONTYPE; + +[ + object, + uuid(4e530b0a-e611-4c77-a3ac-9031d022281b), + pointer_default(unique) +] +interface IApplicationAssociationRegistration : IUnknown +{ + HRESULT QueryCurrentDefault( + [in, string] LPCWSTR pszQuery, + [in] ASSOCIATIONTYPE atQueryType, + [in] ASSOCIATIONLEVEL alQueryLevel, + [out, string] LPWSTR *ppszAssociation); + + HRESULT QueryAppIsDefault( + [in, string] LPCWSTR pszQuery, + [in] ASSOCIATIONTYPE atQueryType, + [in] ASSOCIATIONLEVEL alQueryLevel, + [in, string] LPCWSTR pszAppRegistryName, + [out] BOOL *pfDefault); + + HRESULT QueryAppIsDefaultAll( + [in] ASSOCIATIONLEVEL alQueryLevel, + [in, string] LPCWSTR pszAppRegistryName, + [out] BOOL* pfDefault); + + HRESULT SetAppAsDefault( + [in, string] LPCWSTR pszAppRegistryName, + [in, string] LPCWSTR pszSet, + [in] ASSOCIATIONTYPE atSetType); + + HRESULT SetAppAsDefaultAll( + [in, string] LPCWSTR pszAppRegistryName); + + HRESULT ClearUserAssociations(); +} + +[ + uuid(6332debf-87b5-4670-90c0-5e57b408a49e), + object, + pointer_default(unique) +] +interface ICustomDestinationList : IUnknown +{ + typedef [v1_enum] enum KNOWNDESTCATEGORY { + KDC_FREQUENT = 1, + KDC_RECENT + } KNOWNDESTCATEGORY; + + HRESULT SetAppID([in, string] LPCWSTR pszAppID); + + HRESULT BeginList( + [out] UINT *pcMinSlots, + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT AppendCategory( + [in, string] LPCWSTR pszCategory, + [in] IObjectArray *poa); + + HRESULT AppendKnownCategory([in] KNOWNDESTCATEGORY category); + HRESULT AddUserTasks([in] IObjectArray *poa); + HRESULT CommitList(); + + HRESULT GetRemovedDestinations( + [in] REFIID riid, + [out, iid_is(riid)] void **ppv); + + HRESULT DeleteList([in, unique, string] LPCWSTR pszAppID); + HRESULT AbortList(); +} + +/***************************************************************************** + * ShellObjects typelibrary + */ +[ + uuid(50A7E9B1-70EF-11D1-B75A-00A0C90564FE), + lcid(0x0000), + version(1.0) +] +library ShellObjects +{ + [ + uuid(71F96385-DDD6-48D3-A0C1-AE06E8B055FB) + ] + coclass ExplorerBrowser + { + interface IExplorerBrowser; + } + + [ + uuid(DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7) + ] + coclass FileOpenDialog + { + interface IFileOpenDialog; + } + + [ + uuid(C0B4E2F3-BA21-4773-8DBA-335EC946EB8B) + ] + coclass FileSaveDialog + { + interface IFileSaveDialog; + } + + [ + uuid(AE054212-3535-4430-83ED-D501AA6680E6) + ] + coclass NamespaceTreeControl + { + interface INameSpaceTreeControl2; + } + + [ + uuid(4df0c730-df9d-4ae3-9153-aa6b82e9795a) + ] + coclass KnownFolderManager + { + interface IKnownFolderManager; + } + + [ + uuid(591209c7-767b-42b2-9fba-44ee4615f2c7) + ] + coclass ApplicationAssociationRegistration + { + interface IApplicationAssociationRegistration; + } + + [ + uuid(00021401-0000-0000-c000-000000000046) + ] + coclass ShellLink + { + interface IShellLinkW; + } + + [ + uuid(56fdf344-fd6d-11d0-958a-006097c9a090) + ] + coclass TaskbarList + { + interface ITaskbarList4; + } + + [ + uuid(77f10cf0-3db5-4966-b520-b7c54fd35ed6) + ] + coclass DestinationList { + interface ICustomDestinationList; + } + +} Modified: trunk/reactos/include/psdk/shtypes.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shtypes.idl?r…
============================================================================== --- trunk/reactos/include/psdk/shtypes.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/shtypes.idl [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -80,6 +80,12 @@ } SHELLDETAILS, *LPSHELLDETAILS; cpp_quote("#include <poppack.h>") +typedef struct _COMDLG_FILTERSPEC +{ + [string] LPCWSTR pszName; + [string] LPCWSTR pszSpec; +} COMDLG_FILTERSPEC; + typedef [v1_enum] enum tagSHCOLSTATE { SHCOLSTATE_DEFAULT = 0, @@ -105,3 +111,27 @@ } SHCOLSTATE; typedef DWORD SHCOLSTATEF; + +typedef GUID KNOWNFOLDERID; + +cpp_quote("#if 0") +typedef KNOWNFOLDERID *REFKNOWNFOLDERID; +cpp_quote("#endif") + +cpp_quote("#ifdef __cplusplus") +cpp_quote("#define REFKNOWNFOLDERID const KNOWNFOLDERID &") +cpp_quote("#else") +cpp_quote("#define REFKNOWNFOLDERID const KNOWNFOLDERID * __MIDL_CONST") +cpp_quote("#endif") + +typedef GUID FOLDERTYPEID; + +cpp_quote("#if 0") +typedef FOLDERTYPEID *REFFOLDERTYPEID; +cpp_quote("#endif") + +cpp_quote("#ifdef __cplusplus") +cpp_quote("#define REFFOLDERTYPEID const FOLDERTYPEID &") +cpp_quote("#else") +cpp_quote("#define REFFOLDERTYPEID const FOLDERTYPEID * __MIDL_CONST") +cpp_quote("#endif") Modified: trunk/reactos/lib/sdk/uuid/uuid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/uuid/uuid.c?rev=53…
============================================================================== --- trunk/reactos/lib/sdk/uuid/uuid.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/uuid/uuid.c [iso-8859-1] Fri Sep 23 23:12:53 2011 @@ -158,7 +158,6 @@ DEFINE_GUID(CLSID_TF_CategoryMgr, 0xA4B544A1,0x438D,0x4B41,0x93,0x25,0x86,0x95,0x23,0xE2,0xD6,0xC7); DEFINE_GUID(CLSID_TF_LangBarMgr, 0xebb08c45,0x6c4a,0x4fdc,0xae,0x53,0x4e,0xb8,0xc4,0xc7,0xdb,0x8e); DEFINE_GUID(CLSID_TF_DisplayAttributeMgr, 0x3ce74de4,0x53d3,0x4d74,0x8b,0x83,0x43,0x1b,0x38,0x28,0xba,0x53); -DEFINE_GUID(CLSID_TaskbarList, 0x56fdf344,0xfd6d,0x11d0,0x95,0x8a,0x00,0x60,0x97,0xc9,0xa0,0x90); DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD, 0x34745c63,0xb2f0,0x4784,0x8b,0x67,0x5e,0x12,0xc8,0x70,0x1a,0x31); DEFINE_GUID(GUID_TFCAT_TIP_SPEECH, 0xB5A73CD1,0x8355,0x426B,0xA1,0x61,0x25,0x98,0x08,0xF2,0x6B,0x14); DEFINE_GUID(GUID_TFCAT_TIP_HANDWRITING, 0x246ecb87,0xc2f2,0x4abe,0x90,0x5b,0xc8,0xb3,0x8a,0xdd,0x2c,0x43);
13 years, 1 month
1
0
0
0
[tkreuzer] 53819: [NTOSKRNL] Converting MmLargeStackSize from registry setting to byte value is portable code, move it out of MiInitMachineDependent
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Sep 23 22:24:11 2011 New Revision: 53819 URL:
http://svn.reactos.org/svn/reactos?rev=53819&view=rev
Log: [NTOSKRNL] Converting MmLargeStackSize from registry setting to byte value is portable code, move it out of MiInitMachineDependent Modified: trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c trunk/reactos/ntoskrnl/mm/ARM3/mminit.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/i386/init…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/i386/init.c [iso-8859-1] Fri Sep 23 22:24:11 2011 @@ -163,28 +163,6 @@ PMMPFN Pfn1; ULONG Flags; - /* Check for kernel stack size that's too big */ - if (MmLargeStackSize > (KERNEL_LARGE_STACK_SIZE / _1KB)) - { - /* Sanitize to default value */ - MmLargeStackSize = KERNEL_LARGE_STACK_SIZE; - } - else - { - /* Take the registry setting, and convert it into bytes */ - MmLargeStackSize *= _1KB; - - /* Now align it to a page boundary */ - MmLargeStackSize = PAGE_ROUND_UP(MmLargeStackSize); - - /* Sanity checks */ - ASSERT(MmLargeStackSize <= KERNEL_LARGE_STACK_SIZE); - ASSERT((MmLargeStackSize & (PAGE_SIZE - 1)) == 0); - - /* Make sure it's not too low */ - if (MmLargeStackSize < KERNEL_STACK_SIZE) MmLargeStackSize = KERNEL_STACK_SIZE; - } - /* Check for global bit */ #if 0 if (KeFeatureBits & KF_GLOBAL_PAGE) Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Fri Sep 23 22:24:11 2011 @@ -2038,6 +2038,28 @@ MI_MIN_ALLOCATION_FRAGMENT); } + /* Check for kernel stack size that's too big */ + if (MmLargeStackSize > (KERNEL_LARGE_STACK_SIZE / _1KB)) + { + /* Sanitize to default value */ + MmLargeStackSize = KERNEL_LARGE_STACK_SIZE; + } + else + { + /* Take the registry setting, and convert it into bytes */ + MmLargeStackSize *= _1KB; + + /* Now align it to a page boundary */ + MmLargeStackSize = PAGE_ROUND_UP(MmLargeStackSize); + + /* Sanity checks */ + ASSERT(MmLargeStackSize <= KERNEL_LARGE_STACK_SIZE); + ASSERT((MmLargeStackSize & (PAGE_SIZE - 1)) == 0); + + /* Make sure it's not too low */ + if (MmLargeStackSize < KERNEL_STACK_SIZE) MmLargeStackSize = KERNEL_STACK_SIZE; + } + /* Initialize the platform-specific parts */ MiInitMachineDependent(LoaderBlock);
13 years, 1 month
1
0
0
0
[tkreuzer] 53818: [FREELDR] - Use TYPE_OF_MEMORY from the beginning instead of MEMORY_TYPE and later converting it. - Disable tracing, accidentally comitted in previous revision
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Sep 23 20:09:54 2011 New Revision: 53818 URL:
http://svn.reactos.org/svn/reactos?rev=53818&view=rev
Log: [FREELDR] - Use TYPE_OF_MEMORY from the beginning instead of MEMORY_TYPE and later converting it. - Disable tracing, accidentally comitted in previous revision Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c trunk/reactos/boot/freeldr/freeldr/debug.c trunk/reactos/boot/freeldr/freeldr/include/mm.h trunk/reactos/boot/freeldr/freeldr/mm/meminit.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c [iso-8859-1] Fri Sep 23 20:09:54 2011 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * FreeLoader * * This program is free software; you can redistribute it and/or modify @@ -47,16 +46,16 @@ MEMORY_DESCRIPTOR PcMemoryMap[MAX_BIOS_DESCRIPTORS + 1] = { - { MemoryFirmwarePermanent, 0x00, 1 }, // realmode int vectors - { MemoryFirmwareTemporary, 0x01, FREELDR_BASE_PAGE - 1 }, // freeldr stack + cmdline - { MemoryLoadedProgram, FREELDR_BASE_PAGE, FREELDR_PAGE_COUNT }, // freeldr image - { MemoryFirmwareTemporary, FILEBUF_BASE_PAGE, FILEBUF_PAGE_COUNT }, // File system read buffer. FILESYSBUFFER - { MemoryFirmwareTemporary, DISKBUF_BASE_PAGE, DISKBUF_PAGE_COUNT }, // Disk read buffer for int 13h. DISKREADBUFFER - { MemorySpecialMemory, STACK_BASE_PAGE, STACK_PAGE_COUNT }, // prot mode stack. - { MemoryFirmwareTemporary, BIOSBUF_BASE_PAGE, BIOSBUF_PAGE_COUNT }, // BIOSCALLBUFFER - { MemoryFirmwarePermanent, 0xA0, 0x60 }, // ROM / Video - { MemorySpecialMemory, 0xFFF, 1 }, // unusable memory - { MemorySpecialMemory, MAXULONG_PTR, 0 }, // end of map + { LoaderFirmwarePermanent, 0x00, 1 }, // realmode int vectors + { LoaderFirmwareTemporary, 0x01, FREELDR_BASE_PAGE - 1 }, // freeldr stack + cmdline + { LoaderLoadedProgram, FREELDR_BASE_PAGE, FREELDR_PAGE_COUNT }, // freeldr image + { LoaderFirmwareTemporary, FILEBUF_BASE_PAGE, FILEBUF_PAGE_COUNT }, // File system read buffer. FILESYSBUFFER + { LoaderFirmwareTemporary, DISKBUF_BASE_PAGE, DISKBUF_PAGE_COUNT }, // Disk read buffer for int 13h. DISKREADBUFFER + { LoaderOsloaderStack, STACK_BASE_PAGE, STACK_PAGE_COUNT }, // prot mode stack. + { LoaderFirmwareTemporary, BIOSBUF_BASE_PAGE, BIOSBUF_PAGE_COUNT }, // BIOSCALLBUFFER + { LoaderFirmwarePermanent, 0xA0, 0x60 }, // ROM / Video + { LoaderSpecialMemory, 0xFFF, 1 }, // unusable memory + { 0, 0, 0 }, // end of map }; ULONG @@ -65,7 +64,7 @@ IN ULONG MaxCount, IN PFN_NUMBER BasePage, IN PFN_NUMBER PageCount, - IN MEMORY_TYPE MemoryType); + IN TYPE_OF_MEMORY MemoryType); static BOOLEAN @@ -261,12 +260,12 @@ /* Check if we can add this descriptor */ if ((RealSize >= MM_PAGE_SIZE) && (MapCount < MaxMemoryMapSize)) { - MEMORY_TYPE MemoryType; + TYPE_OF_MEMORY MemoryType; if (PcBiosMemoryMap[PcBiosMapCount].Type == BiosMemoryUsable) - MemoryType = MemoryFree; + MemoryType = LoaderFree; else - MemoryType = MemoryFirmwarePermanent; + MemoryType = LoaderFirmwarePermanent; /* Add the descriptor */ MapCount = AddMemoryDescriptor(PcMemoryMap, @@ -312,14 +311,14 @@ MAX_BIOS_DESCRIPTORS, 0, PcMemGetConventionalMemorySize() * 1024 / PAGE_SIZE, - MemoryFree); + LoaderFree); /* Extended memory */ EntryCount = AddMemoryDescriptor(PcMemoryMap, MAX_BIOS_DESCRIPTORS, 1024 * 1024 / PAGE_SIZE, ExtendedMemorySizeAtOneMB * 1024 / PAGE_SIZE, - MemoryFree); + LoaderFree); EntryCount++; if (ExtendedMemorySizeAtSixteenMB != 0) @@ -329,7 +328,7 @@ MAX_BIOS_DESCRIPTORS, 0x1000000 / PAGE_SIZE, ExtendedMemorySizeAtSixteenMB * 64 * 1024 / PAGE_SIZE, - MemoryFree); + LoaderFree); } } Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c [iso-8859-1] Fri Sep 23 20:09:54 2011 @@ -84,12 +84,12 @@ /* Available RAM block */ BiosMemoryMap[0].BasePage = 0; BiosMemoryMap[0].PageCount = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; - BiosMemoryMap[0].MemoryType = MemoryFree; + BiosMemoryMap[0].MemoryType = LoaderFree; /* Video memory */ BiosMemoryMap[1].BasePage = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; BiosMemoryMap[1].PageCount = (InstalledMemoryMb - AvailableMemoryMb) * 1024 * 1024 / MM_PAGE_SIZE; - BiosMemoryMap[1].MemoryType = MemoryFirmwarePermanent; + BiosMemoryMap[1].MemoryType = LoaderFirmwarePermanent; *MemoryMapSize = 2; return BiosMemoryMap; Modified: trunk/reactos/boot/freeldr/freeldr/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/debug…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] Fri Sep 23 20:09:54 2011 @@ -26,7 +26,7 @@ //#define DEBUG_ALL //#define DEBUG_INIFILE //#define DEBUG_REACTOS -#define DEBUG_CUSTOM +//#define DEBUG_CUSTOM #define DEBUG_NONE #if defined (DEBUG_ALL) @@ -38,7 +38,7 @@ #elif defined (DEBUG_REACTOS) ULONG DebugPrintMask = DPRINT_REACTOS | DPRINT_REGISTRY; #elif defined (DEBUG_CUSTOM) -ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY; +ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_WINDOWS; #else //#elif defined (DEBUG_NONE) ULONG DebugPrintMask = 0; #endif Modified: trunk/reactos/boot/freeldr/freeldr/include/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/mm.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/mm.h [iso-8859-1] Fri Sep 23 20:09:54 2011 @@ -89,7 +89,7 @@ extern ULONG LastFreePageHint; #if DBG -PCSTR MmGetSystemMemoryMapTypeString(MEMORY_TYPE Type); +PCSTR MmGetSystemMemoryMapTypeString(TYPE_OF_MEMORY Type); #endif ULONG MmGetPageNumberFromAddress(PVOID Address); // Returns the page number that contains a linear address Modified: trunk/reactos/boot/freeldr/freeldr/mm/meminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/me…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/mm/meminit.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/mm/meminit.c [iso-8859-1] Fri Sep 23 20:09:54 2011 @@ -26,22 +26,28 @@ #if DBG typedef struct { - MEMORY_TYPE Type; + TYPE_OF_MEMORY Type; PCSTR TypeString; } FREELDR_MEMORY_TYPE, *PFREELDR_MEMORY_TYPE; FREELDR_MEMORY_TYPE MemoryTypeArray[] = { - { MemoryMaximum, "Unknown memory" }, - { MemoryExceptionBlock, "Exception block" }, - { MemorySystemBlock, "System block" }, - { MemoryFree, "Free memory" }, - { MemoryBad, "Bad memory" }, - { MemoryLoadedProgram, "Loaded program" }, - { MemoryFirmwareTemporary, "Firmware temporary" }, - { MemoryFirmwarePermanent, "Firmware permanent" }, - { MemoryFreeContiguous, "Free contiguous memory" }, - { MemorySpecialMemory, "Special memory" }, + { LoaderMaximum, "Unknown memory" }, + { LoaderFree, "Free memory" }, + { LoaderBad, "Bad memory" }, + { LoaderLoadedProgram, "LoadedProgram" }, + { LoaderFirmwareTemporary, "FirmwareTemporary" }, + { LoaderFirmwarePermanent, "FirmwarePermanent" }, + { LoaderOsloaderHeap, "OsloaderHeap" }, + { LoaderOsloaderStack, "OsloaderStack" }, + { LoaderSystemCode, "SystemCode" }, + { LoaderHalCode, "HalCode" }, + { LoaderBootDriver, "BootDriver" }, + { LoaderRegistryData, "RegistryData" }, + { LoaderMemoryData, "MemoryData" }, + { LoaderNlsData, "NlsData" }, + { LoaderSpecialMemory, "SpecialMemory" }, + { LoaderReserve, "Reserve" }, }; ULONG MemoryTypeCount = sizeof(MemoryTypeArray) / sizeof(MemoryTypeArray[0]); #endif @@ -196,28 +202,10 @@ // Initialize the page lookup table MmInitPageLookupTable(PageLookupTableAddress, TotalPagesInLookupTable); -{ - ULONG Type, Index, PrevIndex = 0; - PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTableAddress; - - Type = RealPageLookupTable[0].PageAllocated; - for (Index = 1; Index < TotalPagesInLookupTable; Index++) - { - if ((RealPageLookupTable[Index].PageAllocated != Type) || - (Index == TotalPagesInLookupTable - 1)) - { - TRACE("Range: 0x%lx - 0x%lx Type=%d\n", - PrevIndex, Index - 1, Type); - Type = RealPageLookupTable[Index].PageAllocated; - PrevIndex = Index; - } - } -} - - MmUpdateLastFreePageHint(PageLookupTableAddress, TotalPagesInLookupTable); - FreePagesInLookupTable = MmCountFreePagesInLookupTable(PageLookupTableAddress, TotalPagesInLookupTable); + FreePagesInLookupTable = MmCountFreePagesInLookupTable(PageLookupTableAddress, + TotalPagesInLookupTable); MmInitializeHeap(PageLookupTableAddress); @@ -228,7 +216,7 @@ } #if DBG -PCSTR MmGetSystemMemoryMapTypeString(MEMORY_TYPE Type) +PCSTR MmGetSystemMemoryMapTypeString(TYPE_OF_MEMORY Type) { ULONG Index; @@ -267,7 +255,7 @@ // // Yes, remember it if this is real memory // - if (MemoryDescriptor->MemoryType == MemoryFree) MmHighestPhysicalPage = MemoryDescriptor->BasePage + MemoryDescriptor->PageCount; + if (MemoryDescriptor->MemoryType == LoaderFree) MmHighestPhysicalPage = MemoryDescriptor->BasePage + MemoryDescriptor->PageCount; } // @@ -296,64 +284,26 @@ ULONG PageLookupTableStartPage = 0; PVOID PageLookupTableMemAddress = NULL; - // // Calculate how much pages we need to keep the page lookup table - // PageLookupTableSize = TotalPageCount * sizeof(PAGE_LOOKUP_TABLE_ITEM); PageLookupTablePages = PageLookupTableSize / MM_PAGE_SIZE; - // // Search the highest memory block big enough to contain lookup table - // while ((MemoryDescriptor = ArcGetMemoryDescriptor(MemoryDescriptor)) != NULL) { - // - // Is it suitable memory? - // - if (MemoryDescriptor->MemoryType != MemoryFree) - { - // - // No. Process next descriptor - // - continue; - } - - // - // Is the block big enough? - // - if (MemoryDescriptor->PageCount < PageLookupTablePages) - { - // - // No. Process next descriptor - // - continue; - } - - // - // Is it at a higher address than previous suitable address? - // - if (MemoryDescriptor->BasePage < PageLookupTableStartPage) - { - // - // No. Process next descriptor - // - continue; - } - - // - // Can we use this address? - // - if (MemoryDescriptor->BasePage >= MM_MAX_PAGE) - { - // - // No. Process next descriptor - // - continue; - } - - // + // Continue, if memory is not free + if (MemoryDescriptor->MemoryType != LoaderFree) continue; + + // Continue, if the block is not big enough? + if (MemoryDescriptor->PageCount < PageLookupTablePages) continue; + + // Continue, if it is not at a higher address than previous address + if (MemoryDescriptor->BasePage < PageLookupTableStartPage) continue; + + // Continue, if the address is too high + if (MemoryDescriptor->BasePage >= MM_MAX_PAGE) continue; + // Memory block is more suitable than the previous one - // PageLookupTableStartPage = MemoryDescriptor->BasePage; PageLookupTableMemAddress = (PVOID)((ULONG_PTR) (MemoryDescriptor->BasePage + MemoryDescriptor->PageCount) * MM_PAGE_SIZE @@ -374,87 +324,31 @@ TRACE("MmInitPageLookupTable()\n"); - // // Mark every page as allocated initially // We will go through and mark pages again according to the memory map // But this will mark any holes not described in the map as allocated - // MmMarkPagesInLookupTable(PageLookupTable, MmLowestPhysicalPage, TotalPageCount, LoaderFirmwarePermanent); - // // Parse the whole memory map - // while ((MemoryDescriptor = ArcGetMemoryDescriptor(MemoryDescriptor)) != NULL) { TRACE("Got range: 0x%lx-0x%lx, type=%s\n", MemoryDescriptor->BasePage, MemoryDescriptor->BasePage + MemoryDescriptor->PageCount, MmGetSystemMemoryMapTypeString(MemoryDescriptor->MemoryType)); - // - // Convert ARC memory type to loader memory type - // - switch (MemoryDescriptor->MemoryType) - { - case MemoryFree: - { - // - // Allocatable memory - // - MemoryMapPageAllocated = LoaderFree; - break; - } - case MemoryFirmwarePermanent: - { - // - // Firmware permanent memory - // - MemoryMapPageAllocated = LoaderFirmwarePermanent; - break; - } - case MemoryFirmwareTemporary: - { - // - // Firmware temporary memory - // - MemoryMapPageAllocated = LoaderFirmwareTemporary; - break; - } - case MemoryLoadedProgram: - { - // - // Bootloader code - // - MemoryMapPageAllocated = LoaderLoadedProgram; - break; - } - case MemorySpecialMemory: - { - // - // OS Loader Stack - // - MemoryMapPageAllocated = LoaderOsloaderStack; - break; - } - default: - { - // - // Put something sensible here, which won't be overwritten - // - MemoryMapPageAllocated = LoaderSpecialMemory; - break; - } - } - - // + + MemoryMapPageAllocated = MemoryDescriptor->MemoryType; + // Mark used pages in the lookup table - // - TRACE("Marking pages as type %d: StartPage: %d PageCount: %d\n", MemoryMapPageAllocated, MemoryDescriptor->BasePage, MemoryDescriptor->PageCount); - MmMarkPagesInLookupTable(PageLookupTable, MemoryDescriptor->BasePage, MemoryDescriptor->PageCount, MemoryMapPageAllocated); - } - - // + TRACE("Marking pages as type %d: StartPage: %d PageCount: %d\n", + MemoryMapPageAllocated, MemoryDescriptor->BasePage, MemoryDescriptor->PageCount); + MmMarkPagesInLookupTable(PageLookupTable, + MemoryDescriptor->BasePage, + MemoryDescriptor->PageCount, + MemoryMapPageAllocated); + } + // Mark the pages that the lookup table occupies as reserved - // PageLookupTableStartPage = MmGetPageNumberFromAddress(PageLookupTable); PageLookupTablePageCount = MmGetPageNumberFromAddress((PVOID)((ULONG_PTR)PageLookupTable + ROUND_UP(TotalPageCount * sizeof(PAGE_LOOKUP_TABLE_ITEM), MM_PAGE_SIZE))) - PageLookupTableStartPage; TRACE("Marking the page lookup table pages as reserved StartPage: %d PageCount: %d\n", PageLookupTableStartPage, PageLookupTablePageCount); @@ -515,9 +409,9 @@ ULONG MmFindAvailablePages(PVOID PageLookupTable, ULONG TotalPageCount, ULONG PagesNeeded, BOOLEAN FromEnd) { - PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTable; - ULONG AvailablePagesSoFar; - ULONG Index; + PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTable; + ULONG AvailablePagesSoFar; + ULONG Index; if (LastFreePageHint > TotalPageCount) { @@ -639,7 +533,7 @@ return FALSE; } - for (Index=StartPage; Index<(StartPage + PageCount); Index++) + for (Index = StartPage; Index < (StartPage + PageCount); Index++) { // If this page is allocated then there obviously isn't // memory availabe so return FALSE
13 years, 1 month
1
0
0
0
[ekohl] 53817: [LSASRV] Initialize required policy attributes when the LSA database is created. This fixes the hanging lsa winetest.
by ekohl@svn.reactos.org
Author: ekohl Date: Fri Sep 23 18:24:33 2011 New Revision: 53817 URL:
http://svn.reactos.org/svn/reactos?rev=53817&view=rev
Log: [LSASRV] Initialize required policy attributes when the LSA database is created. This fixes the hanging lsa winetest. Modified: trunk/reactos/dll/win32/lsasrv/database.c Modified: trunk/reactos/dll/win32/lsasrv/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/database.…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/database.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/database.c [iso-8859-1] Fri Sep 23 18:24:33 2011 @@ -76,7 +76,7 @@ static NTSTATUS -LsapInstallDatabase(VOID) +LsapCreateDatabaseKeys(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING KeyName; @@ -180,7 +180,6 @@ goto Done; } - Done: if (SecretsKeyHandle != NULL) NtClose(SecretsKeyHandle); @@ -200,6 +199,55 @@ } +static NTSTATUS +LsapCreateDatabaseObjects(VOID) +{ + PLSA_DB_OBJECT DbObject = NULL; + + /* Open the 'Policy' object */ + DbObject = (PLSA_DB_OBJECT)LsapCreateDbObject(NULL, + L"Policy", + TRUE, + LsaDbPolicyObject, + 0); + if (DbObject != NULL) + { + LsapSetObjectAttribute(DbObject, + L"PolPrDmN", + NULL, + 0); + + LsapSetObjectAttribute(DbObject, + L"PolPrDmS", + NULL, + 0); + + LsapSetObjectAttribute(DbObject, + L"PolAcDmN", + NULL, + 0); + + LsapSetObjectAttribute(DbObject, + L"PolAcDmS", + NULL, + 0); + + + /* Close the 'Policy' object */ + LsapCloseDbObject((LSAPR_HANDLE)DbObject); + } + + return STATUS_SUCCESS; +} + + +static NTSTATUS +LsapUpdateDatabase(VOID) +{ + return STATUS_SUCCESS; +} + + NTSTATUS LsapInitDatabase(VOID) { @@ -216,10 +264,26 @@ if (!LsapIsDatabaseInstalled()) { - Status = LsapInstallDatabase(); + Status = LsapCreateDatabaseKeys(); if (!NT_SUCCESS(Status)) { - ERR("Failed to install the LSA database (Status: 0x%08lx)\n", Status); + ERR("Failed to create the LSA database keys (Status: 0x%08lx)\n", Status); + return Status; + } + + Status = LsapCreateDatabaseObjects(); + if (!NT_SUCCESS(Status)) + { + ERR("Failed to create the LSA database objects (Status: 0x%08lx)\n", Status); + return Status; + } + } + else + { + Status = LsapUpdateDatabase(); + if (!NT_SUCCESS(Status)) + { + ERR("Failed to update the LSA database (Status: 0x%08lx)\n", Status); return Status; } }
13 years, 1 month
1
0
0
0
[tkreuzer] 53816: [FREELDR] Fix some bugs in the code that deals with memory descriptors: ArcGetMemoryDescriptor was enumerating the bios generated entries first and then the static entries. The la...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Sep 23 17:35:45 2011 New Revision: 53816 URL:
http://svn.reactos.org/svn/reactos?rev=53816&view=rev
Log: [FREELDR] Fix some bugs in the code that deals with memory descriptors: ArcGetMemoryDescriptor was enumerating the bios generated entries first and then the static entries. The latter were conflicting with the former and took precedence when initializing the page lookup table. The problem was, that MmFindLocationForPageLookupTable would use the highest range of pages available. If that range would be conflicting with a following static descriptor, the static would have been ignored. It only worked because on x86 the highest bios descriptor has enough free pages, before it conflicts with a static entry (page 0xfff, marked as unusable), so that the page lookup table could be created. MmGetAddressablePageCountIncludingHoles enumerated all memory descriptors to find MmLowestPhysicalPage, but it was only counting FreeMemory, thus skipping all other memory ranges. This only worked, due to the previous bug, so that the bios pages shown first took precedence over the following static descriptors. Without the former bug MmLowestPhysicalPage would be 0x100 which would tigger in the next bug: MmAreMemoryPagesAvailable took the passed address range and looked up all pages in the lookup table to see whether all are free. Now the function didn't check, whether the passed address was below MmLowestPhysicalPage and in case it was, happily accessed the memory below the lookup table. This would result in hal being loaded at 0x40000 overwriting the loader itself. This is all fixe by implementing a new way of creating the memory map. First there is a static memory map, which has enough free entries to add dynamic ranges. Then AddMemoryDescriptor will allow you to add a new range, while the already existing ranges will take precedence and the new ranges will be properly split and inserted, so that the resulting map does not contain any overlapping regions and is sorted from low to high pages. The static memory descriptor exists in the architecture specific file. The code that enumerates the bios information now uses this function to add the ranges on top of the static descriptor. More cleanup work to follow. Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c trunk/reactos/boot/freeldr/freeldr/debug.c trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h trunk/reactos/boot/freeldr/freeldr/include/machine.h trunk/reactos/boot/freeldr/freeldr/mm/meminit.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] Fri Sep 23 17:35:45 2011 @@ -143,12 +143,25 @@ return RootNode; } -PBIOS_MEMORY_MAP -ArmMemGetMemoryMap(OUT PULONG MaxMemoryMapSize) -{ +MEMORY_DESCRIPTOR ArmMemoryMap[32]; + +PMEMORY_DESCRIPTOR +ArmMemGetMemoryMap(OUT ULONG *MemoryMapSize) +{ + ASSERT(ArmBoardBlock->MemoryMapEntryCount <= 32); + /* Return whatever the board returned to us (CS0 Base + Size and FLASH0) */ - *MaxMemoryMapSize = ArmBoardBlock->MemoryMapEntryCount; - return ArmBoardBlock->MemoryMap; + for (i = 0; i < ArmBoardBlock->MemoryMapEntryCount; i++) + { + ArmMemoryMap[i].BasePage = ArmBoardBlock->MemoryMap[i].BaseAddress / PAGE_SIZE; + ArmMemoryMap[i].PageCount = ArmBoardBlock->MemoryMap[i].Length / PAGE_SIZE; + if (ArmBoardBlock->MemoryMap[i].Type == BiosMemoryUsable) + ArmMemoryMap[i].MemoryType = MemoryFree; + else + ArmMemoryMap[i].MemoryType = MemoryFirmwarePermanent; + } + + return ArmBoardBlock->MemoryMapEntryCount; } VOID Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c [iso-8859-1] Fri Sep 23 17:35:45 2011 @@ -21,6 +21,7 @@ */ #include <freeldr.h> +#include <arch/pc/x86common.h> #define NDEBUG #include <debug.h> @@ -28,9 +29,43 @@ DBG_DEFAULT_CHANNEL(MEMORY); #define MAX_BIOS_DESCRIPTORS 32 +#define FREELDR_BASE_PAGE (FREELDR_BASE / PAGE_SIZE) +#define FILEBUF_BASE_PAGE (FILESYSBUFFER / PAGE_SIZE) +#define DISKBUF_BASE_PAGE (DISKREADBUFFER / PAGE_SIZE) +#define STACK_BASE_PAGE (DISKBUF_BASE_PAGE + 1) +#define STACK_END_PAGE (STACK32ADDR / PAGE_SIZE) +#define BIOSBUF_BASE_PAGE (BIOSCALLBUFFER / PAGE_SIZE) + +#define FREELDR_PAGE_COUNT (FILEBUF_BASE_PAGE - FREELDR_BASE_PAGE) +#define FILEBUF_PAGE_COUNT (DISKBUF_BASE_PAGE - FILEBUF_BASE_PAGE) +#define DISKBUF_PAGE_COUNT (1) +#define STACK_PAGE_COUNT (STACK_END_PAGE - STACK_BASE_PAGE) +#define BIOSBUF_PAGE_COUNT (0xA0 - BIOSBUF_BASE_PAGE) BIOS_MEMORY_MAP PcBiosMemoryMap[MAX_BIOS_DESCRIPTORS]; ULONG PcBiosMapCount; + +MEMORY_DESCRIPTOR PcMemoryMap[MAX_BIOS_DESCRIPTORS + 1] = +{ + { MemoryFirmwarePermanent, 0x00, 1 }, // realmode int vectors + { MemoryFirmwareTemporary, 0x01, FREELDR_BASE_PAGE - 1 }, // freeldr stack + cmdline + { MemoryLoadedProgram, FREELDR_BASE_PAGE, FREELDR_PAGE_COUNT }, // freeldr image + { MemoryFirmwareTemporary, FILEBUF_BASE_PAGE, FILEBUF_PAGE_COUNT }, // File system read buffer. FILESYSBUFFER + { MemoryFirmwareTemporary, DISKBUF_BASE_PAGE, DISKBUF_PAGE_COUNT }, // Disk read buffer for int 13h. DISKREADBUFFER + { MemorySpecialMemory, STACK_BASE_PAGE, STACK_PAGE_COUNT }, // prot mode stack. + { MemoryFirmwareTemporary, BIOSBUF_BASE_PAGE, BIOSBUF_PAGE_COUNT }, // BIOSCALLBUFFER + { MemoryFirmwarePermanent, 0xA0, 0x60 }, // ROM / Video + { MemorySpecialMemory, 0xFFF, 1 }, // unusable memory + { MemorySpecialMemory, MAXULONG_PTR, 0 }, // end of map +}; + +ULONG +AddMemoryDescriptor( + IN OUT PMEMORY_DESCRIPTOR List, + IN ULONG MaxCount, + IN PFN_NUMBER BasePage, + IN PFN_NUMBER PageCount, + IN MEMORY_TYPE MemoryType); static BOOLEAN @@ -153,11 +188,14 @@ return (ULONG)Regs.w.ax; } -static ULONG -PcMemGetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize) +static +ULONG +PcMemGetBiosMemoryMap(PMEMORY_DESCRIPTOR MemoryMap, ULONG MaxMemoryMapSize) { REGS Regs; - ULONG MapCount; + ULONG MapCount = 0; + ULONGLONG RealBaseAddress, RealSize; + ASSERT(PcBiosMapCount == 0); TRACE("GetBiosMemoryMap()\n"); @@ -181,7 +219,7 @@ */ Regs.x.ebx = 0x00000000; - for (MapCount = 0; MapCount < MaxMemoryMapSize; MapCount++) + while (PcBiosMapCount < MAX_BIOS_DESCRIPTORS) { /* Setup the registers for the BIOS call */ Regs.x.eax = 0x0000E820; @@ -192,7 +230,7 @@ Regs.w.di = BIOSCALLBUFOFFSET; Int386(0x15, &Regs, &Regs); - TRACE("Memory Map Entry %d\n", MapCount); + TRACE("Memory Map Entry %d\n", PcBiosMapCount); TRACE("Int15h AX=E820h\n"); TRACE("EAX = 0x%x\n", Regs.x.eax); TRACE("EBX = 0x%x\n", Regs.x.ebx); @@ -206,14 +244,39 @@ break; } - /* Copy data to caller's buffer */ - RtlCopyMemory(&BiosMemoryMap[MapCount], (PVOID)BIOSCALLBUFFER, Regs.x.ecx); - - TRACE("BaseAddress: 0x%p\n", (PVOID)(ULONG_PTR)BiosMemoryMap[MapCount].BaseAddress); - TRACE("Length: 0x%p\n", (PVOID)(ULONG_PTR)BiosMemoryMap[MapCount].Length); - TRACE("Type: 0x%x\n", BiosMemoryMap[MapCount].Type); - TRACE("Reserved: 0x%x\n", BiosMemoryMap[MapCount].Reserved); + /* Copy data to global buffer */ + RtlCopyMemory(&PcBiosMemoryMap[PcBiosMapCount], (PVOID)BIOSCALLBUFFER, Regs.x.ecx); + + TRACE("BaseAddress: 0x%p\n", (PVOID)(ULONG_PTR)PcBiosMemoryMap[PcBiosMapCount].BaseAddress); + TRACE("Length: 0x%p\n", (PVOID)(ULONG_PTR)PcBiosMemoryMap[PcBiosMapCount].Length); + TRACE("Type: 0x%x\n", PcBiosMemoryMap[PcBiosMapCount].Type); + TRACE("Reserved: 0x%x\n", PcBiosMemoryMap[PcBiosMapCount].Reserved); TRACE("\n"); + + /* Align up base of memory area */ + RealBaseAddress = ROUND_UP(PcBiosMemoryMap[PcBiosMapCount].BaseAddress, MM_PAGE_SIZE); + RealSize = PcBiosMemoryMap[PcBiosMapCount].Length - + (RealBaseAddress - PcBiosMemoryMap[PcBiosMapCount].BaseAddress); + + /* Check if we can add this descriptor */ + if ((RealSize >= MM_PAGE_SIZE) && (MapCount < MaxMemoryMapSize)) + { + MEMORY_TYPE MemoryType; + + if (PcBiosMemoryMap[PcBiosMapCount].Type == BiosMemoryUsable) + MemoryType = MemoryFree; + else + MemoryType = MemoryFirmwarePermanent; + + /* Add the descriptor */ + MapCount = AddMemoryDescriptor(PcMemoryMap, + MAX_BIOS_DESCRIPTORS, + RealBaseAddress / MM_PAGE_SIZE, + RealSize / MM_PAGE_SIZE, + MemoryType); + } + + PcBiosMapCount++; /* If the continuation value is zero or the * carry flag is set then this was @@ -229,46 +292,59 @@ return MapCount; } -PBIOS_MEMORY_MAP + +PMEMORY_DESCRIPTOR PcMemGetMemoryMap(ULONG *MemoryMapSize) { - ULONG EntryCount; + ULONG i, EntryCount; ULONG ExtendedMemorySizeAtOneMB; ULONG ExtendedMemorySizeAtSixteenMB; - EntryCount = PcMemGetBiosMemoryMap(PcBiosMemoryMap, MAX_BIOS_DESCRIPTORS); - PcBiosMapCount = EntryCount; + EntryCount = PcMemGetBiosMemoryMap(PcMemoryMap, MAX_BIOS_DESCRIPTORS); /* If the BIOS didn't provide a memory map, synthesize one */ if (0 == EntryCount) { GetExtendedMemoryConfiguration(&ExtendedMemorySizeAtOneMB, &ExtendedMemorySizeAtSixteenMB); - /* Conventional memory */ - PcBiosMemoryMap[EntryCount].BaseAddress = 0; - PcBiosMemoryMap[EntryCount].Length = PcMemGetConventionalMemorySize() * 1024; - PcBiosMemoryMap[EntryCount].Type = BiosMemoryUsable; - EntryCount++; - - /* Extended memory at 1MB */ - PcBiosMemoryMap[EntryCount].BaseAddress = 1024 * 1024; - PcBiosMemoryMap[EntryCount].Length = ExtendedMemorySizeAtOneMB * 1024; - PcBiosMemoryMap[EntryCount].Type = BiosMemoryUsable; + /* Conventional memory */ + AddMemoryDescriptor(PcMemoryMap, + MAX_BIOS_DESCRIPTORS, + 0, + PcMemGetConventionalMemorySize() * 1024 / PAGE_SIZE, + MemoryFree); + + /* Extended memory */ + EntryCount = AddMemoryDescriptor(PcMemoryMap, + MAX_BIOS_DESCRIPTORS, + 1024 * 1024 / PAGE_SIZE, + ExtendedMemorySizeAtOneMB * 1024 / PAGE_SIZE, + MemoryFree); EntryCount++; if (ExtendedMemorySizeAtSixteenMB != 0) { /* Extended memory at 16MB */ - PcBiosMemoryMap[EntryCount].BaseAddress = 0x1000000; - PcBiosMemoryMap[EntryCount].Length = ExtendedMemorySizeAtSixteenMB * 64 * 1024; - PcBiosMemoryMap[EntryCount].Type = BiosMemoryUsable; - EntryCount++; + EntryCount = AddMemoryDescriptor(PcMemoryMap, + MAX_BIOS_DESCRIPTORS, + 0x1000000 / PAGE_SIZE, + ExtendedMemorySizeAtSixteenMB * 64 * 1024 / PAGE_SIZE, + MemoryFree); } } + TRACE("Dumping resulting memory map:\n"); + for (i = 0; i < EntryCount; i++) + { + TRACE("BasePage=0x%lx, PageCount=0x%lx, Type=%s\n", + PcMemoryMap[i].BasePage, + PcMemoryMap[i].PageCount, + MmGetSystemMemoryMapTypeString(PcMemoryMap[i].MemoryType)); + } + *MemoryMapSize = EntryCount; - return PcBiosMemoryMap; + return PcMemoryMap; } /* EOF */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c [iso-8859-1] Fri Sep 23 17:35:45 2011 @@ -75,21 +75,21 @@ AvailableMemoryMb = InstalledMemoryMb; } -BIOS_MEMORY_MAP BiosMemoryMap[2]; +MEMORY_DESCRIPTOR BiosMemoryMap[2]; -PBIOS_MEMORY_MAP +PMEMORY_DESCRIPTOR XboxMemGetMemoryMap(ULONG *MemoryMapSize) { /* Synthesize memory map */ /* Available RAM block */ - BiosMemoryMap[0].BaseAddress = 0; - BiosMemoryMap[0].Length = AvailableMemoryMb * 1024 * 1024; - BiosMemoryMap[0].Type = BiosMemoryUsable; + BiosMemoryMap[0].BasePage = 0; + BiosMemoryMap[0].PageCount = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; + BiosMemoryMap[0].MemoryType = MemoryFree; /* Video memory */ - BiosMemoryMap[1].BaseAddress = AvailableMemoryMb * 1024 * 1024; - BiosMemoryMap[1].Length = (InstalledMemoryMb - AvailableMemoryMb) * 1024 * 1024; - BiosMemoryMap[1].Type = BiosMemoryReserved; + BiosMemoryMap[1].BasePage = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; + BiosMemoryMap[1].PageCount = (InstalledMemoryMb - AvailableMemoryMb) * 1024 * 1024 / MM_PAGE_SIZE; + BiosMemoryMap[1].MemoryType = MemoryFirmwarePermanent; *MemoryMapSize = 2; return BiosMemoryMap; Modified: trunk/reactos/boot/freeldr/freeldr/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/debug…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] Fri Sep 23 17:35:45 2011 @@ -26,7 +26,7 @@ //#define DEBUG_ALL //#define DEBUG_INIFILE //#define DEBUG_REACTOS -//#define DEBUG_CUSTOM +#define DEBUG_CUSTOM #define DEBUG_NONE #if defined (DEBUG_ALL) @@ -38,7 +38,7 @@ #elif defined (DEBUG_REACTOS) ULONG DebugPrintMask = DPRINT_REACTOS | DPRINT_REGISTRY; #elif defined (DEBUG_CUSTOM) -ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_WINDOWS; +ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY; #else //#elif defined (DEBUG_NONE) ULONG DebugPrintMask = 0; #endif Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h [iso-8859-1] Fri Sep 23 17:35:45 2011 @@ -49,7 +49,7 @@ VOID XboxMemInit(VOID); PVOID XboxMemReserveMemory(ULONG MbToReserve); -PBIOS_MEMORY_MAP XboxMemGetMemoryMap(ULONG *MemoryMapSize); +PMEMORY_DESCRIPTOR XboxMemGetMemoryMap(ULONG *MemoryMapSize); BOOLEAN XboxDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); BOOLEAN XboxDiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h [iso-8859-1] Fri Sep 23 17:35:45 2011 @@ -46,7 +46,7 @@ VOID PcVideoPrepareForReactOS(IN BOOLEAN Setup); VOID PcPrepareForReactOS(IN BOOLEAN Setup); -PBIOS_MEMORY_MAP PcMemGetMemoryMap(ULONG *MemoryMapSize); +PMEMORY_DESCRIPTOR PcMemGetMemoryMap(ULONG *MemoryMapSize); BOOLEAN PcDiskGetBootPath(char *BootPath, unsigned Size); BOOLEAN PcDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] Fri Sep 23 17:35:45 2011 @@ -13,11 +13,11 @@ #define BSS_START HEX(6F00) #define FREELDR_BASE HEX(F800) #define FREELDR_PE_BASE HEX(10000) +#define FILESYSBUFFER HEX(80000) /* Buffer to store file system data (e.g. cluster buffer for FAT) */ +#define DISKREADBUFFER HEX(90000) /* Buffer to store data read in from the disk via the BIOS */ #define STACK32ADDR HEX(98000) /* The 32-bit stack top will be at 9000:8000, or 0xA8000 */ #define STACK64ADDR HEX(98000) /* The 64-bit stack top will be at 98000 */ #define BIOSCALLBUFFER HEX(98000) /* Buffer to store temporary data for any Int386() call */ -#define FILESYSBUFFER HEX(80000) /* Buffer to store file system data (e.g. cluster buffer for FAT) */ -#define DISKREADBUFFER HEX(90000) /* Buffer to store data read in from the disk via the BIOS */ #define DISKREADBUFFER_SIZE 512 #define BIOSCALLBUFSEGMENT (BIOSCALLBUFFER/16) /* Buffer to store temporary data for any Int386() call */ Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] Fri Sep 23 17:35:45 2011 @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * FreeLoader * * This program is free software; you can redistribute it and/or modify @@ -59,7 +58,7 @@ VOID (*PrepareForReactOS)(IN BOOLEAN Setup); MEMORY_DESCRIPTOR* (*GetMemoryDescriptor)(MEMORY_DESCRIPTOR* Current); - PBIOS_MEMORY_MAP (*GetMemoryMap)(PULONG MemoryMapSize); + PMEMORY_DESCRIPTOR (*GetMemoryMap)(PULONG MaxMemoryMapSize); BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size); BOOLEAN (*DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); Modified: trunk/reactos/boot/freeldr/freeldr/mm/meminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/me…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/mm/meminit.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/mm/meminit.c [iso-8859-1] Fri Sep 23 17:35:45 2011 @@ -53,211 +53,106 @@ ULONG MmLowestPhysicalPage = 0xFFFFFFFF; ULONG MmHighestPhysicalPage = 0; +PMEMORY_DESCRIPTOR BiosMemoryMap; +ULONG BiosMemoryMapEntryCount; + extern ULONG_PTR MmHeapPointer; extern ULONG_PTR MmHeapStart; -typedef struct -{ - MEMORY_DESCRIPTOR m; - ULONG Index; - BOOLEAN GeneratedDescriptor; -} MEMORY_DESCRIPTOR_INT; -static const MEMORY_DESCRIPTOR_INT MemoryDescriptors[] = -{ -#if defined (__i386__) || defined (_M_AMD64) - { { MemoryFirmwarePermanent, 0x00, 1 }, 0, }, // realmode int vectors - { { MemoryFirmwareTemporary, 0x01, 7 }, 1, }, // freeldr stack + cmdline - { { MemoryLoadedProgram, 0x08, 0x70 }, 2, }, // freeldr image (roughly max. 0x64 pages) - { { MemorySpecialMemory, 0x78, 8 }, 3, }, // prot mode stack. BIOSCALLBUFFER - { { MemoryFirmwareTemporary, 0x80, 0x10 }, 4, }, // File system read buffer. FILESYSBUFFER - { { MemoryFirmwareTemporary, 0x90, 0x10 }, 5, }, // Disk read buffer for int 13h. DISKREADBUFFER - { { MemoryFirmwarePermanent, 0xA0, 0x60 }, 6, }, // ROM / Video - { { MemorySpecialMemory, 0xFFF, 1 }, 7, }, // unusable memory -#elif __arm__ // This needs to be done per-platform specific way - -#endif -}; - -static -VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG* MapCount) -{ - int Index; - int Index2; - ULONGLONG BaseAddressOffset; - - // Loop through each entry in the array - for (Index=0; Index<*MapCount; Index++) - { - // Correct all the addresses to be aligned on page boundaries - BaseAddressOffset = ROUND_UP(BiosMemoryMap[Index].BaseAddress, MM_PAGE_SIZE) - BiosMemoryMap[Index].BaseAddress; - BiosMemoryMap[Index].BaseAddress += BaseAddressOffset; - if (BiosMemoryMap[Index].Length < BaseAddressOffset) - { - BiosMemoryMap[Index].Length = 0; - } - else - { - BiosMemoryMap[Index].Length -= BaseAddressOffset; - } - BiosMemoryMap[Index].Length = ROUND_DOWN(BiosMemoryMap[Index].Length, MM_PAGE_SIZE); - - // If the entry type isn't usable then remove - // it from the memory map (this will help reduce - // the size of our lookup table) - // If the length is less than a full page then - // get rid of it also. - if (BiosMemoryMap[Index].Type != BiosMemoryUsable || - BiosMemoryMap[Index].Length < MM_PAGE_SIZE) - { - // Slide every entry after this down one - for (Index2=Index; Index2<(*MapCount - 1); Index2++) - { - BiosMemoryMap[Index2] = BiosMemoryMap[Index2 + 1]; - } - (*MapCount)--; - Index--; - } - } +ULONG +AddMemoryDescriptor( + IN OUT PMEMORY_DESCRIPTOR List, + IN ULONG MaxCount, + IN PFN_NUMBER BasePage, + IN PFN_NUMBER PageCount, + IN MEMORY_TYPE MemoryType) +{ + ULONG i, c; + PFN_NUMBER NextBase; + TRACE("AddMemoryDescriptor(0x%lx-0x%lx [0x%lx pages])\n", + BasePage, BasePage + PageCount, PageCount); + + /* Scan through all existing descriptors */ + for (i = 0, c = 0; (c < MaxCount) && (List[c].PageCount != 0); c++) + { + /* Count entries completely below the new range */ + if (List[i].BasePage + List[i].PageCount <= BasePage) i++; + } + + /* Check if the list is full */ + if (c >= MaxCount) return c; + + /* Is there an existing descriptor starting before the new range */ + while ((i < c) && (List[i].BasePage <= BasePage)) + { + /* The end of the existing one is the minimum for the new range */ + NextBase = List[i].BasePage + List[i].PageCount; + + /* Bail out, if everything is trimmed away */ + if ((BasePage + PageCount) <= NextBase) return c; + + /* Trim the naew range at the lower end */ + PageCount -= (NextBase - BasePage); + BasePage = NextBase; + + /* Go to the next entry and repeat */ + i++; + } + + ASSERT(PageCount > 0); + + /* Are there still entries above? */ + if (i < c) + { + /* Shift the following entries one up */ + RtlMoveMemory(&List[i+1], &List[i], (c - i) * sizeof(List[0])); + + /* Insert the new range */ + List[i].BasePage = BasePage; + List[i].PageCount = min(PageCount, List[i+1].BasePage - BasePage); + List[i].MemoryType = MemoryType; + c++; + + TRACE("Inserting at i=%ld: (0x%lx:0x%lx)\n", + i, List[i].BasePage, List[i].PageCount); + + /* Check if the range was trimmed */ + if (PageCount > List[i].PageCount) + { + /* Recursively process the trimmed part */ + c = AddMemoryDescriptor(List, + MaxCount, + BasePage + List[i].PageCount, + PageCount - List[i].PageCount, + MemoryType); + } + } + else + { + /* We can simply add the range here */ + TRACE("Adding i=%ld: (0x%lx:0x%lx)\n", i, BasePage, PageCount); + List[i].BasePage = BasePage; + List[i].PageCount = PageCount; + List[i].MemoryType = MemoryType; + c++; + } + + /* Return the new count */ + return c; } const MEMORY_DESCRIPTOR* ArcGetMemoryDescriptor(const MEMORY_DESCRIPTOR* Current) { - MEMORY_DESCRIPTOR_INT* CurrentDescriptor; - PBIOS_MEMORY_MAP BiosMemoryMap; - static ULONG BiosMemoryMapEntryCount; - static MEMORY_DESCRIPTOR_INT BiosMemoryDescriptors[32]; - static BOOLEAN MemoryMapInitialized = FALSE; - ULONG i, j; - - // - // Check if it is the first time we're called - // - if (!MemoryMapInitialized) - { - // - // Get the machine generated memory map - // - BiosMemoryMap = MachVtbl.GetMemoryMap(&BiosMemoryMapEntryCount); - - // - // Fix entries that are not page aligned - // - MmFixupSystemMemoryMap(BiosMemoryMap, &BiosMemoryMapEntryCount); - - // - // Copy the entries to our structure - // - for (i = 0, j = 0; i < BiosMemoryMapEntryCount; i++) - { - // - // Is it suitable memory? - // - if (BiosMemoryMap[i].Type != BiosMemoryUsable) - { - // - // No. Process next descriptor - // - continue; - } - - // - // Copy this memory descriptor - // - BiosMemoryDescriptors[j].m.MemoryType = MemoryFree; - BiosMemoryDescriptors[j].m.BasePage = (ULONG)(BiosMemoryMap[i].BaseAddress / MM_PAGE_SIZE); - BiosMemoryDescriptors[j].m.PageCount = (ULONG)(BiosMemoryMap[i].Length / MM_PAGE_SIZE); - BiosMemoryDescriptors[j].Index = j; - BiosMemoryDescriptors[j].GeneratedDescriptor = TRUE; - j++; - } - - // - // Remember how much descriptors we found - // - BiosMemoryMapEntryCount = j; - - // - // Mark memory map as already retrieved and initialized - // - MemoryMapInitialized = TRUE; - } - - CurrentDescriptor = CONTAINING_RECORD(Current, MEMORY_DESCRIPTOR_INT, m); - if (Current == NULL) { - // - // First descriptor requested - // - if (BiosMemoryMapEntryCount > 0) - { - // - // Return first generated memory descriptor - // - return &BiosMemoryDescriptors[0].m; - } - else if (sizeof(MemoryDescriptors) > 0) - { - // - // Return first fixed memory descriptor - // - return &MemoryDescriptors[0].m; - } - else - { - // - // Strange case, we have no memory descriptor - // - return NULL; - } - } - else if (CurrentDescriptor->GeneratedDescriptor) - { - // - // Current entry is a generated descriptor - // - if (CurrentDescriptor->Index + 1 < BiosMemoryMapEntryCount) - { - // - // Return next generated descriptor - // - return &BiosMemoryDescriptors[CurrentDescriptor->Index + 1].m; - } - else if (sizeof(MemoryDescriptors) > 0) - { - // - // Return first fixed memory descriptor - // - return &MemoryDescriptors[0].m; - } - else - { - // - // No fixed memory descriptor; end of memory map - // - return NULL; - } + return BiosMemoryMap; } else { - // - // Current entry is a fixed descriptor - // - if (CurrentDescriptor->Index + 1 < sizeof(MemoryDescriptors) / sizeof(MemoryDescriptors[0])) - { - // - // Return next fixed descriptor - // - return &MemoryDescriptors[CurrentDescriptor->Index + 1].m; - } - else - { - // - // No more fixed memory descriptor; end of memory map - // - return NULL; - } + Current++; + if (Current->PageCount == 0) return NULL; + return Current; } } @@ -269,6 +164,8 @@ #endif TRACE("Initializing Memory Manager.\n"); + + BiosMemoryMap = MachVtbl.GetMemoryMap(&BiosMemoryMapEntryCount); #if DBG // Dump the system memory map @@ -298,6 +195,26 @@ // Initialize the page lookup table MmInitPageLookupTable(PageLookupTableAddress, TotalPagesInLookupTable); + +{ + ULONG Type, Index, PrevIndex = 0; + PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTableAddress; + + Type = RealPageLookupTable[0].PageAllocated; + for (Index = 1; Index < TotalPagesInLookupTable; Index++) + { + if ((RealPageLookupTable[Index].PageAllocated != Type) || + (Index == TotalPagesInLookupTable - 1)) + { + TRACE("Range: 0x%lx - 0x%lx Type=%d\n", + PrevIndex, Index - 1, Type); + Type = RealPageLookupTable[Index].PageAllocated; + PrevIndex = Index; + } + } +} + + MmUpdateLastFreePageHint(PageLookupTableAddress, TotalPagesInLookupTable); FreePagesInLookupTable = MmCountFreePagesInLookupTable(PageLookupTableAddress, TotalPagesInLookupTable); @@ -305,6 +222,8 @@ MmInitializeHeap(PageLookupTableAddress); TRACE("Memory Manager initialized. %d pages available.\n", FreePagesInLookupTable); + + return TRUE; } @@ -359,7 +278,7 @@ // // Yes, remember it if this is real memory // - if (MemoryDescriptor->MemoryType == MemoryFree) MmLowestPhysicalPage = MemoryDescriptor->BasePage; + MmLowestPhysicalPage = MemoryDescriptor->BasePage; } } @@ -467,6 +386,10 @@ // while ((MemoryDescriptor = ArcGetMemoryDescriptor(MemoryDescriptor)) != NULL) { + TRACE("Got range: 0x%lx-0x%lx, type=%s\n", + MemoryDescriptor->BasePage, + MemoryDescriptor->BasePage + MemoryDescriptor->PageCount, + MmGetSystemMemoryMapTypeString(MemoryDescriptor->MemoryType)); // // Convert ARC memory type to loader memory type // @@ -704,6 +627,9 @@ ULONG Index; StartPage = MmGetPageNumberFromAddress(PageAddress); + + if (StartPage < MmLowestPhysicalPage) return FALSE; + StartPage -= MmLowestPhysicalPage; // Make sure they aren't trying to go past the
13 years, 1 month
1
0
0
0
[gadamopoulos] 53815: [user32_apitest] - add back showing the index of the message when comparing massage logs
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Fri Sep 23 16:04:17 2011 New Revision: 53815 URL:
http://svn.reactos.org/svn/reactos?rev=53815&view=rev
Log: [user32_apitest] - add back showing the index of the message when comparing massage logs Modified: trunk/rostests/apitests/user32/helper.c Modified: trunk/rostests/apitests/user32/helper.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/helper.c?…
============================================================================== --- trunk/rostests/apitests/user32/helper.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/helper.c [iso-8859-1] Fri Sep 23 16:04:17 2011 @@ -85,7 +85,7 @@ for (i=0; i < message_cache_size; i++) { sprintf_msg_entry(buff, &message_cache[i]); - trace_(file,line)("%s\n", buff); + trace_(file,line)("%d: %s\n", i, buff); } trace_(file,line)("\n"); } @@ -102,7 +102,7 @@ sprintf_msg_entry(buffGot, &message_cache[i]); sprintf_msg_entry(buffExp, msg_chain); - ok_(file,line)(same,"got %s, expected %s\n", buffGot, buffExp); + ok_(file,line)(same,"%d: got %s, expected %s\n",i, buffGot, buffExp); if(!got_error && !same) got_error = TRUE;
13 years, 1 month
1
0
0
0
[gadamopoulos] 53814: [user32_apitest] - Fix build with gcc
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Fri Sep 23 14:19:40 2011 New Revision: 53814 URL:
http://svn.reactos.org/svn/reactos?rev=53814&view=rev
Log: [user32_apitest] - Fix build with gcc Modified: trunk/rostests/apitests/user32/helper.c Modified: trunk/rostests/apitests/user32/helper.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/helper.c?…
============================================================================== --- trunk/rostests/apitests/user32/helper.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/helper.c [iso-8859-1] Fri Sep 23 14:19:40 2011 @@ -81,7 +81,6 @@ { int i; char buff[100]; - char *szMsgName; for (i=0; i < message_cache_size; i++) {
13 years, 1 month
1
0
0
0
[gadamopoulos] 53813: [user32_apitest] - Simplify compare_cache and make it show more meaningful results
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Fri Sep 23 14:09:30 2011 New Revision: 53813 URL:
http://svn.reactos.org/svn/reactos?rev=53813&view=rev
Log: [user32_apitest] - Simplify compare_cache and make it show more meaningful results Modified: trunk/rostests/apitests/user32/helper.c Modified: trunk/rostests/apitests/user32/helper.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/helper.c?…
============================================================================== --- trunk/rostests/apitests/user32/helper.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/helper.c [iso-8859-1] Fri Sep 23 14:09:30 2011 @@ -42,91 +42,78 @@ } } +static char* get_hook_name(UINT id) +{ + switch (id) + { + case WH_KEYBOARD: return "WH_KEYBOARD"; + case WH_KEYBOARD_LL: return "WH_KEYBOARD_LL"; + case WH_MOUSE: return "WH_MOUSE"; + case WH_MOUSE_LL: return "WH_MOUSE_LL"; + default: return NULL; + } +} + void empty_message_cache() { memset(message_cache, 0, sizeof(message_cache)); message_cache_size = 0; } +void sprintf_msg_entry(char* buffer, MSG_ENTRY* msg) +{ + if(!msg->iwnd && !msg->msg) + { + sprintf(buffer, "nothing"); + } + else + { + char* msgName = msg->hook ? get_hook_name(msg->msg) : get_msg_name(msg->msg); + char* msgType = msg->hook ? "hook" : "msg"; + if(msgName) + sprintf(buffer, "hwnd%d %s %s %d %d", msg->iwnd, msgType, msgName, msg->param1, msg->param2); + else + sprintf(buffer, "hwnd%d %s %d %d %d", msg->iwnd, msgType, msg->msg, msg->param1, msg->param2); + } +} + void trace_cache(const char* file, int line) { int i; + char buff[100]; char *szMsgName; for (i=0; i < message_cache_size; i++) { - if(!message_cache[i].hook) - { - if((szMsgName = get_msg_name(message_cache[i].msg))) - { - trace_(file,line)("hwnd%d, msg:%s\n",message_cache[i].iwnd, szMsgName ); - } - else - { - trace_(file,line)("hwnd%d, msg:%d\n",message_cache[i].iwnd, message_cache[i].msg ); - } - } - else - { - trace_(file,line)("hwnd%d, hook:%d, param1:%d, param2:%d\n",message_cache[i].iwnd, - message_cache[i].msg, - message_cache[i].param1, - message_cache[i].param2); - } + sprintf_msg_entry(buff, &message_cache[i]); + trace_(file,line)("%s\n", buff); } - trace("\n"); + trace_(file,line)("\n"); } void compare_cache(const char* file, int line, MSG_ENTRY *msg_chain) { int i = 0; + char buffGot[100], buffExp[100]; BOOL got_error = FALSE; while(1) { - char *szMsgExpected, *szMsgGot; BOOL same = !memcmp(&message_cache[i],msg_chain, sizeof(MSG_ENTRY)); - szMsgExpected = get_msg_name(msg_chain->msg); - szMsgGot = get_msg_name(message_cache[i].msg); - if(!msg_chain->hook) - { - if(szMsgExpected && szMsgGot) - { - ok_(file,line)(same, - "message %d: expected %s to hwnd%d and got %s to hwnd%d\n", - i, szMsgExpected, msg_chain->iwnd, szMsgGot, message_cache[i].iwnd); - } - else - { - ok_(file,line)(same, - "message %d: expected msg %d to hwnd%d and got msg %d to hwnd%d\n", - i, msg_chain->msg, msg_chain->iwnd, message_cache[i].msg, message_cache[i].iwnd); - } - } - else - { - ok_(file,line)(same, - "message %d: expected hook %d, hwnd%d, param1 %d, param2 %d and got hook %d, hwnd%d, param1 %d, param2 %d\n", - i, msg_chain->msg, msg_chain->iwnd,msg_chain->param1, msg_chain->param2, - message_cache[i].msg, message_cache[i].iwnd, message_cache[i].param1, message_cache[i].param2); - } + sprintf_msg_entry(buffGot, &message_cache[i]); + sprintf_msg_entry(buffExp, msg_chain); + ok_(file,line)(same,"got %s, expected %s\n", buffGot, buffExp); if(!got_error && !same) - { got_error = TRUE; - } if(msg_chain->msg !=0 && msg_chain->iwnd != 0) - { msg_chain++; - } else { if(i>message_cache_size) - { break; - } } i++; }
13 years, 1 month
1
0
0
0
[gadamopoulos] 53812: [user32_apitest.rbuild] - Move shared code used to log window messages in helper.c - Implement logging hooks - Fix comparing the logged messages to show the correct line of th...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Fri Sep 23 12:05:40 2011 New Revision: 53812 URL:
http://svn.reactos.org/svn/reactos?rev=53812&view=rev
Log: [user32_apitest.rbuild] - Move shared code used to log window messages in helper.c - Implement logging hooks - Fix comparing the logged messages to show the correct line of the test - Add tests for hooks in TrackMouseEvent test Added: trunk/rostests/apitests/user32/helper.c (with props) trunk/rostests/apitests/user32/helper.h (with props) Modified: trunk/rostests/apitests/user32/CMakeLists.txt trunk/rostests/apitests/user32/SetActiveWindow.c trunk/rostests/apitests/user32/SetCursorPos.c trunk/rostests/apitests/user32/TrackMouseEvent.c trunk/rostests/apitests/user32/user32_apitest.rbuild Modified: trunk/rostests/apitests/user32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/CMakeList…
============================================================================== --- trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/CMakeLists.txt [iso-8859-1] Fri Sep 23 12:05:40 2011 @@ -4,6 +4,7 @@ set_rc_compiler() list(APPEND SOURCE + helper.c DeferWindowPos.c GetIconInfo.c GetKeyState.c Modified: trunk/rostests/apitests/user32/SetActiveWindow.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/SetActive…
============================================================================== --- trunk/rostests/apitests/user32/SetActiveWindow.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/SetActiveWindow.c [iso-8859-1] Fri Sep 23 12:05:40 2011 @@ -8,104 +8,18 @@ #include <stdio.h> #include <wine/test.h> #include <windows.h> - -typedef struct _MSG_ENTRY -{ - int iwnd; - UINT msg; -} MSG_ENTRY; +#include "helper.h" MSG_ENTRY message_cache[100]; -int message_cache_size = 0; - HWND hWnd1, hWnd2, hWnd3, hWnd4; -/* helper functions */ - -static char* get_msg_name(UINT msg) +static int get_iwnd(HWND hWnd) { - switch(msg) - { - case WM_NCACTIVATE: return "WM_NCACTIVATE"; - case WM_ACTIVATE: return "WM_ACTIVATE"; - case WM_ACTIVATEAPP: return "WM_ACTIVATEAPP"; - case WM_WINDOWPOSCHANGING: return "WM_WINDOWPOSCHANGING"; - case WM_WINDOWPOSCHANGED: return "WM_WINDOWPOSCHANGED"; - case WM_SETFOCUS: return "WM_SETFOCUS"; - case WM_KILLFOCUS: return "WM_KILLFOCUS"; - case WM_NCPAINT: return "WM_NCPAINT"; - case WM_PAINT: return "WM_PAINT"; - case WM_ERASEBKGND: return "WM_ERASEBKGND"; - case WM_SIZE: return "WM_SIZE"; - case WM_MOVE: return "WM_MOVE"; - case WM_SHOWWINDOW: return "WM_SHOWWINDOW"; - case WM_QUERYNEWPALETTE: return "WM_QUERYNEWPALETTE"; - default: return NULL; - } -} - -static void empty_message_cache() -{ - memset(message_cache, 0, sizeof(message_cache)); - message_cache_size = 0; -} - -void trace_cache() -{ - int i; - char *szMsgName; - - for (i=0; i < message_cache_size; i++) - { - if((szMsgName = get_msg_name(message_cache[i].msg))) - { - trace("hwnd%d, msg:%s\n",message_cache[i].iwnd, szMsgName ); - } - else - { - trace("hwnd%d, msg:%d\n",message_cache[i].iwnd, message_cache[i].msg ); - } - } - trace("\n"); -} - -void compare_cache(char* testname, MSG_ENTRY *msg_chain) -{ - int i = 0; - - while(1) - { - char *szMsgExpected, *szMsgGot; - szMsgExpected = get_msg_name(msg_chain->msg); - szMsgGot = get_msg_name(message_cache[i].msg); - if(szMsgExpected && szMsgGot) - { - ok(message_cache[i].iwnd == msg_chain->iwnd && - message_cache[i].msg == msg_chain->msg, - "%s, message %d: expected %s to hwnd%d and got %s to hwnd%d\n", - testname,i, szMsgExpected, msg_chain->iwnd, szMsgGot, message_cache[i].iwnd); - } - else - { - ok(message_cache[i].iwnd == msg_chain->iwnd && - message_cache[i].msg == msg_chain->msg, - "%s, message %d: expected msg %d to hwnd%d and got msg %d to hwnd%d\n", - testname,i, msg_chain->msg, msg_chain->iwnd, message_cache[i].msg, message_cache[i].iwnd); - } - - if(msg_chain->msg !=0 && msg_chain->iwnd != 0) - { - msg_chain++; - } - else - { - if(i>message_cache_size) - { - break; - } - } - i++; - } + if(hWnd == hWnd1) return 1; + else if(hWnd == hWnd2) return 2; + else if(hWnd == hWnd3) return 3; + else if(hWnd == hWnd4) return 4; + else return 0; } LRESULT CALLBACK OwnerTestProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) @@ -121,20 +35,10 @@ message != WM_PAINT && message != 0x031f /*WM_DWMNCRENDERINGCHANGED*/) { - if (message_cache_size<100) - { - int iwnd; - if(hWnd == hWnd1) iwnd = 1; - else if(hWnd == hWnd2) iwnd = 2; - else if(hWnd == hWnd3) iwnd = 3; - else if(hWnd == hWnd4) iwnd = 4; - else - return DefWindowProc(hWnd, message, wParam, lParam); - - message_cache[message_cache_size].iwnd = iwnd; - message_cache[message_cache_size].msg = message; - message_cache_size++; - } + int iwnd; + iwnd = get_iwnd(hWnd); + if(iwnd) + record_message(iwnd, message, FALSE, 0,0); } return DefWindowProc(hWnd, message, wParam, lParam); @@ -142,23 +46,7 @@ static void create_test_windows() { - WNDCLASSEXW wcex; - - wcex.cbSize = sizeof(WNDCLASSEX); - wcex.style = 0; - wcex.lpfnWndProc = OwnerTestProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; - wcex.hInstance = 0; - wcex.hIcon = 0; - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); - wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wcex.lpszMenuName = 0; - wcex.lpszClassName = L"ownertest"; - wcex.hIconSm = 0; - - RegisterClassExW(&wcex); - + RegisterSimpleClass(OwnerTestProc, L"ownertest"); hWnd1 = CreateWindowW(L"ownertest", L"ownertest", WS_OVERLAPPEDWINDOW, 20, 20, 300, 300, NULL, NULL, 0, NULL); @@ -222,14 +110,11 @@ {1,WM_SETFOCUS}, {0,0}}; -#define EXPECT_NEXT(hWnd1, hWnd2) ok(GetWindow(hWnd1,GW_HWNDNEXT) == hWnd2, "Expected %p after %p, not %p\n",hWnd2,hWnd1,GetWindow(hWnd1,GW_HWNDNEXT) ) -#define EXPECT_ACTIVE(hwnd) ok(GetActiveWindow() == hwnd, "Expected %p to be the active window, not %p\n",hwnd,GetActiveWindow()) -#define FLUSH_MESSAGES(msg) while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); - - void Test_SetActiveWindow() { MSG msg; + + SetCursorPos(0,0); create_test_windows(); @@ -268,9 +153,7 @@ EXPECT_NEXT(hWnd2,hWnd1); EXPECT_NEXT(hWnd1,hWnd3); EXPECT_ACTIVE(hWnd1); - compare_cache("Activate1", Activate1_chain); - trace_cache(); - empty_message_cache(); + COMPARE_CACHE(Activate1_chain); SetActiveWindow(hWnd3); FLUSH_MESSAGES(msg); @@ -278,9 +161,7 @@ EXPECT_NEXT(hWnd4,hWnd2); EXPECT_NEXT(hWnd2,hWnd1); EXPECT_ACTIVE(hWnd3); - compare_cache("Activate2", Activate2_chain); - trace_cache(); - empty_message_cache(); + COMPARE_CACHE(Activate2_chain); SetActiveWindow(hWnd2); FLUSH_MESSAGES(msg); @@ -288,9 +169,7 @@ EXPECT_NEXT(hWnd4,hWnd1); EXPECT_NEXT(hWnd1,hWnd3); EXPECT_ACTIVE(hWnd2); - compare_cache("Activate3", Activate3_chain); - trace_cache(); - empty_message_cache(); + COMPARE_CACHE(Activate3_chain); SetActiveWindow(hWnd1); FLUSH_MESSAGES(msg); @@ -298,9 +177,7 @@ EXPECT_NEXT(hWnd4,hWnd1); EXPECT_NEXT(hWnd1,hWnd3); EXPECT_ACTIVE(hWnd1); - compare_cache("Activate4", Activate4_chain); - trace_cache(); - empty_message_cache(); + COMPARE_CACHE(Activate4_chain); } START_TEST(SetActiveWindow) Modified: trunk/rostests/apitests/user32/SetCursorPos.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/SetCursor…
============================================================================== --- trunk/rostests/apitests/user32/SetCursorPos.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/SetCursorPos.c [iso-8859-1] Fri Sep 23 12:05:40 2011 @@ -20,7 +20,7 @@ }; struct _test_info info[] = { {0,0,0}, /* SetCursorPos without a window */ - {1,2,0}, /* mouse_event without a window */ + {1,1,0}, /* mouse_event without a window */ {0,1,1}, /* SetCursorPos with a window */ {1,1,1}, /* mouse_event with a window */ {0,1,1}, /* multiple SetCursorPos with a window with coalescing */ @@ -97,7 +97,7 @@ memset(results, sizeof(results), 0); hMouseHookLL = SetWindowsHookEx(WH_MOUSE_LL, MouseLLHookProc, GetModuleHandleA( NULL ), 0); - hMouseHook = SetWindowsHookEx(WH_MOUSE, MouseHookProc, GetModuleHandleA( NULL ), 0); + hMouseHook = SetWindowsHookExW(WH_MOUSE, MouseHookProc, GetModuleHandleW( NULL ), GetCurrentThreadId()); ok(hMouseHook!=NULL,"failed to set hook\n"); ok(hMouseHookLL!=NULL,"failed to set hook\n"); Modified: trunk/rostests/apitests/user32/TrackMouseEvent.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/TrackMous…
============================================================================== --- trunk/rostests/apitests/user32/TrackMouseEvent.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/TrackMouseEvent.c [iso-8859-1] Fri Sep 23 12:05:40 2011 @@ -8,121 +8,17 @@ #include <stdio.h> #include <wine/test.h> #include <windows.h> - -typedef struct _MSG_ENTRY -{ - int iwnd; - UINT msg; -} MSG_ENTRY; - -MSG_ENTRY message_cache[100]; -static int message_cache_size = 0; +#include "helper.h" HWND hWnd1, hWnd2, hWnd3; - -/* helper functions */ - -static char* get_msg_name(UINT msg) -{ - switch(msg) - { - case WM_NCACTIVATE: return "WM_NCACTIVATE"; - case WM_ACTIVATE: return "WM_ACTIVATE"; - case WM_ACTIVATEAPP: return "WM_ACTIVATEAPP"; - case WM_WINDOWPOSCHANGING: return "WM_WINDOWPOSCHANGING"; - case WM_WINDOWPOSCHANGED: return "WM_WINDOWPOSCHANGED"; - case WM_SETFOCUS: return "WM_SETFOCUS"; - case WM_KILLFOCUS: return "WM_KILLFOCUS"; - case WM_NCPAINT: return "WM_NCPAINT"; - case WM_PAINT: return "WM_PAINT"; - case WM_ERASEBKGND: return "WM_ERASEBKGND"; - case WM_SIZE: return "WM_SIZE"; - case WM_MOVE: return "WM_MOVE"; - case WM_SHOWWINDOW: return "WM_SHOWWINDOW"; - case WM_QUERYNEWPALETTE: return "WM_QUERYNEWPALETTE"; - case WM_MOUSELEAVE: return "WM_MOUSELEAVE"; - case WM_MOUSEHOVER: return "WM_MOUSEHOVER"; - case WM_NCMOUSELEAVE: return "WM_NCMOUSELEAVE"; - case WM_NCMOUSEHOVER: return "WM_NCMOUSEHOVER"; - case WM_NCHITTEST: return "WM_NCHITTEST"; - case WM_SETCURSOR: return "WM_SETCURSOR"; - case WM_MOUSEMOVE: return "WM_MOUSEMOVE"; - default: return NULL; - } -} - -static void empty_message_cache() -{ - memset(message_cache, 0, sizeof(message_cache)); - message_cache_size = 0; -} -#if 0 -static void trace_cache() -{ - int i; - char *szMsgName; - - for (i=0; i < message_cache_size; i++) - { - if((szMsgName = get_msg_name(message_cache[i].msg))) - { - trace("hwnd%d, msg:%s\n",message_cache[i].iwnd, szMsgName ); - } - else - { - trace("hwnd%d, msg:%d\n",message_cache[i].iwnd, message_cache[i].msg ); - } - } - trace("\n"); -} -#endif - -static void compare_cache(char* testname, MSG_ENTRY *msg_chain) -{ - int i = 0; - - while(1) - { - char *szMsgExpected, *szMsgGot; - szMsgExpected = get_msg_name(msg_chain->msg); - szMsgGot = get_msg_name(message_cache[i].msg); - if(szMsgExpected && szMsgGot) - { - ok(message_cache[i].iwnd == msg_chain->iwnd && - message_cache[i].msg == msg_chain->msg, - "%s, message %d: expected %s to hwnd%d and got %s to hwnd%d\n", - testname,i, szMsgExpected, msg_chain->iwnd, szMsgGot, message_cache[i].iwnd); - } - else - { - ok(message_cache[i].iwnd == msg_chain->iwnd && - message_cache[i].msg == msg_chain->msg, - "%s, message %d: expected msg %d to hwnd%d and got msg %d to hwnd%d\n", - testname,i, msg_chain->msg, msg_chain->iwnd, message_cache[i].msg, message_cache[i].iwnd); - } - - if(msg_chain->msg !=0 && msg_chain->iwnd != 0) - { - msg_chain++; - } - else - { - if(i>message_cache_size) - { - break; - } - } - i++; - } - - empty_message_cache(); -} - -static void record_message(int iwnd, UINT message) -{ - message_cache[message_cache_size].iwnd = iwnd; - message_cache[message_cache_size].msg = message; - message_cache_size++; +HHOOK hMouseHookLL, hMouseHook; + +static int get_iwnd(HWND hWnd) +{ + if(hWnd == hWnd1) return 1; + else if(hWnd == hWnd2) return 2; + else if(hWnd == hWnd3) return 3; + else return 0; } LRESULT CALLBACK TmeTestProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) @@ -138,17 +34,9 @@ message != WM_PAINT && message != 0x031f /*WM_DWMNCRENDERINGCHANGED*/) { - if (message_cache_size<100) - { - int iwnd; - if(hWnd == hWnd1) iwnd = 1; - else if(hWnd == hWnd2) iwnd = 2; - else if(hWnd == hWnd3) iwnd = 3; - else - return DefWindowProc(hWnd, message, wParam, lParam); - - record_message(iwnd, message); - } + int iwnd = get_iwnd(hWnd); + if(iwnd) + record_message(iwnd, message, FALSE,0,0); } if(message == WM_PAINT) @@ -158,27 +46,33 @@ Rectangle(ps.hdc, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom); EndPaint(hWnd, &ps); } - + return DefWindowProc(hWnd, message, wParam, lParam); } +static LRESULT CALLBACK MouseLLHookProc(int nCode, WPARAM wParam, LPARAM lParam) +{ + record_message(0, WH_MOUSE_LL, TRUE, wParam, 0); + return CallNextHookEx(hMouseHookLL, nCode, wParam, lParam); +} + +static LRESULT CALLBACK MouseHookProc(int nCode, WPARAM wParam, LPARAM lParam) +{ + MOUSEHOOKSTRUCT *hs = (MOUSEHOOKSTRUCT*) lParam; + record_message(get_iwnd(hs->hwnd), WH_MOUSE, TRUE, wParam, hs->wHitTestCode); + return CallNextHookEx(hMouseHook, nCode, wParam, lParam); +} + static void create_test_windows() { WNDCLASSEXW wcex; - wcex.cbSize = sizeof(WNDCLASSEX); - wcex.style = 0; - wcex.lpfnWndProc = TmeTestProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; - wcex.hInstance = 0; - wcex.hIcon = 0; - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); - wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wcex.lpszMenuName = 0; - wcex.lpszClassName = L"testClass"; - wcex.hIconSm = 0; - + hMouseHookLL = SetWindowsHookExW(WH_MOUSE_LL, MouseLLHookProc, GetModuleHandleW( NULL ), 0); + hMouseHook = SetWindowsHookExW(WH_MOUSE, MouseHookProc, GetModuleHandleW( NULL ), GetCurrentThreadId()); + ok(hMouseHook!=NULL,"failed to set hook\n"); + ok(hMouseHookLL!=NULL,"failed to set hook\n"); + + RegisterSimpleClass(TmeTestProc, L"testClass"); RegisterClassExW(&wcex); hWnd1 = CreateWindowW(L"testClass", L"test", WS_OVERLAPPEDWINDOW, @@ -238,6 +132,7 @@ /* the mouse moves over hwnd2 */ MSG_ENTRY mousemove2_chain[]={{2, WM_NCHITTEST}, + {2, WH_MOUSE,1, WM_MOUSEMOVE, HTCLIENT}, {2, WM_SETCURSOR}, {1, WM_SETCURSOR}, {2, WM_MOUSEMOVE}, @@ -245,6 +140,7 @@ /* the mouse hovers hwnd2 */ MSG_ENTRY mousehover2_chain[]={{2, WM_NCHITTEST}, + {2, WH_MOUSE,1, WM_MOUSEMOVE, HTCLIENT}, {2, WM_SETCURSOR}, {1, WM_SETCURSOR}, {2, WM_MOUSEMOVE}, @@ -253,6 +149,7 @@ /* the mouse leaves hwnd2 and moves to hwnd1 */ MSG_ENTRY mouseleave2to1_chain[]={{1, WM_NCHITTEST}, + {1, WH_MOUSE,1, WM_MOUSEMOVE, HTCLIENT}, {1, WM_SETCURSOR}, {1, WM_MOUSEMOVE}, {2, WM_MOUSELEAVE}, @@ -260,6 +157,7 @@ /* the mouse leaves hwnd2 and moves to hwnd3 */ MSG_ENTRY mouseleave2to3_chain[]={{3, WM_NCHITTEST}, + {3, WH_MOUSE,1, WM_MOUSEMOVE, HTCLIENT}, {3, WM_SETCURSOR}, {1, WM_SETCURSOR}, {3, WM_MOUSEMOVE}, @@ -278,71 +176,71 @@ /* the mouse moves over hwnd2 */ SetCursorPos(220,220); FLUSH_MESSAGES(msg); - compare_cache("mousemove2", mousemove2_chain); - EXPECT_TME_FLAGS(hWnd2, 0); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - FLUSH_MESSAGES(msg); - compare_cache("empty1", empty_chain); + COMPARE_CACHE(mousemove2_chain); + EXPECT_TME_FLAGS(hWnd2, 0); + TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); + EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); + FLUSH_MESSAGES(msg); + COMPARE_CACHE(empty_chain); /* the mouse hovers hwnd2 */ SetCursorPos(221,221); Sleep(100); - EXPECT_QUEUE_STATUS(QS_TIMER|QS_MOUSEMOVE, QS_POSTMESSAGE); + EXPECT_QUEUE_STATUS(QS_TIMER|QS_MOUSEMOVE, 0); EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); FLUSH_MESSAGES(msg); EXPECT_TME_FLAGS(hWnd2, TME_LEAVE); - compare_cache("mousehover2", mousehover2_chain); + COMPARE_CACHE(mousehover2_chain); /* the mouse leaves hwnd2 and moves to hwnd1 */ SetCursorPos(150,150); - EXPECT_QUEUE_STATUS(QS_MOUSEMOVE,QS_TIMER|QS_POSTMESSAGE ); + EXPECT_QUEUE_STATUS(QS_MOUSEMOVE,QS_TIMER ); EXPECT_TME_FLAGS(hWnd2, TME_LEAVE); FLUSH_MESSAGES(msg); EXPECT_TME_FLAGS(hWnd2, 0); - compare_cache("mouseleave2to1", mouseleave2to1_chain); - - FLUSH_MESSAGES(msg); - compare_cache("empty2", empty_chain); + COMPARE_CACHE(mouseleave2to1_chain); + + FLUSH_MESSAGES(msg); + COMPARE_CACHE(empty_chain); /* the mouse moves over hwnd2 */ SetCursorPos(220,220); - EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER|QS_POSTMESSAGE); - FLUSH_MESSAGES(msg); - compare_cache("mousemove2", mousemove2_chain); - EXPECT_TME_FLAGS(hWnd2, 0); - compare_cache("empty3", empty_chain); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - EXPECT_QUEUE_STATUS(0, QS_TIMER|QS_MOUSEMOVE|QS_POSTMESSAGE); - FLUSH_MESSAGES(msg); - compare_cache("empty4", empty_chain); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - - FLUSH_MESSAGES(msg); - compare_cache("empty5", empty_chain); + EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER); + FLUSH_MESSAGES(msg); + COMPARE_CACHE(mousemove2_chain); + EXPECT_TME_FLAGS(hWnd2, 0); + COMPARE_CACHE(empty_chain); + TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); + TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); + TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); + TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); + EXPECT_QUEUE_STATUS(0, QS_TIMER|QS_MOUSEMOVE); + FLUSH_MESSAGES(msg); + COMPARE_CACHE(empty_chain); + EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); + + FLUSH_MESSAGES(msg); + COMPARE_CACHE(empty_chain); /* the mouse moves from hwnd2 to the intersection of hwnd2 and hwnd3 */ SetCursorPos(300,300); - EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER|QS_POSTMESSAGE); - FLUSH_MESSAGES(msg); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - compare_cache("mousemove2", mousemove2_chain); - - FLUSH_MESSAGES(msg); - compare_cache("empty6", empty_chain); + EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER); + FLUSH_MESSAGES(msg); + EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); + COMPARE_CACHE(mousemove2_chain); + + FLUSH_MESSAGES(msg); + COMPARE_CACHE(empty_chain); /* the mouse moves from hwnd2 to hwnd3 */ SetCursorPos(400,400); - EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER|QS_POSTMESSAGE); - FLUSH_MESSAGES(msg); - EXPECT_TME_FLAGS(hWnd2, 0); - compare_cache("mousemove2to3", mouseleave2to3_chain); - - FLUSH_MESSAGES(msg); - compare_cache("empty7", empty_chain); + EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER); + FLUSH_MESSAGES(msg); + EXPECT_TME_FLAGS(hWnd2, 0); + COMPARE_CACHE(mouseleave2to3_chain); + + FLUSH_MESSAGES(msg); + COMPARE_CACHE(empty_chain); } START_TEST(TrackMouseEvent) Added: trunk/rostests/apitests/user32/helper.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/helper.c?…
============================================================================== --- trunk/rostests/apitests/user32/helper.c (added) +++ trunk/rostests/apitests/user32/helper.c [iso-8859-1] Fri Sep 23 12:05:40 2011 @@ -1,0 +1,169 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: helper functions + * PROGRAMMERS: Giannis Adamopoulos + */ + +#include <stdio.h> +#include <wine/test.h> +#include <windows.h> +#include "helper.h" + +MSG_ENTRY message_cache[100]; +static int message_cache_size = 0; + +static char* get_msg_name(UINT msg) +{ + switch(msg) + { + case WM_NCACTIVATE: return "WM_NCACTIVATE"; + case WM_ACTIVATE: return "WM_ACTIVATE"; + case WM_ACTIVATEAPP: return "WM_ACTIVATEAPP"; + case WM_WINDOWPOSCHANGING: return "WM_WINDOWPOSCHANGING"; + case WM_WINDOWPOSCHANGED: return "WM_WINDOWPOSCHANGED"; + case WM_SETFOCUS: return "WM_SETFOCUS"; + case WM_KILLFOCUS: return "WM_KILLFOCUS"; + case WM_NCPAINT: return "WM_NCPAINT"; + case WM_PAINT: return "WM_PAINT"; + case WM_ERASEBKGND: return "WM_ERASEBKGND"; + case WM_SIZE: return "WM_SIZE"; + case WM_MOVE: return "WM_MOVE"; + case WM_SHOWWINDOW: return "WM_SHOWWINDOW"; + case WM_QUERYNEWPALETTE: return "WM_QUERYNEWPALETTE"; + case WM_MOUSELEAVE: return "WM_MOUSELEAVE"; + case WM_MOUSEHOVER: return "WM_MOUSEHOVER"; + case WM_NCMOUSELEAVE: return "WM_NCMOUSELEAVE"; + case WM_NCMOUSEHOVER: return "WM_NCMOUSEHOVER"; + case WM_NCHITTEST: return "WM_NCHITTEST"; + case WM_SETCURSOR: return "WM_SETCURSOR"; + case WM_MOUSEMOVE: return "WM_MOUSEMOVE"; + default: return NULL; + } +} + +void empty_message_cache() +{ + memset(message_cache, 0, sizeof(message_cache)); + message_cache_size = 0; +} + +void trace_cache(const char* file, int line) +{ + int i; + char *szMsgName; + + for (i=0; i < message_cache_size; i++) + { + if(!message_cache[i].hook) + { + if((szMsgName = get_msg_name(message_cache[i].msg))) + { + trace_(file,line)("hwnd%d, msg:%s\n",message_cache[i].iwnd, szMsgName ); + } + else + { + trace_(file,line)("hwnd%d, msg:%d\n",message_cache[i].iwnd, message_cache[i].msg ); + } + } + else + { + trace_(file,line)("hwnd%d, hook:%d, param1:%d, param2:%d\n",message_cache[i].iwnd, + message_cache[i].msg, + message_cache[i].param1, + message_cache[i].param2); + } + } + trace("\n"); +} + +void compare_cache(const char* file, int line, MSG_ENTRY *msg_chain) +{ + int i = 0; + BOOL got_error = FALSE; + + while(1) + { + char *szMsgExpected, *szMsgGot; + BOOL same = !memcmp(&message_cache[i],msg_chain, sizeof(MSG_ENTRY)); + + szMsgExpected = get_msg_name(msg_chain->msg); + szMsgGot = get_msg_name(message_cache[i].msg); + if(!msg_chain->hook) + { + if(szMsgExpected && szMsgGot) + { + ok_(file,line)(same, + "message %d: expected %s to hwnd%d and got %s to hwnd%d\n", + i, szMsgExpected, msg_chain->iwnd, szMsgGot, message_cache[i].iwnd); + } + else + { + ok_(file,line)(same, + "message %d: expected msg %d to hwnd%d and got msg %d to hwnd%d\n", + i, msg_chain->msg, msg_chain->iwnd, message_cache[i].msg, message_cache[i].iwnd); + } + } + else + { + ok_(file,line)(same, + "message %d: expected hook %d, hwnd%d, param1 %d, param2 %d and got hook %d, hwnd%d, param1 %d, param2 %d\n", + i, msg_chain->msg, msg_chain->iwnd,msg_chain->param1, msg_chain->param2, + message_cache[i].msg, message_cache[i].iwnd, message_cache[i].param1, message_cache[i].param2); + } + + if(!got_error && !same) + { + got_error = TRUE; + } + + if(msg_chain->msg !=0 && msg_chain->iwnd != 0) + { + msg_chain++; + } + else + { + if(i>message_cache_size) + { + break; + } + } + i++; + } + + if(got_error ) + { + trace_(file,line)("The complete list of messages got is:\n"); + trace_cache(file,line); + } + + empty_message_cache(); +} + +void record_message(int iwnd, UINT message, BOOL hook, int param1,int param2) +{ + if(message_cache_size>=100) + { + return; + } + + message_cache[message_cache_size].iwnd = iwnd; + message_cache[message_cache_size].msg = message; + message_cache[message_cache_size].hook = hook; + message_cache[message_cache_size].param1 = param1; + message_cache[message_cache_size].param2 = param2; + message_cache_size++; +} + +ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName) +{ + WNDCLASSEXW wcex; + + memset(&wcex, 0, sizeof(wcex)); + wcex.cbSize = sizeof(WNDCLASSEX); + wcex.lpfnWndProc = lpfnWndProc; + wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcex.lpszClassName = lpszClassName; + return RegisterClassExW(&wcex); +} Propchange: trunk/rostests/apitests/user32/helper.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/apitests/user32/helper.h URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/helper.h?…
============================================================================== --- trunk/rostests/apitests/user32/helper.h (added) +++ trunk/rostests/apitests/user32/helper.h [iso-8859-1] Fri Sep 23 12:05:40 2011 @@ -1,0 +1,31 @@ + + +typedef struct _MSG_ENTRY +{ + int iwnd; + UINT msg; + BOOL hook; + int param1; + int param2; +} MSG_ENTRY; + +void record_message(int iwnd, UINT message, BOOL hook, int param1,int param2); +void compare_cache(const char* file, int line, MSG_ENTRY *msg_chain); +void trace_cache(const char* file, int line); +void empty_message_cache(); +ATOM RegisterSimpleClass(WNDPROC lpfnWndProc, LPCWSTR lpszClassName); + +#define COMPARE_CACHE(...) compare_cache(__FILE__, __LINE__, ##__VA_ARGS__) +#define TRACE_CACHE() trace_cache(__FILE__, __LINE__) + +#define FLUSH_MESSAGES(msg) while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); +#define EXPECT_NEXT(hWnd1, hWnd2) ok(GetWindow(hWnd1,GW_HWNDNEXT) == hWnd2, "Expected %p after %p, not %p\n",hWnd2,hWnd1,GetWindow(hWnd1,GW_HWNDNEXT) ) +#define EXPECT_ACTIVE(hwnd) ok(GetActiveWindow() == hwnd, "Expected %p to be the active window, not %p\n",hwnd,GetActiveWindow()) + +#define EXPECT_QUEUE_STATUS(expected, notexpected) \ + { \ + DWORD status = HIWORD(GetQueueStatus(QS_ALLEVENTS)); \ + ok(((status) & (expected))== (expected),"wrong queue status. expected %li, and got %li\n", (DWORD)(expected), status); \ + if(notexpected) \ + ok((status & (notexpected))!=(notexpected), "wrong queue status. got non expected %li\n", (DWORD)(notexpected)); \ + } Propchange: trunk/rostests/apitests/user32/helper.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/user32/user32_apitest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/user32_ap…
============================================================================== --- trunk/rostests/apitests/user32/user32_apitest.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/user32_apitest.rbuild [iso-8859-1] Fri Sep 23 12:05:40 2011 @@ -10,6 +10,7 @@ <file>testlist.c</file> <file>user32_apitest.rc</file> + <file>helper.c</file> <file>GetKeyState.c</file> <file>InitializeLpkHooks.c</file> <file>RealGetWindowClass.c</file>
13 years, 1 month
1
0
0
0
[gadamopoulos] 53811: [user32_apitest] - Fix white spaces
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Fri Sep 23 11:45:44 2011 New Revision: 53811 URL:
http://svn.reactos.org/svn/reactos?rev=53811&view=rev
Log: [user32_apitest] - Fix white spaces Modified: trunk/rostests/apitests/user32/SetCursorPos.c trunk/rostests/apitests/user32/TrackMouseEvent.c Modified: trunk/rostests/apitests/user32/SetCursorPos.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/SetCursor…
============================================================================== --- trunk/rostests/apitests/user32/SetCursorPos.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/SetCursorPos.c [iso-8859-1] Fri Sep 23 11:45:44 2011 @@ -59,7 +59,7 @@ WNDCLASSA wclass; HANDLE hInstance = GetModuleHandleA( NULL ); HWND hWndTest; - + wclass.lpszClassName = "MouseInputTestClass"; wclass.style = CS_HREDRAW | CS_VREDRAW; wclass.lpfnWndProc = WndProc; @@ -154,8 +154,8 @@ SetCapture(NULL); DestroyWindow(hwnd); - UnhookWindowsHookEx (hMouseHook); - UnhookWindowsHookEx (hMouseHookLL); + UnhookWindowsHookEx (hMouseHook); + UnhookWindowsHookEx (hMouseHookLL); } Modified: trunk/rostests/apitests/user32/TrackMouseEvent.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/TrackMous…
============================================================================== --- trunk/rostests/apitests/user32/TrackMouseEvent.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/TrackMouseEvent.c [iso-8859-1] Fri Sep 23 11:45:44 2011 @@ -40,13 +40,13 @@ case WM_MOVE: return "WM_MOVE"; case WM_SHOWWINDOW: return "WM_SHOWWINDOW"; case WM_QUERYNEWPALETTE: return "WM_QUERYNEWPALETTE"; - case WM_MOUSELEAVE: return "WM_MOUSELEAVE"; - case WM_MOUSEHOVER: return "WM_MOUSEHOVER"; - case WM_NCMOUSELEAVE: return "WM_NCMOUSELEAVE"; - case WM_NCMOUSEHOVER: return "WM_NCMOUSEHOVER"; - case WM_NCHITTEST: return "WM_NCHITTEST"; - case WM_SETCURSOR: return "WM_SETCURSOR"; - case WM_MOUSEMOVE: return "WM_MOUSEMOVE"; + case WM_MOUSELEAVE: return "WM_MOUSELEAVE"; + case WM_MOUSEHOVER: return "WM_MOUSEHOVER"; + case WM_NCMOUSELEAVE: return "WM_NCMOUSELEAVE"; + case WM_NCMOUSEHOVER: return "WM_NCMOUSEHOVER"; + case WM_NCHITTEST: return "WM_NCHITTEST"; + case WM_SETCURSOR: return "WM_SETCURSOR"; + case WM_MOUSEMOVE: return "WM_MOUSEMOVE"; default: return NULL; } } @@ -73,7 +73,7 @@ trace("hwnd%d, msg:%d\n",message_cache[i].iwnd, message_cache[i].msg ); } } - trace("\n"); + trace("\n"); } #endif @@ -114,8 +114,8 @@ } i++; } - - empty_message_cache(); + + empty_message_cache(); } static void record_message(int iwnd, UINT message) @@ -147,18 +147,18 @@ else return DefWindowProc(hWnd, message, wParam, lParam); - record_message(iwnd, message); - } - } - - if(message == WM_PAINT) - { - PAINTSTRUCT ps; - BeginPaint(hWnd, &ps); + record_message(iwnd, message); + } + } + + if(message == WM_PAINT) + { + PAINTSTRUCT ps; + BeginPaint(hWnd, &ps); Rectangle(ps.hdc, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom); - EndPaint(hWnd, &ps); - } - + EndPaint(hWnd, &ps); + } + return DefWindowProc(hWnd, message, wParam, lParam); } @@ -194,159 +194,155 @@ UpdateWindow(hWnd2); ShowWindow(hWnd3, SW_SHOWNORMAL); UpdateWindow(hWnd3); - //SetWindowPos (hWnd3, HWND_TOP, 0,0,0,0, SWP_NOMOVE|SWP_NOREDRAW); -} - + //SetWindowPos (hWnd3, HWND_TOP, 0,0,0,0, SWP_NOMOVE|SWP_NOREDRAW); +} + static void TmeStartTracking(HWND hwnd, DWORD Flags) { TRACKMOUSEEVENT tme; - tme.cbSize = sizeof(tme); + tme.cbSize = sizeof(tme); tme.dwFlags = Flags; - tme.hwndTrack = hwnd; - tme.dwHoverTime = 1; - if(!TrackMouseEvent(&tme)) - { - trace("failed!\n"); - } + tme.hwndTrack = hwnd; + tme.dwHoverTime = 1; + if(!TrackMouseEvent(&tme)) + { + trace("failed!\n"); + } } DWORD TmeQuery(HWND hwnd) { TRACKMOUSEEVENT tme; - tme.cbSize = sizeof(tme); - tme.dwFlags = TME_QUERY|TME_HOVER|TME_LEAVE; - tme.hwndTrack = hwnd; - TrackMouseEvent(&tme); - return tme.dwFlags; + tme.cbSize = sizeof(tme); + tme.dwFlags = TME_QUERY|TME_HOVER|TME_LEAVE; + tme.hwndTrack = hwnd; + TrackMouseEvent(&tme); + return tme.dwFlags; } #define FLUSH_MESSAGES(msg) while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessageA( &msg ); #define EXPECT_TME_FLAGS(hWnd, expected) \ { DWORD flags = TmeQuery(hWnd); \ - ok(flags == (expected),"wrong tme flags. expected %li, and got %li\n", (DWORD)(expected), flags); \ - } - -#define EXPECT_QUEUE_STATUS(expected, notexpected) \ - { \ - DWORD status = HIWORD(GetQueueStatus(QS_ALLEVENTS)); \ - ok(((status) & (expected))== (expected),"wrong queue status. expected %li, and got %li\n", (DWORD)(expected), status); \ - if(notexpected) \ - ok((status & (notexpected))!=(notexpected), "wrong queue status. got non expected %li\n", (DWORD)(notexpected)); \ - } - + ok(flags == (expected),"wrong tme flags. expected %li, and got %li\n", (DWORD)(expected), flags); \ + } + +#define EXPECT_QUEUE_STATUS(expected, notexpected) \ + { \ + DWORD status = HIWORD(GetQueueStatus(QS_ALLEVENTS)); \ + ok(((status) & (expected))== (expected),"wrong queue status. expected %li, and got %li\n", (DWORD)(expected), status); \ + if(notexpected) \ + ok((status & (notexpected))!=(notexpected), "wrong queue status. got non expected %li\n", (DWORD)(notexpected)); \ + } + MSG_ENTRY empty_chain[]= {{0,0}}; /* the mouse moves over hwnd2 */ MSG_ENTRY mousemove2_chain[]={{2, WM_NCHITTEST}, {2, WM_SETCURSOR}, - {1, WM_SETCURSOR}, - {2, WM_MOUSEMOVE}, - {0,0}}; + {1, WM_SETCURSOR}, + {2, WM_MOUSEMOVE}, + {0,0}}; /* the mouse hovers hwnd2 */ MSG_ENTRY mousehover2_chain[]={{2, WM_NCHITTEST}, {2, WM_SETCURSOR}, - {1, WM_SETCURSOR}, - {2, WM_MOUSEMOVE}, - {2, WM_MOUSEHOVER}, - {0,0}}; + {1, WM_SETCURSOR}, + {2, WM_MOUSEMOVE}, + {2, WM_MOUSEHOVER}, + {0,0}}; /* the mouse leaves hwnd2 and moves to hwnd1 */ MSG_ENTRY mouseleave2to1_chain[]={{1, WM_NCHITTEST}, {1, WM_SETCURSOR}, - {1, WM_MOUSEMOVE}, - {2, WM_MOUSELEAVE}, - {0,0}}; + {1, WM_MOUSEMOVE}, + {2, WM_MOUSELEAVE}, + {0,0}}; /* the mouse leaves hwnd2 and moves to hwnd3 */ MSG_ENTRY mouseleave2to3_chain[]={{3, WM_NCHITTEST}, {3, WM_SETCURSOR}, {1, WM_SETCURSOR}, - {3, WM_MOUSEMOVE}, - {2, WM_MOUSELEAVE}, - {0,0}}; + {3, WM_MOUSEMOVE}, + {2, WM_MOUSELEAVE}, + {0,0}}; void Test_TrackMouseEvent() { MSG msg; - - SetCursorPos(0,0); + + SetCursorPos(0,0); create_test_windows(); - FLUSH_MESSAGES(msg); - empty_message_cache(); + FLUSH_MESSAGES(msg); + empty_message_cache(); /* the mouse moves over hwnd2 */ - SetCursorPos(220,220); - FLUSH_MESSAGES(msg); - compare_cache("mousemove2", mousemove2_chain); - EXPECT_TME_FLAGS(hWnd2, 0); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - FLUSH_MESSAGES(msg); - compare_cache("empty1", empty_chain); - + SetCursorPos(220,220); + FLUSH_MESSAGES(msg); + compare_cache("mousemove2", mousemove2_chain); + EXPECT_TME_FLAGS(hWnd2, 0); + TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); + EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); + FLUSH_MESSAGES(msg); + compare_cache("empty1", empty_chain); + /* the mouse hovers hwnd2 */ - SetCursorPos(221,221); - Sleep(100); - EXPECT_QUEUE_STATUS(QS_TIMER|QS_MOUSEMOVE, QS_POSTMESSAGE); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - FLUSH_MESSAGES(msg); - EXPECT_TME_FLAGS(hWnd2, TME_LEAVE); - compare_cache("mousehover2", mousehover2_chain); - - /* the mouse leaves hwnd2 and moves to hwnd1 */ - SetCursorPos(150,150); - EXPECT_QUEUE_STATUS(QS_MOUSEMOVE,QS_TIMER|QS_POSTMESSAGE ); - EXPECT_TME_FLAGS(hWnd2, TME_LEAVE); - FLUSH_MESSAGES(msg); - EXPECT_TME_FLAGS(hWnd2, 0); - compare_cache("mouseleave2to1", mouseleave2to1_chain); - - FLUSH_MESSAGES(msg); - compare_cache("empty2", empty_chain); - + SetCursorPos(221,221); + Sleep(100); + EXPECT_QUEUE_STATUS(QS_TIMER|QS_MOUSEMOVE, QS_POSTMESSAGE); + EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); + FLUSH_MESSAGES(msg); + EXPECT_TME_FLAGS(hWnd2, TME_LEAVE); + compare_cache("mousehover2", mousehover2_chain); + + /* the mouse leaves hwnd2 and moves to hwnd1 */ + SetCursorPos(150,150); + EXPECT_QUEUE_STATUS(QS_MOUSEMOVE,QS_TIMER|QS_POSTMESSAGE ); + EXPECT_TME_FLAGS(hWnd2, TME_LEAVE); + FLUSH_MESSAGES(msg); + EXPECT_TME_FLAGS(hWnd2, 0); + compare_cache("mouseleave2to1", mouseleave2to1_chain); + + FLUSH_MESSAGES(msg); + compare_cache("empty2", empty_chain); + /* the mouse moves over hwnd2 */ - SetCursorPos(220,220); - EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER|QS_POSTMESSAGE); - FLUSH_MESSAGES(msg); - compare_cache("mousemove2", mousemove2_chain); - EXPECT_TME_FLAGS(hWnd2, 0); - compare_cache("empty3", empty_chain); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); - EXPECT_QUEUE_STATUS(0, QS_TIMER|QS_MOUSEMOVE|QS_POSTMESSAGE); - FLUSH_MESSAGES(msg); - compare_cache("empty4", empty_chain); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - - FLUSH_MESSAGES(msg); - compare_cache("empty5", empty_chain); - + SetCursorPos(220,220); + EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER|QS_POSTMESSAGE); + FLUSH_MESSAGES(msg); + compare_cache("mousemove2", mousemove2_chain); + EXPECT_TME_FLAGS(hWnd2, 0); + compare_cache("empty3", empty_chain); + TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); + TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); + TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); + TmeStartTracking(hWnd2, TME_HOVER|TME_LEAVE); + EXPECT_QUEUE_STATUS(0, QS_TIMER|QS_MOUSEMOVE|QS_POSTMESSAGE); + FLUSH_MESSAGES(msg); + compare_cache("empty4", empty_chain); + EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); + + FLUSH_MESSAGES(msg); + compare_cache("empty5", empty_chain); + /* the mouse moves from hwnd2 to the intersection of hwnd2 and hwnd3 */ - SetCursorPos(300,300); - EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER|QS_POSTMESSAGE); - FLUSH_MESSAGES(msg); - EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); - compare_cache("mousemove2", mousemove2_chain); - - FLUSH_MESSAGES(msg); - compare_cache("empty6", empty_chain); - - /* the mouse moves from hwnd2 to hwnd3 */ - SetCursorPos(400,400); - EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER|QS_POSTMESSAGE); - FLUSH_MESSAGES(msg); - EXPECT_TME_FLAGS(hWnd2, 0); - compare_cache("mousemove2to3", mouseleave2to3_chain); - - FLUSH_MESSAGES(msg); - compare_cache("empty7", empty_chain); - - //trace_cache(); - - //Sleep(2000); + SetCursorPos(300,300); + EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER|QS_POSTMESSAGE); + FLUSH_MESSAGES(msg); + EXPECT_TME_FLAGS(hWnd2, TME_HOVER|TME_LEAVE); + compare_cache("mousemove2", mousemove2_chain); + + FLUSH_MESSAGES(msg); + compare_cache("empty6", empty_chain); + + /* the mouse moves from hwnd2 to hwnd3 */ + SetCursorPos(400,400); + EXPECT_QUEUE_STATUS(QS_MOUSEMOVE, QS_TIMER|QS_POSTMESSAGE); + FLUSH_MESSAGES(msg); + EXPECT_TME_FLAGS(hWnd2, 0); + compare_cache("mousemove2to3", mouseleave2to3_chain); + + FLUSH_MESSAGES(msg); + compare_cache("empty7", empty_chain); } START_TEST(TrackMouseEvent)
13 years, 1 month
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
40
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
Results per page:
10
25
50
100
200