ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2015
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
15 participants
301 discussions
Start a n
N
ew thread
[gadamopoulos] 68885: [SHELL32] - Rename SHELL32_BindToChild to SHELL32_BindToFS. Do not let it be used for guid items any more. Split SHELL32_GetCLSIDForDirectoryout of it and call it only when ne...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Mon Aug 31 23:44:02 2015 New Revision: 68885 URL:
http://svn.reactos.org/svn/reactos?rev=68885&view=rev
Log: [SHELL32] - Rename SHELL32_BindToChild to SHELL32_BindToFS. Do not let it be used for guid items any more. Split SHELL32_GetCLSIDForDirectoryout of it and call it only when needed. - Fix callers to use SHELL32_BindToGuidItem for guid items. - Fix a bug in CFSFolder which marked folder items as files when a binding context was used. Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp trunk/reactos/dll/win32/shell32/shfldr.h trunk/reactos/dll/win32/shell32/shlfolder.cpp Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] Mon Aug 31 23:44:02 2015 @@ -446,7 +446,10 @@ TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", this, pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut); - return SHELL32_BindToChild( pidlRoot, sPathTarget, pidl, riid, ppvOut ); + if (_ILIsSpecialFolder(pidl)) + return SHELL32_BindToGuidItem(pidlRoot, pidl, pbcReserved, riid, ppvOut); + + return SHELL32_BindToFS( pidlRoot, sPathTarget, pidl, riid, ppvOut ); } /************************************************************************** Modified: trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] Mon Aug 31 23:44:02 2015 @@ -272,7 +272,7 @@ if (_ILIsSpecialFolder(pidl)) return SHELL32_BindToGuidItem(pidlRoot, pidl, pbcReserved, riid, ppvOut); - return SHELL32_BindToChild(pidlRoot, NULL, pidl, riid, ppvOut); + return SHELL32_BindToFS(pidlRoot, NULL, pidl, riid, ppvOut); } /************************************************************************** Modified: trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] Mon Aug 31 23:44:02 2015 @@ -207,6 +207,13 @@ pidlTemp = SHELL32_CreatePidlFromBindCtx(pbc, szElement); if (pidlTemp != NULL) { + /* We are creating an id list without ensuring that the items exist. + If we have a remaining path, this must be a folder. + We have to do it now because it is set as a file by default */ + if (szNext) + { + pidlTemp->mkid.abID[0] = PT_FOLDER; + } hr = S_OK; } else @@ -280,7 +287,7 @@ TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", this, pidl, pbc, shdebugstr_guid(&riid), ppvOut); - return SHELL32_BindToChild(pidlRoot, sPathTarget, pidl, riid, ppvOut); + return SHELL32_BindToFS(pidlRoot, sPathTarget, pidl, riid, ppvOut); } /************************************************************************** Modified: trunk/reactos/dll/win32/shell32/shfldr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr.h…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr.h [iso-8859-1] Mon Aug 31 23:44:02 2015 @@ -41,7 +41,7 @@ LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes); HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); -HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, +HRESULT SHELL32_BindToFS (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut); HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); Modified: trunk/reactos/dll/win32/shell32/shlfolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlfolde…
============================================================================== --- trunk/reactos/dll/win32/shell32/shlfolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlfolder.cpp [iso-8859-1] Mon Aug 31 23:44:02 2015 @@ -149,7 +149,7 @@ * In this case the absolute path is built from pidlChild (eg. C:) */ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot, - LPCITEMIDLIST pidlChild, REFCLSID clsid, LPVOID * ppvOut) + LPCITEMIDLIST pidlChild, REFCLSID clsid, IShellFolder** ppsfOut) { HRESULT hr; CComPtr<IShellFolder> pShellFolder; @@ -163,8 +163,7 @@ CComPtr<IPersistFolder> ppf; CComPtr<IPersistFolder3> ppf3; - if ((_ILIsFolder(pidlChild) || _ILIsDrive(pidlChild)) && - SUCCEEDED(pShellFolder->QueryInterface(IID_PPV_ARG(IPersistFolder3, &ppf3)))) + if (SUCCEEDED(pShellFolder->QueryInterface(IID_PPV_ARG(IPersistFolder3, &ppf3)))) { PERSIST_FOLDER_TARGET_INFO ppfti; @@ -198,15 +197,35 @@ ILFree (pidlAbsolute); } - *ppvOut = pShellFolder.Detach(); - - TRACE ("-- (%p) ret=0x%08x\n", *ppvOut, hr); + *ppsfOut = pShellFolder.Detach(); + + TRACE ("-- (%p) ret=0x%08x\n", *ppsfOut, hr); return hr; } +void SHELL32_GetCLSIDForDirectory(LPCWSTR pathRoot, LPCITEMIDLIST pidl, CLSID* pclsidFolder) +{ + static const WCHAR wszDotShellClassInfo[] = { + '.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0 }; + static const WCHAR wszCLSID[] = {'C','L','S','I','D',0}; + WCHAR wszCLSIDValue[CHARS_IN_GUID], wszFolderPath[MAX_PATH], *pwszPathTail = wszFolderPath; + + /* see if folder CLSID should be overridden by desktop.ini file */ + if (pathRoot) { + lstrcpynW(wszFolderPath, pathRoot, MAX_PATH); + pwszPathTail = PathAddBackslashW(wszFolderPath); + } + + _ILSimpleGetTextW(pidl,pwszPathTail,MAX_PATH - (int)(pwszPathTail - wszFolderPath)); + + if (SHELL32_GetCustomFolderAttributeFromPath (wszFolderPath, + wszDotShellClassInfo, wszCLSID, wszCLSIDValue, CHARS_IN_GUID)) + CLSIDFromString (wszCLSIDValue, pclsidFolder); +} + /*********************************************************************** - * SHELL32_BindToChild [Internal] + * SHELL32_BindToFS [Internal] * * Common code for IShellFolder_BindToObject. * @@ -222,49 +241,40 @@ * This function makes special assumptions on the shell namespace, which * means you probably can't use it for your IShellFolder implementation. */ -HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, +HRESULT SHELL32_BindToFS (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut) { - static const WCHAR wszDotShellClassInfo[] = { - '.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0 }; - - GUID const *clsid; CComPtr<IShellFolder> pSF; HRESULT hr; - LPITEMIDLIST pidlChild; + LPCITEMIDLIST pidlChild; if (!pidlRoot || !ppvOut || !pidlComplete || !pidlComplete->mkid.cb) return E_INVALIDARG; + if (_ILIsValue(pidlComplete)) + { + ERR("Binding to file is unimplemented\n"); + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + } + if (!_ILIsFolder(pidlComplete) && !_ILIsDrive(pidlComplete)) + { + ERR("Got an unknown type of pidl!\n"); + return E_FAIL; + } + *ppvOut = NULL; - pidlChild = ILCloneFirst (pidlComplete); - - if ((clsid = _ILGetGUIDPointer (pidlChild))) { - /* virtual folder */ - hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, *clsid, (LPVOID *)&pSF); - } else { - /* file system folder */ - CLSID clsidFolder = CLSID_ShellFSFolder; - static const WCHAR wszCLSID[] = {'C','L','S','I','D',0}; - WCHAR wszCLSIDValue[CHARS_IN_GUID], wszFolderPath[MAX_PATH], *pwszPathTail = wszFolderPath; - - /* see if folder CLSID should be overridden by desktop.ini file */ - if (pathRoot) { - lstrcpynW(wszFolderPath, pathRoot, MAX_PATH); - pwszPathTail = PathAddBackslashW(wszFolderPath); - } - - _ILSimpleGetTextW(pidlChild,pwszPathTail,MAX_PATH - (int)(pwszPathTail - wszFolderPath)); - - if (SHELL32_GetCustomFolderAttributeFromPath (wszFolderPath, - wszDotShellClassInfo, wszCLSID, wszCLSIDValue, CHARS_IN_GUID)) - CLSIDFromString (wszCLSIDValue, &clsidFolder); - - hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, - clsidFolder, (LPVOID *)&pSF); - } - ILFree (pidlChild); + pidlChild = (_ILIsPidlSimple (pidlComplete)) ? pidlComplete : ILCloneFirst (pidlComplete); + + CLSID clsidFolder = CLSID_ShellFSFolder; + DWORD attributes = _ILGetFileAttributes(ILFindLastID(pidlChild), NULL, 0); + if ((attributes & (FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_READONLY)) != 0) + SHELL32_GetCLSIDForDirectory(pathRoot, pidlChild, &clsidFolder); + + hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, clsidFolder, &pSF); + + if (pidlChild != pidlComplete) + ILFree ((LPITEMIDLIST)pidlChild); if (SUCCEEDED (hr)) { if (_ILIsPidlSimple (pidlComplete)) { @@ -290,27 +300,41 @@ CComPtr<IPersistFolder> pFolder; HRESULT hr; + if (!pidlRoot || !ppvOut || !pidl || !pidl->mkid.cb) + return E_INVALIDARG; + + *ppvOut = NULL; + GUID *pGUID = _ILGetGUIDPointer(pidl); if (!pGUID) { ERR("SHELL32_BindToGuidItem called for non guid item!\n"); - return E_FAIL; + return E_INVALIDARG; } hr = SHCoCreateInstance(NULL, pGUID, NULL, IID_PPV_ARG(IPersistFolder, &pFolder)); if (FAILED(hr)) return hr; - hr = pFolder->Initialize(ILCombine(pidlRoot, pidl)); - if (FAILED(hr)) - return hr; - if (_ILIsPidlSimple (pidl)) { + hr = pFolder->Initialize(ILCombine(pidlRoot, pidl)); + if (FAILED(hr)) + return hr; + return pFolder->QueryInterface(riid, ppvOut); } else { + LPITEMIDLIST pidlChild = ILCloneFirst (pidl); + if (!pidlChild) + return E_OUTOFMEMORY; + + hr = pFolder->Initialize(ILCombine(pidlRoot, pidlChild)); + ILFree(pidlChild); + if (FAILED(hr)) + return hr; + CComPtr<IShellFolder> psf; hr = pFolder->QueryInterface(IID_PPV_ARG(IShellFolder, &psf)); if (FAILED(hr))
9 years, 3 months
1
0
0
0
[gadamopoulos] 68884: [SHELL32] - All shell folders must have the IPersistFolder. Hence their Initialize method is supposed to succeed for them to actually work.
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Mon Aug 31 23:12:03 2015 New Revision: 68884 URL:
http://svn.reactos.org/svn/reactos?rev=68884&view=rev
Log: [SHELL32] - All shell folders must have the IPersistFolder. Hence their Initialize method is supposed to succeed for them to actually work. Modified: trunk/reactos/dll/win32/shell32/folders/CMyDocsFolder.cpp trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp Modified: trunk/reactos/dll/win32/shell32/folders/CMyDocsFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CMyDocsFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CMyDocsFolder.cpp [iso-8859-1] Mon Aug 31 23:12:03 2015 @@ -256,7 +256,7 @@ { TRACE ("(%p)->(%p)\n", this, pidl); - return E_NOTIMPL; + return S_OK; } HRESULT WINAPI CMyDocsFolder::GetCurFolder(LPITEMIDLIST *pidl) Modified: trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp [iso-8859-1] Mon Aug 31 23:12:03 2015 @@ -494,7 +494,7 @@ { TRACE("(%p)->(%p)\n", this, pidl); - return E_NOTIMPL; + return S_OK; } /**************************************************************************
9 years, 3 months
1
0
0
0
[akhaldi] 68883: [VSSAPI] Import from Wine Staging 1.7.47. Thanks to Thomas Faber for his help. [PSDK] Import vss.idl and vswriter.h from Wine Staging 1.7.47. CORE-9924 CORE-9965
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Aug 31 19:34:37 2015 New Revision: 68883 URL:
http://svn.reactos.org/svn/reactos?rev=68883&view=rev
Log: [VSSAPI] Import from Wine Staging 1.7.47. Thanks to Thomas Faber for his help. [PSDK] Import vss.idl and vswriter.h from Wine Staging 1.7.47. CORE-9924 CORE-9965 Added: trunk/reactos/dll/win32/vssapi/ (with props) trunk/reactos/dll/win32/vssapi/CMakeLists.txt (with props) trunk/reactos/dll/win32/vssapi/main.c (with props) trunk/reactos/dll/win32/vssapi/msvc.s (with props) trunk/reactos/dll/win32/vssapi/vssapi.spec (with props) trunk/reactos/include/psdk/vss.idl (with props) trunk/reactos/include/psdk/vswriter.h (with props) Modified: trunk/reactos/dll/win32/CMakeLists.txt trunk/reactos/include/psdk/CMakeLists.txt trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/CMakeLists.txt?r…
============================================================================== --- trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] Mon Aug 31 19:34:37 2015 @@ -218,6 +218,7 @@ add_subdirectory(uxtheme) add_subdirectory(vbscript) add_subdirectory(version) +add_subdirectory(vssapi) add_subdirectory(wbemdisp) add_subdirectory(wbemprox) if(ARCH STREQUAL "i386") Propchange: trunk/reactos/dll/win32/vssapi/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Mon Aug 31 19:34:37 2015 @@ -0,0 +1 @@ +((CORE|ROSTESTS|ROSAPPS)-\d+)(,? ?((CORE|ROSTESTS|ROSAPPS)-\d+))*(,? ?(and |or )?((CORE|ROSTESTS|ROSAPPS)-\d+))? Propchange: trunk/reactos/dll/win32/vssapi/ ------------------------------------------------------------------------------ bugtraq:message = See issue %BUGID% for more details. Propchange: trunk/reactos/dll/win32/vssapi/ ------------------------------------------------------------------------------ bugtraq:url =
https://jira.reactos.org/browse/%BUGID%
Propchange: trunk/reactos/dll/win32/vssapi/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/reactos/dll/win32/vssapi/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vssapi/CMakeList…
============================================================================== --- trunk/reactos/dll/win32/vssapi/CMakeLists.txt (added) +++ trunk/reactos/dll/win32/vssapi/CMakeLists.txt [iso-8859-1] Mon Aug 31 19:34:37 2015 @@ -0,0 +1,19 @@ + +add_definitions(-D__WINESRC__) +include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine) +spec2def(vssapi.dll vssapi.spec) + +list(APPEND SOURCE + main.c + ${CMAKE_CURRENT_BINARY_DIR}/vssapi_stubs.c + ${CMAKE_CURRENT_BINARY_DIR}/vssapi.def) + +if(MSVC) + add_asm_files(vssapi_asm msvc.s) +endif() + +add_library(vssapi SHARED ${SOURCE} ${vssapi_asm}) +set_module_type(vssapi win32dll) +target_link_libraries(vssapi wine) +add_importlibs(vssapi msvcrt kernel32 ntdll) +add_cd_file(TARGET vssapi DESTINATION reactos/system32 FOR all) Propchange: trunk/reactos/dll/win32/vssapi/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/vssapi/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vssapi/main.c?re…
============================================================================== --- trunk/reactos/dll/win32/vssapi/main.c (added) +++ trunk/reactos/dll/win32/vssapi/main.c [iso-8859-1] Mon Aug 31 19:34:37 2015 @@ -0,0 +1,120 @@ +/* + * Copyright 2014 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 + */ + +#include "config.h" +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "vss.h" +#include "vswriter.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL( vssapi ); + +#ifdef __i386__ /* thiscall functions are i386-specific */ + +#define THISCALL(func) __thiscall_ ## func +#define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func) +#undef __thiscall +#define __thiscall __stdcall +#ifdef _MSC_VER +#define DEFINE_THISCALL_WRAPPER(func,args) \ + void __declspec(naked) __thiscall_ ##func(void) \ + { \ + __asm { pop eax } \ + __asm { push ecx } \ + __asm { push eax } \ + __asm { jmp func } \ + } +#else +#define DEFINE_THISCALL_WRAPPER(func,args) \ + extern void THISCALL(func)(void); \ + __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ + "popl %eax\n\t" \ + "pushl %ecx\n\t" \ + "pushl %eax\n\t" \ + "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) ) +#endif +#else /* __i386__ */ + +#define THISCALL(func) func +#define THISCALL_NAME(func) __ASM_NAME(#func) +#define __thiscall __cdecl +#define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */ + +#endif /* __i386__ */ + +struct CVssWriter +{ + void **vtable; +}; + +/****************************************************************** + * ??0CVssWriter@@QAE@XZ (VSSAPI.@) + */ +struct CVssWriter * __thiscall VSSAPI_CVssWriter_default_ctor( struct CVssWriter *writer ) +{ + FIXME( "%p\n", writer ); + writer->vtable = NULL; + return writer; +} +DEFINE_THISCALL_WRAPPER( VSSAPI_CVssWriter_default_ctor, 4 ) + +/****************************************************************** + * ??1CVssWriter@@UAE@XZ (VSSAPI.@) + */ +void __thiscall VSSAPI_CVssWriter_dtor( struct CVssWriter *writer ) +{ + FIXME( "%p\n", writer ); +} +DEFINE_THISCALL_WRAPPER( VSSAPI_CVssWriter_dtor, 4 ) + +/****************************************************************** + * ?Initialize@CVssWriter@@QAGJU_GUID@@PBGW4VSS_USAGE_TYPE@@W4VSS_SOURCE_TYPE@@W4_VSS_APPLICATION_LEVEL@@KW4VSS_ALTERNATE_WRITER_STATE@@_N@Z + */ +HRESULT __thiscall VSSAPI_CVssWriter_Initialize( struct CVssWriter *writer, VSS_ID id, + LPCWSTR name, VSS_USAGE_TYPE usage_type, VSS_SOURCE_TYPE source_type, + VSS_APPLICATION_LEVEL level, DWORD timeout, VSS_ALTERNATE_WRITER_STATE alt_writer_state, + BOOL throttle, LPCWSTR instance ) +{ + FIXME( "%p, %s, %s, %u, %u, %u, %u, %u, %d, %s\n", writer, debugstr_guid(&id), + debugstr_w(name), usage_type, source_type, level, timeout, alt_writer_state, + throttle, debugstr_w(instance) ); + return S_OK; +} +DEFINE_THISCALL_WRAPPER( VSSAPI_CVssWriter_Initialize, 52 ) + +/****************************************************************** + * ?Subscribe@CVssWriter@@QAGJK@Z + */ +HRESULT __thiscall VSSAPI_CVssWriter_Subscribe( struct CVssWriter *writer, DWORD flags ) +{ + FIXME( "%p, %x\n", writer, flags ); + return S_OK; +} +DEFINE_THISCALL_WRAPPER( VSSAPI_CVssWriter_Subscribe, 8 ) + +/****************************************************************** + * ?Unsubscribe@CVssWriter@@QAGJXZ + */ +HRESULT __thiscall VSSAPI_CVssWriter_Unsubscribe( struct CVssWriter *writer ) +{ + FIXME( "%p\n", writer ); + return S_OK; +} +DEFINE_THISCALL_WRAPPER( VSSAPI_CVssWriter_Unsubscribe, 4 ) Propchange: trunk/reactos/dll/win32/vssapi/main.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/vssapi/msvc.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vssapi/msvc.s?re…
============================================================================== --- trunk/reactos/dll/win32/vssapi/msvc.s (added) +++ trunk/reactos/dll/win32/vssapi/msvc.s [iso-8859-1] Mon Aug 31 19:34:37 2015 @@ -0,0 +1,23 @@ + +#include <asm.inc> + +.code +.align 4 + +MACRO(DEFINE_THISCALL_WRAPPER, cxxname, stdcallname) +EXTERN &stdcallname:PROC +PUBLIC &cxxname +&cxxname: + pop eax + push ecx + push eax + jmp &stdcallname +ENDM + +DEFINE_THISCALL_WRAPPER ??0CVssWriter@@QAE@XZ, _VSSAPI_CVssWriter_default_ctor@4 +DEFINE_THISCALL_WRAPPER ??1CVssWriter@@UAE@XZ, _VSSAPI_CVssWriter_dtor@4 +DEFINE_THISCALL_WRAPPER ?Initialize@CVssWriter@@QAGJU_GUID@@PBGW4VSS_USAGE_TYPE@@W4VSS_SOURCE_TYPE@@W4_VSS_APPLICATION_LEVEL@@KW4VSS_ALTERNATE_WRITER_STATE@@_N@Z, _VSSAPI_CVssWriter_Initialize@52 +DEFINE_THISCALL_WRAPPER ?Subscribe@CVssWriter@@QAGJK@Z, _VSSAPI_CVssWriter_Subscribe@8 +DEFINE_THISCALL_WRAPPER ?Unsubscribe@CVssWriter@@QAGJXZ, _VSSAPI_CVssWriter_Unsubscribe@4 + +END Propchange: trunk/reactos/dll/win32/vssapi/msvc.s ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/vssapi/vssapi.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vssapi/vssapi.sp…
============================================================================== --- trunk/reactos/dll/win32/vssapi/vssapi.spec (added) +++ trunk/reactos/dll/win32/vssapi/vssapi.spec [iso-8859-1] Mon Aug 31 19:34:37 2015 @@ -0,0 +1,84 @@ +@ stub IsVolumeSnapshotted +@ stub VssFreeSnapshotProperties +@ stub ShouldBlockRevert +@ stub ??0CVssJetWriter@@QAE@XZ +@ cdecl -arch=i386 ??0CVssWriter@@QAE@XZ(ptr) __thiscall_VSSAPI_CVssWriter_default_ctor +@ stub ??1CVssJetWriter@@UAE@XZ +@ cdecl -arch=i386 ??1CVssWriter@@UAE@XZ(ptr) __thiscall_VSSAPI_CVssWriter_dtor +@ stub ?AreComponentsSelected@CVssJetWriter@@IBG_NXZ +@ stub ?AreComponentsSelected@CVssWriter@@IBG_NXZ +@ stub ?CreateVssBackupComponents@@YGJPAPAVIVssBackupComponents@@@Z +@ stub ?CreateVssExamineWriterMetadata@@YGJPAGPAPAVIVssExamineWriterMetadata@@@Z +@ stub ?CreateVssSnapshotSetDescription@@YGJU_GUID@@JPAPAVIVssSnapshotSetDescription@@@Z +@ stub ?GetBackupType@CVssJetWriter@@IBG?AW4_VSS_BACKUP_TYPE@@XZ +@ stub ?GetBackupType@CVssWriter@@IBG?AW4_VSS_BACKUP_TYPE@@XZ +@ stub ?GetContext@CVssJetWriter@@IBGJXZ +@ stub ?GetContext@CVssWriter@@IBGJXZ +@ stub ?GetCurrentLevel@CVssJetWriter@@IBG?AW4_VSS_APPLICATION_LEVEL@@XZ +@ stub ?GetCurrentLevel@CVssWriter@@IBG?AW4_VSS_APPLICATION_LEVEL@@XZ +@ stub ?GetCurrentSnapshotSetId@CVssJetWriter@@IBG?AU_GUID@@XZ +@ stub ?GetCurrentSnapshotSetId@CVssWriter@@IBG?AU_GUID@@XZ +@ stub ?GetCurrentVolumeArray@CVssJetWriter@@IBGPAPBGXZ +@ stub ?GetCurrentVolumeArray@CVssWriter@@IBGPAPBGXZ +@ stub ?GetCurrentVolumeCount@CVssJetWriter@@IBGIXZ +@ stub ?GetCurrentVolumeCount@CVssWriter@@IBGIXZ +@ stub ?GetRestoreType@CVssJetWriter@@IBG?AW4_VSS_RESTORE_TYPE@@XZ +@ stub ?GetRestoreType@CVssWriter@@IBG?AW4_VSS_RESTORE_TYPE@@XZ +@ stub ?GetSnapshotDeviceName@CVssJetWriter@@IBGJPBGPAPBG@Z +@ stub ?GetSnapshotDeviceName@CVssWriter@@IBGJPBGPAPBG@Z +@ stub ?Initialize@CVssJetWriter@@QAGJU_GUID@@PBG_N211K@Z +@ cdecl -arch=i386 ?Initialize@CVssWriter@@QAGJU_GUID@@PBGW4VSS_USAGE_TYPE@@W4VSS_SOURCE_TYPE@@W4_VSS_APPLICATION_LEVEL@@KW4VSS_ALTERNATE_WRITER_STATE@@_N@Z(ptr ptr wstr long long long long long long wstr) __thiscall_VSSAPI_CVssWriter_Initialize +@ stub ?InstallAlternateWriter@CVssWriter@@QAGJU_GUID@@0@Z +@ stub ?IsBootableSystemStateBackedUp@CVssJetWriter@@IBG_NXZ +@ stub ?IsBootableSystemStateBackedUp@CVssWriter@@IBG_NXZ +@ stub ?IsPartialFileSupportEnabled@CVssJetWriter@@IBG_NXZ +@ stub ?IsPartialFileSupportEnabled@CVssWriter@@IBG_NXZ +@ stub ?IsPathAffected@CVssJetWriter@@IBG_NPBG@Z +@ stub ?IsPathAffected@CVssWriter@@IBG_NPBG@Z +@ stub ?LoadVssSnapshotSetDescription@@YGJPBGPAPAVIVssSnapshotSetDescription@@U_GUID@@@Z +@ stub ?OnAbortBegin@CVssJetWriter@@UAGXXZ +@ stub ?OnAbortEnd@CVssJetWriter@@UAGXXZ +@ stub ?OnBackOffIOOnVolume@CVssWriter@@UAG_NPAGU_GUID@@1@Z +@ stub ?OnBackupComplete@CVssWriter@@UAG_NPAVIVssWriterComponents@@@Z +@ stub ?OnBackupCompleteBegin@CVssJetWriter@@UAG_NPAVIVssWriterComponents@@@Z +@ stub ?OnBackupCompleteEnd@CVssJetWriter@@UAG_NPAVIVssWriterComponents@@_N@Z +@ stub ?OnBackupShutdown@CVssWriter@@UAG_NU_GUID@@@Z +@ stub ?OnContinueIOOnVolume@CVssWriter@@UAG_NPAGU_GUID@@1@Z +@ stub ?OnFreezeBegin@CVssJetWriter@@UAG_NXZ +@ stub ?OnFreezeEnd@CVssJetWriter@@UAG_N_N@Z +@ stub ?OnIdentify@CVssJetWriter@@UAG_NPAVIVssCreateWriterMetadata@@@Z +@ stub ?OnIdentify@CVssWriter@@UAG_NPAVIVssCreateWriterMetadata@@@Z +@ stub ?OnPostRestore@CVssWriter@@UAG_NPAVIVssWriterComponents@@@Z +@ stub ?OnPostRestoreBegin@CVssJetWriter@@UAG_NPAVIVssWriterComponents@@@Z +@ stub ?OnPostRestoreEnd@CVssJetWriter@@UAG_NPAVIVssWriterComponents@@_N@Z +@ stub ?OnPostSnapshot@CVssJetWriter@@UAG_NPAVIVssWriterComponents@@@Z +@ stub ?OnPostSnapshot@CVssWriter@@UAG_NPAVIVssWriterComponents@@@Z +@ stub ?OnPreRestore@CVssWriter@@UAG_NPAVIVssWriterComponents@@@Z +@ stub ?OnPreRestoreBegin@CVssJetWriter@@UAG_NPAVIVssWriterComponents@@@Z +@ stub ?OnPreRestoreEnd@CVssJetWriter@@UAG_NPAVIVssWriterComponents@@_N@Z +@ stub ?OnPrepareBackup@CVssWriter@@UAG_NPAVIVssWriterComponents@@@Z +@ stub ?OnPrepareBackupBegin@CVssJetWriter@@UAG_NPAVIVssWriterComponents@@@Z +@ stub ?OnPrepareBackupEnd@CVssJetWriter@@UAG_NPAVIVssWriterComponents@@_N@Z +@ stub ?OnPrepareSnapshotBegin@CVssJetWriter@@UAG_NXZ +@ stub ?OnPrepareSnapshotEnd@CVssJetWriter@@UAG_N_N@Z +@ stub ?OnThawBegin@CVssJetWriter@@UAG_NXZ +@ stub ?OnThawEnd@CVssJetWriter@@UAG_N_N@Z +@ stub ?OnVSSApplicationStartup@CVssWriter@@UAG_NXZ +@ stub ?OnVSSShutdown@CVssWriter@@UAG_NXZ +@ stub ?SetWriterFailure@CVssJetWriter@@IAGJJ@Z +@ stub ?SetWriterFailure@CVssWriter@@IAGJJ@Z +@ cdecl -arch=i386 ?Subscribe@CVssWriter@@QAGJK@Z(ptr long) __thiscall_VSSAPI_CVssWriter_Subscribe +@ stub ?Uninitialize@CVssJetWriter@@QAGXXZ +@ cdecl -arch=i386 ?Unsubscribe@CVssWriter@@QAGJXZ(ptr) __thiscall_VSSAPI_CVssWriter_Unsubscribe +@ stub CreateVssBackupComponentsInternal +@ stub CreateVssExamineWriterMetadataInternal +@ stub CreateVssExpressWriterInternal +@ stub CreateWriter +@ stub CreateWriterEx +@ stub -private DllCanUnloadNow +@ stub -private DllGetClassObject +@ stub GetProviderMgmtInterface +@ stub GetProviderMgmtInterfaceInternal +@ stub IsVolumeSnapshottedInternal +@ stub ShouldBlockRevertInternal +@ stub VssFreeSnapshotPropertiesInternal Propchange: trunk/reactos/dll/win32/vssapi/vssapi.spec ------------------------------------------------------------------------------ svn:eol-style = native 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] Mon Aug 31 19:34:37 2015 @@ -116,6 +116,7 @@ urlmon.idl vmr9.idl # vmrender.idl + vss.idl wbemcli.idl wbemdisp.idl wbemprov.idl Added: trunk/reactos/include/psdk/vss.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/vss.idl?rev=6…
============================================================================== --- trunk/reactos/include/psdk/vss.idl (added) +++ trunk/reactos/include/psdk/vss.idl [iso-8859-1] Mon Aug 31 19:34:37 2015 @@ -0,0 +1,31 @@ +/* + * Copyright 2014 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 + */ + +import "oaidl.idl"; + +typedef GUID VSS_ID; + +typedef enum _VSS_APPLICATION_LEVEL +{ + VSS_APP_AUTO = -1, + VSS_APP_UNKNOWN = 0, + VSS_APP_SYSTEM = 1, + VSS_APP_BACK_END = 2, + VSS_APP_FRONT_END = 3, + VSS_APP_SYSTEM_RM = 4 +} VSS_APPLICATION_LEVEL; Propchange: trunk/reactos/include/psdk/vss.idl ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/include/psdk/vswriter.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/vswriter.h?re…
============================================================================== --- trunk/reactos/include/psdk/vswriter.h (added) +++ trunk/reactos/include/psdk/vswriter.h [iso-8859-1] Mon Aug 31 19:34:37 2015 @@ -0,0 +1,47 @@ +/* + * Copyright 2014 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 + */ + +#ifndef __WINE_VSWRITER_H +#define __WINE_VSWRITER_H + +typedef enum +{ + VSS_UT_UNDEFINED, + VSS_UT_BOOTABLESYSTEMSTATE, + VSS_UT_SYSTEMSERVICE, + VSS_UT_USERDATA, + VSS_UT_OTHER +} VSS_USAGE_TYPE; + +typedef enum +{ + VSS_ST_UNDEFINED, + VSS_ST_TRANSACTEDDB, + VSS_ST_NONTRANSACTEDDB, + VSS_ST_OTHER +} VSS_SOURCE_TYPE; + +typedef enum +{ + VSS_AWS_UNDEFINED, + VSS_AWS_NO_ALTERNATE_WRITER, + VSS_AWS_ALTERNATE_WRITER_EXISTS, + VSS_AWS_THIS_IS_ALTERNATE_WRITER +} VSS_ALTERNATE_WRITER_STATE; + +#endif /* ___WINE_VSWRITER_H */ Propchange: trunk/reactos/include/psdk/vswriter.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Mon Aug 31 19:34:37 2015 @@ -199,6 +199,7 @@ reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to WineStaging-1.7.47 reactos/dll/win32/version # Synced to WineStaging-1.7.47 +reactos/dll/win32/vssapi # Synced to WineStaging-1.7.47 reactos/dll/win32/wbemdisp # Synced to WineStaging-1.7.47 reactos/dll/win32/wbemprox # Synced to WineStaging-1.7.47 reactos/dll/win32/windowscodecs # Synced to WineStaging-1.7.47
9 years, 3 months
1
0
0
0
[akhaldi] 68882: [SETUPAPI] Sync setupcab.c with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Aug 31 17:52:48 2015 New Revision: 68882 URL:
http://svn.reactos.org/svn/reactos?rev=68882&view=rev
Log: [SETUPAPI] Sync setupcab.c with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/win32/setupapi/setupcab.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/setupapi/setupcab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupca…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupcab.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/setupcab.c [iso-8859-1] Mon Aug 31 17:52:48 2015 @@ -49,6 +49,7 @@ PSP_FILE_CALLBACK_A msghandler; PVOID context; CHAR most_recent_cabinet_name[MAX_PATH]; + CHAR most_recent_target[MAX_PATH]; } SC_HSC_A, *PSC_HSC_A; #define SC_HSC_W_MAGIC 0x0CABFEED @@ -58,6 +59,7 @@ PSP_FILE_CALLBACK_W msghandler; PVOID context; WCHAR most_recent_cabinet_name[MAX_PATH]; + WCHAR most_recent_target[MAX_PATH]; } SC_HSC_W, *PSC_HSC_W; static BOOL LoadCABINETDll(void) @@ -77,27 +79,19 @@ return TRUE; } -static void UnloadCABINETDll(void) -{ - if (CABINET_hInstance) { - FreeLibrary(CABINET_hInstance); - CABINET_hInstance = 0; - } -} - /* FDICreate callbacks */ -static void *sc_cb_alloc(ULONG cb) +static void * CDECL sc_cb_alloc(ULONG cb) { return HeapAlloc(GetProcessHeap(), 0, cb); } -static void sc_cb_free(void *pv) +static void CDECL sc_cb_free(void *pv) { HeapFree(GetProcessHeap(), 0, pv); } -static INT_PTR sc_cb_open(char *pszFile, int oflag, int pmode) +static INT_PTR CDECL sc_cb_open(char *pszFile, int oflag, int pmode) { DWORD creation = 0, sharing = 0; int ioflag = 0; @@ -114,7 +108,7 @@ ioflag |= GENERIC_WRITE; break; case _O_RDWR: - ioflag |= GENERIC_READ & GENERIC_WRITE; + ioflag |= GENERIC_READ | GENERIC_WRITE; break; case _O_WRONLY | _O_RDWR: /* hmmm.. */ ERR("_O_WRONLY & _O_RDWR in oflag?\n"); @@ -159,7 +153,7 @@ sa.nLength = sizeof( SECURITY_ATTRIBUTES ); sa.lpSecurityDescriptor = NULL; - sa.bInheritHandle = (ioflag & _O_NOINHERIT) ? FALSE : TRUE; + sa.bInheritHandle = !(ioflag & _O_NOINHERIT); ret = (INT_PTR) CreateFileA(pszFile, ioflag, sharing, &sa, creation, FILE_ATTRIBUTE_NORMAL, NULL); @@ -168,7 +162,7 @@ return ret; } -static UINT sc_cb_read(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL sc_cb_read(INT_PTR hf, void *pv, UINT cb) { DWORD num_read; BOOL rslt; @@ -188,7 +182,7 @@ return num_read; } -static UINT sc_cb_write(INT_PTR hf, void *pv, UINT cb) +static UINT CDECL sc_cb_write(INT_PTR hf, void *pv, UINT cb) { DWORD num_written; /* BOOL rv; */ @@ -206,7 +200,7 @@ } } -static int sc_cb_close(INT_PTR hf) +static int CDECL sc_cb_close(INT_PTR hf) { /* TRACE("(hf == %d)\n", hf); */ @@ -216,7 +210,7 @@ return -1; } -static long sc_cb_lseek(INT_PTR hf, long dist, int seektype) +static LONG CDECL sc_cb_lseek(INT_PTR hf, LONG dist, int seektype) { DWORD ret; @@ -238,7 +232,7 @@ /* FDICopy callbacks */ -static INT_PTR sc_FNNOTIFY_A(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) +static INT_PTR CDECL sc_FNNOTIFY_A(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) { FILE_IN_CABINET_INFO_A fici; PSC_HSC_A phsc; @@ -248,12 +242,12 @@ CHAR mysterio[SIZEOF_MYSTERIO]; /* how big? undocumented! probably 256... */ - memset(&(mysterio[0]), 0, SIZEOF_MYSTERIO); + memset(mysterio, 0, SIZEOF_MYSTERIO); TRACE("(fdint == %d, pfdin == ^%p)\n", fdint, pfdin); - if (pfdin && pfdin->pv && (*((void **) pfdin->pv) == (void *)SC_HSC_A_MAGIC)) - phsc = (PSC_HSC_A) pfdin->pv; + if (pfdin && pfdin->pv && (((PSC_HSC_A) pfdin->pv)->magic == SC_HSC_A_MAGIC)) + phsc = pfdin->pv; else { ERR("pv %p is not an SC_HSC_A.\n", (pfdin) ? pfdin->pv : NULL); return -1; @@ -268,12 +262,12 @@ TRACE(" Cabinet Set#: %d\n", pfdin->setID); TRACE(" Cabinet Cab#: %d\n", pfdin->iCabinet); */ WARN("SPFILENOTIFY_CABINETINFO undocumented: guess implementation.\n"); - ci.CabinetFile = &(phsc->most_recent_cabinet_name[0]); + ci.CabinetFile = phsc->most_recent_cabinet_name; ci.CabinetPath = pfdin->psz3; ci.DiskName = pfdin->psz2; ci.SetId = pfdin->setID; ci.CabinetNumber = pfdin->iCabinet; - phsc->msghandler(phsc->context, SPFILENOTIFY_CABINETINFO, (UINT) &ci, 0); + phsc->msghandler(phsc->context, SPFILENOTIFY_CABINETINFO, (UINT_PTR) &ci, 0); return 0; case fdintPARTIAL_FILE: TRACE("Partial file notification\n"); @@ -292,17 +286,18 @@ fici.DosDate = pfdin->date; fici.DosTime = pfdin->time; fici.DosAttribs = pfdin->attribs; - memset(&(fici.FullTargetName[0]), 0, MAX_PATH); + memset(fici.FullTargetName, 0, MAX_PATH); err = phsc->msghandler(phsc->context, SPFILENOTIFY_FILEINCABINET, - (UINT) &fici, (UINT) pfdin->psz1); + (UINT_PTR)&fici, (UINT_PTR)pfdin->psz1); if (err == FILEOP_DOIT) { - TRACE(" Callback specified filename: %s\n", debugstr_a(&(fici.FullTargetName[0]))); + TRACE(" Callback specified filename: %s\n", debugstr_a(fici.FullTargetName)); if (!fici.FullTargetName[0]) { WARN(" Empty return string causing abort.\n"); SetLastError(ERROR_PATH_NOT_FOUND); return -1; } - return sc_cb_open(&(fici.FullTargetName[0]), _O_BINARY | _O_CREAT | _O_WRONLY, _S_IREAD | _S_IWRITE); + strcpy( phsc->most_recent_target, fici.FullTargetName ); + return sc_cb_open(fici.FullTargetName, _O_BINARY | _O_CREAT | _O_WRONLY, _S_IREAD | _S_IWRITE); } else { TRACE(" Callback skipped file.\n"); return 0; @@ -312,15 +307,15 @@ /* TRACE(" File name: %s\n", debugstr_a(pfdin->psz1)); TRACE(" Exec file? %s\n", (pfdin->cb) ? "Yes" : "No"); TRACE(" File hndl: %d\n", pfdin->hf); */ - fp.Source = &(phsc->most_recent_cabinet_name[0]); - fp.Target = pfdin->psz1; + fp.Source = phsc->most_recent_cabinet_name; + fp.Target = phsc->most_recent_target; fp.Win32Error = 0; fp.Flags = 0; /* the following should be a fixme -- but it occurs too many times */ WARN("Should set file date/time/attribs (and execute files?)\n"); - err = phsc->msghandler(phsc->context, SPFILENOTIFY_FILEEXTRACTED, (UINT) &fp, 0); if (sc_cb_close(pfdin->hf)) WARN("_close failed.\n"); + err = phsc->msghandler(phsc->context, SPFILENOTIFY_FILEEXTRACTED, (UINT_PTR)&fp, 0); if (err) { SetLastError(err); return FALSE; @@ -339,15 +334,15 @@ ci.SetId = pfdin->setID; ci.CabinetNumber = pfdin->iCabinet; /* remember the new cabinet name */ - strcpy(&(phsc->most_recent_cabinet_name[0]), pfdin->psz1); - err = phsc->msghandler(phsc->context, SPFILENOTIFY_NEEDNEWCABINET, (UINT) &ci, (UINT) &(mysterio[0])); + strcpy(phsc->most_recent_cabinet_name, pfdin->psz1); + err = phsc->msghandler(phsc->context, SPFILENOTIFY_NEEDNEWCABINET, (UINT_PTR)&ci, (UINT_PTR)mysterio); if (err) { SetLastError(err); return -1; } else { if (mysterio[0]) { /* some easy paranoia. no such carefulness exists on the wide API IIRC */ - lstrcpynA(pfdin->psz3, &(mysterio[0]), SIZEOF_MYSTERIO); + lstrcpynA(pfdin->psz3, mysterio, SIZEOF_MYSTERIO); } return 0; } @@ -357,7 +352,7 @@ } } -static INT_PTR sc_FNNOTIFY_W(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) +static INT_PTR CDECL sc_FNNOTIFY_W(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin) { FILE_IN_CABINET_INFO_W fici; PSC_HSC_W phsc; @@ -370,15 +365,15 @@ WCHAR buf[MAX_PATH], buf2[MAX_PATH]; CHAR charbuf[MAX_PATH]; - memset(&(mysterio[0]), 0, SIZEOF_MYSTERIO * sizeof(WCHAR)); - memset(&(buf[0]), 0, MAX_PATH * sizeof(WCHAR)); - memset(&(buf2[0]), 0, MAX_PATH * sizeof(WCHAR)); - memset(&(charbuf[0]), 0, MAX_PATH); + memset(mysterio, 0, SIZEOF_MYSTERIO * sizeof(WCHAR)); + memset(buf, 0, MAX_PATH * sizeof(WCHAR)); + memset(buf2, 0, MAX_PATH * sizeof(WCHAR)); + memset(charbuf, 0, MAX_PATH); TRACE("(fdint == %d, pfdin == ^%p)\n", fdint, pfdin); - if (pfdin && pfdin->pv && (*((void **) pfdin->pv) == (void *)SC_HSC_W_MAGIC)) - phsc = (PSC_HSC_W) pfdin->pv; + if (pfdin && pfdin->pv && (((PSC_HSC_W) pfdin->pv)->magic == SC_HSC_W_MAGIC)) + phsc = pfdin->pv; else { ERR("pv %p is not an SC_HSC_W.\n", (pfdin) ? pfdin->pv : NULL); return -1; @@ -393,18 +388,18 @@ TRACE(" Cabinet Set#: %d\n", pfdin->setID); TRACE(" Cabinet Cab#: %d\n", pfdin->iCabinet); */ WARN("SPFILENOTIFY_CABINETINFO undocumented: guess implementation.\n"); - ci.CabinetFile = &(phsc->most_recent_cabinet_name[0]); - len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz3, -1, &(buf[0]), MAX_PATH); + ci.CabinetFile = phsc->most_recent_cabinet_name; + len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz3, -1, buf, MAX_PATH); if ((len > MAX_PATH) || (len <= 1)) buf[0] = '\0'; - ci.CabinetPath = &(buf[0]); - len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz2, -1, &(buf2[0]), MAX_PATH); + ci.CabinetPath = buf; + len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz2, -1, buf2, MAX_PATH); if ((len > MAX_PATH) || (len <= 1)) buf2[0] = '\0'; - ci.DiskName = &(buf2[0]); + ci.DiskName = buf2; ci.SetId = pfdin->setID; ci.CabinetNumber = pfdin->iCabinet; - phsc->msghandler(phsc->context, SPFILENOTIFY_CABINETINFO, (UINT) &ci, 0); + phsc->msghandler(phsc->context, SPFILENOTIFY_CABINETINFO, (UINT_PTR)&ci, 0); return 0; case fdintPARTIAL_FILE: TRACE("Partial file notification\n"); @@ -417,32 +412,33 @@ TRACE(" File date: %u\n", pfdin->date); TRACE(" File time: %u\n", pfdin->time); TRACE(" File attr: %u\n", pfdin->attribs); */ - len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz1, -1, &(buf2[0]), MAX_PATH); + len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz1, -1, buf2, MAX_PATH); if ((len > MAX_PATH) || (len <= 1)) buf2[0] = '\0'; - fici.NameInCabinet = &(buf2[0]); + fici.NameInCabinet = buf2; fici.FileSize = pfdin->cb; fici.Win32Error = 0; fici.DosDate = pfdin->date; fici.DosTime = pfdin->time; fici.DosAttribs = pfdin->attribs; - memset(&(fici.FullTargetName[0]), 0, MAX_PATH * sizeof(WCHAR)); + memset(fici.FullTargetName, 0, MAX_PATH * sizeof(WCHAR)); err = phsc->msghandler(phsc->context, SPFILENOTIFY_FILEINCABINET, - (UINT) &fici, (UINT) pfdin->psz1); + (UINT_PTR)&fici, (UINT_PTR)pfdin->psz1); if (err == FILEOP_DOIT) { - TRACE(" Callback specified filename: %s\n", debugstr_w(&(fici.FullTargetName[0]))); + TRACE(" Callback specified filename: %s\n", debugstr_w(fici.FullTargetName)); if (fici.FullTargetName[0]) { - len = strlenW(&(fici.FullTargetName[0])) + 1; + len = strlenW(fici.FullTargetName) + 1; if ((len > MAX_PATH ) || (len <= 1)) return 0; - if (!WideCharToMultiByte(CP_ACP, 0, &(fici.FullTargetName[0]), len, &(charbuf[0]), MAX_PATH, 0, 0)) + if (!WideCharToMultiByte(CP_ACP, 0, fici.FullTargetName, len, charbuf, MAX_PATH, 0, 0)) return 0; } else { WARN("Empty buffer string caused abort.\n"); SetLastError(ERROR_PATH_NOT_FOUND); return -1; } - return sc_cb_open(&(charbuf[0]), _O_BINARY | _O_CREAT | _O_WRONLY, _S_IREAD | _S_IWRITE); + strcpyW( phsc->most_recent_target, fici.FullTargetName ); + return sc_cb_open(charbuf, _O_BINARY | _O_CREAT | _O_WRONLY, _S_IREAD | _S_IWRITE); } else { TRACE(" Callback skipped file.\n"); return 0; @@ -452,18 +448,15 @@ /* TRACE(" File name: %s\n", debugstr_a(pfdin->psz1)); TRACE(" Exec file? %s\n", (pfdin->cb) ? "Yes" : "No"); TRACE(" File hndl: %d\n", pfdin->hf); */ - fp.Source = &(phsc->most_recent_cabinet_name[0]); - len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz1, -1, &(buf[0]), MAX_PATH); - if ((len > MAX_PATH) || (len <= 1)) - buf[0] = '\0'; - fp.Target = &(buf[0]); + fp.Source = phsc->most_recent_cabinet_name; + fp.Target = phsc->most_recent_target; fp.Win32Error = 0; fp.Flags = 0; /* a valid fixme -- but occurs too many times */ /* FIXME("Should set file date/time/attribs (and execute files?)\n"); */ - err = phsc->msghandler(phsc->context, SPFILENOTIFY_FILEEXTRACTED, (UINT) &fp, 0); if (sc_cb_close(pfdin->hf)) WARN("_close failed.\n"); + err = phsc->msghandler(phsc->context, SPFILENOTIFY_FILEEXTRACTED, (UINT_PTR)&fp, 0); if (err) { SetLastError(err); return FALSE; @@ -477,30 +470,30 @@ TRACE(" Cabinet Set#: %d\n", pfdin->setID); TRACE(" Cabinet Cab#: %d\n", pfdin->iCabinet); */ /* remember the new cabinet name */ - len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz1, -1, &(phsc->most_recent_cabinet_name[0]), MAX_PATH); + len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz1, -1, phsc->most_recent_cabinet_name, MAX_PATH); if ((len > MAX_PATH) || (len <= 1)) phsc->most_recent_cabinet_name[0] = '\0'; - ci.CabinetFile = &(phsc->most_recent_cabinet_name[0]); - len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz3, -1, &(buf[0]), MAX_PATH); + ci.CabinetFile = phsc->most_recent_cabinet_name; + len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz3, -1, buf, MAX_PATH); if ((len > MAX_PATH) || (len <= 1)) buf[0] = '\0'; - ci.CabinetPath = &(buf[0]); - len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz2, -1, &(buf2[0]), MAX_PATH); + ci.CabinetPath = buf; + len = 1 + MultiByteToWideChar(CP_ACP, 0, pfdin->psz2, -1, buf2, MAX_PATH); if ((len > MAX_PATH) || (len <= 1)) buf2[0] = '\0'; - ci.DiskName = &(buf2[0]); + ci.DiskName = buf2; ci.SetId = pfdin->setID; ci.CabinetNumber = pfdin->iCabinet; - err = phsc->msghandler(phsc->context, SPFILENOTIFY_NEEDNEWCABINET, (UINT) &ci, (UINT) &(mysterio[0])); + err = phsc->msghandler(phsc->context, SPFILENOTIFY_NEEDNEWCABINET, (UINT_PTR)&ci, (UINT_PTR)mysterio); if (err) { SetLastError(err); return -1; } else { if (mysterio[0]) { - len = strlenW(&(mysterio[0])) + 1; + len = strlenW(mysterio) + 1; if ((len > 255) || (len <= 1)) return 0; - if (!WideCharToMultiByte(CP_ACP, 0, &(mysterio[0]), len, pfdin->psz3, 255, 0, 0)) + if (!WideCharToMultiByte(CP_ACP, 0, mysterio, len, pfdin->psz3, 255, 0, 0)) return 0; } return 0; @@ -524,11 +517,10 @@ DWORD fpnsize; BOOL ret; - TRACE("(CabinetFile == %s, Reserved == %u, MsgHandler == ^%p, Context == ^%p)\n", debugstr_a(CabinetFile), Reserved, MsgHandler, Context); - if (! LoadCABINETDll()) + if (!LoadCABINETDll()) return FALSE; if (!CabinetFile) @@ -537,17 +529,13 @@ return FALSE; } - memset(&my_hsc, 0, sizeof(SC_HSC_A)); - pszCabinet[0] = '\0'; - pszCabPath[0] = '\0'; - fpnsize = strlen(CabinetFile); if (fpnsize >= MAX_PATH) { SetLastError(ERROR_BAD_PATHNAME); return FALSE; } - fpnsize = GetFullPathNameA(CabinetFile, MAX_PATH, &(pszCabPath[0]), &p); + fpnsize = GetFullPathNameA(CabinetFile, MAX_PATH, pszCabPath, &p); if (fpnsize > MAX_PATH) { SetLastError(ERROR_BAD_PATHNAME); return FALSE; @@ -564,7 +552,7 @@ TRACE("path: %s, cabfile: %s\n", debugstr_a(pszCabPath), debugstr_a(pszCabinet)); /* remember the cabinet name */ - strcpy(&(my_hsc.most_recent_cabinet_name[0]), pszCabinet); + strcpy(my_hsc.most_recent_cabinet_name, pszCabinet); my_hsc.magic = SC_HSC_A_MAGIC; my_hsc.msghandler = MsgHandler; @@ -574,8 +562,7 @@ if (!my_hsc.hfdi) return FALSE; - ret = ( sc_FDICopy(my_hsc.hfdi, pszCabinet, pszCabPath, - 0, sc_FNNOTIFY_A, NULL, &my_hsc) ) ? TRUE : FALSE; + ret = sc_FDICopy(my_hsc.hfdi, pszCabinet, pszCabPath, 0, sc_FNNOTIFY_A, NULL, &my_hsc); sc_FDIDestroy(my_hsc.hfdi); return ret; @@ -607,8 +594,6 @@ SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - - memset(&my_hsc, 0, sizeof(SC_HSC_W)); fpnsize = GetFullPathNameW(CabinetFile, MAX_PATH, pszCabPathW, &p); if (fpnsize > MAX_PATH) { @@ -642,8 +627,7 @@ if (!my_hsc.hfdi) return FALSE; - ret = ( sc_FDICopy(my_hsc.hfdi, pszCabinet, pszCabPath, - 0, sc_FNNOTIFY_W, NULL, &my_hsc) ) ? TRUE : FALSE; + ret = sc_FDICopy(my_hsc.hfdi, pszCabinet, pszCabPath, 0, sc_FNNOTIFY_W, NULL, &my_hsc); sc_FDIDestroy(my_hsc.hfdi); return ret; @@ -674,8 +658,9 @@ hInstance = (HINSTANCE)hinstDLL; break; case DLL_PROCESS_DETACH: - UnloadCABINETDll(); + if (lpvReserved) break; SetupCloseLog(); + if (CABINET_hInstance) FreeLibrary(CABINET_hInstance); break; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Mon Aug 31 17:52:48 2015 @@ -331,6 +331,9 @@ reactos/dll/win32/secur32/thunks.c # Synced to WineStaging-1.7.37 reactos/dll/win32/secur32/wrapper.c # Synced to WineStaging-1.7.37 +setupapi - + reactos/dll/win32/setupapi/setupcab.c # Synced to WineStaging-1.7.47 + win32k - win32ss/gdi/ntgdi/bezier.c # Synced to WineStaging-1.7.37
9 years, 3 months
1
0
0
0
[tfaber] 68881: [NTOS:EX] - Don't leak process reference in NtFlushInstructionCache. Spotted by Stefan
by tfaber@svn.reactos.org
Author: tfaber Date: Mon Aug 31 13:53:14 2015 New Revision: 68881 URL:
http://svn.reactos.org/svn/reactos?rev=68881&view=rev
Log: [NTOS:EX] - Don't leak process reference in NtFlushInstructionCache. Spotted by Stefan Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Mon Aug 31 13:53:14 2015 @@ -2605,6 +2605,7 @@ { /* Detach from the process */ KeUnstackDetachProcess(&ApcState); + ObDereferenceObject(Process); } return STATUS_SUCCESS;
9 years, 3 months
1
0
0
0
[tfaber] 68880: [LSASRV] - Correctly call LsarClose in DsRolepGetBasicInfo
by tfaber@svn.reactos.org
Author: tfaber Date: Mon Aug 31 13:46:38 2015 New Revision: 68880 URL:
http://svn.reactos.org/svn/reactos?rev=68880&view=rev
Log: [LSASRV] - Correctly call LsarClose in DsRolepGetBasicInfo Modified: trunk/reactos/dll/win32/lsasrv/dssetup.c Modified: trunk/reactos/dll/win32/lsasrv/dssetup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/dssetup.c…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/dssetup.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/dssetup.c [iso-8859-1] Mon Aug 31 13:46:38 2015 @@ -61,7 +61,7 @@ Status = LsarQueryInformationPolicy(PolicyHandle, PolicyAccountDomainInformation, &PolicyInfo); - LsarClose(PolicyHandle); + LsarClose(&PolicyHandle); if (!NT_SUCCESS(Status)) { TRACE("LsarQueryInformationPolicy with NT status %x\n",
9 years, 3 months
1
0
0
0
[tfaber] 68879: [NETAPI32] - Don't try to close the deleted user handle in NetUserDel
by tfaber@svn.reactos.org
Author: tfaber Date: Mon Aug 31 13:44:57 2015 New Revision: 68879 URL:
http://svn.reactos.org/svn/reactos?rev=68879&view=rev
Log: [NETAPI32] - Don't try to close the deleted user handle in NetUserDel Modified: trunk/reactos/dll/win32/netapi32/user.c Modified: trunk/reactos/dll/win32/netapi32/user.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/user.c?…
============================================================================== --- trunk/reactos/dll/win32/netapi32/user.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/user.c [iso-8859-1] Mon Aug 31 13:44:57 2015 @@ -2375,6 +2375,9 @@ ApiStatus = NetpNtStatusToApiStatus(Status); goto done; } + + /* A successful delete invalidates the handle */ + UserHandle = NULL; done: if (UserHandle != NULL)
9 years, 3 months
1
0
0
0
[gadamopoulos] 68878: Fix build.
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Mon Aug 31 11:35:26 2015 New Revision: 68878 URL:
http://svn.reactos.org/svn/reactos?rev=68878&view=rev
Log: Fix build. Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] Mon Aug 31 11:35:26 2015 @@ -664,7 +664,7 @@ { return SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags, strRet); } - else if (!_ILIsDesktop(pidl) && ILIsSpecialFolder(pidl)) + else if (!_ILIsDesktop(pidl) && _ILIsSpecialFolder(pidl)) { return SHELL32_GetDisplayNameOfGUIDItem(this, L"", pidl, dwFlags, strRet); }
9 years, 3 months
1
0
0
0
[gadamopoulos] 68877: [SHELL32] - Make SHELL32_GetDisplayNameOfChild return the result via a STRRET. Fix all callers accordingly. - Avoid any heap allocations if a shell folder needs to forward the...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Mon Aug 31 11:28:24 2015 New Revision: 68877 URL:
http://svn.reactos.org/svn/reactos?rev=68877&view=rev
Log: [SHELL32] - Make SHELL32_GetDisplayNameOfChild return the result via a STRRET. Fix all callers accordingly. - Avoid any heap allocations if a shell folder needs to forward the GetDisplayNameOf call to a child. Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp trunk/reactos/dll/win32/shell32/shfldr.h trunk/reactos/dll/win32/shell32/shlfolder.cpp Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] Mon Aug 31 11:28:24 2015 @@ -660,7 +660,11 @@ if (!strRet) return E_INVALIDARG; - if (!_ILIsDesktop(pidl) && _ILIsPidlSimple(pidl) && _ILIsSpecialFolder(pidl)) + if (!_ILIsPidlSimple (pidl)) + { + return SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags, strRet); + } + else if (!_ILIsDesktop(pidl) && ILIsSpecialFolder(pidl)) { return SHELL32_GetDisplayNameOfGUIDItem(this, L"", pidl, dwFlags, strRet); } @@ -677,7 +681,7 @@ else HCR_GetClassNameW(CLSID_ShellDesktop, pszPath, MAX_PATH); } - else if (_ILIsPidlSimple (pidl)) + else { int cLen = 0; @@ -709,12 +713,6 @@ if (!_ILIsFolder(pidl)) SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags); } - } - else - { - /* a complex pidl, let the subfolder do the work */ - hr = SHELL32_GetDisplayNameOfChild (this, pidl, dwFlags, - pszPath, MAX_PATH); } if (SUCCEEDED(hr)) Modified: trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] Mon Aug 31 11:28:24 2015 @@ -483,6 +483,11 @@ if (!strRet) return E_INVALIDARG; + if (!_ILIsPidlSimple (pidl)) + { + return SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags, strRet); + } + pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR)); if (!pszPath) return E_OUTOFMEMORY; @@ -496,7 +501,7 @@ pszPath[1] = ':'; SHELL32_GUIDToStringW(CLSID_MyComputer, &pszPath[2]); } - else if (_ILIsPidlSimple(pidl)) + else { if (_ILIsSpecialFolder(pidl)) return SHELL32_GetDisplayNameOfGUIDItem(this, L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", pidl, dwFlags, strRet); @@ -557,11 +562,6 @@ return E_INVALIDARG; } } - else - { - /* Complex pidl. Let the child folder do the work */ - hr = SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags, pszPath, MAX_PATH); - } if (SUCCEEDED(hr)) { Modified: trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] Mon Aug 31 11:28:24 2015 @@ -591,67 +591,47 @@ HRESULT WINAPI CFSFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) { - LPWSTR pszPath; - - HRESULT hr = S_OK; - int len = 0; - - TRACE("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet); - pdump(pidl); - if (!pidl || !strRet) return E_INVALIDARG; - pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR)); + /* If it is a complex pidl, let the child handle it */ + if (!_ILIsPidlSimple (pidl)) /* complex pidl */ + { + return SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags, strRet); + } + else if (!pidl->mkid.cb) /* empty pidl */ + { + /* If it is an empty pidl return only the path of the folder */ + if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) && + (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) && + sPathTarget) + { + return SHSetStrRet(strRet, sPathTarget); + } + return E_INVALIDARG; + } + + int len = 0; + LPWSTR pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR)); if (!pszPath) return E_OUTOFMEMORY; - if (_ILIsDesktop(pidl)) /* empty pidl */ - { - if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) && - (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER)) - { - if (sPathTarget) - lstrcpynW(pszPath, sPathTarget, MAX_PATH); - } - else - hr = E_INVALIDARG; /* pidl has to contain exactly one non null SHITEMID */ - } - else if (_ILIsPidlSimple(pidl)) - { - if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) && - (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) && - sPathTarget) - { - lstrcpynW(pszPath, sPathTarget, MAX_PATH); - PathAddBackslashW(pszPath); - len = wcslen(pszPath); - } - _ILSimpleGetTextW(pidl, pszPath + len, MAX_PATH + 1 - len); - if (!_ILIsFolder(pidl)) SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags); - } else - hr = SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags, pszPath, MAX_PATH); - - if (SUCCEEDED(hr)) { - /* Win9x always returns ANSI strings, NT always returns Unicode strings */ - if (GetVersion() & 0x80000000) - { - strRet->uType = STRRET_CSTR; - if (!WideCharToMultiByte(CP_ACP, 0, pszPath, -1, strRet->cStr, MAX_PATH, - NULL, NULL)) - strRet->cStr[0] = '\0'; - CoTaskMemFree(pszPath); - } - else - { - strRet->uType = STRRET_WSTR; - strRet->pOleStr = pszPath; - } - } else - CoTaskMemFree(pszPath); + if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) && + (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) && + sPathTarget) + { + lstrcpynW(pszPath, sPathTarget, MAX_PATH); + PathAddBackslashW(pszPath); + len = wcslen(pszPath); + } + _ILSimpleGetTextW(pidl, pszPath + len, MAX_PATH + 1 - len); + if (!_ILIsFolder(pidl)) SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags); + + strRet->uType = STRRET_WSTR; + strRet->pOleStr = pszPath; TRACE ("-- (%p)->(%s)\n", this, strRet->uType == STRRET_CSTR ? strRet->cStr : debugstr_w(strRet->pOleStr)); - return hr; + return S_OK; } /************************************************************************** Modified: trunk/reactos/dll/win32/shell32/shfldr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr.h…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr.h [iso-8859-1] Mon Aug 31 11:28:24 2015 @@ -39,8 +39,7 @@ LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut); HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc, LPITEMIDLIST * pidlInOut, LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes); -HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPWSTR szOut, - DWORD dwOutLen); +HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut); Modified: trunk/reactos/dll/win32/shell32/shlfolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlfolde…
============================================================================== --- trunk/reactos/dll/win32/shell32/shlfolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlfolder.cpp [iso-8859-1] Mon Aug 31 11:28:24 2015 @@ -335,54 +335,34 @@ * virtual folders with the registry key WantsFORPARSING set. */ HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, - LPCITEMIDLIST pidl, DWORD dwFlags, LPWSTR szOut, DWORD dwOutLen) -{ - LPITEMIDLIST pidlFirst; - HRESULT hr = E_INVALIDARG; - - TRACE ("(%p)->(pidl=%p 0x%08x %p 0x%08x)\n", psf, pidl, dwFlags, szOut, dwOutLen); - pdump (pidl); - - pidlFirst = ILCloneFirst(pidl); - if (pidlFirst) - { - CComPtr<IShellFolder> psfChild; - - hr = psf->BindToObject(pidlFirst, NULL, IID_PPV_ARG(IShellFolder, &psfChild)); - if (SUCCEEDED (hr)) - { - STRRET strTemp; - LPITEMIDLIST pidlNext = ILGetNext (pidl); - - hr = psfChild->GetDisplayNameOf(pidlNext, dwFlags, &strTemp); - if (SUCCEEDED (hr)) - { - if(!StrRetToStrNW (szOut, dwOutLen, &strTemp, pidlNext)) - hr = E_FAIL; - } - } - ILFree (pidlFirst); - } else - hr = E_OUTOFMEMORY; - - TRACE ("-- ret=0x%08x %s\n", hr, debugstr_w(szOut)); + LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + LPITEMIDLIST pidlFirst = ILCloneFirst(pidl); + if (!pidlFirst) + return E_OUTOFMEMORY; + + CComPtr<IShellFolder> psfChild; + HRESULT hr = psf->BindToObject(pidlFirst, NULL, IID_PPV_ARG(IShellFolder, &psfChild)); + if (SUCCEEDED (hr)) + { + hr = psfChild->GetDisplayNameOf(ILGetNext (pidl), dwFlags, strRet); + } + ILFree (pidlFirst); return hr; } HRESULT SHELL32_GetDisplayNameOfGUIDItem(IShellFolder2* psf, LPCWSTR pszFolderPath, PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) { - HRESULT hr = S_OK; + HRESULT hr; GUID const *clsid = _ILGetGUIDPointer (pidl); if (!strRet) return E_INVALIDARG; - LPWSTR pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR)); - if (!pszPath) - return E_OUTOFMEMORY; - - if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) + /* First of all check if we need to query the name from the child item */ + if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING && + GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) { int bWantsForParsing; @@ -408,32 +388,38 @@ } } - if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && - bWantsForParsing) + if (bWantsForParsing) { /* - * we need the filesystem path to the destination folder. - * Only the folder itself can know it - */ - hr = SHELL32_GetDisplayNameOfChild (psf, pidl, dwFlags, - pszPath, - MAX_PATH); - } - else - { - wcscpy(pszPath, pszFolderPath); - PWCHAR pItemName = &pszPath[wcslen(pszPath)]; - - /* parsing name like ::{...} */ - pItemName[0] = ':'; - pItemName[1] = ':'; - SHELL32_GUIDToStringW (*clsid, &pItemName[2]); - } + * we need the filesystem path to the destination folder. + * Only the folder itself can know it + */ + return SHELL32_GetDisplayNameOfChild (psf, pidl, dwFlags, strRet); + } + } + + /* Allocate the buffer for the result */ + LPWSTR pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR)); + if (!pszPath) + return E_OUTOFMEMORY; + + hr = S_OK; + + if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) + { + wcscpy(pszPath, pszFolderPath); + PWCHAR pItemName = &pszPath[wcslen(pszPath)]; + + /* parsing name like ::{...} */ + pItemName[0] = ':'; + pItemName[1] = ':'; + SHELL32_GUIDToStringW (*clsid, &pItemName[2]); } else { /* user friendly name */ - HCR_GetClassNameW (*clsid, pszPath, MAX_PATH); + if (!HCR_GetClassNameW (*clsid, pszPath, MAX_PATH)) + hr = E_FAIL; } if (SUCCEEDED(hr))
9 years, 3 months
1
0
0
0
[jimtabor] 68876: [NtGdi] - Fix color setting.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sun Aug 30 23:15:55 2015 New Revision: 68876 URL:
http://svn.reactos.org/svn/reactos?rev=68876&view=rev
Log: [NtGdi] - Fix color setting. Modified: trunk/reactos/win32ss/gdi/ntgdi/dcutil.c Modified: trunk/reactos/win32ss/gdi/ntgdi/dcutil.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dcutil.c…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/dcutil.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/dcutil.c [iso-8859-1] Sun Aug 30 23:15:55 2015 @@ -159,9 +159,15 @@ } pdcattr = pdc->pdcattr; - // What about ulForegroundClr, like in gdi32? - crOldColor = pdcattr->crForegroundClr; - pdcattr->crForegroundClr = color; + crOldColor = (COLORREF) pdcattr->ulForegroundClr; + pdcattr->ulForegroundClr = (ULONG)color; + + if (pdcattr->crForegroundClr != color) + { + pdcattr->ulDirty_ |= (DIRTY_TEXT|DIRTY_LINE|DIRTY_FILL); + pdcattr->crForegroundClr = color; + } + DC_vUpdateTextBrush(pdc); DC_UnlockDc(pdc);
9 years, 3 months
1
0
0
0
← Newer
1
2
3
4
...
31
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
Results per page:
10
25
50
100
200