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
April 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
17 participants
481 discussions
Start a n
N
ew thread
[dreimer] 67434: [ROSAPPS] Add all sysutils to build which did build at rbuild times. Fix several warnings in rosddt. Update notevil with moar names to be up to date and really not evil by ignoring...
by dreimer@svn.reactos.org
Author: dreimer Date: Sun Apr 26 12:28:01 2015 New Revision: 67434 URL:
http://svn.reactos.org/svn/reactos?rev=67434&view=rev
Log: [ROSAPPS] Add all sysutils to build which did build at rbuild times. Fix several warnings in rosddt. Update notevil with moar names to be up to date and really not evil by ignoring some guys. ^^ Added: trunk/rosapps/applications/sysutils/logevent/CMakeLists.txt (with props) trunk/rosapps/applications/sysutils/lsdd/CMakeLists.txt (with props) trunk/rosapps/applications/sysutils/man/CMakeLists.txt (with props) trunk/rosapps/applications/sysutils/pedump/CMakeLists.txt (with props) trunk/rosapps/applications/sysutils/regexpl/CMakeLists.txt (with props) trunk/rosapps/applications/sysutils/rosddt/CMakeLists.txt (with props) trunk/rosapps/applications/sysutils/screenshot/CMakeLists.txt (with props) trunk/rosapps/applications/sysutils/systeminfo/CMakeLists.txt (with props) trunk/rosapps/applications/sysutils/tcat/CMakeLists.txt (with props) Modified: trunk/rosapps/applications/notevil/notevil.rc trunk/rosapps/applications/sysutils/CMakeLists.txt trunk/rosapps/applications/sysutils/rosddt/http.c trunk/rosapps/applications/sysutils/rosddt/rosddt.c Modified: trunk/rosapps/applications/notevil/notevil.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/notevil/notev…
============================================================================== --- trunk/rosapps/applications/notevil/notevil.rc [iso-8859-1] (original) +++ trunk/rosapps/applications/notevil/notevil.rc [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -16,98 +16,157 @@ * * 2006-03-05, frik85: add new coders (in no particular order) * + * 2015-04-26, dreimer: add new and old missing coders based on our + * Wiki site. Order made alphabetical. + * */ STRINGTABLE MOVEABLE BEGIN - 1, "Boudewijn Dekker (Ariadne)" - 2, "Robert Bergkvist (FragDance Galore)" - 3, "Arindam Das" - 4, "Jason Eager" - 5, "Jason Filby" - 6, "Rex Jolliff" - 7, "Eric Kohl" - 8, "Hans Kremer" - 9, "Frederik Leemans" - 10, "Jean Michault" - 11, "Jim Noeth" - 12, "Brian Palmer" - 13, "Matt Pyne" - 14, "Jason Weiler" - 15, "David Welch" + 1, "Aleksandar Andrejevic" + 2, "Aleksey Bragin" + 3, "Alex Ionescu" + 4, "Amine Khaldi" + 5, "Andrew Green" + 6, "Andrew Greenwood" + 7, "Andrew Hill" + 8, "Andrew Munger" + 9, "Andrey Korotaev" + 10, "Arch Blackmann" + 11, "Arindam Das" + 12, "Art Yerkes" + 13, "Benedikt Freisen" + 14, "Boudewijn Dekker" + 15, "Brandon Turner" END STRINGTABLE MOVEABLE BEGIN - 16, "Emanuele Aliberti" - 17, "Phillip Susi" - 18, "Paolo Pantaleo" - 19, "Hernan Ochoa" - 20, "Casper S. Hornstrup" - 21, "Steven Edwards" - 22, "KJK::Hyperion" - 23, "Robert Dickenson" - 24, "Eugene Ingerman" - 25, "Guido de Jong" - 26, "Jurgen van Gael" - 27, "Marty Dill" - 28, "Ge van Geldorp" - 29, "Richard Campbell" - 30, "Gunnar Andre' Dalsnes" + 16, "Brian Palmer" + 17, "Cameron M. Gutman" + 18, "Carl Nettelblad" + 19, "Casper S. Hornstrup" + 20, "Christoph von Wittich" + 21, "Claudiu Mihail" + 22, "Colin Finck" + 23, "Daniel Reimer" + 24, "Danny Götte" + 25, "David Quintana" + 26, "David Welch" + 27, "Dmitry Chapyshev" + 28, "Dmitry Gorbachev" + 29, "Dominique Cote" + 30, "Edijs Kolesnikovics" END STRINGTABLE MOVEABLE BEGIN - 31, "Aleksey Bragin" - 32, "Royce Mitchell III" - 33, "Mark Tempel" - 34, "Art Yerkes" - 35, "Martin Fuchs" - 36, "Vizzini" - 37, "Filip Navara" - 38, "Andrew Greenwood" - 39, "Thomas Weidenmueller" - 40, "Jonathan Wilson" - 41, "Alex Ionescu" - 42, "James Tabor" - 43, "Magnus Olsen" - 44, "Herve Poussineau" - 45, "Christoph von Wittich" + 31, "Emanuele Aliberti" + 32, "Eric Kohl" + 33, "Eugene Ingerman" + 34, "Filip Navara" + 35, "Franz Lehner" + 36, "Frederik Leemans" + 37, "Gabriel Ilardi" + 38, "Ged Murphy" + 39, "Gé van Geldorp" + 40, "Gero Kuehn" + 41, "Giannis Adamopoulos" + 42, "Gregor Anich" + 43, "Gregor Gullwi" + 44, "Gregor Schneider" + 45, "Guido de Jong" END STRINGTABLE MOVEABLE BEGIN - 46, "Brandon Turner" - 47, "Ged Murphy" - 48, "Klemens R. Friedl" - 49, "Maarten Bosma" - 50, "Saveliy Tretiakov" - 51, "Amine Khaldi" - 52, "Andrew Munger" - 53, "Cameron M. Gutman" - 54, "Daniel Reimer" - 55, "Dmitry Chapyshev" - 56, "Gregor Brunmar" - 57, "Gregor Schneider" - 58, "Iwan Fatahi" - 59, "Jeffrey Morlan" - 60, "Johannes Anderwald" + 46, "Gunnar Andre' Dalsnes" + 47, "Hans Kremer" + 48, "Hartmut Birr" + 49, "Hermès Bélusca-Maïto" + 50, "Hernan Ochoa" + 51, "Hervé Poussineau" + 52, "Iwan Fatahi" + 53, "James Tabor" + 54, "Jan Roeloffzen" + 55, "Jason Eager" + 56, "Jason Filby" + 57, "Jason Weiler" + 58, "Jean Michault" + 59, "Jean-Michel Gay" + 60, "Jeffrey Morlan" END STRINGTABLE MOVEABLE BEGIN - 61, "Mark Weaver" - 62, "Matthias Kupfer" - 63, "Mike Nordell" - 64, "Nathan Woods" - 65, "Pablo Borobia" - 66, "Peter Ward" - 67, "Pierre Schweitzer" - 68, "Rafal Harabien" - 69, "Samuel Serapion" - 70, "Stefan Ginsberg" - 71, "Timo Kreuzer" - 72, "Victor Kirhenshtein" + 61, "Jens Collin" + 62, "Jérôme Gardou" + 63, "Jim Noeth" + 64, "Johannes Anderwald" + 65, "Jonathan Wilson" + 66, "Jose Catena" + 67, "Jurgen van Gael" + 68, "Kai Tietz" + 69, "Kamil Hornicek" + 70, "KJK::Hyperion" + 71, "Klemens R. Friedl" + 72, "Lucas Suggs" + 73, "Maarten Bosma" + 74, "Magnus Olsen" + 75, "Marc Piulachs" +END + +STRINGTABLE MOVEABLE +BEGIN + 76, "Mark Tempel" + 77, "Mark Weaver" + 78, "Martin Fuchs" + 79, "Marty Dill" + 80, "Matthias Kupfer" + 81, "Matt Pyne" + 82, "Michael Martin" + 83, "Michael Steil" + 84, "Michael Wirth" + 85, "Michele Cicciott" + 86, "Mike Nordell" + 87, "Mindflyer" + 88, "Nathan Woods" + 89, "Nedko Arnaudov" + 90, "Neeraj Yadav" +END + +STRINGTABLE MOVEABLE +BEGIN + 91, "Olaf Siejka" + 92, "Pablo Borobia" + 93, "Paolo Pantaleo" + 94, "Peter Ward" + 95, "Phillip Susi" + 96, "Pierre Schweitzer" + 97, "Rafal Harabien" + 98, "Rex Jolliff" + 99, "Richard Campbell" + 100, "Robert Bergkvist (FragDance Galore)" + 101, "Robert Dickenson" + 102, "Robert Kopferl" + 103, "Roel Messiant" + 104, "Royce Mitchell III" + 105, "Samuel Serapión" +END + +STRINGTABLE MOVEABLE +BEGIN + 106, "Saveliy Tretiakov" + 107, "Sebastian Gasiorek" + 108, "Stefan Ginsberg" + 109, "Steven Edwards" + 110, "Sylvain Petreolle" + 111, "Thomas Bluemel" + 112, "Thomas Faber" + 113, "Timo Kreuzer" + 114, "Victor Kirhenshtein" + 115, "Vizzini" + 116, "Ziliang Guo" END /* EOF */ Modified: trunk/rosapps/applications/sysutils/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/CMak…
============================================================================== --- trunk/rosapps/applications/sysutils/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/CMakeLists.txt [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -3,15 +3,14 @@ add_subdirectory(ctm) add_subdirectory(gettype) add_subdirectory(kill) -#add_subdirectory(logevent) -#add_subdirectory(lsdd) -#add_subdirectory(man) -#add_subdirectory(mkdosfs) -#add_subdirectory(pedump) -#add_subdirectory(regexpl) -#add_subdirectory(rosddt) -#add_subdirectory(screenshot) -#add_subdirectory(systeminfo) -#add_subdirectory(tcat) +add_subdirectory(logevent) +add_subdirectory(lsdd) +add_subdirectory(man) +add_subdirectory(pedump) +add_subdirectory(regexpl) +add_subdirectory(rosddt) +add_subdirectory(screenshot) +add_subdirectory(systeminfo) +add_subdirectory(tcat) add_subdirectory(tlist) add_subdirectory(utils) Added: trunk/rosapps/applications/sysutils/logevent/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/loge…
============================================================================== --- trunk/rosapps/applications/sysutils/logevent/CMakeLists.txt (added) +++ trunk/rosapps/applications/sysutils/logevent/CMakeLists.txt [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -0,0 +1,6 @@ + +add_executable(logevent logevent.c logevent.rc) +set_module_type(logevent win32cui) +add_target_compile_flags(logevent "-Wno-unused-but-set-variable") +add_importlibs(logevent advapi32 msvcrt kernel32) +add_cd_file(TARGET logevent DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/sysutils/logevent/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/sysutils/lsdd/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/lsdd…
============================================================================== --- trunk/rosapps/applications/sysutils/lsdd/CMakeLists.txt (added) +++ trunk/rosapps/applications/sysutils/lsdd/CMakeLists.txt [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -0,0 +1,6 @@ + +add_executable(lsdd lsdd.c lsdd.rc) +set_module_type(lsdd win32cui) +target_link_libraries(lsdd win32err) +add_importlibs(lsdd user32 msvcrt kernel32) +add_cd_file(TARGET lsdd DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/sysutils/lsdd/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/sysutils/man/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/man/…
============================================================================== --- trunk/rosapps/applications/sysutils/man/CMakeLists.txt (added) +++ trunk/rosapps/applications/sysutils/man/CMakeLists.txt [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -0,0 +1,5 @@ + +add_executable(man man.c) +set_module_type(man win32cui) +add_importlibs(man user32 msvcrt kernel32 ntdll) +add_cd_file(TARGET man DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/sysutils/man/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/sysutils/pedump/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/pedu…
============================================================================== --- trunk/rosapps/applications/sysutils/pedump/CMakeLists.txt (added) +++ trunk/rosapps/applications/sysutils/pedump/CMakeLists.txt [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -0,0 +1,6 @@ + +add_executable(pedump pedump.c pedump.rc) +set_module_type(pedump win32cui) +add_target_compile_flags(pedump "-Wno-unused-but-set-variable") +add_importlibs(pedump msvcrt kernel32 ntdll) +add_cd_file(TARGET pedump DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/sysutils/pedump/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/sysutils/regexpl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rege…
============================================================================== --- trunk/rosapps/applications/sysutils/regexpl/CMakeLists.txt (added) +++ trunk/rosapps/applications/sysutils/regexpl/CMakeLists.txt [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -0,0 +1,36 @@ + +set_cpp(WITH_RUNTIME WITH_STL WITH_EXCEPTIONS) + +list(APPEND SOURCE + ArgumentParser.cpp + Console.cpp + RegistryExplorer.cpp + RegistryKey.cpp + RegistryTree.cpp + SecurityDescriptor.cpp + ShellCommand.cpp + ShellCommandChangeKey.cpp + ShellCommandConnect.cpp + ShellCommandDACL.cpp + ShellCommandDeleteKey.cpp + ShellCommandDeleteValue.cpp + ShellCommandDir.cpp + ShellCommandExit.cpp + ShellCommandHelp.cpp + ShellCommandNewKey.cpp + ShellCommandOwner.cpp + ShellCommandSACL.cpp + ShellCommandSetValue.cpp + ShellCommandValue.cpp + ShellCommandVersion.cpp + ShellCommandsLinkedList.cpp + TextHistory.cpp + Completion.cpp + Pattern.cpp + Settings.cpp + Prompt.cpp) + +add_executable(regexpl ${SOURCE} regexpl.rc) +set_module_type(regexpl win32cui) +add_importlibs(regexpl user32 advapi32 msvcrt kernel32) +add_cd_file(TARGET regexpl DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/sysutils/regexpl/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/sysutils/rosddt/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rosd…
============================================================================== --- trunk/rosapps/applications/sysutils/rosddt/CMakeLists.txt (added) +++ trunk/rosapps/applications/sysutils/rosddt/CMakeLists.txt [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -0,0 +1,5 @@ + +add_executable(rosddt http.c rosddt.c rosddt.rc) +set_module_type(rosddt win32cui UNICODE) +add_importlibs(rosddt setupapi wininet user32 msvcrt kernel32) +add_cd_file(TARGET rosddt DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/sysutils/rosddt/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rosapps/applications/sysutils/rosddt/http.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rosd…
============================================================================== --- trunk/rosapps/applications/sysutils/rosddt/http.c [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/rosddt/http.c [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -76,7 +76,8 @@ char *replay = NULL; wchar_t host[MAX_PATH]; wchar_t path[MAX_PATH]; - unsigned char *p, *d = data; + char *p = NULL; + char *d = data; do { @@ -86,7 +87,7 @@ strcpy(q_data, "data="); p = q_data + 5; while (size--) { - p += sprintf(p, "%%%0.2x", (u_long)*d++); + p += sprintf(p, "%%%.2x", (u_int)*d++); } url_cm.dwStructSize = sizeof(url_cm); Modified: trunk/rosapps/applications/sysutils/rosddt/rosddt.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rosd…
============================================================================== --- trunk/rosapps/applications/sysutils/rosddt/rosddt.c [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/rosddt/rosddt.c [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -30,7 +30,8 @@ static int hw_check_base(wchar_t *hw_id, wchar_t *hw_name) { - wchar_t buff[MAX_PATH], *p; + wchar_t buff[MAX_PATH]; + wchar_t *p = NULL; int status; if ( (status = hw_check_ini(hw_id)) != ST_NEUTRAL ) { @@ -48,7 +49,7 @@ return status; } - if (p = wcsstr(hw_id, L"&REV_")) { + if (p == wcsstr(hw_id, L"&REV_")) { wcscat(buff, p); status = hw_check_ini(buff); } } else if ( (wcsncmp(hw_id, L"USB\\", 4) == 0) && (p = wcsstr(hw_id, L"&VID")) ) @@ -59,7 +60,7 @@ return status; } - if (p = wcsstr(buff, L"&REV")) { + if (p == wcsstr(buff, L"&REV")) { *p = 0; status = hw_check_ini(buff); } } @@ -143,9 +144,9 @@ static void do_update_base() { wchar_t up_url[MAX_PATH]; - void *data; + void *data = NULL; u_long size; - FILE *f; + FILE *f = NULL; if (GetPrivateProfileString(L"URL", L"udpate", NULL, up_url, MAX_PATH, gl_ini_file) == 0) { wprintf(L"Update URL not found in rosddt.ini\n"); return; @@ -153,9 +154,9 @@ wprintf(L"Downloading new rosddt.ini...\n"); - if (data = http_get(up_url, &size)) - { - if (f = _wfopen(gl_ini_file, L"wb")) { + if (data == http_get(up_url, &size)) + { + if (f == _wfopen(gl_ini_file, L"wb")) { fwrite(data, 1, size, f); fclose(f); wprintf(L"Update completed\n"); @@ -172,7 +173,8 @@ { wchar_t up_url[MAX_PATH]; int utf_sz; - char *utf, *p; + char *utf; + char *p = NULL; if (GetPrivateProfileString(L"URL", L"report", NULL, up_url, MAX_PATH, gl_ini_file) == 0) { wprintf(L"Report URL not found in rosddt.ini\n"); return; @@ -184,7 +186,7 @@ wprintf(L"Sending report...\n"); - if (p = http_post(up_url, utf, utf_sz-1, NULL)) { + if (p == http_post(up_url, utf, utf_sz-1, NULL)) { wprintf(L"%S\n", p); free(p); } else { wprintf(L"Report can not be sended, connection error\n"); Added: trunk/rosapps/applications/sysutils/screenshot/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/scre…
============================================================================== --- trunk/rosapps/applications/sysutils/screenshot/CMakeLists.txt (added) +++ trunk/rosapps/applications/sysutils/screenshot/CMakeLists.txt [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -0,0 +1,5 @@ + +add_executable(screenshot screenshot.c screenshot.rc) +set_module_type(screenshot win32gui UNICODE) +add_importlibs(screenshot user32 gdi32 comdlg32 msvcrt kernel32) +add_cd_file(TARGET screenshot DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/sysutils/screenshot/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/sysutils/systeminfo/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/syst…
============================================================================== --- trunk/rosapps/applications/sysutils/systeminfo/CMakeLists.txt (added) +++ trunk/rosapps/applications/sysutils/systeminfo/CMakeLists.txt [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -0,0 +1,5 @@ + +add_executable(systeminfo systeminfo.c systeminfo.rc rsrc.rc) +set_module_type(systeminfo win32cui) +add_importlibs(systeminfo user32 advapi32 netapi32 shlwapi iphlpapi ws2_32 msvcrt kernel32 ntdll) +add_cd_file(TARGET systeminfo DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/sysutils/systeminfo/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/applications/sysutils/tcat/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/tcat…
============================================================================== --- trunk/rosapps/applications/sysutils/tcat/CMakeLists.txt (added) +++ trunk/rosapps/applications/sysutils/tcat/CMakeLists.txt [iso-8859-1] Sun Apr 26 12:28:01 2015 @@ -0,0 +1,5 @@ + +add_executable(tcat cat.c) +set_module_type(tcat win32cui) +add_importlibs(tcat user32 msvcrt kernel32 ntdll) +add_cd_file(TARGET tcat DESTINATION reactos/system32 FOR all) Propchange: trunk/rosapps/applications/sysutils/tcat/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native
9 years, 8 months
1
0
0
0
[tkreuzer] 67433: [CRT] Add incomplete armintr.h
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Apr 26 11:41:08 2015 New Revision: 67433 URL:
http://svn.reactos.org/svn/reactos?rev=67433&view=rev
Log: [CRT] Add incomplete armintr.h Added: trunk/reactos/include/crt/armintr.h (with props) Modified: trunk/reactos/include/crt/intrin.h Added: trunk/reactos/include/crt/armintr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/armintr.h?rev=…
============================================================================== --- trunk/reactos/include/crt/armintr.h (added) +++ trunk/reactos/include/crt/armintr.h [iso-8859-1] Sun Apr 26 11:41:08 2015 @@ -0,0 +1,106 @@ + + +#pragma once + +#if defined(__cplusplus) +extern "C" { +#endif + +typedef enum _tag_ARMINTR_SHIFT_T +{ + _ARM_LSR = 0, + _ARM_LSL = 1, + _ARM_ASR = 2, + _ARM_ROR = 3 +} _ARMINTR_SHIFT_T; + +typedef enum _tag_ARMINTR_CPS_OP +{ + _ARM_CPS_ENABLE_INTERRUPTS = 1, + _ARM_CPS_DISABLE_INTERRUPTS = 2, + _ARM_CPS_CHANGE_MODE = 4 +} _ARMINTR_CPS_OP; + +typedef enum _tag_ARMINTR_CPS_FLAG +{ + _ARM_CPS_INTERRUPT_FLAG_F = 1, + _ARM_CPS_INTERRUPT_FLAG_I = 2, + _ARM_CPS_INTERRUPT_FLAG_A = 4 +} _ARMINTR_CPS_FLAG; + +typedef enum _tag_ARMINTR_BARRIER_TYPE +{ + _ARM_BARRIER_SY = 0xF, + _ARM_BARRIER_ST = 0xE, + _ARM_BARRIER_ISH = 0xB, + _ARM_BARRIER_ISHST = 0xA, + _ARM_BARRIER_NSH = 0x7, + _ARM_BARRIER_NSHST = 0x6, + _ARM_BARRIER_OSH = 0x3, + _ARM_BARRIER_OSHST = 0x2 +} _ARMINTR_BARRIER_TYPE; + +typedef enum _tag_ARMINTR_BANKED_REG +{ + _ARM_BANKED_R8_USR = 0x0, + _ARM_BANKED_R9_USR = 0x1, + _ARM_BANKED_R10_USR = 0x2, + _ARM_BANKED_R11_USR = 0x3, + _ARM_BANKED_R12_USR = 0x4, + _ARM_BANKED_R13_USR = 0x5, + _ARM_BANKED_SP_USR = 0x5, + _ARM_BANKED_R14_USR = 0x6, + _ARM_BANKED_LR_USR = 0x6, + _ARM_BANKED_R8_FIQ = 0x8, + _ARM_BANKED_R9_FIQ = 0x9, + _ARM_BANKED_R10_FIQ = 0xA, + _ARM_BANKED_R11_FIQ = 0xB, + _ARM_BANKED_R12_FIQ = 0xC, + _ARM_BANKED_R13_FIQ = 0xD, + _ARM_BANKED_SP_FIQ = 0xD, + _ARM_BANKED_R14_FIQ = 0xE, + _ARM_BANKED_LR_FIQ = 0xE, + _ARM_BANKED_R14_IRQ = 0x10, + _ARM_BANKED_LR_IRQ = 0x10, + _ARM_BANKED_R13_IRQ = 0x11, + _ARM_BANKED_SP_IRQ = 0x11, + _ARM_BANKED_R14_SVC = 0x12, + _ARM_BANKED_LR_SVC = 0x12, + _ARM_BANKED_R13_SVC = 0x13, + _ARM_BANKED_SP_SVC = 0x13, + _ARM_BANKED_R14_ABT = 0x14, + _ARM_BANKED_LR_ABT = 0x14, + _ARM_BANKED_R13_ABT = 0x15, + _ARM_BANKED_SP_ABT = 0x15, + _ARM_BANKED_R14_UND = 0x16, + _ARM_BANKED_LR_UND = 0x16, + _ARM_BANKED_R13_UND = 0x17, + _ARM_BANKED_SP_UND = 0x17, + _ARM_BANKED_R14_MON = 0x1C, + _ARM_BANKED_LR_MON = 0x1C, + _ARM_BANKED_R13_MON = 0x1D, + _ARM_BANKED_SP_MON = 0x1D, + _ARM_BANKED_ELR_HYP = 0x1E, + _ARM_BANKED_R13_HYP = 0x1F, + _ARM_BANKED_SP_HYP = 0x1F, + _ARM_BANKED_SPSR_FIQ = 0x2E, + _ARM_BANKED_SPSR_IRQ = 0x30, + _ARM_BANKED_SPSR_SVC = 0x32, + _ARM_BANKED_SPSR_ABT = 0x34, + _ARM_BANKED_SPSR_UND = 0x36, + _ARM_BANKED_SPSR_MON = 0x3C, + _ARM_BANKED_SPSR_HYP = 0x3E +} _ARMINTR_BANKED_REG; + +void __dmb(unsigned int Type); +void __dsb(unsigned int Type); +void __isb(unsigned int Type); + +#pragma intrinsic(__dmb) +#pragma intrinsic(__dsb) +#pragma intrinsic(__isb) + + +#if defined(__cplusplus) +} // extern "C" +#endif Propchange: trunk/reactos/include/crt/armintr.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/crt/intrin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/intrin.h?rev=6…
============================================================================== --- trunk/reactos/include/crt/intrin.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/intrin.h [iso-8859-1] Sun Apr 26 11:41:08 2015 @@ -17,7 +17,7 @@ #if defined(_M_ARM) //#include <arm_neon.h> -//#include <armintr.h> +#include <armintr.h> #endif /* _M_ARM */ #if defined(__cplusplus)
9 years, 8 months
1
0
0
0
[akhaldi] 67432: [SHELL32_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Apr 26 11:27:59 2015 New Revision: 67432 URL:
http://svn.reactos.org/svn/reactos?rev=67432&view=rev
Log: [SHELL32_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246 Modified: trunk/rostests/winetests/shell32/assoc.c trunk/rostests/winetests/shell32/ebrowser.c trunk/rostests/winetests/shell32/recyclebin.c trunk/rostests/winetests/shell32/shelllink.c trunk/rostests/winetests/shell32/shellpath.c trunk/rostests/winetests/shell32/shlexec.c trunk/rostests/winetests/shell32/shlfileop.c trunk/rostests/winetests/shell32/shlfolder.c trunk/rostests/winetests/shell32/shlview.c Modified: trunk/rostests/winetests/shell32/assoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/assoc.c…
============================================================================== --- trunk/rostests/winetests/shell32/assoc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/assoc.c [iso-8859-1] Sun Apr 26 11:27:59 2015 @@ -57,21 +57,11 @@ } -static void test_IApplicationAssociationRegistration_QueryInterface(void) -{ - IApplicationAssociationRegistration *appreg; +static void test_IApplicationAssociationRegistration_QueryInterface(IApplicationAssociationRegistration *appreg) +{ IApplicationAssociationRegistration *appreg2; IUnknown *unk; HRESULT hr; - - /* this works since Vista */ - hr = CoCreateInstance(&CLSID_ApplicationAssociationRegistration, NULL, CLSCTX_INPROC_SERVER, - &IID_IApplicationAssociationRegistration, (LPVOID*)&appreg); - - if (FAILED(hr)) { - skip("IApplicationAssociationRegistration not created: 0x%x\n", hr); - return; - } hr = IApplicationAssociationRegistration_QueryInterface(appreg, &IID_IApplicationAssociationRegistration, (void**)&appreg2); @@ -88,8 +78,6 @@ hr = IApplicationAssociationRegistration_QueryInterface(appreg, &IID_IUnknown, NULL); ok(hr == E_POINTER, "got 0x%x (expected E_POINTER)\n", hr); - - IApplicationAssociationRegistration_Release(appreg); } struct assoc_getstring_test @@ -103,7 +91,6 @@ }; static const WCHAR httpW[] = {'h','t','t','p',0}; -static const WCHAR httpsW[] = {'h','t','t','p','s',0}; static const WCHAR badW[] = {'b','a','d','b','a','d',0}; static struct assoc_getstring_test getstring_tests[] = @@ -190,9 +177,48 @@ IQueryAssociations_Release(assoc); } +static void test_IApplicationAssociationRegistration_QueryCurrentDefault(IApplicationAssociationRegistration *appreg) +{ + static const WCHAR emptyW[] = {0}; + static const WCHAR txtW[] = {'.','t','x','t',0}; + static const WCHAR spacetxtW[] = {' ','.','t','x','t',0}; + HRESULT hr; + LPWSTR assocprog = NULL; + + hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, emptyW, AT_URLPROTOCOL, AL_EFFECTIVE, &assocprog); + ok(hr == E_INVALIDARG, "got 0x%x\n", hr); + + hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, emptyW, AT_FILEEXTENSION, AL_EFFECTIVE, &assocprog); + ok(hr == E_INVALIDARG, "got 0x%x\n", hr); + + hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, spacetxtW, AT_FILEEXTENSION, AL_EFFECTIVE, &assocprog); + ok(hr == E_INVALIDARG || hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) /* Win8 */, "got 0x%x\n", hr); + + hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, httpW, AT_URLPROTOCOL, AL_EFFECTIVE, NULL); + ok(hr == E_INVALIDARG, "got 0x%x\n", hr); + + /* AT_FILEEXTENSION must start with a period */ + hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, txtW, AT_FILEEXTENSION, AL_EFFECTIVE, &assocprog); + ok(hr == S_OK, "got 0x%x\n", hr); + trace("%s\n", wine_dbgstr_w(assocprog)); + CoTaskMemFree(assocprog); + + hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, emptyW, AT_STARTMENUCLIENT, AL_EFFECTIVE, &assocprog); + ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), "got 0x%x\n", hr); + + hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, emptyW, AT_MIMETYPE, AL_EFFECTIVE, &assocprog); + ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), "got 0x%x\n", hr); + + hr = IApplicationAssociationRegistration_QueryCurrentDefault(appreg, httpW, AT_URLPROTOCOL, AL_EFFECTIVE, &assocprog); + todo_wine ok(hr == S_OK, "got 0x%x\n", hr); + trace("%s\n", wine_dbgstr_w(assocprog)); + CoTaskMemFree(assocprog); +} + START_TEST(assoc) { IQueryAssociations *qa; + IApplicationAssociationRegistration *appreg; HRESULT hr; CoInitialize(NULL); @@ -210,7 +236,18 @@ else win_skip("IQueryAssociations not supported, 0x%x\n", hr); - test_IApplicationAssociationRegistration_QueryInterface(); + /* this works since Vista */ + hr = CoCreateInstance(&CLSID_ApplicationAssociationRegistration, NULL, CLSCTX_INPROC_SERVER, + &IID_IApplicationAssociationRegistration, (LPVOID *)&appreg); + if (hr == S_OK) + { + test_IApplicationAssociationRegistration_QueryInterface(appreg); + test_IApplicationAssociationRegistration_QueryCurrentDefault(appreg); + + IApplicationAssociationRegistration_Release(appreg); + } + else + win_skip("IApplicationAssociationRegistration not supported: 0x%x\n", hr); CoUninitialize(); } Modified: trunk/rostests/winetests/shell32/ebrowser.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/ebrowse…
============================================================================== --- trunk/rostests/winetests/shell32/ebrowser.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/ebrowser.c [iso-8859-1] Sun Apr 26 11:27:59 2015 @@ -1381,7 +1381,7 @@ ok(pSHCreateShellItem != NULL, "pSHCreateShellItem unexpectedly missing.\n"); GetCurrentDirectoryW(MAX_PATH, current_path); - if(!lstrlenW(current_path)) + if(!current_path[0]) { skip("Failed to create test-directory.\n"); return; Modified: trunk/rostests/winetests/shell32/recyclebin.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/recycle…
============================================================================== --- trunk/rostests/winetests/shell32/recyclebin.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/recyclebin.c [iso-8859-1] Sun Apr 26 11:27:59 2015 @@ -55,8 +55,7 @@ HRESULT hr; HANDLE file; SHFILEOPSTRUCTA shfo; - const CHAR name[] = "test.txt"; - CHAR buf[MAX_PATH + sizeof(name) + 1]; + CHAR temp_path[MAX_PATH-14], buf[MAX_PATH+1]; if(!pSHQueryRecycleBinA) { skip("SHQueryRecycleBinA does not exist\n"); @@ -67,18 +66,17 @@ skip("SHFileOperationA does not exist\n"); return; } - GetCurrentDirectoryA(MAX_PATH, buf); - strcat(buf,"\\"); - strcat(buf,name); + ok(GetTempPathA(sizeof(temp_path), temp_path), "GetTempPath failed\n"); + ok(GetTempFileNameA(temp_path, "trash", 0, buf), "GetTempFileName failed\n"); buf[strlen(buf) + 1] = '\0'; hr = pSHQueryRecycleBinA(buf,&info1); ok(hr == S_OK, "SHQueryRecycleBinA failed with error 0x%x\n", hr); ok(info1.i64Size!=0xdeadbeef,"i64Size not set\n"); ok(info1.i64NumItems!=0xdeadbeef,"i64NumItems not set\n"); /*create and send a file to the recycle bin*/ - file = CreateFileA(name,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,0,NULL); - ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n",name); - WriteFile(file,name,strlen(name),&written,NULL); + file = CreateFileA(buf,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,0,NULL); + ok(file != INVALID_HANDLE_VALUE, "Failure to open file %s\n",buf); + WriteFile(file,buf,strlen(buf),&written,NULL); CloseHandle(file); shfo.hwnd = NULL; shfo.wFunc = FO_DELETE; @@ -89,14 +87,9 @@ shfo.lpszProgressTitle = NULL; ok(!pSHFileOperationA(&shfo), "Deletion was not successful\n"); hr = pSHQueryRecycleBinA(buf,&info2); - ok(hr == S_OK, "SHQueryRecycleBinW failed with error 0x%x\n", hr); - if(info2.i64Size!=info1.i64Size || info2.i64NumItems!=info1.i64NumItems) { - ok(info2.i64Size==info1.i64Size+written,"Expected recycle bin to have 0x%s bytes\n",str_from_int64(info1.i64Size+written)); - ok(info2.i64NumItems==info1.i64NumItems+1,"Expected recycle bin to have 0x%s items\n",str_from_int64(info1.i64NumItems+1)); - } else todo_wine { - ok(info2.i64Size==info1.i64Size+written,"Expected recycle bin to have 0x%s bytes\n",str_from_int64(info1.i64Size+written)); - ok(info2.i64NumItems==info1.i64NumItems+1,"Expected recycle bin to have 0x%s items\n",str_from_int64(info1.i64NumItems+1)); - } + ok(hr == S_OK, "SHQueryRecycleBinA failed with error 0x%x\n", hr); + ok(info2.i64Size==info1.i64Size+written,"Expected recycle bin to have 0x%s bytes\n",str_from_int64(info1.i64Size+written)); + ok(info2.i64NumItems==info1.i64NumItems+1,"Expected recycle bin to have 0x%s items\n",str_from_int64(info1.i64NumItems+1)); } Modified: trunk/rostests/winetests/shell32/shelllink.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shellli…
============================================================================== --- trunk/rostests/winetests/shell32/shelllink.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shelllink.c [iso-8859-1] Sun Apr 26 11:27:59 2015 @@ -49,8 +49,6 @@ { 0xb9, 0x2f, 0x00, 0xa0, 0xc9, 0x03, 0x12, 0xe1 } }; -static const WCHAR notafile[]= { 'C',':','\\','n','o','n','e','x','i','s','t','e','n','t','\\','f','i','l','e',0 }; - /* For some reason SHILCreateFromPath does not work on Win98 and * SHSimpleIDListFromPathA does not work on NT4. But if we call both we @@ -1153,6 +1151,41 @@ for (i = 0; i < ret; i++) DestroyIcon(icons[i]); } +static void test_propertystore(void) +{ + IShellLinkA *linkA; + IShellLinkW *linkW; + IPropertyStore *ps; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + &IID_IShellLinkA, (void**)&linkA); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IShellLinkA_QueryInterface(linkA, &IID_IShellLinkW, (void**)&linkW); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IShellLinkA_QueryInterface(linkA, &IID_IPropertyStore, (void**)&ps); + if (hr == S_OK) { + IPropertyStoreCache *pscache; + + IPropertyStore_Release(ps); + + hr = IShellLinkW_QueryInterface(linkW, &IID_IPropertyStore, (void**)&ps); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IPropertyStore_QueryInterface(ps, &IID_IPropertyStoreCache, (void**)&pscache); + ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + + IPropertyStore_Release(ps); + } + else + win_skip("IShellLink doesn't support IPropertyStore.\n"); + + IShellLinkA_Release(linkA); + IShellLinkW_Release(linkW); +} + START_TEST(shelllink) { HRESULT r; @@ -1180,6 +1213,7 @@ test_GetIconLocation(); test_SHGetStockIconInfo(); test_SHExtractIcons(); + test_propertystore(); CoUninitialize(); } Modified: trunk/rostests/winetests/shell32/shellpath.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shellpa…
============================================================================== --- trunk/rostests/winetests/shell32/shellpath.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shellpath.c [iso-8859-1] Sun Apr 26 11:27:59 2015 @@ -101,6 +101,7 @@ static HRESULT (WINAPI *pSHGetKnownFolderPath)(REFKNOWNFOLDERID, DWORD, HANDLE, PWSTR *); static HRESULT (WINAPI *pSHSetKnownFolderPath)(REFKNOWNFOLDERID, DWORD, HANDLE, PWSTR); static HRESULT (WINAPI *pSHGetFolderPathEx)(REFKNOWNFOLDERID, DWORD, HANDLE, LPWSTR, DWORD); +static BOOL (WINAPI *pPathYetAnotherMakeUniqueName)(PWSTR, PCWSTR, PCWSTR, PCWSTR); static DLLVERSIONINFO shellVersion = { 0 }; static LPMALLOC pMalloc; @@ -207,6 +208,7 @@ pILFindLastID = (void *)GetProcAddress(hShell32, (LPCSTR)16); GET_PROC(SHFileOperationA) GET_PROC(SHGetMalloc) + GET_PROC(PathYetAnotherMakeUniqueName) ok(pSHGetMalloc != NULL, "shell32 is missing SHGetMalloc\n"); if (pSHGetMalloc) @@ -859,6 +861,11 @@ ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); ok(path != NULL, "expected path != NULL\n"); + path = NULL; + hr = pSHGetKnownFolderPath(&FOLDERID_Desktop, KF_FLAG_DEFAULT_PATH, NULL, &path); + ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); + ok(path != NULL, "expected path != NULL\n"); + hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, MAX_PATH); ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); ok(!lstrcmpiW(path, buffer), "expected equal paths\n"); @@ -876,7 +883,7 @@ ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr); } hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, len); - ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), "expected 0x8007007a, got 0x%08x\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "expected E_NOT_SUFFICIENT_BUFFER, got 0x%08x\n", hr); hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, len + 1); ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr); @@ -2631,6 +2638,85 @@ } } +static void test_PathYetAnotherMakeUniqueName(void) +{ + static const WCHAR shortW[] = {'f','i','l','e','.','t','s','t',0}; + static const WCHAR short2W[] = {'f','i','l','e',' ','(','2',')','.','t','s','t',0}; + static const WCHAR tmpW[] = {'t','m','p',0}; + static const WCHAR longW[] = {'n','a','m','e',0}; + static const WCHAR long2W[] = {'n','a','m','e',' ','(','2',')',0}; + WCHAR nameW[MAX_PATH], buffW[MAX_PATH], pathW[MAX_PATH]; + HANDLE file; + BOOL ret; + + if (!pPathYetAnotherMakeUniqueName) + { + win_skip("PathYetAnotherMakeUniqueName() is not available.\n"); + return; + } + +if (0) +{ + /* crashes on Windows */ + ret = pPathYetAnotherMakeUniqueName(NULL, NULL, NULL, NULL); + ok(!ret, "got %d\n", ret); + + ret = pPathYetAnotherMakeUniqueName(nameW, NULL, NULL, NULL); + ok(!ret, "got %d\n", ret); +} + + GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW); + + /* Using short name only first */ + nameW[0] = 0; + ret = pPathYetAnotherMakeUniqueName(nameW, pathW, shortW, NULL); + ok(ret, "got %d\n", ret); + lstrcpyW(buffW, pathW); + lstrcatW(buffW, shortW); + ok(!lstrcmpW(nameW, buffW), "got %s, expected %s\n", wine_dbgstr_w(nameW), wine_dbgstr_w(buffW)); + + /* now create a file with this name and get next name */ + file = CreateFileW(nameW, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); + ok(file != NULL, "got %p\n", file); + + nameW[0] = 0; + ret = pPathYetAnotherMakeUniqueName(nameW, pathW, shortW, NULL); + ok(ret, "got %d\n", ret); + lstrcpyW(buffW, pathW); + lstrcatW(buffW, short2W); + ok(!lstrcmpW(nameW, buffW), "got %s, expected %s\n", wine_dbgstr_w(nameW), wine_dbgstr_w(buffW)); + + CloseHandle(file); + + /* Using short and long */ + nameW[0] = 0; + ret = pPathYetAnotherMakeUniqueName(nameW, pathW, tmpW, longW); + ok(ret, "got %d\n", ret); + lstrcpyW(buffW, pathW); + lstrcatW(buffW, longW); + ok(!lstrcmpW(nameW, buffW), "got %s, expected %s\n", wine_dbgstr_w(nameW), wine_dbgstr_w(buffW)); + + file = CreateFileW(nameW, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, NULL); + ok(file != NULL, "got %p\n", file); + + nameW[0] = 0; + ret = pPathYetAnotherMakeUniqueName(nameW, pathW, tmpW, longW); + ok(ret, "got %d\n", ret); + lstrcpyW(buffW, pathW); + lstrcatW(buffW, long2W); + ok(!lstrcmpW(nameW, buffW), "got %s, expected %s\n", wine_dbgstr_w(nameW), wine_dbgstr_w(buffW)); + + CloseHandle(file); + + /* Using long only */ + nameW[0] = 0; + ret = pPathYetAnotherMakeUniqueName(nameW, pathW, NULL, longW); + ok(ret, "got %d\n", ret); + lstrcpyW(buffW, pathW); + lstrcatW(buffW, longW); + ok(!lstrcmpW(nameW, buffW), "got %s, expected %s\n", wine_dbgstr_w(nameW), wine_dbgstr_w(buffW)); +} + START_TEST(shellpath) { if (!init()) return; @@ -2659,5 +2745,6 @@ test_SHGetFolderPathEx(); test_knownFolders(); test_DoEnvironmentSubst(); + test_PathYetAnotherMakeUniqueName(); } } Modified: trunk/rostests/winetests/shell32/shlexec.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shlexec…
============================================================================== --- trunk/rostests/winetests/shell32/shlexec.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shlexec.c [iso-8859-1] Sun Apr 26 11:27:59 2015 @@ -118,7 +118,7 @@ * association it displays the 'Open With' dialog and I could not find * a flag to prevent this. */ - rc=(INT_PTR)ShellExecuteA(NULL, verb, file, parameters, directory, SW_SHOWNORMAL); + rc=(INT_PTR)ShellExecuteA(NULL, verb, file, parameters, directory, SW_HIDE); if (rc > 32) { @@ -183,7 +183,7 @@ trace("%s\n", shell_call); sei.cbSize=sizeof(sei); - sei.fMask=SEE_MASK_NOCLOSEPROCESS | mask; + sei.fMask=SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NO_CONSOLE | mask; sei.hwnd=NULL; sei.lpVerb=verb; sei.lpFile=file; @@ -857,6 +857,7 @@ "%s\\masked", "%s\\test file.sde", "%s\\test file.exe", + "%s\\test file two.exe", "%s\\test2.exe", "%s\\simple.shlexec", "%s\\drawback_file.noassoc", @@ -931,7 +932,7 @@ /* existing "drawback_file.noassoc" prevents finding "drawback_file.noassoc foo.shlexec" on wine */ sprintf(fileA, "%s\\drawback_file.noassoc foo.shlexec", tmpdir); rc=shell_execute(NULL, fileA, NULL, NULL); - todo_wine ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); + ok(rc > 32, "%s failed: rc=%lu\n", shell_call, rc); /* if quoted, existing "drawback_file.noassoc" not prevents finding "drawback_file.noassoc foo.shlexec" on wine */ sprintf(fileA, "\"%s\\drawback_file.noassoc foo.shlexec\"", tmpdir); @@ -1159,6 +1160,8 @@ win_skip("CommandLineToArgvW not implemented, skipping\n"); return FALSE; } + ok(!argsW[cl2a_count] || broken(argsW[cl2a_count] != NULL) /* before Vista */, + "expected NULL-terminated list of commandline arguments\n"); count = 0; while (test->args[count]) @@ -1218,6 +1221,8 @@ *strW = 0; args = CommandLineToArgvW(strW, &numargs); ok(numargs == 1, "expected 1 args, got %d\n", numargs); + ok(!args || (!args[numargs] || broken(args[numargs] != NULL) /* before Vista */), + "expected NULL-terminated list of commandline arguments\n"); if (numargs == 1) { GetModuleFileNameW(NULL, strW, sizeof(strW)/sizeof(*strW)); @@ -1543,7 +1548,7 @@ "%s failed: rc=%ld err=%u\n", shell_call, rc, GetLastError()); } - else todo_wine + else { ok(rc==test->rc, "%s failed: rc=%ld err=%u\n", shell_call, rc, GetLastError()); @@ -2090,6 +2095,7 @@ { char filename[MAX_PATH]; char params[1024]; + DWORD retval; INT_PTR rc; sprintf(params, "shlexec \"%s\" Exec", child_file); @@ -2116,6 +2122,32 @@ { win_skip("Skipping shellexecute of file with unassociated extension\n"); } + + /* the directory with the test programs contain "test file.exe" + * and "test file two.exe". Check we do not start the first + * when we specify to start the second (see bug 19666) + */ + sprintf(filename, "%s\\test file.exe", tmpdir); + retval = CopyFileA(argv0, filename, FALSE); + ok(retval, "CopyFile(\"%s\",\"%s\",FALSE) failed\n", argv0, filename); + sprintf(filename, "%s\\test file two.exe", tmpdir); + retval = CopyFileA(argv0, filename, FALSE); + ok(retval, "CopyFile(\"%s\",\"%s\",FALSE) failed\n", argv0, filename); + rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, params, NULL, NULL); + ok(rc > 32, "%s returned %lu\n", shell_call, rc); + okChildInt("argcA", 4); + okChildString("argvA0", filename); + okChildString("argvA3", "Exec"); + + /* check quoted filename */ + sprintf(filename, "\"%s\\test file two.exe\"", tmpdir); + rc=shell_execute_ex(SEE_MASK_NOZONECHECKS, NULL, filename, params, NULL, NULL); + ok(rc > 32, "%s returned %lu\n", shell_call, rc); + okChildInt("argcA", 4); + /* strip the quotes for the compare */ + sprintf(filename, "%s\\test file two.exe", tmpdir); + okChildString("argvA0", filename); + okChildString("argvA3", "Exec"); } typedef struct Modified: trunk/rostests/winetests/shell32/shlfileop.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shlfile…
============================================================================== --- trunk/rostests/winetests/shell32/shlfileop.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shlfileop.c [iso-8859-1] Sun Apr 26 11:27:59 2015 @@ -251,7 +251,7 @@ ok(rc == 1, "SHGetFileInfoA(c:\\nonexistent) should return 1, got 0x%x\n", rc); if (rc) { - ok(strcpy(shfi.szDisplayName, "dummy") != 0, "SHGetFileInfoA(c:\\nonexistent) displayname is not set\n"); + ok(strcmp(shfi.szDisplayName, "dummy"), "SHGetFileInfoA(c:\\nonexistent) displayname is not set\n"); ok(shfi.iIcon != 0xdeadbeef, "SHGetFileInfoA(c:\\nonexistent) iIcon is not set\n"); } @@ -622,7 +622,6 @@ shfo.pFrom = "nonexistent.txt\0"; shfo.wFunc = FO_DELETE; ret = SHFileOperationA(&shfo); - todo_wine ok(ret == 1026 || ret == ERROR_FILE_NOT_FOUND || /* Vista */ broken(ret == ERROR_SUCCESS), /* NT4 */ @@ -651,7 +650,6 @@ shfo.pFrom = "test1.txt\0nonexistent.txt\0test2.txt\0"; shfo.wFunc = FO_DELETE; ret = SHFileOperationA(&shfo); - todo_wine ok(ret == 1026 || ret == ERROR_FILE_NOT_FOUND || /* Vista */ broken(ret == ERROR_SUCCESS), /* NT4 */ @@ -664,14 +662,12 @@ init_shfo_tests(); shfo.pFrom = "testdir2\\nonexistent.txt\0"; ret = SHFileOperationA(&shfo); - todo_wine ok(ret == ERROR_FILE_NOT_FOUND || /* Vista */ broken(ret == 0x402) || /* XP */ broken(ret == ERROR_SUCCESS), /* NT4 */ "Expected 0x402 or ERROR_FILE_NOT_FOUND, got %x\n", ret); shfo.pFrom = "nonexistent\\one.txt\0"; ret = SHFileOperationA(&shfo); - todo_wine ok(ret == DE_INVALIDFILES || /* Vista or later */ broken(ret == 0x402), /* XP */ "Expected 0x402 or DE_INVALIDFILES, got %x\n", ret); @@ -898,13 +894,13 @@ DeleteFileA("test7.txt"); RemoveDirectoryA("test8.txt"); - /* number of sources do not correspond to number of targets */ + /* number of sources does not correspond to number of targets */ set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); set_curr_dir_path(to, "test6.txt\0test7.txt\0"); retval = SHFileOperationA(&shfo2); if (dir_exists("test6.txt")) { - /* Vista and W2K8 (broken or new behavior ?) */ + /* Vista and W2K8 (broken or new behavior?) */ ok(retval == DE_DESTSAMETREE, "Expected DE_DESTSAMETREE, got %d\n", retval); ok(DeleteFileA("test6.txt\\test1.txt"), "The file is not copied - many files " "are specified as a target\n"); @@ -1871,7 +1867,7 @@ init_shfo_tests(); - /* number of sources do not correspond to number of targets, + /* number of sources does not correspond to number of targets, include directories */ set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0"); set_curr_dir_path(to, "test6.txt\0test7.txt\0"); @@ -1904,7 +1900,7 @@ } init_shfo_tests(); - /* number of sources do not correspond to number of targets, + /* number of sources does not correspond to number of targets, files only, from exceeds to */ set_curr_dir_path(from, "test1.txt\0test2.txt\0test3.txt\0"); @@ -1939,7 +1935,7 @@ } init_shfo_tests(); - /* number of sources do not correspond to number of targets, + /* number of sources does not correspond to number of targets, files only, too exceeds from */ set_curr_dir_path(from, "test1.txt\0test2.txt\0"); @@ -1963,7 +1959,7 @@ } init_shfo_tests(); - /* number of sources do not correspond to number of targets, + /* number of sources does not correspond to number of targets, target directories */ set_curr_dir_path(from, "test1.txt\0test2.txt\0test3.txt\0"); set_curr_dir_path(to, "test4.txt\0test5.txt\0"); @@ -1987,7 +1983,7 @@ init_shfo_tests(); - /* 0 incomming files */ + /* 0 incoming files */ set_curr_dir_path(from, "\0\0"); set_curr_dir_path(to, "test6.txt\0\0"); retval = SHFileOperationA(&shfo2); Modified: trunk/rostests/winetests/shell32/shlfolder.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shlfold…
============================================================================== --- trunk/rostests/winetests/shell32/shlfolder.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shlfolder.c [iso-8859-1] Sun Apr 26 11:27:59 2015 @@ -60,6 +60,7 @@ static HRESULT (WINAPI *pSHCreateItemFromParsingName)(PCWSTR,IBindCtx*,REFIID,void**); static HRESULT (WINAPI *pSHCreateShellItem)(LPCITEMIDLIST,IShellFolder*,LPCITEMIDLIST,IShellItem**); static HRESULT (WINAPI *pSHCreateShellItemArray)(LPCITEMIDLIST,IShellFolder*,UINT,LPCITEMIDLIST*,IShellItemArray**); +static HRESULT (WINAPI *pSHCreateShellItemArrayFromIDLists)(UINT, PCIDLIST_ABSOLUTE*, IShellItemArray**); static HRESULT (WINAPI *pSHCreateShellItemArrayFromDataObject)(IDataObject*, REFIID, void **); static HRESULT (WINAPI *pSHCreateShellItemArrayFromShellItem)(IShellItem*, REFIID, void **); static LPITEMIDLIST (WINAPI *pILCombine)(LPCITEMIDLIST,LPCITEMIDLIST); @@ -80,7 +81,7 @@ WCHAR *ret; int len; - if(!str || strlen(str) == 0) + if (!str || !str[0]) return NULL; len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0); @@ -116,6 +117,7 @@ MAKEFUNC(SHCreateItemFromParsingName); MAKEFUNC(SHCreateShellItem); MAKEFUNC(SHCreateShellItemArray); + MAKEFUNC(SHCreateShellItemArrayFromIDLists); MAKEFUNC(SHCreateShellItemArrayFromDataObject); MAKEFUNC(SHCreateShellItemArrayFromShellItem); MAKEFUNC(SHGetFolderPathA); @@ -533,12 +535,13 @@ IShellFolder_Release(psfSystemDir); - GetCurrentDirectoryA(MAX_PATH, buf); - if(!lstrlenA(buf)) + cChars = GetCurrentDirectoryA(MAX_PATH, buf); + if(!cChars) { skip("Failed to get current directory, skipping tests.\n"); return; } + if(buf[cChars-1] != '\\') lstrcatA(buf, "\\"); SHGetDesktopFolder(&psfDesktop); @@ -546,7 +549,6 @@ /* .html */ lstrcpyA(pathA, buf); - lstrcatA(pathA, "\\"); lstrcatA(pathA, filename_html); hfile = CreateFileA(pathA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); if(hfile != INVALID_HANDLE_VALUE) @@ -590,7 +592,6 @@ /* .txt */ lstrcpyA(pathA, buf); - lstrcatA(pathA, "\\"); lstrcatA(pathA, filename_txt); hfile = CreateFileA(pathA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); if(hfile != INVALID_HANDLE_VALUE) @@ -604,6 +605,7 @@ hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void**)&psfChild); ok(hr == E_FAIL || /* Vista+ */ hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || /* XP, W2K3 */ + hr == E_INVALIDARG || /* W2K item in top dir */ broken(hr == S_OK), /* Win9x, NT4, W2K */ "Got 0x%08x\n", hr); if(SUCCEEDED(hr)) IShellFolder_Release(psfChild); @@ -616,7 +618,6 @@ /* .foo */ lstrcpyA(pathA, buf); - lstrcatA(pathA, "\\"); lstrcatA(pathA, filename_foo); hfile = CreateFileA(pathA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); if(hfile != INVALID_HANDLE_VALUE) @@ -630,6 +631,7 @@ hr = IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (void**)&psfChild); ok(hr == E_FAIL || /* Vista+ */ hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || /* XP, W2K3 */ + hr == E_INVALIDARG || /* W2K item in top dir */ broken(hr == S_OK), /* Win9x, NT4, W2K */ "Got 0x%08x\n", hr); if(SUCCEEDED(hr)) IShellFolder_Release(psfChild); @@ -779,7 +781,8 @@ if (pidlLast->mkid.cb >= 76) { ok(!lstrcmpW((WCHAR*)&pidlLast->mkid.abID[46], wszFileName) || (pidlLast->mkid.cb >= 94 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[64], wszFileName)) || /* Vista */ - (pidlLast->mkid.cb >= 98 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[68], wszFileName)), /* Win7 */ + (pidlLast->mkid.cb >= 98 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[68], wszFileName)) || /* Win7 */ + (pidlLast->mkid.cb >= 102 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[72], wszFileName)), /* Win8 */ "Filename should be stored as wchar-string at this position!\n"); } @@ -1853,8 +1856,9 @@ } ok (!lstrcmpW(wszFile[i], name) || - !lstrcmpW(wszFile[i], name + 9) || /* Vista */ - !lstrcmpW(wszFile[i], name + 11), /* Win7 */ + !lstrcmpW(wszFile[i], name + 9) || /* Vista */ + !lstrcmpW(wszFile[i], name + 11) || /* Win7 */ + !lstrcmpW(wszFile[i], name + 13), /* Win8 */ "The filename should be stored in unicode at this position!\n"); } } @@ -2199,7 +2203,7 @@ return; } - if (!lstrlenA(curdirA)) + if (!curdirA[0]) { win_skip("GetCurrentDirectoryA returned empty string, skipping test_SHCreateShellItem\n"); return; @@ -2234,8 +2238,10 @@ pidl_abstestfile = pILCombine(pidl_cwd, pidl_testfile); + shellitem = (void*)0xdeadbeef; ret = pSHCreateShellItem(NULL, NULL, NULL, &shellitem); ok(ret == E_INVALIDARG, "SHCreateShellItem returned %x\n", ret); + ok(shellitem == 0, "Got %p\n", shellitem); if (0) /* crashes on Windows XP */ { @@ -2774,7 +2780,7 @@ } GetCurrentDirectoryW(MAX_PATH, curdirW); - if(!lstrlenW(curdirW)) + if (!curdirW[0]) { skip("Failed to get current directory, skipping.\n"); return; @@ -3538,10 +3544,343 @@ else skip("No SHCreateShellItemArrayFromDataObject.\n"); + if(pSHCreateShellItemArrayFromIDLists) + { + WCHAR test1W[] = {'t','e','s','t','1','.','t','x','t',0}; + WCHAR test1pathW[MAX_PATH]; + LPITEMIDLIST pidltest1; + LPCITEMIDLIST pidl_array[2]; + + if(0) + { + /* Crashes */ + hr = pSHCreateShellItemArrayFromIDLists(0, NULL, NULL); + } + + psia = (void*)0xdeadbeef; + hr = pSHCreateShellItemArrayFromIDLists(0, NULL, &psia); + ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(psia == NULL, "Got %p\n", psia); + + psia = (void*)0xdeadbeef; + hr = pSHCreateShellItemArrayFromIDLists(0, pidl_array, &psia); + ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + ok(psia == NULL, "Got %p\n", psia); + + psia = (void*)0xdeadbeef; + pidl_array[0] = NULL; + hr = pSHCreateShellItemArrayFromIDLists(1, pidl_array, &psia); + todo_wine ok(hr == E_OUTOFMEMORY, "Got 0x%08x\n", hr); + ok(psia == NULL, "Got %p\n", psia); + + psia = (void*)0xdeadbeef; + pidl_array[0] = pidl_testdir; + pidl_array[1] = NULL; + hr = pSHCreateShellItemArrayFromIDLists(2, pidl_array, &psia); + todo_wine ok(hr == S_OK || broken(hr == E_INVALIDARG) /* Vista */, "Got 0x%08x\n", hr); + todo_wine ok(psia != NULL || broken(psia == NULL) /* Vista */, "Got %p\n", psia); + if(SUCCEEDED(hr)) + { + IShellItem *psi; + UINT count = 0; + + hr = IShellItemArray_GetCount(psia, &count); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(count == 2, "Got %d\n", count); + + hr = IShellItemArray_GetItemAt(psia, 0, &psi); + ok(hr == S_OK, "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + { + LPWSTR path; + hr = IShellItem_GetDisplayName(psi, SIGDN_DESKTOPABSOLUTEPARSING, &path); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(!lstrcmpW(path, cTestDirW), "Got %s\n", wine_dbgstr_w(path)); + if(SUCCEEDED(hr)) + CoTaskMemFree(path); + + IShellItem_Release(psi); + } + + hr = IShellItemArray_GetItemAt(psia, 1, &psi); + ok(hr == S_OK, "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + { + LPWSTR path; + WCHAR desktoppath[MAX_PATH]; + BOOL result; + + result = pSHGetSpecialFolderPathW(NULL, desktoppath, CSIDL_DESKTOPDIRECTORY, FALSE); + ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOPDIRECTORY) failed! %u\n", GetLastError()); + + hr = IShellItem_GetDisplayName(psi, SIGDN_DESKTOPABSOLUTEPARSING, &path); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(!lstrcmpW(path, desktoppath), "Got %s\n", wine_dbgstr_w(path)); + if(SUCCEEDED(hr)) + CoTaskMemFree(path); + + IShellItem_Release(psi); + } + + + IShellItemArray_Release(psia); + } + + + /* Single pidl */ + psia = (void*)0xdeadbeef; + pidl_array[0] = pidl_testdir; + hr = pSHCreateShellItemArrayFromIDLists(1, pidl_array, &psia); + ok(hr == S_OK, "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + { + IShellItem *psi; + UINT count = 0; + + hr = IShellItemArray_GetCount(psia, &count); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(count == 1, "Got %d\n", count); + + hr = IShellItemArray_GetItemAt(psia, 0, &psi); + ok(hr == S_OK, "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + { + LPWSTR path; + hr = IShellItem_GetDisplayName(psi, SIGDN_DESKTOPABSOLUTEPARSING, &path); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(!lstrcmpW(path, cTestDirW), "Got %s\n", wine_dbgstr_w(path)); + if(SUCCEEDED(hr)) + CoTaskMemFree(path); + + IShellItem_Release(psi); + } + + IShellItemArray_Release(psia); + } + + + lstrcpyW(test1pathW, cTestDirW); + myPathAddBackslashW(test1pathW); + lstrcatW(test1pathW, test1W); + + SHGetDesktopFolder(&pdesktopsf); + + hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, test1pathW, NULL, &pidltest1, NULL); + ok(hr == S_OK, "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + { + psia = (void*)0xdeadbeef; + pidl_array[0] = pidl_testdir; + pidl_array[1] = pidltest1; + hr = pSHCreateShellItemArrayFromIDLists(2, pidl_array, &psia); + ok(hr == S_OK, "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + { + IShellItem *psi; + UINT count = 0; + + hr = IShellItemArray_GetCount(psia, &count); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(count == 2, "Got %d\n", count); + + hr = IShellItemArray_GetItemAt(psia, 0, &psi); + ok(hr == S_OK, "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + { + LPWSTR path; + hr = IShellItem_GetDisplayName(psi, SIGDN_DESKTOPABSOLUTEPARSING, &path); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(!lstrcmpW(path, cTestDirW), "Got %s\n", wine_dbgstr_w(path)); + if(SUCCEEDED(hr)) + CoTaskMemFree(path); + + IShellItem_Release(psi); + } + + hr = IShellItemArray_GetItemAt(psia, 1, &psi); + ok(hr == S_OK, "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + { + LPWSTR path; + hr = IShellItem_GetDisplayName(psi, SIGDN_DESKTOPABSOLUTEPARSING, &path); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(!lstrcmpW(path, test1pathW), "Got %s\n", wine_dbgstr_w(path)); + if(SUCCEEDED(hr)) + CoTaskMemFree(path); + + IShellItem_Release(psi); + } + + + IShellItemArray_Release(psia); + } + + pILFree(pidltest1); + } + + IShellFolder_Release(pdesktopsf); + } + else + skip("No SHCreateShellItemArrayFromIDLists.\n"); + IShellFolder_Release(psf); pILFree(pidl_testdir); Cleanup(); } + +static void test_ShellItemArrayEnumItems(void) +{ + IShellFolder *pdesktopsf, *psf; + IEnumIDList *peidl; + WCHAR cTestDirW[MAX_PATH]; + HRESULT hr; + LPITEMIDLIST pidl_testdir; + static const WCHAR testdirW[] = {'t','e','s','t','d','i','r',0}; + + if(!pSHCreateShellItemArray) + { + win_skip("No SHCreateShellItemArray, skipping test...\n"); + return; + } + + CreateFilesFolders(); + + SHGetDesktopFolder(&pdesktopsf); + + GetCurrentDirectoryW(MAX_PATH, cTestDirW); + myPathAddBackslashW(cTestDirW); + lstrcatW(cTestDirW, testdirW); + + hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, cTestDirW, NULL, &pidl_testdir, 0); + ok(hr == S_OK, "got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + { + hr = IShellFolder_BindToObject(pdesktopsf, pidl_testdir, NULL, (REFIID)&IID_IShellFolder, + (void**)&psf); + ok(hr == S_OK, "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + pILFree(pidl_testdir); + } + IShellFolder_Release(pdesktopsf); + + hr = IShellFolder_EnumObjects(psf, NULL, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS, &peidl); + ok(hr == S_OK, "Got %08x\n", hr); + if(SUCCEEDED(hr)) + { + IShellItemArray *psia; + LPITEMIDLIST apidl[5]; + UINT done, numitems, i; + + for(done = 0; done < 5; done++) + if(IEnumIDList_Next(peidl, 1, &apidl[done], NULL) != S_OK) + break; + ok(done == 5, "Got %d pidls\n", done); + IEnumIDList_Release(peidl); + + /* Create a ShellItemArray */ + hr = pSHCreateShellItemArray(NULL, psf, done, (LPCITEMIDLIST*)apidl, &psia); + ok(hr == S_OK, "Got 0x%08x\n", hr); + if(SUCCEEDED(hr)) + { + IEnumShellItems *iesi; + IShellItem *my_array[10]; + ULONG fetched; + + IShellItemArray_GetCount(psia, &numitems); + ok(numitems == done, "Got %d, expected %d\n", numitems, done); + + iesi = NULL; + hr = IShellItemArray_EnumItems(psia, &iesi); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(iesi != NULL, "Got NULL\n"); + if(SUCCEEDED(hr)) + { + IEnumShellItems *iesi2; + + /* This should fail according to the documentation and Win7+ */ + for(i = 0; i < 10; i++) my_array[i] = (void*)0xdeadbeef; + hr = IEnumShellItems_Next(iesi, 2, my_array, NULL); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* Vista */, "Got 0x%08x\n", hr); + for(i = 0; i < 2; i++) + { + ok(my_array[i] == (void*)0xdeadbeef || + broken(my_array[i] != (void*)0xdeadbeef && my_array[i] != NULL), /* Vista */ + "Got %p (%d)\n", my_array[i], i); + + if(my_array[i] != (void*)0xdeadbeef) + IShellItem_Release(my_array[i]); + } + ok(my_array[2] == (void*)0xdeadbeef, "Got %p\n", my_array[2]); + + IEnumShellItems_Reset(iesi); + for(i = 0; i < 10; i++) my_array[i] = (void*)0xdeadbeef; + hr = IEnumShellItems_Next(iesi, 1, my_array, NULL); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(my_array[0] != NULL && my_array[0] != (void*)0xdeadbeef, "Got %p\n", my_array[0]); + if(my_array[0] != NULL && my_array[0] != (void*)0xdeadbeef) + IShellItem_Release(my_array[0]); + ok(my_array[1] == (void*)0xdeadbeef, "Got %p\n", my_array[1]); + + IEnumShellItems_Reset(iesi); + fetched = 0; + for(i = 0; i < 10; i++) my_array[i] = (void*)0xdeadbeef; + hr = IEnumShellItems_Next(iesi, numitems, my_array, &fetched); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(fetched == numitems, "Got %d\n", fetched); + for(i = 0;i < numitems; i++) + { + ok(my_array[i] != NULL && my_array[i] != (void*)0xdeadbeef, + "Got %p at %d\n", my_array[i], i); + + if(my_array[i] != NULL && my_array[i] != (void*)0xdeadbeef) + IShellItem_Release(my_array[i]); + } + ok(my_array[i] == (void*)0xdeadbeef, "Got %p\n", my_array[i]); + + /* Compare all the items */ + IEnumShellItems_Reset(iesi); + for(i = 0; i < numitems; i++) + { + IShellItem *psi; + int order; + + hr = IShellItemArray_GetItemAt(psia, i, &psi); + ok(hr == S_OK, "Got 0x%08x\n", hr); + hr = IEnumShellItems_Next(iesi, 1, my_array, &fetched); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(fetched == 1, "Got %d\n", fetched); + + hr = IShellItem_Compare(psi, my_array[0], 0, &order); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(order == 0, "Got %d\n", order); + + IShellItem_Release(psi); + IShellItem_Release(my_array[0]); + } + + my_array[0] = (void*)0xdeadbeef; + hr = IEnumShellItems_Next(iesi, 1, my_array, &fetched); + ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(fetched == 0, "Got %d\n", fetched); + ok(my_array[0] == (void*)0xdeadbeef, "Got %p\n", my_array[0]); + + /* Cloning not implemented anywhere */ + iesi2 = (void*)0xdeadbeef; + hr = IEnumShellItems_Clone(iesi, &iesi2); + ok(hr == E_NOTIMPL, "Got 0x%08x\n", hr); + ok(iesi2 == NULL || broken(iesi2 == (void*)0xdeadbeef) /* Vista */, "Got %p\n", iesi2); + + IEnumShellItems_Release(iesi); + } + + IShellItemArray_Release(psia); + } + + for(i = 0; i < done; i++) + pILFree(apidl[i]); + } +} + static void test_ShellItemBindToHandler(void) { @@ -3640,8 +3979,8 @@ if(SUCCEEDED(hr)) IUnknown_Release(punk); /* BHID_Transfer - ITransferSource and ITransferDestination are accessible starting Vista, IUnknown is - supported start Win8. */ + ITransferSource and ITransferDestination are accessible starting from Vista, IUnknown is + supported starting from Win8. */ hr = IShellItem_BindToHandler(psi, NULL, &BHID_Transfer, &IID_ITransferSource, (void**)&punk); ok(hr == S_OK || broken(FAILED(hr)) /* pre-Vista */, "Got 0x%08x\n", hr); if(SUCCEEDED(hr)) @@ -3709,10 +4048,15 @@ static void test_ShellItemGetAttributes(void) { - IShellItem *psi; - LPITEMIDLIST pidl_desktop; + IShellItem *psi, *psi_folder1, *psi_file1; + IShellFolder *pdesktopsf; + LPITEMIDLIST pidl_desktop, pidl; SFGAOF sfgao; HRESULT hr; + WCHAR curdirW[MAX_PATH]; + WCHAR buf[MAX_PATH]; + static const WCHAR testdir1W[] = {'t','e','s','t','d','i','r',0}; + static const WCHAR testfile1W[] = {'t','e','s','t','d','i','r','\\','t','e','s','t','1','.','t','x','t',0}; if(!pSHCreateShellItem) { @@ -3747,6 +4091,148 @@ ok(sfgao == SFGAO_FOLDER || broken(sfgao == 0) /* <Vista */, "Got 0x%08x\n", sfgao); IShellItem_Release(psi); + + CreateFilesFolders(); + + SHGetDesktopFolder(&pdesktopsf); + + GetCurrentDirectoryW(MAX_PATH, curdirW); + myPathAddBackslashW(curdirW); + + lstrcpyW(buf, curdirW); + lstrcatW(buf, testdir1W); + hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, buf, NULL, &pidl, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = pSHCreateShellItem(NULL, NULL, pidl, &psi_folder1); + ok(hr == S_OK, "Got 0x%08x\n", sfgao); + pILFree(pidl); + + lstrcpyW(buf, curdirW); + lstrcatW(buf, testfile1W); + hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, buf, NULL, &pidl, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = pSHCreateShellItem(NULL, NULL, pidl, &psi_file1); + ok(hr == S_OK, "Got 0x%08x\n", sfgao); + pILFree(pidl); + + IShellFolder_Release(pdesktopsf); + + sfgao = 0xdeadbeef; + hr = IShellItem_GetAttributes(psi_folder1, 0, &sfgao); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(sfgao == 0, "Got 0x%08x\n", sfgao); + + sfgao = 0xdeadbeef; + hr = IShellItem_GetAttributes(psi_folder1, SFGAO_FOLDER, &sfgao); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(sfgao == SFGAO_FOLDER, "Got 0x%08x\n", sfgao); + + sfgao = 0xdeadbeef; + hr = IShellItem_GetAttributes(psi_file1, SFGAO_FOLDER, &sfgao); + ok(hr == S_FALSE, "Got 0x%08x\n", hr); + ok(sfgao == 0, "Got 0x%08x\n", sfgao); + + IShellItem_Release(psi_folder1); + IShellItem_Release(psi_file1); + + Cleanup(); +} + +static void test_ShellItemArrayGetAttributes(void) +{ + IShellItemArray *psia_files, *psia_folders1, *psia_folders2, *psia_all; + IShellFolder *pdesktopsf; + LPCITEMIDLIST pidl_array[5]; + SFGAOF attr; + HRESULT hr; + WCHAR curdirW[MAX_PATH]; + WCHAR buf[MAX_PATH]; + UINT i; + static const WCHAR testdir1W[] = {'t','e','s','t','d','i','r',0}; + static const WCHAR testdir2W[] = {'t','e','s','t','d','i','r','\\','t','e','s','t','d','i','r','2',0}; + static const WCHAR testdir3W[] = {'t','e','s','t','d','i','r','\\','t','e','s','t','d','i','r','3',0}; + static const WCHAR testfile1W[] = {'t','e','s','t','d','i','r','\\','t','e','s','t','1','.','t','x','t',0}; + static const WCHAR testfile2W[] = {'t','e','s','t','d','i','r','\\','t','e','s','t','2','.','t','x','t',0}; + static const WCHAR *testfilesW[5] = { testdir1W, testdir2W, testdir3W, testfile1W, testfile2W }; + + if(!pSHCreateShellItemArrayFromShellItem) + { + win_skip("No SHCreateShellItemArrayFromShellItem, skipping test...\n"); + return; + } + + CreateFilesFolders(); + CreateDirectoryA(".\\testdir\\testdir3", NULL); + + SHGetDesktopFolder(&pdesktopsf); + + GetCurrentDirectoryW(MAX_PATH, curdirW); + myPathAddBackslashW(curdirW); + + for(i = 0; i < 5; i++) + { + lstrcpyW(buf, curdirW); + lstrcatW(buf, testfilesW[i]); + hr = IShellFolder_ParseDisplayName(pdesktopsf, NULL, NULL, buf, NULL, (LPITEMIDLIST*)&pidl_array[i], NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + } + IShellFolder_Release(pdesktopsf); + + hr = pSHCreateShellItemArrayFromIDLists(2, pidl_array, &psia_folders1); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = pSHCreateShellItemArrayFromIDLists(2, &pidl_array[1], &psia_folders2); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = pSHCreateShellItemArrayFromIDLists(2, &pidl_array[3], &psia_files); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = pSHCreateShellItemArrayFromIDLists(4, &pidl_array[1], &psia_all); /* All except the first */ + ok(hr == S_OK, "got 0x%08x\n", hr); + + for(i = 0; i < 5; i++) + pILFree((LPITEMIDLIST)pidl_array[i]); + + /* [testfolder/, testfolder/testfolder2] seems to break in Vista */ + attr = 0xdeadbeef; + hr = IShellItemArray_GetAttributes(psia_folders1, SIATTRIBFLAGS_AND, SFGAO_FOLDER, &attr); + ok(hr == S_OK || broken(hr == E_UNEXPECTED) /* Vista */, "Got 0x%08x\n", hr); + ok(attr == SFGAO_FOLDER || broken(attr == 0) /* Vista */, "Got 0x%08x\n", attr); + attr = 0xdeadbeef; + hr = IShellItemArray_GetAttributes(psia_folders1, SIATTRIBFLAGS_OR, SFGAO_FOLDER, &attr); + ok(hr == S_OK || broken(hr == E_UNEXPECTED) /* Vista */, "Got 0x%08x\n", hr); + ok(attr == SFGAO_FOLDER || broken(attr == 0) /* Vista */, "Got 0x%08x\n", attr); + + /* [testfolder/testfolder2, testfolder/testfolder3] works */ + attr = 0xdeadbeef; + hr = IShellItemArray_GetAttributes(psia_folders2, SIATTRIBFLAGS_AND, SFGAO_FOLDER, &attr); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(attr == SFGAO_FOLDER, "Got 0x%08x\n", attr); + attr = 0xdeadbeef; + hr = IShellItemArray_GetAttributes(psia_files, SIATTRIBFLAGS_AND, SFGAO_FOLDER, &attr); + ok(hr == S_FALSE || broken(hr == S_OK) /* Vista */, "Got 0x%08x\n", hr); + ok(attr == 0, "Got 0x%08x\n", attr); + attr = 0xdeadbeef; + hr = IShellItemArray_GetAttributes(psia_all, SIATTRIBFLAGS_AND, SFGAO_FOLDER, &attr); + ok(hr == S_FALSE || broken(hr == S_OK) /* Vista */, "Got 0x%08x\n", hr); + ok(attr == 0, "Got 0x%08x\n", attr); + attr = 0xdeadbeef; + hr = IShellItemArray_GetAttributes(psia_folders2, SIATTRIBFLAGS_OR, SFGAO_FOLDER, &attr); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(attr == SFGAO_FOLDER, "Got 0x%08x\n", attr); + attr = 0xdeadbeef; + hr = IShellItemArray_GetAttributes(psia_files, SIATTRIBFLAGS_OR, SFGAO_FOLDER, &attr); + ok(hr == S_FALSE || broken(hr == S_OK) /* Vista */, "Got 0x%08x\n", hr); + ok(attr == 0, "Got 0x%08x\n", attr); + attr = 0xdeadbeef; + hr = IShellItemArray_GetAttributes(psia_all, SIATTRIBFLAGS_OR, SFGAO_FOLDER, &attr); + ok(hr == S_OK, "Got 0x%08x\n", hr); + ok(attr == SFGAO_FOLDER, "Got 0x%08x\n", attr); + + IShellItemArray_Release(psia_folders1); + IShellItemArray_Release(psia_folders2); + IShellItemArray_Release(psia_files); + IShellItemArray_Release(psia_all); + + RemoveDirectoryA(".\\testdir\\testdir3"); + Cleanup(); } static void test_SHParseDisplayName(void) @@ -3901,7 +4387,7 @@ } GetCurrentDirectoryW(MAX_PATH, path); - if(!lstrlenW(path)) + if (!path[0]) { skip("GetCurrentDirectoryW returned an empty string.\n"); return; @@ -3969,7 +4455,8 @@ } max_id_check -= baseItem; ok((max_id_check == max_id) || - (max_id_check == max_id-1 /* Win 7 */), + (max_id_check == max_id-1) || /* Win 7 */ + (max_id_check == max_id-2), /* Win 8 */ "Not equal (or near equal), got %d and %d\n", max_id_check, max_id); #define is_win2k() (pSHGetFolderPathA && !pSHGetFolderPathAndSubDirA) @@ -4502,8 +4989,8 @@ exp_data->missing_events = exp_data->notify_count; SHChangeNotify(exp_data->signal, SHCNF_PATHA | SHCNF_FLUSH, - strlen(exp_data->path_1) > 0 ? exp_data->path_1 : NULL, - strlen(exp_data->path_2) > 0 ? exp_data->path_2 : NULL); + exp_data->path_1[0] ? exp_data->path_1 : NULL, + exp_data->path_2[0] ? exp_data->path_2 : NULL); do_events(); ok(exp_data->missing_events == 0, "%s: Expected wndproc to be called\n", exp_data->id); @@ -4558,7 +5045,7 @@ } GetCurrentDirectoryW(MAX_PATH, path); - if(!lstrlenW(path)) + if (!path[0]) { skip("GetCurrentDirectoryW returned an empty string.\n"); return; @@ -4757,6 +5244,7 @@ test_LocalizedNames(); test_SHCreateShellItem(); test_SHCreateShellItemArray(); + test_ShellItemArrayEnumItems(); test_desktop_IPersist(); test_GetUIObject(); test_SHSimpleIDListFromPath(); @@ -4770,6 +5258,7 @@ test_SHChangeNotify(TRUE); test_ShellItemBindToHandler(); test_ShellItemGetAttributes(); + test_ShellItemArrayGetAttributes(); test_SHCreateDefaultContextMenu(); test_SHCreateShellFolderView(); test_SHCreateShellFolderViewEx(); Modified: trunk/rostests/winetests/shell32/shlview.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shlview…
============================================================================== --- trunk/rostests/winetests/shell32/shlview.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shlview.c [iso-8859-1] Sun Apr 26 11:27:59 2015 @@ -485,11 +485,6 @@ { 0 } }; -static const struct message folderview_itemcount_seq[] = { - { LVM_GETITEMCOUNT, sent }, - { 0 } -}; - static void test_IShellView_CreateViewWindow(void) { IShellFolder *desktop;
9 years, 8 months
1
0
0
0
[tfaber] 67431: [KERNEL32_VISTA] - Silence debug prints
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 26 06:10:03 2015 New Revision: 67431 URL:
http://svn.reactos.org/svn/reactos?rev=67431&view=rev
Log: [KERNEL32_VISTA] - Silence debug prints Modified: trunk/reactos/dll/win32/kernel32_vista/IdnToAscii.c trunk/reactos/dll/win32/kernel32_vista/IdnToUnicode.c Modified: trunk/reactos/dll/win32/kernel32_vista/IdnToAscii.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32_vista/I…
============================================================================== --- trunk/reactos/dll/win32/kernel32_vista/IdnToAscii.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32_vista/IdnToAscii.c [iso-8859-1] Sun Apr 26 06:10:03 2015 @@ -1,6 +1,8 @@ #define WIN32_NO_STATUS #include <wine/unicode.h> + +#define NDEBUG #include <debug.h> /* Taken from Wine kernel32/locale.c */ Modified: trunk/reactos/dll/win32/kernel32_vista/IdnToUnicode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32_vista/I…
============================================================================== --- trunk/reactos/dll/win32/kernel32_vista/IdnToUnicode.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32_vista/IdnToUnicode.c [iso-8859-1] Sun Apr 26 06:10:03 2015 @@ -1,6 +1,8 @@ #define WIN32_NO_STATUS #include <wine/unicode.h> + +#define NDEBUG #include <debug.h> /* Taken from Wine kernel32/locale.c */
9 years, 8 months
1
0
0
0
[tfaber] 67430: [CMD] - Account for null terminator returned from RegQueryInfoKey CORE-6976
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 26 05:31:16 2015 New Revision: 67430 URL:
http://svn.reactos.org/svn/reactos?rev=67430&view=rev
Log: [CMD] - Account for null terminator returned from RegQueryInfoKey CORE-6976 Modified: trunk/reactos/base/shell/cmd/assoc.c Modified: trunk/reactos/base/shell/cmd/assoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/assoc.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/assoc.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/assoc.c [iso-8859-1] Sun Apr 26 05:31:16 2015 @@ -116,6 +116,7 @@ return -2; } + extLength++; extName = cmd_alloc(extLength * sizeof(TCHAR)); for(keyCtr = 0; keyCtr < numKeys; keyCtr++)
9 years, 8 months
1
0
0
0
[tfaber] 67429: [DHCPCSVC] - Account for null terminator space after RegQueryInfoKey CORE-6976
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 26 04:52:05 2015 New Revision: 67429 URL:
http://svn.reactos.org/svn/reactos?rev=67429&view=rev
Log: [DHCPCSVC] - Account for null terminator space after RegQueryInfoKey CORE-6976 Modified: trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c Modified: trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dhcpcsvc/dhcp/ad…
============================================================================== --- trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c [iso-8859-1] Sun Apr 26 04:52:05 2015 @@ -22,6 +22,7 @@ &MaxSubKeys, &MaxSubKeyLen, NULL, NULL, NULL, NULL, NULL, NULL ); + MaxSubKeyLen++; DH_DbgPrint(MID_TRACE,("MaxSubKeys: %d, MaxSubKeyLen %d\n", MaxSubKeys, MaxSubKeyLen));
9 years, 8 months
1
0
0
0
[tfaber] 67428: [USERENV] - Add space for terminator to values returned from RegQueryInfoKey CORE-6976
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 26 04:10:25 2015 New Revision: 67428 URL:
http://svn.reactos.org/svn/reactos?rev=67428&view=rev
Log: [USERENV] - Add space for terminator to values returned from RegQueryInfoKey CORE-6976 Modified: trunk/reactos/dll/win32/userenv/environment.c trunk/reactos/dll/win32/userenv/registry.c Modified: trunk/reactos/dll/win32/userenv/environment.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/userenv/environm…
============================================================================== --- trunk/reactos/dll/win32/userenv/environment.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/userenv/environment.c [iso-8859-1] Sun Apr 26 04:10:25 2015 @@ -340,6 +340,7 @@ } /* Allocate buffers */ + dwMaxValueNameLength++; lpValueName = LocalAlloc(LPTR, dwMaxValueNameLength * sizeof(WCHAR)); if (lpValueName == NULL) Modified: trunk/reactos/dll/win32/userenv/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/userenv/registry…
============================================================================== --- trunk/reactos/dll/win32/userenv/registry.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/userenv/registry.c [iso-8859-1] Sun Apr 26 04:10:25 2015 @@ -89,6 +89,9 @@ return FALSE; } + dwMaxSubKeyNameLength++; + dwMaxValueNameLength++; + DPRINT("dwSubKeys %lu\n", dwSubKeys); DPRINT("dwMaxSubKeyNameLength %lu\n", dwMaxSubKeyNameLength); DPRINT("dwValues %lu\n", dwValues);
9 years, 8 months
1
0
0
0
[akhaldi] 67427: [NETCFGX] Improve button placements and fix some typos and truncations. By Joachim Henze. CORE-9575
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Apr 25 22:49:02 2015 New Revision: 67427 URL:
http://svn.reactos.org/svn/reactos?rev=67427&view=rev
Log: [NETCFGX] Improve button placements and fix some typos and truncations. By Joachim Henze. CORE-9575 Modified: trunk/reactos/dll/win32/netcfgx/lang/bg-BG.rc trunk/reactos/dll/win32/netcfgx/lang/cs-CZ.rc trunk/reactos/dll/win32/netcfgx/lang/da-DK.rc trunk/reactos/dll/win32/netcfgx/lang/de-DE.rc trunk/reactos/dll/win32/netcfgx/lang/el-GR.rc trunk/reactos/dll/win32/netcfgx/lang/en-US.rc trunk/reactos/dll/win32/netcfgx/lang/es-ES.rc trunk/reactos/dll/win32/netcfgx/lang/fr-FR.rc trunk/reactos/dll/win32/netcfgx/lang/he-IL.rc trunk/reactos/dll/win32/netcfgx/lang/hu-HU.rc trunk/reactos/dll/win32/netcfgx/lang/id-ID.rc trunk/reactos/dll/win32/netcfgx/lang/it-IT.rc trunk/reactos/dll/win32/netcfgx/lang/ja-JP.rc trunk/reactos/dll/win32/netcfgx/lang/nl-NL.rc trunk/reactos/dll/win32/netcfgx/lang/no-NO.rc trunk/reactos/dll/win32/netcfgx/lang/pl-PL.rc trunk/reactos/dll/win32/netcfgx/lang/ro-RO.rc trunk/reactos/dll/win32/netcfgx/lang/ru-RU.rc trunk/reactos/dll/win32/netcfgx/lang/sk-SK.rc trunk/reactos/dll/win32/netcfgx/lang/sq-AL.rc trunk/reactos/dll/win32/netcfgx/lang/sv-SE.rc trunk/reactos/dll/win32/netcfgx/lang/tr-TR.rc trunk/reactos/dll/win32/netcfgx/lang/uk-UA.rc trunk/reactos/dll/win32/netcfgx/lang/zh-CN.rc [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/netcfgx/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/bg-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/cs-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/da-DK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/da-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/de-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/el-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/en-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/es-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/fr-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/he-IL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/he-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/hu-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/id-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/it-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/ja-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/nl-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/no-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/pl-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/ro-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/ru-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/sk-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/sq-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/sv-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/tr-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/uk-…
Modified: trunk/reactos/dll/win32/netcfgx/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/lang/zh-…
9 years, 8 months
1
0
0
0
[tfaber] 67426: [ADVAPI32] - Account for RegQueryInfoKey no longer including the null terminator in EnumHKCRKey/EnumHKCRValue CORE-6976
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Apr 25 20:34:35 2015 New Revision: 67426 URL:
http://svn.reactos.org/svn/reactos?rev=67426&view=rev
Log: [ADVAPI32] - Account for RegQueryInfoKey no longer including the null terminator in EnumHKCRKey/EnumHKCRValue CORE-6976 Modified: trunk/reactos/dll/win32/advapi32/reg/hkcr.c trunk/reactos/dll/win32/advapi32/reg/reg.c Modified: trunk/reactos/dll/win32/advapi32/reg/hkcr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/hkc…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/hkcr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/hkcr.c [iso-8859-1] Sat Apr 25 20:34:35 2015 @@ -711,11 +711,12 @@ goto Exit; } + MaxFallbackSubKeyLen++; TRACE("Maxfallbacksubkeylen: %d\n", MaxFallbackSubKeyLen); /* Allocate our buffer */ FallbackSubKeyName = RtlAllocateHeap( - RtlGetProcessHeap(), 0, (MaxFallbackSubKeyLen + 1) * sizeof(WCHAR)); + RtlGetProcessHeap(), 0, MaxFallbackSubKeyLen * sizeof(WCHAR)); if (!FallbackSubKeyName) { ErrorCode = ERROR_NOT_ENOUGH_MEMORY; @@ -925,11 +926,12 @@ goto Exit; } + MaxFallbackValueNameLen++; TRACE("Maxfallbacksubkeylen: %d\n", MaxFallbackValueNameLen); /* Allocate our buffer */ FallbackValueName = RtlAllocateHeap( - RtlGetProcessHeap(), 0, (MaxFallbackValueNameLen + 1) * sizeof(WCHAR)); + RtlGetProcessHeap(), 0, MaxFallbackValueNameLen * sizeof(WCHAR)); if (!FallbackValueName) { ErrorCode = ERROR_NOT_ENOUGH_MEMORY; Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Sat Apr 25 20:34:35 2015 @@ -3789,7 +3789,6 @@ lpftLastWriteTime->dwHighDateTime = FullInfo->LastWriteTime.u.HighPart; } - ErrorCode = ERROR_SUCCESS; if (lpClass != NULL) { if (*lpcClass == 0)
9 years, 8 months
1
0
0
0
[tfaber] 67425: [ADVAPI32] Fix RegQueryInfoKey - Return a value in lpcClass if lpClass is NULL - Return correct error codes as shown by tests - Correctly name parameters -- most of these are NOT by...
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Apr 25 19:57:27 2015 New Revision: 67425 URL:
http://svn.reactos.org/svn/reactos?rev=67425&view=rev
Log: [ADVAPI32] Fix RegQueryInfoKey - Return a value in lpcClass if lpClass is NULL - Return correct error codes as shown by tests - Correctly name parameters -- most of these are NOT byte counts CORE-6976 Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Sat Apr 25 19:57:27 2015 @@ -1961,7 +1961,7 @@ * NOTES * - Unless RRF_NOEXPAND is specified, REG_EXPAND_SZ values are automatically * expanded and pdwType is set to REG_SZ instead. - * - Restrictions are applied after expanding, using RRF_RT_REG_EXPAND_SZ + * - Restrictions are applied after expanding, using RRF_RT_REG_EXPAND_SZ * without RRF_NOEXPAND is thus not allowed. * An exception is the case where RRF_RT_ANY is specified, because then * RRF_NOEXPAND is allowed. @@ -2720,11 +2720,14 @@ if ((lpData && !lpcbData) || lpdwReserved) return ERROR_INVALID_PARAMETER; - /* Get the size of the buffer we must use for the first call ro RegEnumValueW */ + /* Get the size of the buffer we must use for the first call to RegEnumValueW */ ErrorCode = RegQueryInfoKeyW( hKey, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &NameBufferSize, NULL, NULL, NULL); if (ErrorCode != ERROR_SUCCESS) return ErrorCode; + + /* Add space for the null terminator */ + NameBufferSize++; /* Allocate the buffer for the unicode name */ NameBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, NameBufferSize * sizeof(WCHAR)); @@ -3583,14 +3586,14 @@ LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, - LPDWORD lpcbClass, + LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, - LPDWORD lpcbMaxSubKeyLen, - LPDWORD lpcbMaxClassLen, + LPDWORD lpcMaxSubKeyLen, + LPDWORD lpcMaxClassLen, LPDWORD lpcValues, - LPDWORD lpcbMaxValueNameLen, - LPDWORD lpcbMaxValueLen, + LPDWORD lpcMaxValueNameLen, + LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime) { @@ -3598,38 +3601,51 @@ UNICODE_STRING UnicodeString; ANSI_STRING AnsiString; LONG ErrorCode; + NTSTATUS Status; + DWORD cClass = 0; RtlInitUnicodeString(&UnicodeString, NULL); if (lpClass != NULL) { - UnicodeString.Buffer = &ClassName[0]; - UnicodeString.MaximumLength = sizeof(ClassName); - AnsiString.MaximumLength = *lpcbClass; + RtlInitEmptyUnicodeString(&UnicodeString, + ClassName, + sizeof(ClassName)); + cClass = sizeof(ClassName) / sizeof(WCHAR); } ErrorCode = RegQueryInfoKeyW(hKey, UnicodeString.Buffer, - lpcbClass, + &cClass, lpReserved, lpcSubKeys, - lpcbMaxSubKeyLen, - lpcbMaxClassLen, + lpcMaxSubKeyLen, + lpcMaxClassLen, lpcValues, - lpcbMaxValueNameLen, - lpcbMaxValueLen, + lpcMaxValueNameLen, + lpcMaxValueLen, lpcbSecurityDescriptor, lpftLastWriteTime); if ((ErrorCode == ERROR_SUCCESS) && (lpClass != NULL)) { - AnsiString.Buffer = lpClass; - AnsiString.Length = 0; - UnicodeString.Length = *lpcbClass * sizeof(WCHAR); - RtlUnicodeStringToAnsiString(&AnsiString, - &UnicodeString, - FALSE); - *lpcbClass = AnsiString.Length; - lpClass[AnsiString.Length] = 0; + if (*lpcClass == 0) + { + return ErrorCode; + } + + RtlInitEmptyAnsiString(&AnsiString, lpClass, *lpcClass); + UnicodeString.Length = cClass * sizeof(WCHAR); + Status = RtlUnicodeStringToAnsiString(&AnsiString, + &UnicodeString, + FALSE); + ErrorCode = RtlNtStatusToDosError(Status); + cClass = AnsiString.Length; + lpClass[*lpcClass - 1] = 0; + } + + if (lpcClass != NULL) + { + *lpcClass = cClass; } return ErrorCode; @@ -3644,14 +3660,14 @@ LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, - LPDWORD lpcbClass, + LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, - LPDWORD lpcbMaxSubKeyLen, - LPDWORD lpcbMaxClassLen, + LPDWORD lpcMaxSubKeyLen, + LPDWORD lpcMaxClassLen, LPDWORD lpcValues, - LPDWORD lpcbMaxValueNameLen, - LPDWORD lpcbMaxValueLen, + LPDWORD lpcMaxValueNameLen, + LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime) { @@ -3664,7 +3680,7 @@ ULONG Length; LONG ErrorCode = ERROR_SUCCESS; - if ((lpClass) && (!lpcbClass)) + if ((lpClass) && (!lpcClass)) { return ERROR_INVALID_PARAMETER; } @@ -3678,9 +3694,9 @@ if (lpClass != NULL) { - if (*lpcbClass > 0) - { - ClassLength = min(*lpcbClass - 1, REG_MAX_NAME_SIZE) * sizeof(WCHAR); + if (*lpcClass > 0) + { + ClassLength = min(*lpcClass - 1, REG_MAX_NAME_SIZE) * sizeof(WCHAR); } else { @@ -3696,16 +3712,12 @@ ErrorCode = ERROR_OUTOFMEMORY; goto Cleanup; } - - FullInfo->ClassLength = ClassLength; } else { FullInfoSize = sizeof(KEY_FULL_INFORMATION); FullInfo = &FullInfoBuffer; - FullInfo->ClassLength = 0; - } - FullInfo->ClassOffset = FIELD_OFFSET(KEY_FULL_INFORMATION, Class); + } Status = NtQueryKey(KeyHandle, KeyFullInformation, @@ -3713,15 +3725,8 @@ FullInfoSize, &Length); TRACE("NtQueryKey() returned status 0x%X\n", Status); - if (!NT_SUCCESS(Status)) - { - if (lpClass != NULL) - { - RtlFreeHeap(ProcessHeap, - 0, - FullInfo); - } - + if (!NT_SUCCESS(Status) && Status != STATUS_BUFFER_OVERFLOW) + { ErrorCode = RtlNtStatusToDosError(Status); goto Cleanup; } @@ -3733,15 +3738,15 @@ } TRACE("MaxNameLen %lu\n", FullInfo->MaxNameLen); - if (lpcbMaxSubKeyLen != NULL) - { - *lpcbMaxSubKeyLen = FullInfo->MaxNameLen / sizeof(WCHAR) + 1; + if (lpcMaxSubKeyLen != NULL) + { + *lpcMaxSubKeyLen = FullInfo->MaxNameLen / sizeof(WCHAR); } TRACE("MaxClassLen %lu\n", FullInfo->MaxClassLen); - if (lpcbMaxClassLen != NULL) - { - *lpcbMaxClassLen = FullInfo->MaxClassLen / sizeof(WCHAR) + 1; + if (lpcMaxClassLen != NULL) + { + *lpcMaxClassLen = FullInfo->MaxClassLen / sizeof(WCHAR); } TRACE("Values %lu\n", FullInfo->Values); @@ -3751,15 +3756,15 @@ } TRACE("MaxValueNameLen %lu\n", FullInfo->MaxValueNameLen); - if (lpcbMaxValueNameLen != NULL) - { - *lpcbMaxValueNameLen = FullInfo->MaxValueNameLen / sizeof(WCHAR) + 1; + if (lpcMaxValueNameLen != NULL) + { + *lpcMaxValueNameLen = FullInfo->MaxValueNameLen / sizeof(WCHAR); } TRACE("MaxValueDataLen %lu\n", FullInfo->MaxValueDataLen); - if (lpcbMaxValueLen != NULL) - { - *lpcbMaxValueLen = FullInfo->MaxValueDataLen; + if (lpcMaxValueLen != NULL) + { + *lpcMaxValueLen = FullInfo->MaxValueDataLen; } if (lpcbSecurityDescriptor != NULL) @@ -3773,13 +3778,6 @@ lpcbSecurityDescriptor); if (!NT_SUCCESS(Status) && Status != STATUS_BUFFER_TOO_SMALL) { - if (lpClass != NULL) - { - RtlFreeHeap(ProcessHeap, - 0, - FullInfo); - } - ErrorCode = RtlNtStatusToDosError(Status); goto Cleanup; } @@ -3791,27 +3789,40 @@ lpftLastWriteTime->dwHighDateTime = FullInfo->LastWriteTime.u.HighPart; } + ErrorCode = ERROR_SUCCESS; if (lpClass != NULL) { + if (*lpcClass == 0) + { + goto Cleanup; + } + if (FullInfo->ClassLength > ClassLength) { - ErrorCode = ERROR_BUFFER_OVERFLOW; + ErrorCode = ERROR_INSUFFICIENT_BUFFER; } else { RtlCopyMemory(lpClass, FullInfo->Class, FullInfo->ClassLength); - *lpcbClass = FullInfo->ClassLength / sizeof(WCHAR); - lpClass[*lpcbClass] = 0; - } - + lpClass[FullInfo->ClassLength / sizeof(WCHAR)] = UNICODE_NULL; + } + } + + if (lpcClass != NULL) + { + *lpcClass = FullInfo->ClassLength / sizeof(WCHAR); + } + +Cleanup: + if (lpClass != NULL) + { RtlFreeHeap(ProcessHeap, 0, FullInfo); } -Cleanup: ClosePredefKey(KeyHandle); return ErrorCode; @@ -3979,9 +3990,9 @@ * Failure: ERROR_INVALID_HANDLE, if hkey is invalid. * ERROR_INVALID_PARAMETER, if any other parameter is invalid. * ERROR_MORE_DATA, if on input *count is too small to hold the contents. - * + * * NOTES - * MSDN states that if data is too small it is partially filled. In reality + * MSDN states that if data is too small it is partially filled. In reality * it remains untouched. */ LONG @@ -4218,15 +4229,15 @@ if (name && name[0]) { ret = RegOpenKeyW( hkey, name, &subkey); - if (ret != ERROR_SUCCESS) + if (ret != ERROR_SUCCESS) { return ret; } } ret = RegQueryValueExW( subkey, NULL, NULL, NULL, (LPBYTE)data, (LPDWORD)count ); - - if (subkey != hkey) + + if (subkey != hkey) { RegCloseKey( subkey ); } @@ -4234,9 +4245,9 @@ if (ret == ERROR_FILE_NOT_FOUND) { /* return empty string if default value not found */ - if (data) + if (data) *data = 0; - if (count) + if (count) *count = sizeof(WCHAR); ret = ERROR_SUCCESS; }
9 years, 8 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
49
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Results per page:
10
25
50
100
200