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
2025
January
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
October 2014
----- 2025 -----
January 2025
----- 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
19 participants
730 discussions
Start a n
N
ew thread
[hpoussin] 64500: [BOOTDATA] Do not mix lower and upper case
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Oct 3 15:11:22 2014 New Revision: 64500 URL:
http://svn.reactos.org/svn/reactos?rev=64500&view=rev
Log: [BOOTDATA] Do not mix lower and upper case Modified: trunk/reactos/boot/bootdata/hivedef.inf trunk/reactos/boot/bootdata/hivesys.inf Modified: trunk/reactos/boot/bootdata/hivedef.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivedef.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivedef.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivedef.inf [iso-8859-1] Fri Oct 3 15:11:22 2014 @@ -1645,7 +1645,7 @@ HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run",,0x00000012 -HKCU,"Software\Microsoft\Windows\CurrentVersion\Telephony",,0x00000012 +HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows NT",,0x00000012 @@ -1711,8 +1711,8 @@ ;HKCU,"SOFTWARE\ReactOS\Debug","SpyExcludeDWP",0x00020000,"" ; Internet Explorer -HKCU,Software\Wine\MSHTML,"GeckoUrl",,"
http://source.winehq.org/winegecko.php
" -HKCU,Software\Wine\MSHTML,"GeckoCabDir",0x00020000,"%SystemRoot%\" +HKCU,"SOFTWARE\Wine\MSHTML","GeckoUrl",,"
http://source.winehq.org/winegecko.php
" +HKCU,"SOFTWARE\Wine\MSHTML","GeckoCabDir",0x00020000,"%SystemRoot%\" HKCU,"SOFTWARE\Microsoft\Internet Explorer\Main","Start Page",0x00000000,"
http://www.reactos.org
" Modified: trunk/reactos/boot/bootdata/hivesys.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] Fri Oct 3 15:11:22 2014 @@ -1982,7 +1982,7 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Start",0x00010001,0x00000004 HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Type",0x00010001,0x00000001 HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Tag",0x00010001,0x00000002 -HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VGA\Device0","VgaCompatible",0x00010001,1 +HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","VgaCompatible",0x00010001,1 HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","InstalledDisplayDrivers",0x00010000,"vgaddi" HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.VRefresh",0x00010001,1
10 years, 3 months
1
0
0
0
[hpoussin] 64499: [TCPIP] Fix debug traces
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Oct 3 15:11:19 2014 New Revision: 64499 URL:
http://svn.reactos.org/svn/reactos?rev=64499&view=rev
Log: [TCPIP] Fix debug traces Modified: trunk/reactos/drivers/network/tcpip/tcpip/main.c Modified: trunk/reactos/drivers/network/tcpip/tcpip/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
============================================================================== --- trunk/reactos/drivers/network/tcpip/tcpip/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/tcpip/main.c [iso-8859-1] Fri Oct 3 15:11:19 2014 @@ -165,9 +165,9 @@ TI_DbgPrint(MIN_TRACE, ("AddressCount: %d\n", Address->TAAddressCount)); if( Address->TAAddressCount == 1 ) { - TI_DbgPrint(MIN_TRACE, ("AddressLength: %\n", + TI_DbgPrint(MIN_TRACE, ("AddressLength: %u\n", Address->Address[0].AddressLength)); - TI_DbgPrint(MIN_TRACE, ("AddressType: %\n", + TI_DbgPrint(MIN_TRACE, ("AddressType: %u\n", Address->Address[0].AddressType)); }
10 years, 3 months
1
0
0
0
[hpoussin] 64498: [MKHIVE] Use same code as ntoskrnl to create registry keys CORE-8584
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Oct 3 13:17:32 2014 New Revision: 64498 URL:
http://svn.reactos.org/svn/reactos?rev=64498&view=rev
Log: [MKHIVE] Use same code as ntoskrnl to create registry keys CORE-8584 Added: trunk/reactos/tools/mkhive/cmindex.c (with props) trunk/reactos/tools/mkhive/cmname.c (with props) trunk/reactos/tools/mkhive/ntoskrnl.h (with props) Added: trunk/reactos/tools/mkhive/cmindex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/cmindex.c?rev…
============================================================================== --- trunk/reactos/tools/mkhive/cmindex.c (added) +++ trunk/reactos/tools/mkhive/cmindex.c [iso-8859-1] Fri Oct 3 13:17:32 2014 @@ -0,0 +1 @@ +#include "../../ntoskrnl/config/cmindex.c" Propchange: trunk/reactos/tools/mkhive/cmindex.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/tools/mkhive/cmname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/cmname.c?rev=…
============================================================================== --- trunk/reactos/tools/mkhive/cmname.c (added) +++ trunk/reactos/tools/mkhive/cmname.c [iso-8859-1] Fri Oct 3 13:17:32 2014 @@ -0,0 +1 @@ +#include "../../ntoskrnl/config/cmname.c" Propchange: trunk/reactos/tools/mkhive/cmname.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/tools/mkhive/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/ntoskrnl.h?re…
============================================================================== --- trunk/reactos/tools/mkhive/ntoskrnl.h (added) +++ trunk/reactos/tools/mkhive/ntoskrnl.h [iso-8859-1] Fri Oct 3 13:17:32 2014 @@ -0,0 +1,2 @@ +#define NDEBUG +#include "mkhive.h" Propchange: trunk/reactos/tools/mkhive/ntoskrnl.h ------------------------------------------------------------------------------ svn:eol-style = native
10 years, 3 months
1
0
0
0
[hpoussin] 64497: [MKHIVE] Use same code as ntoskrnl to create registry keys CORE-8584
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Oct 3 13:15:10 2014 New Revision: 64497 URL:
http://svn.reactos.org/svn/reactos?rev=64497&view=rev
Log: [MKHIVE] Use same code as ntoskrnl to create registry keys CORE-8584 Modified: trunk/reactos/tools/mkhive/CMakeLists.txt trunk/reactos/tools/mkhive/cmi.c trunk/reactos/tools/mkhive/mkhive.h trunk/reactos/tools/mkhive/rtl.c Modified: trunk/reactos/tools/mkhive/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/CMakeLists.tx…
============================================================================== --- trunk/reactos/tools/mkhive/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/CMakeLists.txt [iso-8859-1] Fri Oct 3 13:15:10 2014 @@ -9,6 +9,8 @@ list(APPEND SOURCE binhive.c cmi.c + cmindex.c + cmname.c mkhive.c reginf.c registry.c Modified: trunk/reactos/tools/mkhive/cmi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/cmi.c?rev=644…
============================================================================== --- trunk/reactos/tools/mkhive/cmi.c [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/cmi.c [iso-8859-1] Fri Oct 3 13:15:10 2014 @@ -26,7 +26,7 @@ #define NDEBUG #include "mkhive.h" -static PVOID +PVOID NTAPI CmpAllocate( IN SIZE_T Size, @@ -36,7 +36,7 @@ return (PVOID) malloc((size_t)Size); } -static VOID +VOID NTAPI CmpFree( IN PVOID Ptr, @@ -221,16 +221,13 @@ } NTSTATUS -CmiAddSubKey( - IN PCMHIVE RegistryHive, - IN PCM_KEY_NODE ParentKeyCell, +CmiCreateSubKey( + IN PCMHIVE RegistryHive, IN HCELL_INDEX ParentKeyCellOffset, IN PCUNICODE_STRING SubKeyName, IN ULONG CreateOptions, - OUT PCM_KEY_NODE *pSubKeyCell, - OUT HCELL_INDEX *pBlockOffset) -{ - PCM_KEY_FAST_INDEX HashBlock; + OUT HCELL_INDEX* pNKBOffset) +{ HCELL_INDEX NKBOffset; PCM_KEY_NODE NewKeyCell; ULONG NewBlockSize; @@ -240,8 +237,6 @@ BOOLEAN Packable; HSTORAGE_TYPE Storage; ULONG i; - - VERIFY_KEY_CELL(ParentKeyCell); /* Skip leading backslash */ if (SubKeyName->Buffer[0] == L'\\') @@ -325,90 +320,46 @@ VERIFY_KEY_CELL(NewKeyCell); } + if (NT_SUCCESS(Status)) + { + *pNKBOffset = NKBOffset; + } + return Status; +} + +NTSTATUS +CmiAddSubKey( + IN PCMHIVE RegistryHive, + IN PCM_KEY_NODE ParentKeyCell, + IN HCELL_INDEX ParentKeyCellOffset, + IN PCUNICODE_STRING SubKeyName, + IN ULONG CreateOptions, + OUT PCM_KEY_NODE *pSubKeyCell, + OUT HCELL_INDEX *pBlockOffset) +{ + HCELL_INDEX NKBOffset; + NTSTATUS Status; + + VERIFY_KEY_CELL(ParentKeyCell); + + /* Create the new key */ + Status = CmiCreateSubKey(RegistryHive, ParentKeyCellOffset, SubKeyName, CreateOptions, &NKBOffset); if (!NT_SUCCESS(Status)) { return Status; } - if (ParentKeyCell->SubKeyLists[Storage] == HCELL_NIL) - { - Status = CmiAllocateHashTableCell ( - RegistryHive, - &HashBlock, - &ParentKeyCell->SubKeyLists[Storage], - REG_INIT_HASH_TABLE_SIZE, - Storage); - if (!NT_SUCCESS(Status)) - { - return(Status); - } - } - else - { - HashBlock = (PCM_KEY_FAST_INDEX)HvGetCell ( - &RegistryHive->Hive, - ParentKeyCell->SubKeyLists[Storage]); - ASSERT(HashBlock->Signature == CM_KEY_FAST_LEAF); - - if (HashBlock->Count == - ((HvGetCellSize(&RegistryHive->Hive, HashBlock) - FIELD_OFFSET(CM_KEY_FAST_INDEX, List)) / sizeof(CM_INDEX))) - { - PCM_KEY_FAST_INDEX NewHashBlock; - HCELL_INDEX HTOffset; - - /* Reallocate the hash table cell */ - Status = CmiAllocateHashTableCell ( - RegistryHive, - &NewHashBlock, - &HTOffset, - HashBlock->Count + - REG_EXTEND_HASH_TABLE_SIZE, - Storage); - if (!NT_SUCCESS(Status)) - { - return Status; - } - RtlCopyMemory( - &NewHashBlock->List[0], - &HashBlock->List[0], - sizeof(NewHashBlock->List[0]) * HashBlock->Count); - NewHashBlock->Count = HashBlock->Count; - HvFreeCell (&RegistryHive->Hive, ParentKeyCell->SubKeyLists[Storage]); - ParentKeyCell->SubKeyLists[Storage] = HTOffset; - HashBlock = NewHashBlock; - } - } - - Status = CmiAddKeyToHashTable( - RegistryHive, - HashBlock, - ParentKeyCell->SubKeyLists[Storage], - NewKeyCell, - NKBOffset); - if (NT_SUCCESS(Status)) - { - ParentKeyCell->SubKeyCounts[Storage]++; - if (Packable) - { - if (NameLength*sizeof(WCHAR) > ParentKeyCell->MaxNameLen) - ParentKeyCell->MaxNameLen = NameLength*sizeof(WCHAR); - } - else - { - if (NameLength > ParentKeyCell->MaxNameLen) - ParentKeyCell->MaxNameLen = NameLength; - } - if (NewKeyCell->ClassLength > ParentKeyCell->MaxClassLen) - ParentKeyCell->MaxClassLen = NewKeyCell->ClassLength; - - *pSubKeyCell = NewKeyCell; - *pBlockOffset = NKBOffset; + if (!CmpAddSubKey(&RegistryHive->Hive, ParentKeyCellOffset, NKBOffset)) + { + /* FIXME: delete newly created cell */ + return STATUS_UNSUCCESSFUL; } KeQuerySystemTime(&ParentKeyCell->LastWriteTime); HvMarkCellDirty(&RegistryHive->Hive, ParentKeyCellOffset, FALSE); - return Status; + *pBlockOffset = NKBOffset; + return STATUS_SUCCESS; } static BOOLEAN Modified: trunk/reactos/tools/mkhive/mkhive.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/mkhive.h?rev=…
============================================================================== --- trunk/reactos/tools/mkhive/mkhive.h [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/mkhive.h [iso-8859-1] Fri Oct 3 13:15:10 2014 @@ -117,9 +117,12 @@ #include "registry.h" #include "binhive.h" +#define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\') + #define HIVE_NO_FILE 2 #define VERIFY_REGISTRY_HIVE(hive) extern LIST_ENTRY CmiHiveListHead; #define ABS_VALUE(V) (((V) < 0) ? -(V) : (V)) +#define PAGED_CODE() /* EOF */ Modified: trunk/reactos/tools/mkhive/rtl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/rtl.c?rev=644…
============================================================================== --- trunk/reactos/tools/mkhive/rtl.c [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/rtl.c [iso-8859-1] Fri Oct 3 13:15:10 2014 @@ -105,6 +105,37 @@ WideString[2 * i + 1] = 0; } return STATUS_SUCCESS; +} + +LONG NTAPI +RtlCompareUnicodeString( + IN PCUNICODE_STRING String1, + IN PCUNICODE_STRING String2, + IN BOOLEAN CaseInSensitive) +{ + USHORT i; + WCHAR c1, c2; + + for (i = 0; i <= String1->Length / sizeof(WCHAR) && i <= String2->Length / sizeof(WCHAR); i++) + { + if (CaseInSensitive) + { + c1 = RtlUpcaseUnicodeChar(String1->Buffer[i]); + c2 = RtlUpcaseUnicodeChar(String2->Buffer[i]); + } + else + { + c1 = String1->Buffer[i]; + c2 = String2->Buffer[i]; + } + + if (c1 < c2) + return -1; + else if (c1 > c2) + return 1; + } + + return 0; } WCHAR NTAPI
10 years, 3 months
1
0
0
0
[tkreuzer] 64496: [PSDK/XDK] Add some missing definitions to ntdef.h and winnt.h
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Oct 3 12:10:08 2014 New Revision: 64496 URL:
http://svn.reactos.org/svn/reactos?rev=64496&view=rev
Log: [PSDK/XDK] Add some missing definitions to ntdef.h and winnt.h Modified: trunk/reactos/include/psdk/ntdef.h trunk/reactos/include/psdk/winnt.h trunk/reactos/include/xdk/ntbasedef.h trunk/reactos/include/xdk/ntdef.template.h trunk/reactos/include/xdk/winnt_old.h Modified: trunk/reactos/include/psdk/ntdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=6…
============================================================================== --- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ntdef.h [iso-8859-1] Fri Oct 3 12:10:08 2014 @@ -461,10 +461,6 @@ typedef unsigned short USHORT, *PUSHORT; typedef unsigned long ULONG, *PULONG; -typedef CONST UCHAR *PCUCHAR; -typedef CONST USHORT *PCUSHORT; -typedef CONST ULONG *PCULONG; - typedef double DOUBLE; /* Signed Types */ @@ -799,6 +795,26 @@ #else #define RTL_CONST_CAST(type) (type) #endif + +#ifdef __cplusplus +#define DEFINE_ENUM_FLAG_OPERATORS(_ENUMTYPE) \ +extern "C++" { \ + inline _ENUMTYPE operator|(_ENUMTYPE a, _ENUMTYPE b) { return _ENUMTYPE(((int)a) | ((int)b)); } \ + inline _ENUMTYPE &operator|=(_ENUMTYPE &a, _ENUMTYPE b) { return (_ENUMTYPE &)(((int &)a) |= ((int)b)); } \ + inline _ENUMTYPE operator&(_ENUMTYPE a, _ENUMTYPE b) { return _ENUMTYPE(((int)a) & ((int)b)); } \ + inline _ENUMTYPE &operator&=(_ENUMTYPE &a, _ENUMTYPE b) { return (_ENUMTYPE &)(((int &)a) &= ((int)b)); } \ + inline _ENUMTYPE operator~(_ENUMTYPE a) { return _ENUMTYPE(~((int)a)); } \ + inline _ENUMTYPE operator^(_ENUMTYPE a, _ENUMTYPE b) { return _ENUMTYPE(((int)a) ^ ((int)b)); } \ + inline _ENUMTYPE &operator^=(_ENUMTYPE &a, _ENUMTYPE b) { return (_ENUMTYPE &)(((int &)a) ^= ((int)b)); } \ +} +#else +#define DEFINE_ENUM_FLAG_OPERATORS(_ENUMTYPE) +#endif + +#define COMPILETIME_OR_2FLAGS(a,b) ((UINT)(a)|(UINT)(b)) +#define COMPILETIME_OR_3FLAGS(a,b,c) ((UINT)(a)|(UINT)(b)|(UINT)(c)) +#define COMPILETIME_OR_4FLAGS(a,b,c,d) ((UINT)(a)|(UINT)(b)|(UINT)(c)|(UINT)(d)) +#define COMPILETIME_OR_5FLAGS(a,b,c,d,e) ((UINT)(a)|(UINT)(b)|(UINT)(c)|(UINT)(d)|(UINT)(e)) /* Type Limits */ #define MINCHAR 0x80 @@ -1401,8 +1417,22 @@ #define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT) #define LOCALE_INVARIANT MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT) +typedef _Return_type_success_(return >= 0) LONG NTSTATUS; +typedef NTSTATUS *PNTSTATUS; + +#ifndef __SECSTATUS_DEFINED__ +typedef long SECURITY_STATUS; +#define __SECSTATUS_DEFINED__ +#endif + /* Physical Addresses are always treated as 64-bit wide */ typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; + +#define TIME LARGE_INTEGER +#define _TIME _LARGE_INTEGER +#define PTIME PLARGE_INTEGER +#define LowTime LowPart +#define HighTime HighPart /* Used to store a non-float 8 byte aligned structure */ typedef struct _QUAD @@ -1413,6 +1443,17 @@ double DoNotUseThisField; } DUMMYUNIONNAME; } QUAD, *PQUAD, UQUAD, *PUQUAD; + +#if (_WIN32_WINNT >= 0x0600) || (defined(__cplusplus) && defined(WINDOWS_ENABLE_CPLUSPLUS)) +typedef CONST UCHAR *PCUCHAR; +typedef CONST USHORT *PCUSHORT; +typedef CONST ULONG *PCULONG; +typedef CONST UQUAD *PCUQUAD; +typedef CONST SCHAR *PCSCHAR; +#endif /* (/_WIN32_WINNT >= 0x0600) */ +#if (_WIN32_WINNT >= 0x0600) +typedef CONST NTSTATUS *PCNTSTATUS; +#endif /* (/_WIN32_WINNT >= 0x0600) */ /* String Types */ typedef struct _STRING { @@ -1528,6 +1569,8 @@ } OBJECT_ATTRIBUTES64, *POBJECT_ATTRIBUTES64; typedef CONST OBJECT_ATTRIBUTES64 *PCOBJECT_ATTRIBUTES64; +#define OBJ_HANDLE_TAGBITS 0x00000003L + /* Values for the Attributes member */ #define OBJ_INHERIT 0x00000002L #define OBJ_PERMANENT 0x00000010L @@ -1561,6 +1604,37 @@ #define RTL_INIT_OBJECT_ATTRIBUTES(n, a) \ RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a) +#ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable:4214) /* Bit fields of other types than int */ +#endif /* _MSC_VER */ +typedef struct _RTL_BALANCED_NODE +{ + _ANONYMOUS_UNION union + { + struct _RTL_BALANCED_NODE *Children[2]; + _ANONYMOUS_STRUCT struct + { + struct _RTL_BALANCED_NODE *Left; + struct _RTL_BALANCED_NODE *Right; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + _ANONYMOUS_UNION union + { + UCHAR Red : 1; + UCHAR Balance : 2; + ULONG_PTR ParentValue; + } DUMMYUNIONNAME2; +} RTL_BALANCED_NODE, *PRTL_BALANCED_NODE; +#ifdef _MSC_VER + #pragma warning(pop) +#endif /* _MSC_VER */ + +#define RTL_BALANCED_NODE_RESERVED_PARENT_MASK 3 +#define RTL_BALANCED_NODE_GET_PARENT_POINTER(Node) \ + ((PRTL_BALANCED_NODE)((Node)->ParentValue & \ + ~RTL_BALANCED_NODE_RESERVED_PARENT_MASK)) + /* Product Types */ typedef enum _NT_PRODUCT_TYPE { NtProductWinNt = 1, @@ -1583,6 +1657,28 @@ WaitAny } WAIT_TYPE; +#ifndef MIDL_PASS +FORCEINLINE +VOID +ListEntry32To64( + _In_ PLIST_ENTRY32 ListEntry32, + _Out_ PLIST_ENTRY64 ListEntry64) +{ + ListEntry64->Flink = (ULONG)ListEntry32->Flink; + ListEntry64->Blink = (ULONG)ListEntry32->Blink; +} + +FORCEINLINE +VOID +ListEntry64To32( + _In_ PLIST_ENTRY64 ListEntry64, + _Out_ PLIST_ENTRY32 ListEntry32) +{ + ListEntry32->Flink = ListEntry64->Flink & 0xFFFFFFFF; + ListEntry32->Blink = ListEntry64->Blink & 0xFFFFFFFF; +} +#endif /* !MIDL_PASS */ + #ifdef __cplusplus } // extern "C" #endif Modified: trunk/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=6…
============================================================================== --- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Fri Oct 3 12:10:08 2014 @@ -728,6 +728,26 @@ #else #define RTL_CONST_CAST(type) (type) #endif + +#ifdef __cplusplus +#define DEFINE_ENUM_FLAG_OPERATORS(_ENUMTYPE) \ +extern "C++" { \ + inline _ENUMTYPE operator|(_ENUMTYPE a, _ENUMTYPE b) { return _ENUMTYPE(((int)a) | ((int)b)); } \ + inline _ENUMTYPE &operator|=(_ENUMTYPE &a, _ENUMTYPE b) { return (_ENUMTYPE &)(((int &)a) |= ((int)b)); } \ + inline _ENUMTYPE operator&(_ENUMTYPE a, _ENUMTYPE b) { return _ENUMTYPE(((int)a) & ((int)b)); } \ + inline _ENUMTYPE &operator&=(_ENUMTYPE &a, _ENUMTYPE b) { return (_ENUMTYPE &)(((int &)a) &= ((int)b)); } \ + inline _ENUMTYPE operator~(_ENUMTYPE a) { return _ENUMTYPE(~((int)a)); } \ + inline _ENUMTYPE operator^(_ENUMTYPE a, _ENUMTYPE b) { return _ENUMTYPE(((int)a) ^ ((int)b)); } \ + inline _ENUMTYPE &operator^=(_ENUMTYPE &a, _ENUMTYPE b) { return (_ENUMTYPE &)(((int &)a) ^= ((int)b)); } \ +} +#else +#define DEFINE_ENUM_FLAG_OPERATORS(_ENUMTYPE) +#endif + +#define COMPILETIME_OR_2FLAGS(a,b) ((UINT)(a)|(UINT)(b)) +#define COMPILETIME_OR_3FLAGS(a,b,c) ((UINT)(a)|(UINT)(b)|(UINT)(c)) +#define COMPILETIME_OR_4FLAGS(a,b,c,d) ((UINT)(a)|(UINT)(b)|(UINT)(c)|(UINT)(d)) +#define COMPILETIME_OR_5FLAGS(a,b,c,d,e) ((UINT)(a)|(UINT)(b)|(UINT)(c)|(UINT)(d)|(UINT)(e)) /* Type Limits */ #define MINCHAR 0x80 @@ -1423,21 +1443,6 @@ #define ACE_OBJECT_TYPE_PRESENT 0x00000001 #define ACE_INHERITED_OBJECT_TYPE_PRESENT 0x00000002 - -#ifdef __cplusplus -#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \ -extern "C++" { \ - inline ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)|((int)b)); } \ - inline ENUMTYPE operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) |= ((int)b)); } \ - inline ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)&((int)b)); } \ - inline ENUMTYPE operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) &= ((int)b)); } \ - inline ENUMTYPE operator ~ (ENUMTYPE a) { return (ENUMTYPE)(~((int)a)); } \ - inline ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)^((int)b)); } \ - inline ENUMTYPE operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) ^= ((int)b)); } \ -} -#else -# define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) /* */ -#endif /* also in ddk/ntifs.h */ #define COMPRESSION_FORMAT_NONE (0x0000) Modified: trunk/reactos/include/xdk/ntbasedef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ntbasedef.h?re…
============================================================================== --- trunk/reactos/include/xdk/ntbasedef.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/ntbasedef.h [iso-8859-1] Fri Oct 3 12:10:08 2014 @@ -351,10 +351,6 @@ typedef unsigned char UCHAR, *PUCHAR; typedef unsigned short USHORT, *PUSHORT; typedef unsigned long ULONG, *PULONG; - -typedef CONST UCHAR *PCUCHAR; -typedef CONST USHORT *PCUSHORT; -typedef CONST ULONG *PCULONG; typedef double DOUBLE; $endif(_NTDEF_) @@ -711,6 +707,26 @@ #else #define RTL_CONST_CAST(type) (type) #endif + +#ifdef __cplusplus +#define DEFINE_ENUM_FLAG_OPERATORS(_ENUMTYPE) \ +extern "C++" { \ + inline _ENUMTYPE operator|(_ENUMTYPE a, _ENUMTYPE b) { return _ENUMTYPE(((int)a) | ((int)b)); } \ + inline _ENUMTYPE &operator|=(_ENUMTYPE &a, _ENUMTYPE b) { return (_ENUMTYPE &)(((int &)a) |= ((int)b)); } \ + inline _ENUMTYPE operator&(_ENUMTYPE a, _ENUMTYPE b) { return _ENUMTYPE(((int)a) & ((int)b)); } \ + inline _ENUMTYPE &operator&=(_ENUMTYPE &a, _ENUMTYPE b) { return (_ENUMTYPE &)(((int &)a) &= ((int)b)); } \ + inline _ENUMTYPE operator~(_ENUMTYPE a) { return _ENUMTYPE(~((int)a)); } \ + inline _ENUMTYPE operator^(_ENUMTYPE a, _ENUMTYPE b) { return _ENUMTYPE(((int)a) ^ ((int)b)); } \ + inline _ENUMTYPE &operator^=(_ENUMTYPE &a, _ENUMTYPE b) { return (_ENUMTYPE &)(((int &)a) ^= ((int)b)); } \ +} +#else +#define DEFINE_ENUM_FLAG_OPERATORS(_ENUMTYPE) +#endif + +#define COMPILETIME_OR_2FLAGS(a,b) ((UINT)(a)|(UINT)(b)) +#define COMPILETIME_OR_3FLAGS(a,b,c) ((UINT)(a)|(UINT)(b)|(UINT)(c)) +#define COMPILETIME_OR_4FLAGS(a,b,c,d) ((UINT)(a)|(UINT)(b)|(UINT)(c)|(UINT)(d)) +#define COMPILETIME_OR_5FLAGS(a,b,c,d,e) ((UINT)(a)|(UINT)(b)|(UINT)(c)|(UINT)(d)|(UINT)(e)) /* Type Limits */ #define MINCHAR 0x80 Modified: trunk/reactos/include/xdk/ntdef.template.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ntdef.template…
============================================================================== --- trunk/reactos/include/xdk/ntdef.template.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/ntdef.template.h [iso-8859-1] Fri Oct 3 12:10:08 2014 @@ -117,8 +117,22 @@ $define(UCHAR=UCHAR) $include(ntbasedef.h) +typedef _Return_type_success_(return >= 0) LONG NTSTATUS; +typedef NTSTATUS *PNTSTATUS; + +#ifndef __SECSTATUS_DEFINED__ +typedef long SECURITY_STATUS; +#define __SECSTATUS_DEFINED__ +#endif + /* Physical Addresses are always treated as 64-bit wide */ typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; + +#define TIME LARGE_INTEGER +#define _TIME _LARGE_INTEGER +#define PTIME PLARGE_INTEGER +#define LowTime LowPart +#define HighTime HighPart /* Used to store a non-float 8 byte aligned structure */ typedef struct _QUAD @@ -129,6 +143,17 @@ double DoNotUseThisField; } DUMMYUNIONNAME; } QUAD, *PQUAD, UQUAD, *PUQUAD; + +#if (_WIN32_WINNT >= 0x0600) || (defined(__cplusplus) && defined(WINDOWS_ENABLE_CPLUSPLUS)) +typedef CONST UCHAR *PCUCHAR; +typedef CONST USHORT *PCUSHORT; +typedef CONST ULONG *PCULONG; +typedef CONST UQUAD *PCUQUAD; +typedef CONST SCHAR *PCSCHAR; +#endif /* (/_WIN32_WINNT >= 0x0600) */ +#if (_WIN32_WINNT >= 0x0600) +typedef CONST NTSTATUS *PCNTSTATUS; +#endif /* (/_WIN32_WINNT >= 0x0600) */ /* String Types */ typedef struct _STRING { @@ -244,6 +269,8 @@ } OBJECT_ATTRIBUTES64, *POBJECT_ATTRIBUTES64; typedef CONST OBJECT_ATTRIBUTES64 *PCOBJECT_ATTRIBUTES64; +#define OBJ_HANDLE_TAGBITS 0x00000003L + /* Values for the Attributes member */ #define OBJ_INHERIT 0x00000002L #define OBJ_PERMANENT 0x00000010L @@ -277,6 +304,37 @@ #define RTL_INIT_OBJECT_ATTRIBUTES(n, a) \ RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a) +#ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable:4214) /* Bit fields of other types than int */ +#endif /* _MSC_VER */ +typedef struct _RTL_BALANCED_NODE +{ + _ANONYMOUS_UNION union + { + struct _RTL_BALANCED_NODE *Children[2]; + _ANONYMOUS_STRUCT struct + { + struct _RTL_BALANCED_NODE *Left; + struct _RTL_BALANCED_NODE *Right; + } DUMMYSTRUCTNAME; + } DUMMYUNIONNAME; + _ANONYMOUS_UNION union + { + UCHAR Red : 1; + UCHAR Balance : 2; + ULONG_PTR ParentValue; + } DUMMYUNIONNAME2; +} RTL_BALANCED_NODE, *PRTL_BALANCED_NODE; +#ifdef _MSC_VER + #pragma warning(pop) +#endif /* _MSC_VER */ + +#define RTL_BALANCED_NODE_RESERVED_PARENT_MASK 3 +#define RTL_BALANCED_NODE_GET_PARENT_POINTER(Node) \ + ((PRTL_BALANCED_NODE)((Node)->ParentValue & \ + ~RTL_BALANCED_NODE_RESERVED_PARENT_MASK)) + /* Product Types */ typedef enum _NT_PRODUCT_TYPE { NtProductWinNt = 1, @@ -299,6 +357,28 @@ WaitAny } WAIT_TYPE; +#ifndef MIDL_PASS +FORCEINLINE +VOID +ListEntry32To64( + _In_ PLIST_ENTRY32 ListEntry32, + _Out_ PLIST_ENTRY64 ListEntry64) +{ + ListEntry64->Flink = (ULONG)ListEntry32->Flink; + ListEntry64->Blink = (ULONG)ListEntry32->Blink; +} + +FORCEINLINE +VOID +ListEntry64To32( + _In_ PLIST_ENTRY64 ListEntry64, + _Out_ PLIST_ENTRY32 ListEntry32) +{ + ListEntry32->Flink = ListEntry64->Flink & 0xFFFFFFFF; + ListEntry32->Blink = ListEntry64->Blink & 0xFFFFFFFF; +} +#endif /* !MIDL_PASS */ + #ifdef __cplusplus } // extern "C" #endif Modified: trunk/reactos/include/xdk/winnt_old.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/winnt_old.h?re…
============================================================================== --- trunk/reactos/include/xdk/winnt_old.h [iso-8859-1] (original) +++ trunk/reactos/include/xdk/winnt_old.h [iso-8859-1] Fri Oct 3 12:10:08 2014 @@ -92,21 +92,6 @@ #define ACE_OBJECT_TYPE_PRESENT 0x00000001 #define ACE_INHERITED_OBJECT_TYPE_PRESENT 0x00000002 - -#ifdef __cplusplus -#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \ -extern "C++" { \ - inline ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)|((int)b)); } \ - inline ENUMTYPE operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) |= ((int)b)); } \ - inline ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)&((int)b)); } \ - inline ENUMTYPE operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) &= ((int)b)); } \ - inline ENUMTYPE operator ~ (ENUMTYPE a) { return (ENUMTYPE)(~((int)a)); } \ - inline ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((int)a)^((int)b)); } \ - inline ENUMTYPE operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((int &)a) ^= ((int)b)); } \ -} -#else -# define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) /* */ -#endif /* also in ddk/ntifs.h */ #define COMPRESSION_FORMAT_NONE (0x0000)
10 years, 3 months
1
0
0
0
[akhaldi] 64495: [SHLWAPI_WINETEST] * Sync with Wine 1.7.27. CORE-8540
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Oct 3 12:07:36 2014 New Revision: 64495 URL:
http://svn.reactos.org/svn/reactos?rev=64495&view=rev
Log: [SHLWAPI_WINETEST] * Sync with Wine 1.7.27. CORE-8540 Modified: trunk/rostests/winetests/shlwapi/ordinal.c trunk/rostests/winetests/shlwapi/path.c Modified: trunk/rostests/winetests/shlwapi/ordinal.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/ordinal…
============================================================================== --- trunk/rostests/winetests/shlwapi/ordinal.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/ordinal.c [iso-8859-1] Fri Oct 3 12:07:36 2014 @@ -295,14 +295,15 @@ When the buffer is large enough, the default language is returned When the buffer is too small for that fallback, win7_32 and w2k8_64 - and above fail with HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), but - recent os succeed and return a partial result while - older os succeed and overflow the buffer */ + fail with HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), win8 fails + with HRESULT_FROM_WIN32(ERROR_MORE_DATA), other versions succeed and + return a partial result while older os succeed and overflow the buffer */ ok(((hr == E_INVALIDARG) && (len == 0)) || (((hr == S_OK) && !lstrcmpA(buffer, language) && (len == lstrlenA(language))) || ((hr == S_OK) && !memcmp(buffer, language, len)) || - ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len)), + ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len) || + ((hr == __HRESULT_FROM_WIN32(ERROR_MORE_DATA)) && len == exactsize)), "==_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); if (exactsize > 1) { @@ -313,7 +314,8 @@ ok(((hr == E_INVALIDARG) && (len == 0)) || (((hr == S_OK) && !lstrcmpA(buffer, language) && (len == lstrlenA(language))) || ((hr == S_OK) && !memcmp(buffer, language, len)) || - ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len)), + ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len) || + ((hr == __HRESULT_FROM_WIN32(ERROR_MORE_DATA)) && len == exactsize - 1)), "-1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); } @@ -324,15 +326,16 @@ ok(((hr == E_INVALIDARG) && (len == 0)) || (((hr == S_OK) && !lstrcmpA(buffer, language) && (len == lstrlenA(language))) || ((hr == S_OK) && !memcmp(buffer, language, len)) || - ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len)), + ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len) || + ((hr == __HRESULT_FROM_WIN32(ERROR_MORE_DATA)) && len == 1)), "=1_#%d: got 0x%x with %d and %s\n", i, hr, len, buffer); len = maxlen; hr = pGetAcceptLanguagesA( NULL, &len); /* w2k3 and below: E_FAIL and untouched len, - since w2k8: S_OK and needed size (excluding 0) */ - ok( ((hr == S_OK) && (len == exactsize)) || + since w2k8: S_OK and needed size (excluding 0), win8 S_OK and size including 0. */ + ok( ((hr == S_OK) && ((len == exactsize) || (len == exactsize + 1))) || ((hr == E_FAIL) && (len == maxlen)), "NULL,max #%d: got 0x%x with %d and %s\n", i, hr, len, buffer); @@ -355,7 +358,8 @@ buffer[maxlen] = 0; hr = pGetAcceptLanguagesA( buffer, &len); ok( (((hr == S_OK) || (hr == E_INVALIDARG)) && !memcmp(buffer, language, len)) || - ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len), + ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len) || + ((hr == __HRESULT_FROM_WIN32(ERROR_CANNOT_COPY)) && !len), "=2: got 0x%x with %d and %s\n", hr, len, buffer); len = 1; @@ -363,20 +367,21 @@ buffer[maxlen] = 0; hr = pGetAcceptLanguagesA( buffer, &len); /* When the buffer is too small, win7_32 and w2k8_64 and above fail with - HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), other versions succeed - and return a partial 0 terminated result while other versions + HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), win8 ERROR_CANNOT_COPY, + other versions succeed and return a partial 0 terminated result while other versions fail with E_INVALIDARG and return a partial unterminated result */ ok( (((hr == S_OK) || (hr == E_INVALIDARG)) && !memcmp(buffer, language, len)) || - ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len), + ((hr == __HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) && !len) || + ((hr == __HRESULT_FROM_WIN32(ERROR_CANNOT_COPY)) && !len), "=1: got 0x%x with %d and %s\n", hr, len, buffer); len = 0; memset(buffer, '#', maxlen); buffer[maxlen] = 0; hr = pGetAcceptLanguagesA( buffer, &len); - /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG */ - ok((hr == E_FAIL) || (hr == E_INVALIDARG), - "got 0x%x (expected E_FAIL or E_INVALIDARG)\n", hr); + /* w2k3 and below: E_FAIL, since w2k8: E_INVALIDARG, win8 ERROR_CANNOT_COPY */ + ok((hr == E_FAIL) || (hr == E_INVALIDARG) || (hr == __HRESULT_FROM_WIN32(ERROR_CANNOT_COPY)), + "got 0x%x\n", hr); memset(buffer, '#', maxlen); buffer[maxlen] = 0; @@ -1795,6 +1800,7 @@ INT ret; static const WCHAR spaceW[] = {' ',0}; #define UNICODE_LTR_MARK 0x200e +#define UNICODE_RTL_MARK 0x200f if(!pSHFormatDateTimeW) { @@ -1924,9 +1930,9 @@ p2 = buff2; while (*p2 != '\0') { - while (*p1 == UNICODE_LTR_MARK) + while (*p1 == UNICODE_LTR_MARK || *p1 == UNICODE_RTL_MARK) p1++; - while (*p2 == UNICODE_LTR_MARK) + while (*p2 == UNICODE_LTR_MARK || *p2 == UNICODE_RTL_MARK) p2++; p1++; p2++; @@ -1950,9 +1956,9 @@ p2 = buff2; while (*p2 != '\0') { - while (*p1 == UNICODE_LTR_MARK) + while (*p1 == UNICODE_LTR_MARK || *p1 == UNICODE_RTL_MARK) p1++; - while (*p2 == UNICODE_LTR_MARK) + while (*p2 == UNICODE_LTR_MARK || *p2 == UNICODE_RTL_MARK) p2++; p1++; p2++; @@ -2296,7 +2302,9 @@ /* null source pointer */ hr = pIUnknown_QueryServiceExec(NULL, &dummy_serviceid, &dummy_groupid, 0, 0, 0, 0); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL || + hr == E_NOTIMPL, /* win 8 */ + "got 0x%08x\n", hr); /* expected trace: IUnknown_QueryServiceExec( ptr1, serviceid, groupid, arg1, arg2, arg3, arg4); @@ -2412,7 +2420,9 @@ /* null source pointer */ hr = pIUnknown_ProfferService(NULL, &dummy_serviceid, 0, 0); - ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(hr == E_FAIL || + hr == E_NOTIMPL, /* win 8 */ + "got 0x%08x\n", hr); /* expected trace: IUnknown_ProfferService( ptr1, serviceid, arg1, arg2); @@ -2664,7 +2674,7 @@ IShellFolder_Release(folder); } -static void write_inifile(LPCWSTR filename) +static BOOL write_inifile(LPCWSTR filename) { DWORD written; HANDLE file; @@ -2675,12 +2685,16 @@ "AnotherKey=asdf\r\n"; file = CreateFileW(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - if(file == INVALID_HANDLE_VALUE) - return; + if(file == INVALID_HANDLE_VALUE) { + win_skip("failed to create ini file at %s\n", wine_dbgstr_w(filename)); + return FALSE; + } WriteFile(file, data, sizeof(data), &written, NULL); CloseHandle(file); + + return TRUE; } #define verify_inifile(f, e) r_verify_inifile(__LINE__, f, e) @@ -2691,6 +2705,7 @@ DWORD read; file = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); + if(file == INVALID_HANDLE_VALUE) return; @@ -2709,52 +2724,54 @@ WCHAR out[64] = {0}; static const WCHAR TestAppW[] = {'T','e','s','t','A','p','p',0}; - static const WCHAR TestIniW[] = {'C',':','\\','t','e','s','t','.','i','n','i',0}; static const WCHAR AKeyW[] = {'A','K','e','y',0}; static const WCHAR AnotherKeyW[] = {'A','n','o','t','h','e','r','K','e','y',0}; static const WCHAR JunkKeyW[] = {'J','u','n','k','K','e','y',0}; + static const WCHAR testpathW[] = {'C',':','\\','t','e','s','t','.','i','n','i',0}; + WCHAR pathW[MAX_PATH]; if(!pSHGetIniStringW || is_win2k_and_lower){ win_skip("SHGetIniStringW is not available\n"); return; } - write_inifile(TestIniW); + lstrcpyW(pathW, testpathW); + + if (!write_inifile(pathW)) + return; if(0){ /* these crash on Windows */ pSHGetIniStringW(NULL, NULL, NULL, 0, NULL); - pSHGetIniStringW(NULL, AKeyW, out, sizeof(out), TestIniW); - pSHGetIniStringW(TestAppW, AKeyW, NULL, sizeof(out), TestIniW); - } - - ret = pSHGetIniStringW(TestAppW, AKeyW, out, 0, TestIniW); + pSHGetIniStringW(NULL, AKeyW, out, sizeof(out), pathW); + pSHGetIniStringW(TestAppW, AKeyW, NULL, sizeof(out), pathW); + } + + ret = pSHGetIniStringW(TestAppW, AKeyW, out, 0, pathW); ok(ret == 0, "SHGetIniStringW should have given 0, instead: %d\n", ret); /* valid arguments */ - ret = pSHGetIniStringW(TestAppW, NULL, out, sizeof(out), TestIniW); - ok(broken(ret == 0) || /* win 98 */ - ret == 4, "SHGetIniStringW should have given 4, instead: %d\n", ret); - ok(!lstrcmpW(out, AKeyW), "Expected %s, got: %s\n", - wine_dbgstr_w(AKeyW), wine_dbgstr_w(out)); - - ret = pSHGetIniStringW(TestAppW, AKeyW, out, sizeof(out), TestIniW); - ok(broken(ret == 0) || /* win 98 */ - ret == 1, "SHGetIniStringW should have given 1, instead: %d\n", ret); - ok(broken(*out == 0) || /*win 98 */ - !strcmp_wa(out, "1"), "Expected L\"1\", got: %s\n", wine_dbgstr_w(out)); - - ret = pSHGetIniStringW(TestAppW, AnotherKeyW, out, sizeof(out), TestIniW); - ok(broken(ret == 0) || /* win 98 */ - ret == 4, "SHGetIniStringW should have given 4, instead: %d\n", ret); - ok(broken(*out == 0) || /* win 98 */ - !strcmp_wa(out, "asdf"), "Expected L\"asdf\", got: %s\n", wine_dbgstr_w(out)); - - ret = pSHGetIniStringW(TestAppW, JunkKeyW, out, sizeof(out), TestIniW); + out[0] = 0; + SetLastError(0xdeadbeef); + ret = pSHGetIniStringW(TestAppW, NULL, out, sizeof(out), pathW); + ok(ret == 4, "SHGetIniStringW should have given 4, instead: %d\n", ret); + ok(!lstrcmpW(out, AKeyW), "Expected %s, got: %s, %d\n", + wine_dbgstr_w(AKeyW), wine_dbgstr_w(out), GetLastError()); + + ret = pSHGetIniStringW(TestAppW, AKeyW, out, sizeof(out), pathW); + ok(ret == 1, "SHGetIniStringW should have given 1, instead: %d\n", ret); + ok(!strcmp_wa(out, "1"), "Expected L\"1\", got: %s\n", wine_dbgstr_w(out)); + + ret = pSHGetIniStringW(TestAppW, AnotherKeyW, out, sizeof(out), pathW); + ok(ret == 4, "SHGetIniStringW should have given 4, instead: %d\n", ret); + ok(!strcmp_wa(out, "asdf"), "Expected L\"asdf\", got: %s\n", wine_dbgstr_w(out)); + + out[0] = 1; + ret = pSHGetIniStringW(TestAppW, JunkKeyW, out, sizeof(out), pathW); ok(ret == 0, "SHGetIniStringW should have given 0, instead: %d\n", ret); ok(*out == 0, "Expected L\"\", got: %s\n", wine_dbgstr_w(out)); - DeleteFileW(TestIniW); + DeleteFileW(pathW); } static void test_SHSetIniString(void) @@ -2773,7 +2790,8 @@ return; } - write_inifile(TestIniW); + if (!write_inifile(TestIniW)) + return; ret = pSHSetIniStringW(TestAppW, AKeyW, AValueW, TestIniW); ok(ret == TRUE, "SHSetIniStringW should not have failed\n"); Modified: trunk/rostests/winetests/shlwapi/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/path.c?…
============================================================================== --- trunk/rostests/winetests/shlwapi/path.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/path.c [iso-8859-1] Fri Oct 3 12:07:36 2014 @@ -41,6 +41,8 @@ static BOOL (WINAPI *pPathAppendA)(LPSTR, LPCSTR); static BOOL (WINAPI *pPathUnExpandEnvStringsA)(LPCSTR, LPSTR, UINT); static BOOL (WINAPI *pPathUnExpandEnvStringsW)(LPCWSTR, LPWSTR, UINT); +static BOOL (WINAPI *pPathIsRelativeA)(LPCSTR); +static BOOL (WINAPI *pPathIsRelativeW)(LPCWSTR); /* ################ */ @@ -1590,6 +1592,62 @@ ok(!lstrcmpW(buffW, pathW), "wrong unexpanded string %s, expected %s\n", wine_dbgstr_w(buffW), wine_dbgstr_w(pathW)); } +static const struct { + const char *path; + BOOL expect; +} test_path_is_relative[] = { + {NULL, TRUE}, + {"\0", TRUE}, + {"test.txt", TRUE}, + {"\\\\folder\\test.txt", FALSE}, + {"file://folder/test.txt", TRUE}, + {"C:\\test.txt", FALSE}, + {"file:///C:/test.txt", TRUE} +}; + +static void test_PathIsRelativeA(void) +{ + BOOL ret; + int i, num; + + if (!pPathIsRelativeA) { + win_skip("PathIsRelativeA not available\n"); + return; + } + + num = sizeof(test_path_is_relative) / sizeof(test_path_is_relative[0]); + for (i = 0; i < num; i++) { + ret = pPathIsRelativeA(test_path_is_relative[i].path); + ok(ret == test_path_is_relative[i].expect, + "PathIsRelativeA(\"%s\") expects %d, got %d.\n", + test_path_is_relative[i].path, test_path_is_relative[i].expect, ret); + } +} + +static void test_PathIsRelativeW(void) +{ + BOOL ret; + int i, num; + LPWSTR path; + + if (!pPathIsRelativeW) { + win_skip("PathIsRelativeA not available\n"); + return; + } + + num = sizeof(test_path_is_relative) / sizeof(test_path_is_relative[0]); + for (i = 0; i < num; i++) { + path = GetWideString(test_path_is_relative[i].path); + + ret = pPathIsRelativeW(path); + ok(ret == test_path_is_relative[i].expect, + "PathIsRelativeW(\"%s\") expects %d, got %d.\n", + test_path_is_relative[i].path, test_path_is_relative[i].expect, ret); + + FreeWideString(path); + } +} + START_TEST(path) { HMODULE hShlwapi = GetModuleHandleA("shlwapi.dll"); @@ -1609,6 +1667,8 @@ pPathAppendA = (void*)GetProcAddress(hShlwapi, "PathAppendA"); pPathUnExpandEnvStringsA = (void*)GetProcAddress(hShlwapi, "PathUnExpandEnvStringsA"); pPathUnExpandEnvStringsW = (void*)GetProcAddress(hShlwapi, "PathUnExpandEnvStringsW"); + pPathIsRelativeA = (void*)GetProcAddress(hShlwapi, "PathIsRelativeA"); + pPathIsRelativeW = (void*)GetProcAddress(hShlwapi, "PathIsRelativeW"); test_PathSearchAndQualify(); test_PathCreateFromUrl(); @@ -1631,4 +1691,6 @@ test_PathUnquoteSpaces(); test_PathGetDriveNumber(); test_PathUnExpandEnvStrings(); -} + test_PathIsRelativeA(); + test_PathIsRelativeW(); +}
10 years, 3 months
1
0
0
0
[tkreuzer] 64494: [KMTEST] Use CONST UCHAR * instead of PCUCHAR (which is only defined in ntdef.h, not in winnt.h)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Fri Oct 3 12:07:30 2014 New Revision: 64494 URL:
http://svn.reactos.org/svn/reactos?rev=64494&view=rev
Log: [KMTEST] Use CONST UCHAR * instead of PCUCHAR (which is only defined in ntdef.h, not in winnt.h) Modified: trunk/rostests/kmtests/rtl/RtlMemory.c Modified: trunk/rostests/kmtests/rtl/RtlMemory.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/rtl/RtlMemory.c?r…
============================================================================== --- trunk/rostests/kmtests/rtl/RtlMemory.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/rtl/RtlMemory.c [iso-8859-1] Fri Oct 3 12:07:30 2014 @@ -50,7 +50,7 @@ IN const VOID *Buffer, ...) { - PCUCHAR OutBuffer = Buffer; + CONST UCHAR *OutBuffer = Buffer; INT Count; INT Value; va_list Arguments; @@ -69,7 +69,7 @@ if (*OutBuffer++ != Value) { --OutBuffer; - trace("CheckBuffer failed at offset %d, value %x, expected %x\n", OutBuffer - (PCUCHAR)Buffer, *OutBuffer, Value); + trace("CheckBuffer failed at offset %d, value %x, expected %x\n", OutBuffer - (CONST UCHAR*)Buffer, *OutBuffer, Value); return FALSE; } } @@ -118,7 +118,7 @@ IN const VOID *Buffer, ...) { - PCUCHAR OutBuffer = Buffer; + CONST UCHAR *OutBuffer = Buffer; INT Count, Repeat, i; INT Values[16]; va_list Arguments; @@ -143,7 +143,7 @@ if (*OutBuffer++ != Values[i]) { --OutBuffer; - trace("CheckPattern failed at offset %d, value %x, expected %x\n", OutBuffer - (PCUCHAR)Buffer, *OutBuffer, Values[i]); + trace("CheckPattern failed at offset %d, value %x, expected %x\n", OutBuffer - (CONST UCHAR*)Buffer, *OutBuffer, Values[i]); return FALSE; } }
10 years, 3 months
1
0
0
0
[akhaldi] 64493: [SHLWAPI] * Sync with Wine 1.7.27. CORE-8540
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Oct 3 12:07:14 2014 New Revision: 64493 URL:
http://svn.reactos.org/svn/reactos?rev=64493&view=rev
Log: [SHLWAPI] * Sync with Wine 1.7.27. CORE-8540 Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Da.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_De.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_En.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Es.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Fi.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Fr.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_He.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Hu.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_It.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ja.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ko.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Lt.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Nl.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_No.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Pl.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Pt.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ro.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ru.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Si.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sk.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sq.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sv.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Tr.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Uk.rc trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Zh.rc trunk/reactos/dll/win32/shlwapi/path.c trunk/reactos/dll/win32/shlwapi/reg.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Da.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Da.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Da.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,20 +20,6 @@ LANGUAGE LANG_DANISH, SUBLANG_DEFAULT -IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Fejl!" -FONT 8, "MS Shell Dlg" -{ - LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 - LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "Vis ikke denne besked igen", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Annuller", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Ja", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Nej", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -} - STRINGTABLE { IDS_BYTES_FORMAT "%ld bytes" @@ -41,3 +27,17 @@ IDS_TIME_INTERVAL_MINUTES " min" IDS_TIME_INTERVAL_SECONDS " sec" } + +IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Fejl" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "Vis ikke denne besked igen", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Annuller", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Ja", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Nej", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_De.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_De.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -22,20 +22,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Fehler!" -FONT 8, "MS Shell Dlg" -{ - LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 - LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "&Diesen Dialog nicht mehr anzeigen", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Abbrechen", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Ja", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Nein", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -} - STRINGTABLE { IDS_BYTES_FORMAT "%ld Bytes" @@ -43,3 +29,17 @@ IDS_TIME_INTERVAL_MINUTES " Min" IDS_TIME_INTERVAL_SECONDS " Sek" } + +IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Fehler" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "&Diesen Dialog nicht mehr anzeigen", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Abbrechen", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Ja", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Nein", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_En.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_En.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,20 +20,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT -IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Error!" -FONT 8, "MS Shell Dlg" -{ - LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 - LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "Don't show me th&is message again", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Cancel", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Yes", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&No", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -} - STRINGTABLE { IDS_BYTES_FORMAT "%ld bytes" @@ -41,3 +27,17 @@ IDS_TIME_INTERVAL_MINUTES " min" IDS_TIME_INTERVAL_SECONDS " sec" } + +IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Error" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "Don't show me th&is message again", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Yes", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Es.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Es.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Es.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,9 +20,17 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld bytes" + IDS_TIME_INTERVAL_HOURS " hr" + IDS_TIME_INTERVAL_MINUTES " min" + IDS_TIME_INTERVAL_SECONDS " sec" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "¡Error!" +CAPTION "Error" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -33,11 +41,3 @@ PUSHBUTTON "&Sí", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&No", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld bytes" - IDS_TIME_INTERVAL_HOURS " hr" - IDS_TIME_INTERVAL_MINUTES " min" - IDS_TIME_INTERVAL_SECONDS " sec" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Fi.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Fi.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Fi.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,9 +20,17 @@ LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld bytes" + IDS_TIME_INTERVAL_HOURS " hr" + IDS_TIME_INTERVAL_MINUTES " min" + IDS_TIME_INTERVAL_SECONDS " sec" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Virhe!" +CAPTION "Virhe" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -33,11 +41,3 @@ PUSHBUTTON "&Kyllä", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&Ei", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld bytes" - IDS_TIME_INTERVAL_HOURS " hr" - IDS_TIME_INTERVAL_MINUTES " min" - IDS_TIME_INTERVAL_SECONDS " sec" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Fr.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Fr.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -23,20 +23,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Erreur !" -FONT 8, "MS Shell Dlg" -{ - LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 - LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "Ne plus me montrer ce message", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Annuler", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Oui", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Non", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -} - STRINGTABLE { IDS_BYTES_FORMAT "%ld bytes" @@ -44,3 +30,17 @@ IDS_TIME_INTERVAL_MINUTES " min" IDS_TIME_INTERVAL_SECONDS " s" } + +IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Erreur" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "Ne plus me montrer ce message", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Annuler", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Oui", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Non", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_He.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_He.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_He.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -22,9 +22,17 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld ××ת" + IDS_TIME_INTERVAL_HOURS " שע×ת" + IDS_TIME_INTERVAL_MINUTES " ×ק×ת" + IDS_TIME_INTERVAL_SECONDS " ×©× ××ת" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ש××××!" +CAPTION "ש××××" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -35,11 +43,3 @@ PUSHBUTTON "××", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "××", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld ××ת" - IDS_TIME_INTERVAL_HOURS " שע×ת" - IDS_TIME_INTERVAL_MINUTES " ×ק×ת" - IDS_TIME_INTERVAL_SECONDS " ×©× ××ת" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Hu.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Hu.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Hu.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -23,9 +23,17 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld bájt" + IDS_TIME_INTERVAL_HOURS " óra" + IDS_TIME_INTERVAL_MINUTES " perc" + IDS_TIME_INTERVAL_SECONDS " mp" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Hiba!" +CAPTION "Hiba" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -36,11 +44,3 @@ PUSHBUTTON "&Igen", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&Nem", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld bájt" - IDS_TIME_INTERVAL_HOURS " óra" - IDS_TIME_INTERVAL_MINUTES " perc" - IDS_TIME_INTERVAL_SECONDS " mp" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_It.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_It.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_It.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,20 +20,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Errore!" -FONT 8, "MS Shell Dlg" -{ - LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 - LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "Non mostrare nuovamente &questo messaggio", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Annulla", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Si", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&No", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -} - STRINGTABLE { IDS_BYTES_FORMAT "%ld bytes" @@ -41,3 +27,17 @@ IDS_TIME_INTERVAL_MINUTES " min" IDS_TIME_INTERVAL_SECONDS " sec" } + +IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Errore" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "Non mostrare nuovamente &questo messaggio", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Annulla", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Si", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&No", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ja.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ja.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ja.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -23,9 +23,17 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld bytes" + IDS_TIME_INTERVAL_HOURS " hr" + IDS_TIME_INTERVAL_MINUTES " min" + IDS_TIME_INTERVAL_SECONDS " sec" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ã¨ã©ã¼!" +CAPTION "ã¨ã©ã¼" FONT 9, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -36,11 +44,3 @@ PUSHBUTTON "ã¯ã(&Y)", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "ããã(&N)", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld bytes" - IDS_TIME_INTERVAL_HOURS " hr" - IDS_TIME_INTERVAL_MINUTES " min" - IDS_TIME_INTERVAL_SECONDS " sec" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ko.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ko.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,9 +20,17 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld ¹ÙÀÌÆ®" + IDS_TIME_INTERVAL_HOURS "½Ã" + IDS_TIME_INTERVAL_MINUTES " ºÐ" + IDS_TIME_INTERVAL_SECONDS " ÃÊ" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "¿¡·¯!" +CAPTION "¿¡·¯" FONT 9, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -33,12 +41,3 @@ PUSHBUTTON "¿¹(&Y)", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "¾Æ´Ï¿À(&N)", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld ¹ÙÀÌÆ®" - IDS_TIME_INTERVAL_HOURS "½Ã" - IDS_TIME_INTERVAL_MINUTES " ºÐ" - IDS_TIME_INTERVAL_SECONDS " ÃÊ" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Lt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Lt.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Lt.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -23,20 +23,6 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_NEUTRAL -IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Klaida!" -FONT 8, "MS Shell Dlg" -{ - LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 - LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "Daugiau ne&rodyti šio pranešimo", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Gerai", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Atsisakyti", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Taip", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Ne", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -} - STRINGTABLE { IDS_BYTES_FORMAT "%ld baitai" @@ -44,3 +30,17 @@ IDS_TIME_INTERVAL_MINUTES " min" IDS_TIME_INTERVAL_SECONDS " sek" } + +IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Klaida" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "Daugiau ne&rodyti šio pranešimo", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Gerai", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Atsisakyti", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Taip", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Ne", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Nl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Nl.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Nl.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,20 +20,6 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Fout!" -FONT 8, "MS Shell Dlg" -{ - LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 - LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "Deze boodschap &niet opnieuw tonen", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Annuleren", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Ja", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Nee", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -} - STRINGTABLE { IDS_BYTES_FORMAT "%ld bytes" @@ -41,3 +27,17 @@ IDS_TIME_INTERVAL_MINUTES " min" IDS_TIME_INTERVAL_SECONDS " sec" } + +IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Fout" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "Deze boodschap &niet opnieuw tonen", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Annuleren", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Ja", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Nee", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_No.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_No.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,6 +20,14 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld byte" + IDS_TIME_INTERVAL_HOURS " hr" + IDS_TIME_INTERVAL_MINUTES " min" + IDS_TIME_INTERVAL_SECONDS " sec" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Feil" @@ -28,16 +36,8 @@ LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 CHECKBOX "&Ikke vis denne meldingen igjen", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Avbryt", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Ja", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Nei", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Avbryt", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Ja", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Nei", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld byte" - IDS_TIME_INTERVAL_HOURS " hr" - IDS_TIME_INTERVAL_MINUTES " min" - IDS_TIME_INTERVAL_SECONDS " sec" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Pl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Pl.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Pl.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -21,20 +21,6 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "B³¹d!" -FONT 8, "MS Shell Dlg" -{ - LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 - LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "Nie pokazuj w&iêcej tego komunikatu", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Anuluj", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Tak", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Nie", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -} - STRINGTABLE { IDS_BYTES_FORMAT "%ld bajtów" @@ -42,3 +28,17 @@ IDS_TIME_INTERVAL_MINUTES " min." IDS_TIME_INTERVAL_SECONDS " s" } + +IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "B³¹d" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "Nie pokazuj w&iêcej tego komunikatu", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Anuluj", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Tak", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Nie", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Pt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Pt.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Pt.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -24,9 +24,17 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld bytes" + IDS_TIME_INTERVAL_HOURS " hr" + IDS_TIME_INTERVAL_MINUTES " min" + IDS_TIME_INTERVAL_SECONDS " seg" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Erro!" +CAPTION "Erro" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -37,11 +45,3 @@ PUSHBUTTON "&Sim", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&Não", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld bytes" - IDS_TIME_INTERVAL_HOURS " hr" - IDS_TIME_INTERVAL_MINUTES " min" - IDS_TIME_INTERVAL_SECONDS " seg" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ro.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ro.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ro.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -18,13 +18,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#pragma code_page(65001) + LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -#pragma code_page(65001) +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld octeÈi" + IDS_TIME_INTERVAL_HOURS " ore" + IDS_TIME_INTERVAL_MINUTES " min" + IDS_TIME_INTERVAL_SECONDS " sec" +} IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Eroare!" +CAPTION "Eroare" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -35,11 +43,3 @@ PUSHBUTTON "&Da", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "N&u", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld octeÈi" - IDS_TIME_INTERVAL_HOURS " ore" - IDS_TIME_INTERVAL_MINUTES " min" - IDS_TIME_INTERVAL_SECONDS " sec" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ru.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ru.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Ru.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -23,9 +23,17 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld байÑ" + IDS_TIME_INTERVAL_HOURS " ÑаÑ" + IDS_TIME_INTERVAL_MINUTES " мин" + IDS_TIME_INTERVAL_SECONDS " Ñек" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ÐÑибка!" +CAPTION "ÐÑибка" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -36,11 +44,3 @@ PUSHBUTTON "&Ðа", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&ÐеÑ", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld байÑ" - IDS_TIME_INTERVAL_HOURS " ÑаÑ" - IDS_TIME_INTERVAL_MINUTES " мин" - IDS_TIME_INTERVAL_SECONDS " Ñек" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Si.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Si.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Si.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -22,9 +22,17 @@ LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld bajtov" + IDS_TIME_INTERVAL_HOURS " ur" + IDS_TIME_INTERVAL_MINUTES " min" + IDS_TIME_INTERVAL_SECONDS " sek" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Napak!" +CAPTION "Napak" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -35,11 +43,3 @@ PUSHBUTTON "&Da", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&Ne", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld bajtov" - IDS_TIME_INTERVAL_HOURS " ur" - IDS_TIME_INTERVAL_MINUTES " min" - IDS_TIME_INTERVAL_SECONDS " sek" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sk.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sk.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,9 +20,17 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld bajtov" + IDS_TIME_INTERVAL_HOURS " hod." + IDS_TIME_INTERVAL_MINUTES " min." + IDS_TIME_INTERVAL_SECONDS " s" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Chyba!" +CAPTION "Chyba" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -33,11 +41,3 @@ PUSHBUTTON "Án&o", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&Nie", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld bajtov" - IDS_TIME_INTERVAL_HOURS " hod." - IDS_TIME_INTERVAL_MINUTES " min." - IDS_TIME_INTERVAL_SECONDS " s" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sq.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sq.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sq.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,20 +20,6 @@ LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL -IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Gabim!" -FONT 8, "MS Shell Dlg" -{ - LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 - LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "Mos më tregoni këtë mesazh përsëri", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Anulo", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Po", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Jo", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -} - STRINGTABLE { IDS_BYTES_FORMAT "%ld bytes" @@ -41,3 +27,17 @@ IDS_TIME_INTERVAL_MINUTES " min" IDS_TIME_INTERVAL_SECONDS " sek" } + +IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Gabim" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "Mos më tregoni këtë mesazh përsëri", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Anulo", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Po", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Jo", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sv.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sv.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Sv.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,9 +20,17 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld byte" + IDS_TIME_INTERVAL_HOURS " h" + IDS_TIME_INTERVAL_MINUTES " min" + IDS_TIME_INTERVAL_SECONDS " s" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Fel!" +CAPTION "Fel" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -33,11 +41,3 @@ PUSHBUTTON "&Ja", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&Nej", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld byte" - IDS_TIME_INTERVAL_HOURS " h" - IDS_TIME_INTERVAL_MINUTES " min" - IDS_TIME_INTERVAL_SECONDS " s" -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Tr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Tr.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Tr.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -20,20 +20,6 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 -STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "YanlıÅlık!" -FONT 8, "MS Shell Dlg" -{ - LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 - LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 - CHECKBOX "&Bana Bu Ä°letiyi Bir Daha Gösterme", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Tamam", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Ä°ptal", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Evet", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON L"&Hayır", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP -} - STRINGTABLE { IDS_BYTES_FORMAT "%ld çoklu" @@ -41,3 +27,17 @@ IDS_TIME_INTERVAL_MINUTES " dakîka" IDS_TIME_INTERVAL_SECONDS " sâniye" } + +IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "YanlıÅlık" +FONT 8, "MS Shell Dlg" +{ + LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 + LTEXT "", IDS_ERR_USER_MSG, 15, 5, 210, 8 + CHECKBOX "&Bana Bu Ä°letiyi Bir Daha Gösterme", IDC_ERR_DONT_SHOW, 5, 20, 210, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Tamam", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Ä°ptal", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Evet", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "&Hayır", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP +} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Uk.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Uk.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -23,9 +23,17 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld байÑ" + IDS_TIME_INTERVAL_HOURS " год" + IDS_TIME_INTERVAL_MINUTES " Ñ Ð²" + IDS_TIME_INTERVAL_SECONDS " Ñек." +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ðомилка!" +CAPTION "Ðомилка" FONT 8, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -36,11 +44,3 @@ PUSHBUTTON "&Так", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "&ÐÑ", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld байÑ" - IDS_TIME_INTERVAL_HOURS " год" - IDS_TIME_INTERVAL_MINUTES " Ñ Ð²" - IDS_TIME_INTERVAL_SECONDS " Ñек." -} Modified: trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Zh.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/lang/shl…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Zh.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/lang/shlwapi_Zh.rc [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -23,9 +23,17 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +STRINGTABLE +{ + IDS_BYTES_FORMAT "%ld åè" + IDS_TIME_INTERVAL_HOURS " å°æ¶" + IDS_TIME_INTERVAL_MINUTES " å" + IDS_TIME_INTERVAL_SECONDS " ç§" +} + IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "é误!" +CAPTION "é误" FONT 9, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -37,19 +45,19 @@ PUSHBUTTON "å¦(&N)", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL + STRINGTABLE { - IDS_BYTES_FORMAT "%ld åè" - IDS_TIME_INTERVAL_HOURS " å°æ¶" + IDS_BYTES_FORMAT "%ld åç¯" + IDS_TIME_INTERVAL_HOURS " å°æ" IDS_TIME_INTERVAL_MINUTES " å" IDS_TIME_INTERVAL_SECONDS " ç§" } -LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL - IDD_ERR_DIALOG DIALOG 0, 0, 220, 60 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "é¯èª¤!" +CAPTION "é¯èª¤" FONT 9, "MS Shell Dlg" { LTEXT "", IDS_ERR_USER_MSG2, 15, 5, 28, 20 @@ -60,11 +68,3 @@ PUSHBUTTON "æ¯(&Y)", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "å¦(&N)", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } - -STRINGTABLE -{ - IDS_BYTES_FORMAT "%ld åç¯" - IDS_TIME_INTERVAL_HOURS " å°æ" - IDS_TIME_INTERVAL_MINUTES " å" - IDS_TIME_INTERVAL_SECONDS " ç§" -} Modified: trunk/reactos/dll/win32/shlwapi/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/path.c?r…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/path.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/path.c [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -137,7 +137,7 @@ if (!lpszDest) return NULL; if (!lpszDir && !lpszFile) - goto fail; + goto fail; if (lpszDir) if (!MultiByteToWideChar(CP_ACP,0,lpszDir,-1,szDir,MAX_PATH)) @@ -3360,7 +3360,7 @@ len = src - pszUrl; StrCpyNW(dst, pszUrl, len + 1); dst += len; - if (isalphaW(src[1]) && (src[2] == ':' || src[2] == '|')) + if (*src && isalphaW(src[1]) && (src[2] == ':' || src[2] == '|')) { /* 'Forget' to add a trailing '/', just like Windows */ src++; Modified: trunk/reactos/dll/win32/shlwapi/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/reg.c?re…
============================================================================== --- trunk/reactos/dll/win32/shlwapi/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/reg.c [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -198,31 +198,48 @@ /************************************************************************* * SHRegCreateUSKeyA [SHLWAPI.@] * + * See SHRegCreateUSKeyW. + */ +LONG WINAPI SHRegCreateUSKeyA(LPCSTR path, REGSAM samDesired, HUSKEY relative_key, + PHUSKEY new_uskey, DWORD flags) +{ + WCHAR *pathW; + LONG ret; + + TRACE("(%s, 0x%08x, %p, %p, 0x%08x)\n", debugstr_a(path), samDesired, relative_key, + new_uskey, flags); + + if (path) + { + INT len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0); + pathW = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); + if (!pathW) + return ERROR_NOT_ENOUGH_MEMORY; + MultiByteToWideChar(CP_ACP, 0, path, -1, pathW, len); + } + else + pathW = NULL; + + ret = SHRegCreateUSKeyW(pathW, samDesired, relative_key, new_uskey, flags); + HeapFree(GetProcessHeap(), 0, pathW); + return ret; +} + +/************************************************************************* + * SHRegCreateUSKeyW [SHLWAPI.@] + * * Create or open a user-specific registry key. - * - * PARAMS - * pszPath [I] Key name to create or open. - * samDesired [I] Wanted security access. - * hRelativeUSKey [I] Base path if pszPath is relative. NULL otherwise. - * phNewUSKey [O] Receives a handle to the new or opened key. - * dwFlags [I] Base key under which the key should be opened. + * + * PARAMS + * path [I] Key name to create or open. + * samDesired [I] Wanted security access. + * relative_key [I] Base path if 'path' is relative. NULL otherwise. + * new_uskey [O] Receives a handle to the new or opened key. + * flags [I] Base key under which the key should be opened. * * RETURNS * Success: ERROR_SUCCESS * Failure: Nonzero error code from winerror.h - */ -LONG WINAPI SHRegCreateUSKeyA(LPCSTR pszPath, REGSAM samDesired, HUSKEY hRelativeUSKey, - PHUSKEY phNewUSKey, DWORD dwFlags) -{ - FIXME("(%s, 0x%08x, %p, %p, 0x%08x) stub\n", debugstr_a(pszPath), samDesired, - hRelativeUSKey, phNewUSKey, dwFlags); - return ERROR_SUCCESS; -} - -/************************************************************************* - * SHRegCreateUSKeyW [SHLWAPI.@] - * - * See SHRegCreateUSKeyA. */ LONG WINAPI SHRegCreateUSKeyW(LPCWSTR path, REGSAM samDesired, HUSKEY relative_key, PHUSKEY new_uskey, DWORD flags) Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Oct 3 12:07:14 2014 @@ -185,7 +185,7 @@ reactos/dll/win32/shdocvw # Synced to Wine-1.7.17 reactos/dll/win32/shell32 # Forked at Wine-20071011 reactos/dll/win32/shfolder # Synced to Wine-1.7.17 -reactos/dll/win32/shlwapi # Synced to Wine-1.7.17 +reactos/dll/win32/shlwapi # Synced to Wine-1.7.27 reactos/dll/win32/slbcsp # Synced to Wine-1.7.17 reactos/dll/win32/snmpapi # Synced to Wine-1.7.17 reactos/dll/win32/softpub # Synced to Wine-1.7.17
10 years, 3 months
1
0
0
0
[akhaldi] 64492: [OLE32_WINETEST] * Sync with Wine 1.7.27. CORE-8540
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Oct 3 11:44:48 2014 New Revision: 64492 URL:
http://svn.reactos.org/svn/reactos?rev=64492&view=rev
Log: [OLE32_WINETEST] * Sync with Wine 1.7.27. CORE-8540 Modified: trunk/rostests/winetests/ole32/compobj.c trunk/rostests/winetests/ole32/hglobalstream.c trunk/rostests/winetests/ole32/propvariant.c trunk/rostests/winetests/ole32/storage32.c Modified: trunk/rostests/winetests/ole32/compobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/compobj.c…
============================================================================== --- trunk/rostests/winetests/ole32/compobj.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/compobj.c [iso-8859-1] Fri Oct 3 11:44:48 2014 @@ -50,12 +50,15 @@ static HRESULT (WINAPI * pCoGetObjectContext)(REFIID riid, LPVOID *ppv); static HRESULT (WINAPI * pCoSwitchCallContext)(IUnknown *pObject, IUnknown **ppOldObject); static HRESULT (WINAPI * pCoGetTreatAsClass)(REFCLSID clsidOld, LPCLSID pClsidNew); +static HRESULT (WINAPI * pCoTreatAsClass)(REFCLSID clsidOld, REFCLSID pClsidNew); static HRESULT (WINAPI * pCoGetContextToken)(ULONG_PTR *token); +static LONG (WINAPI * pRegDeleteKeyExA)(HKEY, LPCSTR, REGSAM, DWORD); static LONG (WINAPI * pRegOverridePredefKey)(HKEY key, HKEY override); static BOOL (WINAPI *pActivateActCtx)(HANDLE,ULONG_PTR*); static HANDLE (WINAPI *pCreateActCtxW)(PCACTCTXW); static BOOL (WINAPI *pDeactivateActCtx)(DWORD,ULONG_PTR); +static BOOL (WINAPI *pIsWow64Process)(HANDLE, LPBOOL); static void (WINAPI *pReleaseActCtx)(HANDLE); #define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr) @@ -1057,6 +1060,8 @@ CLSID clsid; HKEY hkey; LONG res; + const BOOL is_win64 = (sizeof(void*) != sizeof(int)); + BOOL is_wow64 = FALSE; hr = CoGetPSClsid(&IID_IClassFactory, &clsid); ok(hr == CO_E_NOTINITIALIZED, @@ -1138,6 +1143,43 @@ pDeactivateActCtx(0, cookie); pReleaseActCtx(handle); + } + + if (pRegDeleteKeyExA && + (is_win64 || + (pIsWow64Process && pIsWow64Process(GetCurrentProcess(), &is_wow64) && is_wow64))) + { + static GUID IID_DeadBeef = {0xdeadbeef,0xdead,0xbeef,{0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef}}; + static const char clsidDeadBeef[] = "{deadbeef-dead-beef-dead-beefdeadbeef}"; + static const char clsidA[] = "{66666666-8888-7777-6666-555555555555}"; + HKEY hkey_iface, hkey_psclsid; + REGSAM opposite = is_win64 ? KEY_WOW64_32KEY : KEY_WOW64_64KEY; + + hr = CoGetPSClsid(&IID_DeadBeef, &clsid); + ok(hr == REGDB_E_IIDNOTREG, "got 0x%08x\n", hr); + + res = RegCreateKeyExA(HKEY_CLASSES_ROOT, "Interface", + 0, NULL, 0, KEY_ALL_ACCESS | opposite, NULL, &hkey_iface, NULL); + ok(!res, "RegCreateKeyEx returned %d\n", res); + res = RegCreateKeyExA(hkey_iface, clsidDeadBeef, + 0, NULL, 0, KEY_ALL_ACCESS | opposite, NULL, &hkey, NULL); + ok(!res, "RegCreateKeyEx returned %d\n", res); + res = RegCreateKeyExA(hkey, "ProxyStubClsid32", + 0, NULL, 0, KEY_ALL_ACCESS | opposite, NULL, &hkey_psclsid, NULL); + res = RegSetValueExA(hkey_psclsid, NULL, 0, REG_SZ, (const BYTE *)clsidA, strlen(clsidA)+1); + ok(!res, "RegSetValueEx returned %d\n", res); + RegCloseKey(hkey_psclsid); + + hr = CoGetPSClsid(&IID_DeadBeef, &clsid); + ok_ole_success(hr, "CoGetPSClsid"); + ok(IsEqualGUID(&clsid, &IID_TestPS), "got clsid %s\n", wine_dbgstr_guid(&clsid)); + + res = pRegDeleteKeyExA(hkey, "ProxyStubClsid32", opposite, 0); + ok(!res, "RegDeleteKeyEx returned %d\n", res); + RegCloseKey(hkey); + res = pRegDeleteKeyExA(hkey_iface, clsidDeadBeef, opposite, 0); + ok(!res, "RegDeleteKeyEx returned %d\n", res); + RegCloseKey(hkey_iface); } CoUninitialize(); @@ -1905,11 +1947,15 @@ CoUninitialize(); } -static void test_CoGetTreatAsClass(void) +static void test_TreatAsClass(void) { HRESULT hr; CLSID out; static GUID deadbeef = {0xdeadbeef,0xdead,0xbeef,{0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef}}; + static const char deadbeefA[] = "{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF}"; + IInternetProtocol *pIP = NULL; + HKEY clsidkey, deadbeefkey; + LONG lr; if (!pCoGetTreatAsClass) { @@ -1919,6 +1965,63 @@ hr = pCoGetTreatAsClass(&deadbeef,&out); ok (hr == S_FALSE, "expected S_FALSE got %x\n",hr); ok (IsEqualGUID(&out,&deadbeef), "expected to get same clsid back\n"); + + lr = RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_READ, &clsidkey); + ok(lr == ERROR_SUCCESS, "Couldn't open CLSID key\n"); + + lr = RegCreateKeyExA(clsidkey, deadbeefA, 0, NULL, 0, KEY_WRITE, NULL, &deadbeefkey, NULL); + ok(lr == ERROR_SUCCESS, "Couldn't create class key\n"); + + hr = pCoTreatAsClass(&deadbeef, &deadbeef); + ok(hr == REGDB_E_WRITEREGDB, "CoTreatAsClass gave wrong error: %08x\n", hr); + + hr = pCoTreatAsClass(&deadbeef, &CLSID_FileProtocol); + if(hr == REGDB_E_WRITEREGDB){ + win_skip("Insufficient privileges to use CoTreatAsClass\n"); + goto exit; + } + ok(hr == S_OK, "CoTreatAsClass failed: %08x\n", hr); + + hr = pCoGetTreatAsClass(&deadbeef, &out); + ok(hr == S_OK, "CoGetTreatAsClass failed: %08x\n",hr); + ok(IsEqualGUID(&out, &CLSID_FileProtocol), "expected to get substituted clsid\n"); + + OleInitialize(NULL); + + hr = CoCreateInstance(&deadbeef, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void **)&pIP); + if(hr == REGDB_E_CLASSNOTREG) + { + win_skip("IE not installed so can't test CoCreateInstance\n"); + goto exit; + } + + ok(hr == S_OK, "CoCreateInstance failed: %08x\n", hr); + if(pIP){ + IInternetProtocol_Release(pIP); + pIP = NULL; + } + + hr = pCoTreatAsClass(&deadbeef, &CLSID_NULL); + ok(hr == S_OK, "CoTreatAsClass failed: %08x\n", hr); + + hr = pCoGetTreatAsClass(&deadbeef, &out); + ok(hr == S_FALSE, "expected S_FALSE got %08x\n", hr); + ok(IsEqualGUID(&out, &deadbeef), "expected to get same clsid back\n"); + + /* bizarrely, native's CoTreatAsClass takes some time to take effect in CoCreateInstance */ + Sleep(200); + + hr = CoCreateInstance(&deadbeef, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void **)&pIP); + ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance gave wrong error: %08x\n", hr); + + if(pIP) + IInternetProtocol_Release(pIP); + +exit: + OleUninitialize(); + RegCloseKey(deadbeefkey); + RegDeleteKeyA(clsidkey, deadbeefA); + RegCloseKey(clsidkey); } static void test_CoInitializeEx(void) @@ -1986,6 +2089,14 @@ } } +static void test_CoCreateGuid(void) +{ + HRESULT hr; + + hr = CoCreateGuid(NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); +} + static void init_funcs(void) { HMODULE hOle32 = GetModuleHandleA("ole32"); @@ -1995,13 +2106,16 @@ pCoGetObjectContext = (void*)GetProcAddress(hOle32, "CoGetObjectContext"); pCoSwitchCallContext = (void*)GetProcAddress(hOle32, "CoSwitchCallContext"); pCoGetTreatAsClass = (void*)GetProcAddress(hOle32,"CoGetTreatAsClass"); + pCoTreatAsClass = (void*)GetProcAddress(hOle32,"CoTreatAsClass"); pCoGetContextToken = (void*)GetProcAddress(hOle32, "CoGetContextToken"); + pRegDeleteKeyExA = (void*)GetProcAddress(hAdvapi32, "RegDeleteKeyExA"); pRegOverridePredefKey = (void*)GetProcAddress(hAdvapi32, "RegOverridePredefKey"); pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx"); pActivateActCtx = (void*)GetProcAddress(hkernel32, "ActivateActCtx"); pCreateActCtxW = (void*)GetProcAddress(hkernel32, "CreateActCtxW"); pDeactivateActCtx = (void*)GetProcAddress(hkernel32, "DeactivateActCtx"); + pIsWow64Process = (void*)GetProcAddress(hkernel32, "IsWow64Process"); pReleaseActCtx = (void*)GetProcAddress(hkernel32, "ReleaseActCtx"); } @@ -2039,7 +2153,8 @@ test_CoGetObjectContext(); test_CoGetCallContext(); test_CoGetContextToken(); - test_CoGetTreatAsClass(); + test_TreatAsClass(); test_CoInitializeEx(); test_OleRegGetMiscStatus(); -} + test_CoCreateGuid(); +} Modified: trunk/rostests/winetests/ole32/hglobalstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/hglobalst…
============================================================================== --- trunk/rostests/winetests/ole32/hglobalstream.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/hglobalstream.c [iso-8859-1] Fri Oct 3 11:44:48 2014 @@ -266,14 +266,17 @@ ok(ull.u.LowPart == 0x80000008, "should have set LowPart to 0x80000008 instead of %08x\n", ull.u.LowPart); ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); - /* IStream_Seek -- seek wraps position/size on integer overflow */ + /* IStream_Seek -- seek wraps position/size on integer overflow, but not on win8 */ ull.u.HighPart = 0xCAFECAFE; ull.u.LowPart = 0xCAFECAFE; ll.u.HighPart = 0; ll.u.LowPart = 0x7FFFFFFF; hr = IStream_Seek(pStream, ll, STREAM_SEEK_CUR, &ull); - ok_ole_success(hr, "IStream_Seek"); - ok(ull.u.LowPart == 0x00000007, "should have set LowPart to 0x00000007 instead of %08x\n", ull.u.LowPart); + ok(hr == S_OK || hr == STG_E_SEEKERROR /* win8 */, "IStream_Seek\n"); + if (SUCCEEDED(hr)) + ok(ull.u.LowPart == 0x00000007, "should have set LowPart to 0x00000007 instead of %08x\n", ull.u.LowPart); + else + ok(ull.u.LowPart == 0x80000008, "should have set LowPart to 0x80000008 instead of %08x\n", ull.u.LowPart); ok(ull.u.HighPart == 0, "should have set HighPart to 0 instead of %d\n", ull.u.HighPart); hr = IStream_Commit(pStream, STGC_DEFAULT); Modified: trunk/rostests/winetests/ole32/propvariant.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/propvaria…
============================================================================== --- trunk/rostests/winetests/ole32/propvariant.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/propvariant.c [iso-8859-1] Fri Oct 3 11:44:48 2014 @@ -61,11 +61,11 @@ { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_CY */ { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_DATE */ { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_BSTR */ - { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_DISPATCH */ + { PROP_V1 , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_DISPATCH */ { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_ERROR */ { PROP_V0 , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_BOOL */ { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_V0 , PROP_V1 | PROP_TODO }, /* VT_VARIANT */ - { PROP_V1 | PROP_TODO , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_UNKNOWN */ + { PROP_V1 , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_UNKNOWN */ { PROP_V1 , PROP_V1 | PROP_TODO , PROP_INV, PROP_V1 | PROP_TODO }, /* VT_DECIMAL */ { PROP_INV, PROP_INV, PROP_INV, PROP_INV }, /* 15 */ { PROP_V1 , PROP_V1 | PROP_TODO , PROP_V1 , PROP_V1 | PROP_TODO }, /* VT_I1 */ Modified: trunk/rostests/winetests/ole32/storage32.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/storage32…
============================================================================== --- trunk/rostests/winetests/ole32/storage32.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/storage32.c [iso-8859-1] Fri Oct 3 11:44:48 2014 @@ -25,6 +25,8 @@ //#include <stdio.h> #define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT //#include <windows.h> #include <wine/test.h> @@ -870,11 +872,9 @@ r = StgOpenStorage( filename, NULL, STGM_PRIORITY, NULL, 0, &stgprio); ok(r==S_OK, "StgOpenStorage failed with error 0x%08x\n", r); - todo_wine { /* non-transacted mode read/write fails */ r = StgOpenStorage( filename, NULL, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, NULL, 0, &stg); ok(r==STG_E_LOCKVIOLATION, "StgOpenStorage should return STG_E_LOCKVIOLATION instead of 0x%08x\n", r); - } /* non-transacted mode read-only succeeds */ r = StgOpenStorage( filename, NULL, STGM_SHARE_DENY_WRITE|STGM_READ, NULL, 0, &stg); @@ -3144,6 +3144,506 @@ } DeleteFileW(fileW); +} + +struct lock_test +{ + DWORD stg_mode; + BOOL create; + DWORD access; + DWORD sharing; + const int *locked_bytes; + const int *fail_ranges; + BOOL todo; +}; + +static const int priority_locked_bytes[] = { 0x58, 0x81, 0x93, -1 }; +static const int rwex_locked_bytes[] = { 0x93, 0xa7, 0xbb, 0xcf, -1 }; +static const int rw_locked_bytes[] = { 0x93, 0xa7, -1 }; +static const int nosn_locked_bytes[] = { 0x6c, 0x93, 0xa7, 0xcf, -1 }; +static const int rwdw_locked_bytes[] = { 0x93, 0xa7, 0xcf, -1 }; +static const int wodw_locked_bytes[] = { 0xa7, 0xcf, -1 }; +static const int tr_locked_bytes[] = { 0x93, -1 }; +static const int no_locked_bytes[] = { -1 }; +static const int roex_locked_bytes[] = { 0x93, 0xbb, 0xcf, -1 }; + +static const int rwex_fail_ranges[] = { 0x93,0xe3, -1 }; +static const int rw_fail_ranges[] = { 0xbb,0xe3, -1 }; +static const int rwdw_fail_ranges[] = { 0xa7,0xe3, -1 }; +static const int dw_fail_ranges[] = { 0xa7,0xcf, -1 }; +static const int tr_fail_ranges[] = { 0xbb,0xcf, -1 }; +static const int pr_fail_ranges[] = { 0x80,0x81, 0xbb,0xcf, -1 }; +static const int roex_fail_ranges[] = { 0x0,-1 }; + +static const struct lock_test lock_tests[] = { + { STGM_PRIORITY, FALSE, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, priority_locked_bytes, pr_fail_ranges, FALSE }, + { STGM_CREATE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, TRUE, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, rwex_locked_bytes, 0, FALSE }, + { STGM_CREATE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE|STGM_TRANSACTED, TRUE, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, rwex_locked_bytes, 0, FALSE }, + { STGM_CREATE|STGM_READWRITE|STGM_TRANSACTED, TRUE, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, rw_locked_bytes, 0, FALSE }, + { STGM_CREATE|STGM_READWRITE|STGM_SHARE_DENY_WRITE|STGM_TRANSACTED, TRUE, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, rwdw_locked_bytes, 0, FALSE }, + { STGM_CREATE|STGM_WRITE|STGM_SHARE_DENY_WRITE|STGM_TRANSACTED, TRUE, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, wodw_locked_bytes, 0, FALSE }, + { STGM_SHARE_EXCLUSIVE|STGM_READWRITE, FALSE, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, rwex_locked_bytes, rwex_fail_ranges, FALSE }, + { STGM_SHARE_EXCLUSIVE|STGM_READWRITE|STGM_TRANSACTED, FALSE, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, rwex_locked_bytes, rwex_fail_ranges, FALSE }, + { STGM_READWRITE|STGM_TRANSACTED, FALSE, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, rw_locked_bytes, rw_fail_ranges, FALSE }, + { STGM_READWRITE|STGM_TRANSACTED|STGM_NOSNAPSHOT, FALSE, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, nosn_locked_bytes, rwdw_fail_ranges, FALSE }, + { STGM_READWRITE|STGM_TRANSACTED|STGM_SHARE_DENY_WRITE, FALSE, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, rwdw_locked_bytes, rwdw_fail_ranges, FALSE }, + { STGM_READ|STGM_SHARE_DENY_WRITE, FALSE, GENERIC_READ, FILE_SHARE_READ, no_locked_bytes, dw_fail_ranges, TRUE }, + { STGM_READ|STGM_TRANSACTED, FALSE, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, tr_locked_bytes, tr_fail_ranges, FALSE }, + { STGM_READ|STGM_SHARE_EXCLUSIVE, FALSE, GENERIC_READ, FILE_SHARE_READ, roex_locked_bytes, roex_fail_ranges, TRUE }, + { STGM_READ|STGM_SHARE_EXCLUSIVE|STGM_TRANSACTED, FALSE, GENERIC_READ, FILE_SHARE_READ, roex_locked_bytes, roex_fail_ranges, TRUE }, +}; + +static BOOL can_open(LPCWSTR filename, DWORD access, DWORD sharing) +{ + HANDLE hfile; + + hfile = CreateFileW(filename, access, sharing, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + + if (hfile == INVALID_HANDLE_VALUE) + return FALSE; + + CloseHandle(hfile); + return TRUE; +} + +static void check_sharing(LPCWSTR filename, const struct lock_test *current, + DWORD access, DWORD sharing, const char *desc, DWORD *open_mode, BOOL *any_failure) +{ + if (can_open(filename, access, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE)) + { + *open_mode = access; + if (!current->todo || (current->sharing & sharing)) + ok(current->sharing & sharing || + broken(!(current->sharing & sharing) && access == GENERIC_WRITE && (current->stg_mode & 0xf) != STGM_READ) /* win2k */, + "file with mode %x should not be openable with %s permission\n", current->stg_mode, desc); + else + { + todo_wine ok(current->sharing & sharing || + broken(!(current->sharing & sharing) && access == GENERIC_WRITE && (current->stg_mode & 0xf) != STGM_READ) /* win2k */, + "file with mode %x should not be openable with %s permission\n", current->stg_mode, desc); + *any_failure = TRUE; + } + } + else + { + if (!current->todo || !(current->sharing & sharing)) + ok(!(current->sharing & sharing), "file with mode %x should be openable with %s permission\n", current->stg_mode, desc); + else + { + todo_wine ok(!(current->sharing & sharing), "file with mode %x should be openable with %s permission\n", current->stg_mode, desc); + *any_failure = TRUE; + } + } +} + +static void check_access(LPCWSTR filename, const struct lock_test *current, + DWORD access, DWORD sharing, const char *desc, DWORD open_mode, BOOL *any_failure) +{ + if (can_open(filename, open_mode, (FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE) & ~sharing)) + { + if (!current->todo || !(current->access & access)) + ok(!(current->access & access), "file with mode %x should not be openable without %s sharing\n", current->stg_mode, desc); + else + { + todo_wine ok(!(current->access & access), "file with mode %x should not be openable without %s sharing\n", current->stg_mode, desc); + *any_failure = TRUE; + } + } + else + { + if (!current->todo || (current->access & access)) + ok(current->access & access, "file with mode %x should be openable without %s sharing\n", current->stg_mode, desc); + else + { + todo_wine ok(current->access & access, "file with mode %x should be openable without %s sharing\n", current->stg_mode, desc); + *any_failure = TRUE; + } + } +} + +static void test_locking(void) +{ + static const WCHAR filename[] = {'w','i','n','e','t','e','s','t',0}; + int i; + IStorage *stg; + HRESULT hr; + + for (i=0; i<sizeof(lock_tests)/sizeof(lock_tests[0]); i++) + { + const struct lock_test *current = &lock_tests[i]; + BOOL any_failure = FALSE; + DWORD open_mode = 0; + + if (current->create) + { + hr = StgCreateDocfile(filename, current->stg_mode, 0, &stg); + ok(SUCCEEDED(hr), "StgCreateDocfile with mode %x failed with hr %x\n", current->stg_mode, hr); + if (FAILED(hr)) continue; + } + else + { + hr = StgCreateDocfile(filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); + ok(SUCCEEDED(hr), "StgCreateDocfile failed with hr %x\n", hr); + if (FAILED(hr)) continue; + IStorage_Release(stg); + + hr = StgOpenStorage(filename, NULL, current->stg_mode, NULL, 0, &stg); + ok(SUCCEEDED(hr), "StgOpenStorage with mode %x failed with hr %x\n", current->stg_mode, hr); + if (FAILED(hr)) + { + DeleteFileW(filename); + continue; + } + } + + check_sharing(filename, current, GENERIC_READ, FILE_SHARE_READ, "READ", &open_mode, &any_failure); + check_sharing(filename, current, GENERIC_WRITE, FILE_SHARE_WRITE, "WRITE", &open_mode, &any_failure); + check_sharing(filename, current, DELETE, FILE_SHARE_DELETE, "DELETE", &open_mode, &any_failure); + + if (open_mode != 0) + { + HANDLE hfile; + BOOL locked, expect_locked; + OVERLAPPED ol; + const int* next_lock = current->locked_bytes; + + check_access(filename, current, GENERIC_READ, FILE_SHARE_READ, "READ", open_mode, &any_failure); + check_access(filename, current, GENERIC_WRITE, FILE_SHARE_WRITE, "WRITE", open_mode, &any_failure); + check_access(filename, current, DELETE, FILE_SHARE_DELETE, "DELETE", open_mode, &any_failure); + + hfile = CreateFileW(filename, open_mode, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + ok(hfile != INVALID_HANDLE_VALUE, "couldn't open file with mode %x\n", current->stg_mode); + + ol.u.s.OffsetHigh = 0; + ol.hEvent = NULL; + + for (ol.u.s.Offset = 0x7fffff00; ol.u.s.Offset != 0x80000000; ol.u.s.Offset++) + { + if (LockFileEx(hfile, LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY, 0, 1, 0, &ol)) + locked = FALSE; + else + { + ok(!LockFileEx(hfile, LOCKFILE_FAIL_IMMEDIATELY, 0, 1, 0, &ol), "shared locks should not be used\n"); + locked = TRUE; + } + + UnlockFileEx(hfile, 0, 1, 0, &ol); + + if ((ol.u.s.Offset&0xff) == *next_lock) + { + expect_locked = TRUE; + next_lock++; + } + else + expect_locked = FALSE; + + if (!current->todo || locked == expect_locked) + ok(locked == expect_locked, "byte %x of file with mode %x is %slocked but should %sbe\n", + ol.u.s.Offset, current->stg_mode, locked?"":"not ", expect_locked?"":"not "); + else + { + any_failure = TRUE; + todo_wine ok(locked == expect_locked, "byte %x of file with mode %x is %slocked but should %sbe\n", + ol.u.s.Offset, current->stg_mode, locked?"":"not ", expect_locked?"":"not "); + } + } + + CloseHandle(hfile); + } + + IStorage_Release( stg ); + + if (!current->create) + { + HANDLE hfile; + BOOL failed, expect_failed=FALSE; + OVERLAPPED ol; + const int* next_range = current->fail_ranges; + + hfile = CreateFileW(filename, open_mode, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + ok(hfile != INVALID_HANDLE_VALUE, "couldn't open file with mode %x\n", current->stg_mode); + + ol.u.s.OffsetHigh = 0; + ol.hEvent = NULL; + + for (ol.u.s.Offset = 0x7fffff00; ol.u.s.Offset != 0x80000000; ol.u.s.Offset++) + { + if (ol.u.s.Offset == 0x7fffff92 || + (ol.u.s.Offset == 0x7fffff80 && current->stg_mode == (STGM_TRANSACTED|STGM_READWRITE)) || + (ol.u.s.Offset == 0x7fffff80 && current->stg_mode == (STGM_TRANSACTED|STGM_READ))) + continue; /* This makes opens hang */ + + LockFileEx(hfile, LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, &ol); + + hr = StgOpenStorage(filename, NULL, current->stg_mode, NULL, 0, &stg); + ok(hr == S_OK || hr == STG_E_LOCKVIOLATION || hr == STG_E_SHAREVIOLATION, "failed with unexpected hr %x\n", hr); + if (SUCCEEDED(hr)) IStorage_Release(stg); + + UnlockFileEx(hfile, 0, 1, 0, &ol); + + failed = FAILED(hr); + + if (!expect_failed && (ol.u.s.Offset&0xff) == next_range[0]) + { + expect_failed = TRUE; + } + else if (expect_failed && (ol.u.s.Offset&0xff) == next_range[1]) + { + expect_failed = FALSE; + next_range += 2; + } + + if (!current->todo || failed == expect_failed) + ok(failed == expect_failed, "open with byte %x locked, mode %x %s but should %s\n", + ol.u.s.Offset, current->stg_mode, failed?"failed":"succeeded", expect_failed?"fail":"succeed"); + else + { + any_failure = TRUE; + todo_wine ok(failed == expect_failed, "open with byte %x locked, mode %x %s but should %s\n", + ol.u.s.Offset, current->stg_mode, failed?"failed":"succeeded", expect_failed?"fail":"succeed"); + } + } + + CloseHandle(hfile); + } + + DeleteFileW(filename); + + if (current->todo && !any_failure) + todo_wine ok(1, "tests succeeded for mode %x\n", current->stg_mode); + } +} + +static void test_transacted_shared(void) +{ + IStorage *stg = NULL; + IStorage *stgrw = NULL; + HRESULT r; + IStream *stm = NULL; + static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; + LARGE_INTEGER pos; + ULARGE_INTEGER upos; + char buffer[10]; + ULONG bytesread; + + DeleteFileA(filenameA); + + /* create a new transacted storage with a stream */ + r = StgCreateDocfile(filename, STGM_CREATE | + STGM_READWRITE |STGM_TRANSACTED, 0, &stg); + ok(r==S_OK, "StgCreateDocfile failed %x\n", r); + + r = WriteClassStg(stg, &test_stg_cls); + ok(r == S_OK, "WriteClassStg failed %x\n", r); + + r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); + ok(r==S_OK, "IStorage->CreateStream failed %x\n", r); + + pos.QuadPart = 0; + r = IStream_Seek(stm, pos, 0, &upos); + ok(r==S_OK, "IStream->Seek failed %x\n", r); + + r = IStream_Write(stm, "aaa", 3, NULL); + ok(r==S_OK, "IStream->Write failed %x\n", r); + + r = IStorage_Commit(stg, STGC_ONLYIFCURRENT); + ok(r==S_OK, "IStorage->Commit failed %x\n", r); + + /* open a second transacted read/write storage */ + r = StgOpenStorage(filename, NULL, STGM_READWRITE | STGM_TRANSACTED | STGM_SHARE_DENY_NONE, NULL, 0, &stgrw); + ok(r==S_OK, "StgOpenStorage failed %x\n", r); + + /* update stream on the first storage and commit */ + pos.QuadPart = 0; + r = IStream_Seek(stm, pos, 0, &upos); + ok(r==S_OK, "IStream->Seek failed %x\n", r); + + r = IStream_Write(stm, "ccc", 3, NULL); + ok(r==S_OK, "IStream->Write failed %x\n", r); + + r = IStorage_Commit(stg, STGC_ONLYIFCURRENT); + ok(r==S_OK, "IStorage->Commit failed %x\n", r); + + /* update again without committing */ + pos.QuadPart = 0; + r = IStream_Seek(stm, pos, 0, &upos); + ok(r==S_OK, "IStream->Seek failed %x\n", r); + + r = IStream_Write(stm, "ddd", 3, NULL); + ok(r==S_OK, "IStream->Write failed %x\n", r); + + IStream_Release(stm); + + /* we can still read the old content from the second storage */ + r = IStorage_OpenStream(stgrw, stmname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); + ok(r==S_OK, "IStorage->OpenStream failed %x\n", r); + + pos.QuadPart = 0; + r = IStream_Seek(stm, pos, 0, &upos); + ok(r==S_OK, "IStream->Seek failed %x\n", r); + + r = IStream_Read(stm, buffer, sizeof(buffer), &bytesread); + ok(r==S_OK, "IStream->Read failed %x\n", r); + ok(bytesread == 3, "read wrong number of bytes %i\n", bytesread); + ok(memcmp(buffer, "aaa", 3) == 0, "wrong data\n"); + + /* and overwrite the data */ + pos.QuadPart = 0; + r = IStream_Seek(stm, pos, 0, &upos); + ok(r==S_OK, "IStream->Seek failed %x\n", r); + + r = IStream_Write(stm, "bbb", 3, NULL); + ok(r==S_OK, "IStream->Write failed %x\n", r); + + IStream_Release(stm); + + /* commit fails because we're out of date */ + r = IStorage_Commit(stgrw, STGC_ONLYIFCURRENT); + ok(r==STG_E_NOTCURRENT, "IStorage->Commit failed %x\n", r); + + /* unless we force it */ + r = IStorage_Commit(stgrw, STGC_DEFAULT); + ok(r==S_OK, "IStorage->Commit failed %x\n", r); + + /* reverting gets us back to the last commit from the same storage */ + r = IStorage_Revert(stg); + ok(r==S_OK, "IStorage->Revert failed %x\n", r); + + r = IStorage_OpenStream(stg, stmname, NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &stm); + ok(r==S_OK, "IStorage->CreateStream failed %x\n", r); + + pos.QuadPart = 0; + r = IStream_Seek(stm, pos, 0, &upos); + ok(r==S_OK, "IStream->Seek failed %x\n", r); + + r = IStream_Read(stm, buffer, sizeof(buffer), &bytesread); + ok(r==S_OK, "IStream->Read failed %x\n", r); + ok(bytesread == 3, "read wrong number of bytes %i\n", bytesread); + ok(memcmp(buffer, "ccc", 3) == 0, "wrong data\n"); + + /* and committing fails forever */ + r = IStorage_Commit(stg, STGC_ONLYIFCURRENT); + ok(r==STG_E_NOTCURRENT, "IStorage->Commit failed %x\n", r); + + IStream_Release(stm); + + IStorage_Release(stg); + IStorage_Release(stgrw); + + DeleteFileA(filenameA); +} + +static void test_overwrite(void) +{ + IStorage *stg = NULL; + HRESULT r; + IStream *stm = NULL; + static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; + static const WCHAR stmname2[] = { 'C','O','N','T','E','N','T','2',0 }; + LARGE_INTEGER pos; + ULARGE_INTEGER upos; + char buffer[4096]; + DWORD orig_size, new_size; + ULONG bytesread; + HANDLE hfile; + int i; + + DeleteFileA(filenameA); + + r = StgCreateDocfile(filename, STGM_CREATE | STGM_READWRITE | STGM_TRANSACTED, 0, &stg); + ok(r==S_OK, "StgCreateDocfile failed %x\n", r); + + r = WriteClassStg(stg, &test_stg_cls); + ok(r == S_OK, "WriteClassStg failed %x\n", r); + + r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); + ok(r==S_OK, "IStorage->CreateStream failed %x\n", r); + + pos.QuadPart = 0; + r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &upos); + ok(r==S_OK, "IStream->Seek failed %x\n", r); + + memset(buffer, 'a', sizeof(buffer)); + for (i=0; i<4; i++) + { + /* Write enough bytes to pass the minimum storage file size */ + r = IStream_Write(stm, buffer, sizeof(buffer), NULL); + ok(r==S_OK, "IStream->Write failed %x\n", r); + } + + r = IStorage_Commit(stg, STGC_DEFAULT); + ok(r==S_OK, "IStorage->Commit failed %x\n", r); + + hfile = CreateFileA(filenameA, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, + NULL, OPEN_EXISTING, 0, NULL); + ok(hfile != NULL, "couldn't open file %d\n", GetLastError()); + + orig_size = GetFileSize(hfile, NULL); + + pos.QuadPart = 0; + r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &upos); + ok(r==S_OK, "IStream->Seek failed %x\n", r); + + r = IStream_Write(stm, "b", 1, NULL); + ok(r==S_OK, "IStream->Write failed %x\n", r); + + r = IStorage_Commit(stg, STGC_OVERWRITE); + ok(r==S_OK, "IStorage->Commit failed %x\n", r); + + new_size = GetFileSize(hfile, NULL); + + todo_wine ok(new_size == orig_size, "file grew from %d bytes to %d\n", orig_size, new_size); + + IStream_Release(stm); + + IStorage_RenameElement(stg, stmname, stmname2); + + r = IStorage_Commit(stg, STGC_OVERWRITE); + ok(r==S_OK, "IStorage->Commit failed %x\n", r); + + new_size = GetFileSize(hfile, NULL); + + todo_wine ok(new_size == orig_size, "file grew from %d bytes to %d\n", orig_size, new_size); + + IStorage_Release(stg); + + r = StgOpenStorage(filename, NULL, STGM_READWRITE | STGM_TRANSACTED | STGM_SHARE_EXCLUSIVE, NULL, 0, &stg); + ok(r==S_OK, "StgOpenStorage failed %x\n", r); + + r = IStorage_OpenStream(stg, stmname2, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stm); + ok(r==S_OK, "IStorage->CreateStream failed %x\n", r); + + r = IStream_Read(stm, buffer, sizeof(buffer), &bytesread); + ok(r==S_OK, "IStream->Write failed %x\n", r); + ok(bytesread == sizeof(buffer), "only read %d bytes\n", bytesread); + ok(buffer[0] == 'b', "unexpected data at byte 0\n"); + + for (i=1; i<sizeof(buffer); i++) + if (buffer[i] != 'a') + break; + ok(i == sizeof(buffer), "unexpected data at byte %i\n", i); + + pos.QuadPart = 0; + r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &upos); + ok(r==S_OK, "IStream->Seek failed %x\n", r); + + r = IStream_Write(stm, "c", 1, NULL); + ok(r==S_OK, "IStream->Write failed %x\n", r); + + r = IStorage_Commit(stg, STGC_OVERWRITE); + ok(r==S_OK, "IStorage->Commit failed %x\n", r); + + new_size = GetFileSize(hfile, NULL); + + todo_wine ok(new_size == orig_size, "file grew from %d bytes to %d\n", orig_size, new_size); + + IStream_Release(stm); + + IStorage_Release(stg); + + CloseHandle(hfile); + + DeleteFileA(filenameA); } START_TEST(storage32) @@ -3191,4 +3691,7 @@ test_hglobal_storage_creation(); test_convert(); test_direct_swmr(); -} + test_locking(); + test_transacted_shared(); + test_overwrite(); +}
10 years, 3 months
1
0
0
0
[akhaldi] 64491: [OLE32] * Sync with Wine 1.7.27. CORE-8540
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Oct 3 11:44:27 2014 New Revision: 64491 URL:
http://svn.reactos.org/svn/reactos?rev=64491&view=rev
Log: [OLE32] * Sync with Wine 1.7.27. CORE-8540 Modified: trunk/reactos/dll/win32/ole32/compobj.c trunk/reactos/dll/win32/ole32/filelockbytes.c trunk/reactos/dll/win32/ole32/filemoniker.c trunk/reactos/dll/win32/ole32/ole2.c trunk/reactos/dll/win32/ole32/stg_stream.c trunk/reactos/dll/win32/ole32/storage32.c trunk/reactos/dll/win32/ole32/storage32.h trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/ole32/compobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compobj.c?…
============================================================================== --- trunk/reactos/dll/win32/ole32/compobj.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/compobj.c [iso-8859-1] Fri Oct 3 11:44:27 2014 @@ -314,7 +314,7 @@ static HKEY classes_root_hkey; /* create the special HKEY_CLASSES_ROOT key */ -static HKEY create_classes_root_hkey(void) +static HKEY create_classes_root_hkey(DWORD access) { HKEY hkey, ret = 0; OBJECT_ATTRIBUTES attr; @@ -327,23 +327,39 @@ attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; RtlInitUnicodeString( &name, classes_rootW ); - if (create_key( &hkey, MAXIMUM_ALLOWED, &attr )) return 0; + if (create_key( &hkey, access, &attr )) return 0; TRACE( "%s -> %p\n", debugstr_w(attr.ObjectName->Buffer), hkey ); - if (!(ret = InterlockedCompareExchangePointer( (void **)&classes_root_hkey, hkey, 0 ))) + if (!(access & KEY_WOW64_64KEY)) + { + if (!(ret = InterlockedCompareExchangePointer( (void **)&classes_root_hkey, hkey, 0 ))) + ret = hkey; + else + NtClose( hkey ); /* somebody beat us to it */ + } + else ret = hkey; - else - NtClose( hkey ); /* somebody beat us to it */ return ret; } /* map the hkey from special root to normal key if necessary */ -static inline HKEY get_classes_root_hkey( HKEY hkey ) +static inline HKEY get_classes_root_hkey( HKEY hkey, REGSAM access ) { HKEY ret = hkey; - - if (hkey == HKEY_CLASSES_ROOT && !(ret = classes_root_hkey)) - ret = create_classes_root_hkey(); + const BOOL is_win64 = sizeof(void*) > sizeof(int); + const BOOL force_wow32 = is_win64 && (access & KEY_WOW64_32KEY); + + if (hkey == HKEY_CLASSES_ROOT && + ((access & KEY_WOW64_64KEY) || !(ret = classes_root_hkey))) + ret = create_classes_root_hkey(MAXIMUM_ALLOWED | (access & KEY_WOW64_64KEY)); + if (force_wow32 && ret && ret == classes_root_hkey) + { + static const WCHAR wow6432nodeW[] = {'W','o','w','6','4','3','2','N','o','d','e',0}; + access &= ~KEY_WOW64_32KEY; + if (create_classes_key(classes_root_hkey, wow6432nodeW, access, &hkey)) + return 0; + ret = hkey; + } return ret; } @@ -353,7 +369,7 @@ OBJECT_ATTRIBUTES attr; UNICODE_STRING nameW; - if (!(hkey = get_classes_root_hkey( hkey ))) return ERROR_INVALID_HANDLE; + if (!(hkey = get_classes_root_hkey( hkey, access ))) return ERROR_INVALID_HANDLE; attr.Length = sizeof(attr); attr.RootDirectory = hkey; @@ -371,7 +387,7 @@ OBJECT_ATTRIBUTES attr; UNICODE_STRING nameW; - if (!(hkey = get_classes_root_hkey( hkey ))) return ERROR_INVALID_HANDLE; + if (!(hkey = get_classes_root_hkey( hkey, access ))) return ERROR_INVALID_HANDLE; attr.Length = sizeof(attr); attr.RootDirectory = hkey; @@ -1174,7 +1190,7 @@ return ret; } -/* The given OXID must be local to this process: +/* The given OXID must be local to this process: * * The ref parameter is here mostly to ensure people remember that * they get one, you should normally take a ref for thread safety. @@ -1639,14 +1655,27 @@ * already been created */ HRESULT apartment_createwindowifneeded(struct apartment *apt) { +#ifndef __REACTOS__ + static INIT_ONCE class_init_once = INIT_ONCE_STATIC_INIT; +#endif + if (apt->multi_threaded) return S_OK; if (!apt->win) { +#ifndef __REACTOS__ + HWND hwnd; + + InitOnceExecuteOnce( &class_init_once, register_class, NULL, NULL ); + + hwnd = CreateWindowW(wszAptWinClass, NULL, 0, 0, 0, 0, 0, + HWND_MESSAGE, 0, hProxyDll, NULL); +#else HWND hwnd = CreateWindowW(wszAptWinClass, NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, 0, hProxyDll, NULL); +#endif if (!hwnd) { ERR("CreateWindow failed with error %d\n", GetLastError()); @@ -2054,7 +2083,11 @@ */ HRESULT WINAPI CoCreateGuid(GUID *pguid) { - DWORD status = UuidCreate(pguid); + DWORD status; + + if(!pguid) return E_INVALIDARG; + + status = UuidCreate(pguid); if (status == RPC_S_OK || status == RPC_S_UUID_LOCAL_ONLY) return S_OK; return HRESULT_FROM_WIN32( status ); } @@ -2474,6 +2507,28 @@ return CLSIDFromProgID(progid, clsid); } +static HRESULT get_ps_clsid_from_registry(const WCHAR* path, REGSAM access, CLSID *pclsid) +{ + HKEY hkey; + WCHAR value[CHARS_IN_GUID]; + DWORD len; + + access |= KEY_READ; + + if (open_classes_key(HKEY_CLASSES_ROOT, path, access, &hkey)) + return REGDB_E_IIDNOTREG; + + len = sizeof(value); + if (ERROR_SUCCESS != RegQueryValueExW(hkey, NULL, NULL, NULL, (BYTE *)value, &len)) + return REGDB_E_IIDNOTREG; + RegCloseKey(hkey); + + if (CLSIDFromString(value, pclsid) != NOERROR) + return REGDB_E_IIDNOTREG; + + return S_OK; +} + /***************************************************************************** * CoGetPSClsid [OLE32.@] * @@ -2483,7 +2538,7 @@ * PARAMS * riid [I] Interface whose proxy/stub CLSID is to be returned. * pclsid [O] Where to store returned proxy/stub CLSID. - * + * * RETURNS * S_OK * E_OUTOFMEMORY @@ -2515,12 +2570,12 @@ static const WCHAR wszInterface[] = {'I','n','t','e','r','f','a','c','e','\\',0}; static const WCHAR wszPSC[] = {'\\','P','r','o','x','y','S','t','u','b','C','l','s','i','d','3','2',0}; WCHAR path[ARRAYSIZE(wszInterface) - 1 + CHARS_IN_GUID - 1 + ARRAYSIZE(wszPSC)]; - WCHAR value[CHARS_IN_GUID]; - LONG len; - HKEY hkey; APARTMENT *apt = COM_CurrentApt(); struct registered_psclsid *registered_psclsid; ACTCTX_SECTION_KEYED_DATA data; + HRESULT hr; + REGSAM opposite = (sizeof(void*) > sizeof(int)) ? KEY_WOW64_32KEY : KEY_WOW64_64KEY; + BOOL is_wow64; TRACE("() riid=%s, pclsid=%p\n", debugstr_guid(riid), pclsid); @@ -2559,31 +2614,17 @@ StringFromGUID2(riid, path + ARRAYSIZE(wszInterface) - 1, CHARS_IN_GUID); strcpyW(path + ARRAYSIZE(wszInterface) - 1 + CHARS_IN_GUID - 1, wszPSC); - /* Open the key.. */ - if (open_classes_key(HKEY_CLASSES_ROOT, path, KEY_READ, &hkey)) - { + hr = get_ps_clsid_from_registry(path, 0, pclsid); + if (FAILED(hr) && (opposite == KEY_WOW64_32KEY || + (IsWow64Process(GetCurrentProcess(), &is_wow64) && is_wow64))) + hr = get_ps_clsid_from_registry(path, opposite, pclsid); + + if (hr == S_OK) + TRACE ("() Returning CLSID=%s\n", debugstr_guid(pclsid)); + else WARN("No PSFactoryBuffer object is registered for IID %s\n", debugstr_guid(riid)); - return REGDB_E_IIDNOTREG; - } - - /* ... Once we have the key, query the registry to get the - value of CLSID as a string, and convert it into a - proper CLSID structure to be passed back to the app */ - len = sizeof(value); - if (ERROR_SUCCESS != RegQueryValueW(hkey, NULL, value, &len)) - { - RegCloseKey(hkey); - return REGDB_E_IIDNOTREG; - } - RegCloseKey(hkey); - - /* We have the CLSID we want back from the registry as a string, so - let's convert it into a CLSID structure */ - if (CLSIDFromString(value, pclsid) != NOERROR) - return REGDB_E_IIDNOTREG; - - TRACE ("() Returning CLSID=%s\n", debugstr_guid(pclsid)); - return S_OK; + + return hr; } /***************************************************************************** @@ -2595,7 +2636,7 @@ * PARAMS * riid [I] Interface whose proxy/stub CLSID is to be registered. * rclsid [I] CLSID of the proxy/stub. - * + * * RETURNS * Success: S_OK * Failure: E_OUTOFMEMORY @@ -3159,12 +3200,17 @@ HRESULT hres; LPCLASSFACTORY lpclf = 0; APARTMENT *apt; + CLSID clsid; TRACE("(rclsid=%s, pUnkOuter=%p, dwClsContext=%08x, riid=%s, ppv=%p)\n", debugstr_guid(rclsid), pUnkOuter, dwClsContext, debugstr_guid(iid), ppv); if (ppv==0) return E_POINTER; + + hres = CoGetTreatAsClass(rclsid, &clsid); + if(FAILED(hres)) + clsid = *rclsid; *ppv = 0; @@ -3181,7 +3227,7 @@ /* * The Standard Global Interface Table (GIT) object is a process-wide singleton. */ - if (IsEqualIID(rclsid, &CLSID_StdGlobalInterfaceTable)) + if (IsEqualIID(&clsid, &CLSID_StdGlobalInterfaceTable)) { IGlobalInterfaceTable *git = get_std_git(); hres = IGlobalInterfaceTable_QueryInterface(git, iid, ppv); @@ -3191,13 +3237,13 @@ return S_OK; } - if (IsEqualCLSID(rclsid, &CLSID_ManualResetEvent)) + if (IsEqualCLSID(&clsid, &CLSID_ManualResetEvent)) return ManualResetEvent_Construct(pUnkOuter, iid, ppv); /* * Get a class factory to construct the object we want. */ - hres = CoGetClassObject(rclsid, + hres = CoGetClassObject(&clsid, dwClsContext, NULL, &IID_IClassFactory, @@ -3214,11 +3260,11 @@ if (FAILED(hres)) { if (hres == CLASS_E_NOAGGREGATION && pUnkOuter) - FIXME("Class %s does not support aggregation\n", debugstr_guid(rclsid)); + FIXME("Class %s does not support aggregation\n", debugstr_guid(&clsid)); else FIXME("no instance created for interface %s of class %s, hres is 0x%08x\n", debugstr_guid(iid), - debugstr_guid(rclsid),hres); + debugstr_guid(&clsid),hres); } return hres; @@ -3321,7 +3367,7 @@ init_multi_qi(count, results); - /* optionaly get CLSID from a file */ + /* optionally get CLSID from a file */ if (!rclsid) { hr = GetClassFile(filename, &clsid); @@ -3383,7 +3429,7 @@ init_multi_qi(count, results); - /* optionaly get CLSID from a file */ + /* optionally get CLSID from a file */ if (!rclsid) { memset(&stat.clsid, 0, sizeof(stat.clsid)); @@ -3577,14 +3623,14 @@ if (!apt) return CO_E_NOTINITIALIZED; stubmgr = get_stub_manager_from_object(apt, pUnk); - + if (stubmgr) { if (fLock) stub_manager_ext_addref(stubmgr, 1, FALSE); else stub_manager_ext_release(stubmgr, 1, FALSE, fLastUnlockReleases); - + stub_manager_int_release(stubmgr); return S_OK; @@ -3730,7 +3776,8 @@ res = COM_OpenKeyForCLSID(clsidOld, NULL, KEY_READ | KEY_WRITE, &hkey); if (FAILED(res)) goto done; - if (!memcmp( clsidOld, clsidNew, sizeof(*clsidOld) )) + + if (IsEqualGUID( clsidOld, clsidNew )) { if (!RegQueryValueW(hkey, wszAutoTreatAs, auto_treat_as, &auto_treat_as_size) && CLSIDFromString(auto_treat_as, &id) == S_OK) @@ -3743,15 +3790,28 @@ } else { - RegDeleteKeyW(hkey, wszTreatAs); + if(RegDeleteKeyW(hkey, wszTreatAs)) + res = REGDB_E_WRITEREGDB; goto done; } } - else if (!StringFromGUID2(clsidNew, szClsidNew, ARRAYSIZE(szClsidNew)) && - !RegSetValueW(hkey, wszTreatAs, REG_SZ, szClsidNew, sizeof(szClsidNew))) - { - res = REGDB_E_WRITEREGDB; - goto done; + else + { + if(IsEqualGUID(clsidNew, &CLSID_NULL)){ + RegDeleteKeyW(hkey, wszTreatAs); + }else{ + if(!StringFromGUID2(clsidNew, szClsidNew, ARRAYSIZE(szClsidNew))){ + WARN("StringFromGUID2 failed\n"); + res = E_FAIL; + goto done; + } + + if(RegSetValueW(hkey, wszTreatAs, REG_SZ, szClsidNew, sizeof(szClsidNew)) != ERROR_SUCCESS){ + WARN("RegSetValue failed\n"); + res = REGDB_E_WRITEREGDB; + goto done; + } + } } done: @@ -4037,7 +4097,7 @@ FIXME("(%p, %p): stub\n", pUnk, pvReserved); return S_OK; } - + /*********************************************************************** * CoQueryProxyBlanket [OLE32.@] * @@ -4987,13 +5047,19 @@ switch(fdwReason) { case DLL_PROCESS_ATTACH: hProxyDll = hinstDLL; +#ifdef __REACTOS__ COMPOBJ_InitProcess(); +#endif break; case DLL_PROCESS_DETACH: if (reserved) break; release_std_git(); +#ifdef __REACTOS__ COMPOBJ_UninitProcess(); +#else + UnregisterClassW( wszAptWinClass, hProxyDll ); +#endif RPC_UnregisterAllChannelHooks(); COMPOBJ_DllList_Free(); DeleteCriticalSection(&csRegisteredClassList); Modified: trunk/reactos/dll/win32/ole32/filelockbytes.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/filelockby…
============================================================================== --- trunk/reactos/dll/win32/ole32/filelockbytes.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/filelockbytes.c [iso-8859-1] Fri Oct 3 11:44:27 2014 @@ -29,7 +29,6 @@ { ILockBytes ILockBytes_iface; LONG ref; - ULARGE_INTEGER filesize; HANDLE hfile; DWORD flProtect; LPWSTR pwcsName; @@ -88,8 +87,6 @@ This->ILockBytes_iface.lpVtbl = &FileLockBytesImpl_Vtbl; This->ref = 1; This->hfile = hFile; - This->filesize.u.LowPart = GetFileSize(This->hfile, - &This->filesize.u.HighPart); This->flProtect = GetProtectMode(openFlags); if(pwcsName) { @@ -108,8 +105,6 @@ } else This->pwcsName = NULL; - - TRACE("file len %u\n", This->filesize.u.LowPart); *pLockBytes = &This->ILockBytes_iface; @@ -228,7 +223,6 @@ ULONG* pcbWritten) /* [out] */ { FileLockBytesImpl* This = impl_from_ILockBytes(iface); - ULONG size_needed = ulOffset.u.LowPart + cb; ULONG bytes_left = cb; const BYTE *writePtr = pv; BOOL ret; @@ -246,27 +240,19 @@ if (pcbWritten) *pcbWritten = 0; - if (size_needed > This->filesize.u.LowPart) - { - ULARGE_INTEGER newSize; - newSize.u.HighPart = 0; - newSize.u.LowPart = size_needed; - ILockBytes_SetSize(iface, newSize); - } - offset.QuadPart = ulOffset.QuadPart; ret = SetFilePointerEx(This->hfile, offset, NULL, FILE_BEGIN); if (!ret) - return STG_E_READFAULT; + return STG_E_WRITEFAULT; while (bytes_left) { ret = WriteFile(This->hfile, writePtr, bytes_left, &cbWritten, NULL); if (!ret) - return STG_E_READFAULT; + return STG_E_WRITEFAULT; if (pcbWritten) *pcbWritten += cbWritten; @@ -296,10 +282,7 @@ HRESULT hr = S_OK; LARGE_INTEGER newpos; - if (This->filesize.u.LowPart == newSize.u.LowPart) - return hr; - - TRACE("from %u to %u\n", This->filesize.u.LowPart, newSize.u.LowPart); + TRACE("new size %u\n", newSize.u.LowPart); newpos.QuadPart = newSize.QuadPart; if (SetFilePointerEx(This->hfile, newpos, NULL, FILE_BEGIN)) @@ -307,22 +290,82 @@ SetEndOfFile(This->hfile); } - This->filesize = newSize; return hr; +} + +static HRESULT get_lock_error(void) +{ + switch (GetLastError()) + { + case ERROR_LOCK_VIOLATION: return STG_E_LOCKVIOLATION; break; + case ERROR_ACCESS_DENIED: return STG_E_ACCESSDENIED; break; + case ERROR_NOT_SUPPORTED: return STG_E_INVALIDFUNCTION; break; + default: + FIXME("no mapping for error %d\n", GetLastError()); + return STG_E_INVALIDFUNCTION; + } } static HRESULT WINAPI FileLockBytesImpl_LockRegion(ILockBytes* iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) { - FIXME("stub\n"); - return E_NOTIMPL; + FileLockBytesImpl* This = impl_from_ILockBytes(iface); + OVERLAPPED ol; + DWORD lock_flags = LOCKFILE_FAIL_IMMEDIATELY; + + TRACE("ofs %u count %u flags %x\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType); + + if (dwLockType & LOCK_WRITE) + return STG_E_INVALIDFUNCTION; + + if (dwLockType & (LOCK_EXCLUSIVE|LOCK_ONLYONCE)) + lock_flags |= LOCKFILE_EXCLUSIVE_LOCK; + + ol.hEvent = 0; + ol.u.s.Offset = libOffset.u.LowPart; + ol.u.s.OffsetHigh = libOffset.u.HighPart; + + if (LockFileEx(This->hfile, lock_flags, 0, cb.u.LowPart, cb.u.HighPart, &ol)) + return S_OK; + return get_lock_error(); +} + +HRESULT FileLockBytesImpl_LockRegionSync(ILockBytes* iface, + ULARGE_INTEGER libOffset, ULARGE_INTEGER cb) +{ + FileLockBytesImpl* This = impl_from_ILockBytes(iface); + OVERLAPPED ol; + + if (iface->lpVtbl != &FileLockBytesImpl_Vtbl) + return E_NOTIMPL; + + ol.hEvent = 0; + ol.u.s.Offset = libOffset.u.LowPart; + ol.u.s.OffsetHigh = libOffset.u.HighPart; + + if (LockFileEx(This->hfile, LOCKFILE_EXCLUSIVE_LOCK, 0, cb.u.LowPart, cb.u.HighPart, &ol)) + return S_OK; + return get_lock_error(); } static HRESULT WINAPI FileLockBytesImpl_UnlockRegion(ILockBytes* iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) { - FIXME("stub\n"); - return E_NOTIMPL; + FileLockBytesImpl* This = impl_from_ILockBytes(iface); + OVERLAPPED ol; + + TRACE("ofs %u count %u flags %x\n", libOffset.u.LowPart, cb.u.LowPart, dwLockType); + + if (dwLockType & LOCK_WRITE) + return STG_E_INVALIDFUNCTION; + + ol.hEvent = 0; + ol.u.s.Offset = libOffset.u.LowPart; + ol.u.s.OffsetHigh = libOffset.u.HighPart; + + if (UnlockFileEx(This->hfile, 0, cb.u.LowPart, cb.u.HighPart, &ol)) + return S_OK; + return get_lock_error(); } static HRESULT WINAPI FileLockBytesImpl_Stat(ILockBytes* iface, @@ -341,7 +384,8 @@ pstatstg->pwcsName = NULL; pstatstg->type = STGTY_LOCKBYTES; - pstatstg->cbSize = This->filesize; + + pstatstg->cbSize.u.LowPart = GetFileSize(This->hfile, &pstatstg->cbSize.u.HighPart); /* FIXME: If the implementation is exported, we'll need to set other fields. */ return S_OK; Modified: trunk/reactos/dll/win32/ole32/filemoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/filemonike…
============================================================================== --- trunk/reactos/dll/win32/ole32/filemoniker.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/filemoniker.c [iso-8859-1] Fri Oct 3 11:44:27 2014 @@ -588,22 +588,11 @@ /* get the file name */ IMoniker_GetDisplayName(iface,pbc,pmkToLeft,&filePath); - /* verify if the file contains a storage object */ - res=StgIsStorageFile(filePath); - - if(res==S_OK){ - - res=StgOpenStorage(filePath,NULL,STGM_READWRITE|STGM_SHARE_DENY_WRITE,NULL,0,&pstg); - - if (SUCCEEDED(res)){ - - *ppvObject=pstg; - - IStorage_AddRef(pstg); - - return res; - } - } + res=StgOpenStorage(filePath,NULL,STGM_READWRITE|STGM_SHARE_DENY_WRITE,NULL,0,&pstg); + + if (SUCCEEDED(res)) + *ppvObject=pstg; + CoTaskMemFree(filePath); } else Modified: trunk/reactos/dll/win32/ole32/ole2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole2.c?rev…
============================================================================== --- trunk/reactos/dll/win32/ole32/ole2.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/ole2.c [iso-8859-1] Fri Oct 3 11:44:27 2014 @@ -2179,7 +2179,9 @@ case WM_MBUTTONDOWN: case WM_RBUTTONDOWN: { - OLEDD_TrackStateChange((TrackerWindowInfo*)GetWindowLongPtrA(hwnd, 0)); + TrackerWindowInfo *trackerInfo = (TrackerWindowInfo*)GetWindowLongPtrA(hwnd, 0); + if (trackerInfo->trackingDone) break; + OLEDD_TrackStateChange(trackerInfo); break; } case WM_DESTROY: @@ -2843,6 +2845,8 @@ case VT_LPWSTR: case VT_FILETIME: case VT_BLOB: + case VT_DISPATCH: + case VT_UNKNOWN: case VT_STREAM: case VT_STORAGE: case VT_STREAMED_OBJECT: @@ -2919,6 +2923,8 @@ case VT_UINT: case VT_FILETIME: break; + case VT_DISPATCH: + case VT_UNKNOWN: case VT_STREAM: case VT_STREAMED_OBJECT: case VT_STORAGE: @@ -3032,6 +3038,8 @@ case VT_DATE: case VT_FILETIME: break; + case VT_DISPATCH: + case VT_UNKNOWN: case VT_STREAM: case VT_STREAMED_OBJECT: case VT_STORAGE: Modified: trunk/reactos/dll/win32/ole32/stg_stream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/stg_stream…
============================================================================== --- trunk/reactos/dll/win32/ole32/stg_stream.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/stg_stream.c [iso-8859-1] Fri Oct 3 11:44:27 2014 @@ -151,7 +151,7 @@ /* * Advance the pointer for the number of positions read. */ - This->currentPosition.u.LowPart += *pcbRead; + This->currentPosition.QuadPart += *pcbRead; } TRACE("<-- %08x\n", res); @@ -232,12 +232,12 @@ /* * Advance the position pointer for the number of positions written. */ - This->currentPosition.u.LowPart += *pcbWritten; + This->currentPosition.QuadPart += *pcbWritten; if (SUCCEEDED(res)) res = StorageBaseImpl_Flush(This->parentStorage); - TRACE("<-- S_OK, written %u\n", *pcbWritten); + TRACE("<-- %08x, written %u\n", res, *pcbWritten); return res; } Modified: trunk/reactos/dll/win32/ole32/storage32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
============================================================================== --- trunk/reactos/dll/win32/ole32/storage32.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/storage32.c [iso-8859-1] Fri Oct 3 11:44:27 2014 @@ -83,6 +83,7 @@ /* Method definitions for the Storage32InternalImpl class. */ static StorageInternalImpl* StorageInternalImpl_Construct(StorageBaseImpl* parentStorage, DWORD openFlags, DirRef storageDirEntry); +static HRESULT StorageImpl_Refresh(StorageImpl *This, BOOL new_object, BOOL create); static void StorageImpl_Destroy(StorageBaseImpl* iface); static void StorageImpl_Invalidate(StorageBaseImpl* iface); static HRESULT StorageImpl_Flush(StorageBaseImpl* iface); @@ -91,8 +92,9 @@ static void StorageImpl_SetNextBlockInChain(StorageImpl* This, ULONG blockIndex, ULONG nextBlock); static HRESULT StorageImpl_LoadFileHeader(StorageImpl* This); static void StorageImpl_SaveFileHeader(StorageImpl* This); - -static void Storage32Impl_AddBlockDepot(StorageImpl* This, ULONG blockIndex); +static HRESULT StorageImpl_LockRegionSync(StorageImpl *This, ULARGE_INTEGER offset, ULARGE_INTEGER cb, DWORD dwLockType); + +static void Storage32Impl_AddBlockDepot(StorageImpl* This, ULONG blockIndex, ULONG depotIndex); static ULONG Storage32Impl_AddExtBlockDepot(StorageImpl* This); static ULONG Storage32Impl_GetNextExtendedBlock(StorageImpl* This, ULONG blockIndex); static ULONG Storage32Impl_GetExtDepotBlock(StorageImpl* This, ULONG depotIndex); @@ -172,10 +174,31 @@ * Changes are committed to the transacted parent. */ StorageBaseImpl *transactedParent; + + /* The transaction signature from when we last committed */ + ULONG lastTransactionSig; } TransactedSnapshotImpl; +typedef struct TransactedSharedImpl +{ + struct StorageBaseImpl base; + + /* + * Snapshot and uncommitted changes go here. + */ + TransactedSnapshotImpl *scratch; + + /* + * Changes are committed to the transacted parent. + */ + StorageBaseImpl *transactedParent; + + /* The transaction signature from when we last committed */ + ULONG lastTransactionSig; +} TransactedSharedImpl; + /* Generic function to create a transacted wrapper for a direct storage object. */ -static HRESULT Storage_ConstructTransacted(StorageBaseImpl* parent, StorageBaseImpl** result); +static HRESULT Storage_ConstructTransacted(StorageBaseImpl* parent, BOOL toplevel, StorageBaseImpl** result); /* OLESTREAM memory structure to use for Get and Put Routines */ /* Used for OleConvertIStorageToOLESTREAM and OleConvertOLESTREAMToIStorage */ @@ -311,9 +334,9 @@ ** Block Functions */ -static ULONG StorageImpl_GetBigBlockOffset(StorageImpl* This, ULONG index) -{ - return (index+1) * This->bigBlockSize; +static ULONGLONG StorageImpl_GetBigBlockOffset(StorageImpl* This, ULONG index) +{ + return (ULONGLONG)(index+1) * This->bigBlockSize; } /************************************************************************ @@ -647,7 +670,7 @@ { if (grfMode & STGM_TRANSACTED) { - res = Storage_ConstructTransacted(&newStorage->base, &newTransactedStorage); + res = Storage_ConstructTransacted(&newStorage->base, FALSE, &newTransactedStorage); if (FAILED(res)) { @@ -1280,8 +1303,7 @@ /* * initialize the size used by the directory stream */ - newSize.u.HighPart = 0; - newSize.u.LowPart = storage->bigBlockSize * blockCount; + newSize.QuadPart = (ULONGLONG)storage->bigBlockSize * blockCount; /* * add a block to the directory stream @@ -2560,7 +2582,6 @@ if (FAILED(hr)) return hr; /* Grow the stream if necessary */ - newSize.QuadPart = 0; newSize.QuadPart = offset.QuadPart + size; if (newSize.QuadPart > data.size.QuadPart) @@ -2617,6 +2638,108 @@ hr = StorageImpl_WriteDirEntry(This, dst, &dst_data); } + + return hr; +} + +static HRESULT StorageImpl_GetTransactionSig(StorageBaseImpl *base, + ULONG* result, BOOL refresh) +{ + StorageImpl *This = (StorageImpl*)base; + HRESULT hr=S_OK; + DWORD oldTransactionSig = This->transactionSig; + + if (refresh) + { + ULARGE_INTEGER offset; + ULONG bytes_read; + BYTE data[4]; + + offset.u.HighPart = 0; + offset.u.LowPart = OFFSET_TRANSACTIONSIG; + hr = StorageImpl_ReadAt(This, offset, data, 4, &bytes_read); + + if (SUCCEEDED(hr)) + { + StorageUtl_ReadDWord(data, 0, &This->transactionSig); + + if (oldTransactionSig != This->transactionSig) + { + /* Someone else wrote to this, so toss all cached information. */ + TRACE("signature changed\n"); + + hr = StorageImpl_Refresh(This, FALSE, FALSE); + } + + if (FAILED(hr)) + This->transactionSig = oldTransactionSig; + } + } + + *result = This->transactionSig; + + return hr; +} + +static HRESULT StorageImpl_SetTransactionSig(StorageBaseImpl *base, + ULONG value) +{ + StorageImpl *This = (StorageImpl*)base; + + This->transactionSig = value; + StorageImpl_SaveFileHeader(This); + + return S_OK; +} + +static HRESULT StorageImpl_LockTransaction(StorageBaseImpl *base, BOOL write) +{ + StorageImpl *This = (StorageImpl*)base; + HRESULT hr; + ULARGE_INTEGER offset, cb; + + if (write) + { + /* Synchronous grab of second priority range, the commit lock, and the + * lock-checking lock. */ + offset.QuadPart = RANGELOCK_TRANSACTION_FIRST; + cb.QuadPart = RANGELOCK_TRANSACTION_LAST - RANGELOCK_TRANSACTION_FIRST + 1; + } + else + { + offset.QuadPart = RANGELOCK_COMMIT; + cb.QuadPart = 1; + } + + hr = StorageImpl_LockRegionSync(This, offset, cb, LOCK_ONLYONCE); + + if (hr == STG_E_INVALIDFUNCTION) + hr = S_OK; + + return hr; +} + +static HRESULT StorageImpl_UnlockTransaction(StorageBaseImpl *base, BOOL write) +{ + StorageImpl *This = (StorageImpl*)base; + HRESULT hr; + ULARGE_INTEGER offset, cb; + + if (write) + { + offset.QuadPart = RANGELOCK_TRANSACTION_FIRST; + cb.QuadPart = RANGELOCK_TRANSACTION_LAST - RANGELOCK_TRANSACTION_FIRST + 1; + } + else + { + offset.QuadPart = RANGELOCK_COMMIT; + cb.QuadPart = 1; + } + + hr = ILockBytes_UnlockRegion(This->lockBytes, offset, cb, LOCK_ONLYONCE); + + if (hr == STG_E_INVALIDFUNCTION) + hr = S_OK; return hr; } @@ -2721,69 +2844,163 @@ StorageImpl_StreamReadAt, StorageImpl_StreamWriteAt, StorageImpl_StreamSetSize, - StorageImpl_StreamLink + StorageImpl_StreamLink, + StorageImpl_GetTransactionSig, + StorageImpl_SetTransactionSig, + StorageImpl_LockTransaction, + StorageImpl_UnlockTransaction }; -static HRESULT StorageImpl_Construct( - HANDLE hFile, - LPCOLESTR pwcsName, - ILockBytes* pLkbyt, - DWORD openFlags, - BOOL fileBased, - BOOL create, - ULONG sector_size, - StorageImpl** result) -{ - StorageImpl* This; - HRESULT hr = S_OK; +static HRESULT StorageImpl_LockRegionSync(StorageImpl *This, ULARGE_INTEGER offset, + ULARGE_INTEGER cb, DWORD dwLockType) +{ + HRESULT hr; + int delay = 0; + + /* if it's a FileLockBytesImpl use LockFileEx in blocking mode */ + if (SUCCEEDED(FileLockBytesImpl_LockRegionSync(This->lockBytes, offset, cb))) + return S_OK; + + /* otherwise we have to fake it based on an async lock */ + do + { + hr = ILockBytes_LockRegion(This->lockBytes, offset, cb, dwLockType); + + if (hr == STG_E_ACCESSDENIED || hr == STG_E_LOCKVIOLATION) + { + Sleep(delay); + if (delay < 150) delay++; + } + } while (hr == STG_E_ACCESSDENIED || hr == STG_E_LOCKVIOLATION); + + return hr; +} + +static HRESULT StorageImpl_CheckLockRange(StorageImpl *This, ULONG start, + ULONG end, HRESULT fail_hr) +{ + HRESULT hr; + ULARGE_INTEGER offset, cb; + + offset.QuadPart = start; + cb.QuadPart = 1 + end - start; + + hr = ILockBytes_LockRegion(This->lockBytes, offset, cb, LOCK_ONLYONCE); + if (SUCCEEDED(hr)) ILockBytes_UnlockRegion(This->lockBytes, offset, cb, LOCK_ONLYONCE); + + if (hr == STG_E_ACCESSDENIED || hr == STG_E_LOCKVIOLATION) + return fail_hr; + else + return S_OK; +} + +static HRESULT StorageImpl_LockOne(StorageImpl *This, ULONG start, ULONG end) +{ + HRESULT hr=S_OK; + int i, j; + ULARGE_INTEGER offset, cb; + + cb.QuadPart = 1; + + for (i=start; i<=end; i++) + { + offset.QuadPart = i; + hr = ILockBytes_LockRegion(This->lockBytes, offset, cb, LOCK_ONLYONCE); + if (hr != STG_E_ACCESSDENIED && hr != STG_E_LOCKVIOLATION) + break; + } + + if (SUCCEEDED(hr)) + { + for (j=0; j<sizeof(This->locked_bytes)/sizeof(This->locked_bytes[0]); j++) + { + if (This->locked_bytes[j] == 0) + { + This->locked_bytes[j] = i; + break; + } + } + } + + return hr; +} + +static HRESULT StorageImpl_GrabLocks(StorageImpl *This, DWORD openFlags) +{ + HRESULT hr; + ULARGE_INTEGER offset; + ULARGE_INTEGER cb; + DWORD share_mode = STGM_SHARE_MODE(openFlags); + + if (openFlags & STGM_NOSNAPSHOT) + { + /* STGM_NOSNAPSHOT implies deny write */ + if (share_mode == STGM_SHARE_DENY_READ) share_mode = STGM_SHARE_EXCLUSIVE; + else if (share_mode != STGM_SHARE_EXCLUSIVE) share_mode = STGM_SHARE_DENY_WRITE; + } + + /* Wrap all other locking inside a single lock so we can check ranges safely */ + offset.QuadPart = RANGELOCK_CHECKLOCKS; + cb.QuadPart = 1; + hr = StorageImpl_LockRegionSync(This, offset, cb, LOCK_ONLYONCE); + + /* If the ILockBytes doesn't support locking that's ok. */ + if (FAILED(hr)) return S_OK; + + hr = S_OK; + + /* First check for any conflicting locks. */ + if (SUCCEEDED(hr) && (openFlags & STGM_PRIORITY) == STGM_PRIORITY) + hr = StorageImpl_CheckLockRange(This, RANGELOCK_COMMIT, RANGELOCK_COMMIT, STG_E_LOCKVIOLATION); + + if (SUCCEEDED(hr) && (STGM_ACCESS_MODE(openFlags) != STGM_WRITE)) + hr = StorageImpl_CheckLockRange(This, RANGELOCK_DENY_READ_FIRST, RANGELOCK_DENY_READ_LAST, STG_E_SHAREVIOLATION); + + if (SUCCEEDED(hr) && (STGM_ACCESS_MODE(openFlags) != STGM_READ)) + hr = StorageImpl_CheckLockRange(This, RANGELOCK_DENY_WRITE_FIRST, RANGELOCK_DENY_WRITE_LAST, STG_E_SHAREVIOLATION); + + if (SUCCEEDED(hr) && (share_mode == STGM_SHARE_DENY_READ || share_mode == STGM_SHARE_EXCLUSIVE)) + hr = StorageImpl_CheckLockRange(This, RANGELOCK_READ_FIRST, RANGELOCK_READ_LAST, STG_E_LOCKVIOLATION); + + if (SUCCEEDED(hr) && (share_mode == STGM_SHARE_DENY_WRITE || share_mode == STGM_SHARE_EXCLUSIVE)) + hr = StorageImpl_CheckLockRange(This, RANGELOCK_WRITE_FIRST, RANGELOCK_WRITE_LAST, STG_E_LOCKVIOLATION); + + /* Then grab our locks. */ + if (SUCCEEDED(hr) && (openFlags & STGM_PRIORITY) == STGM_PRIORITY) + { + hr = StorageImpl_LockOne(This, RANGELOCK_PRIORITY1_FIRST, RANGELOCK_PRIORITY1_LAST); + if (SUCCEEDED(hr)) + hr = StorageImpl_LockOne(This, RANGELOCK_PRIORITY2_FIRST, RANGELOCK_PRIORITY2_LAST); + } + + if (SUCCEEDED(hr) && (STGM_ACCESS_MODE(openFlags) != STGM_WRITE)) + hr = StorageImpl_LockOne(This, RANGELOCK_READ_FIRST, RANGELOCK_READ_LAST); + + if (SUCCEEDED(hr) && (STGM_ACCESS_MODE(openFlags) != STGM_READ)) + hr = StorageImpl_LockOne(This, RANGELOCK_WRITE_FIRST, RANGELOCK_WRITE_LAST); + + if (SUCCEEDED(hr) && (share_mode == STGM_SHARE_DENY_READ || share_mode == STGM_SHARE_EXCLUSIVE)) + hr = StorageImpl_LockOne(This, RANGELOCK_DENY_READ_FIRST, RANGELOCK_DENY_READ_LAST); + + if (SUCCEEDED(hr) && (share_mode == STGM_SHARE_DENY_WRITE || share_mode == STGM_SHARE_EXCLUSIVE)) + hr = StorageImpl_LockOne(This, RANGELOCK_DENY_WRITE_FIRST, RANGELOCK_DENY_WRITE_LAST); + + if (SUCCEEDED(hr) && (openFlags & STGM_NOSNAPSHOT) == STGM_NOSNAPSHOT) + hr = StorageImpl_LockOne(This, RANGELOCK_NOSNAPSHOT_FIRST, RANGELOCK_NOSNAPSHOT_LAST); + + offset.QuadPart = RANGELOCK_CHECKLOCKS; + cb.QuadPart = 1; + ILockBytes_UnlockRegion(This->lockBytes, offset, cb, LOCK_ONLYONCE); + + return hr; +} + +static HRESULT StorageImpl_Refresh(StorageImpl *This, BOOL new_object, BOOL create) +{ + HRESULT hr=S_OK; DirEntry currentEntry; DirRef currentEntryRef; - - if ( FAILED( validateSTGM(openFlags) )) - return STG_E_INVALIDFLAG; - - This = HeapAlloc(GetProcessHeap(), 0, sizeof(StorageImpl)); - if (!This) - return E_OUTOFMEMORY; - - memset(This, 0, sizeof(StorageImpl)); - - list_init(&This->base.strmHead); - - list_init(&This->base.storageHead); - - This->base.IStorage_iface.lpVtbl = &Storage32Impl_Vtbl; - This->base.IPropertySetStorage_iface.lpVtbl = &IPropertySetStorage_Vtbl; - This->base.IDirectWriterLock_iface.lpVtbl = &DirectWriterLockVtbl; - This->base.baseVtbl = &StorageImpl_BaseVtbl; - This->base.openFlags = (openFlags & ~STGM_CREATE); - This->base.ref = 1; - This->base.create = create; - - if (openFlags == (STGM_DIRECT_SWMR|STGM_READWRITE|STGM_SHARE_DENY_WRITE)) - This->base.lockingrole = SWMR_Writer; - else if (openFlags == (STGM_DIRECT_SWMR|STGM_READ|STGM_SHARE_DENY_NONE)) - This->base.lockingrole = SWMR_Reader; - else - This->base.lockingrole = SWMR_None; - - This->base.reverted = FALSE; - - /* - * Initialize the big block cache. - */ - This->bigBlockSize = sector_size; - This->smallBlockSize = DEF_SMALL_BLOCK_SIZE; - if (hFile) - hr = FileLockBytesImpl_Construct(hFile, openFlags, pwcsName, &This->lockBytes); - else - { - This->lockBytes = pLkbyt; - ILockBytes_AddRef(pLkbyt); - } - - if (FAILED(hr)) - goto end; + BlockChainStream *blockChainStream; if (create) { @@ -2809,7 +3026,7 @@ This->rootStartBlock = 1; This->smallBlockLimit = LIMIT_TO_USE_SMALL_BLOCK; This->smallBlockDepotStart = BLOCK_END_OF_CHAIN; - if (sector_size == 4096) + if (This->bigBlockSize == 4096) This->bigBlockSizeBits = MAX_BIG_BLOCK_SIZE_BITS; else This->bigBlockSizeBits = MIN_BIG_BLOCK_SIZE_BITS; @@ -2843,7 +3060,7 @@ if (FAILED(hr)) { - goto end; + return hr; } } @@ -2870,8 +3087,7 @@ This->extBigBlockDepotLocations = HeapAlloc(GetProcessHeap(), 0, sizeof(ULONG) * cache_size); if (!This->extBigBlockDepotLocations) { - hr = E_OUTOFMEMORY; - goto end; + return E_OUTOFMEMORY; } This->extBigBlockDepotLocationsSize = cache_size; @@ -2881,8 +3097,7 @@ if (current_block == BLOCK_END_OF_CHAIN) { WARN("File has too few extended big block depot blocks.\n"); - hr = STG_E_DOCFILECORRUPT; - goto end; + return STG_E_DOCFILECORRUPT; } This->extBigBlockDepotLocations[i] = current_block; current_block = Storage32Impl_GetNextExtendedBlock(This, current_block); @@ -2897,20 +3112,24 @@ /* * Create the block chain abstractions. */ - if(!(This->rootBlockChain = + if(!(blockChainStream = BlockChainStream_Construct(This, &This->rootStartBlock, DIRENTRY_NULL))) { - hr = STG_E_READFAULT; - goto end; - } - - if(!(This->smallBlockDepotChain = + return STG_E_READFAULT; + } + if (!new_object) + BlockChainStream_Destroy(This->rootBlockChain); + This->rootBlockChain = blockChainStream; + + if(!(blockChainStream = BlockChainStream_Construct(This, &This->smallBlockDepotStart, DIRENTRY_NULL))) { - hr = STG_E_READFAULT; - goto end; - } + return STG_E_READFAULT; + } + if (!new_object) + BlockChainStream_Destroy(This->smallBlockDepotChain); + This->smallBlockDepotChain = blockChainStream; /* * Write the root storage entry (memory only) @@ -2963,20 +3182,96 @@ if (FAILED(hr)) { - hr = STG_E_READFAULT; - goto end; + return STG_E_READFAULT; } /* * Create the block chain abstraction for the small block root chain. */ - if(!(This->smallBlockRootChain = + if(!(blockChainStream = BlockChainStream_Construct(This, NULL, This->base.storageDirEntry))) { - hr = STG_E_READFAULT; - } - -end: + return STG_E_READFAULT; + } + if (!new_object) + BlockChainStream_Destroy(This->smallBlockRootChain); + This->smallBlockRootChain = blockChainStream; + + if (!new_object) + { + int i; + for (i=0; i<BLOCKCHAIN_CACHE_SIZE; i++) + { + BlockChainStream_Destroy(This->blockChainCache[i]); + This->blockChainCache[i] = NULL; + } + } + + return hr; +} + +static HRESULT StorageImpl_Construct( + HANDLE hFile, + LPCOLESTR pwcsName, + ILockBytes* pLkbyt, + DWORD openFlags, + BOOL fileBased, + BOOL create, + ULONG sector_size, + StorageImpl** result) +{ + StorageImpl* This; + HRESULT hr = S_OK; + + if ( FAILED( validateSTGM(openFlags) )) + return STG_E_INVALIDFLAG; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(StorageImpl)); + if (!This) + return E_OUTOFMEMORY; + + memset(This, 0, sizeof(StorageImpl)); + + list_init(&This->base.strmHead); + + list_init(&This->base.storageHead); + + This->base.IStorage_iface.lpVtbl = &Storage32Impl_Vtbl; + This->base.IPropertySetStorage_iface.lpVtbl = &IPropertySetStorage_Vtbl; + This->base.IDirectWriterLock_iface.lpVtbl = &DirectWriterLockVtbl; + This->base.baseVtbl = &StorageImpl_BaseVtbl; + This->base.openFlags = (openFlags & ~STGM_CREATE); + This->base.ref = 1; + This->base.create = create; + + if (openFlags == (STGM_DIRECT_SWMR|STGM_READWRITE|STGM_SHARE_DENY_WRITE)) + This->base.lockingrole = SWMR_Writer; + else if (openFlags == (STGM_DIRECT_SWMR|STGM_READ|STGM_SHARE_DENY_NONE)) + This->base.lockingrole = SWMR_Reader; + else + This->base.lockingrole = SWMR_None; + + This->base.reverted = FALSE; + + /* + * Initialize the big block cache. + */ + This->bigBlockSize = sector_size; + This->smallBlockSize = DEF_SMALL_BLOCK_SIZE; + if (hFile) + hr = FileLockBytesImpl_Construct(hFile, openFlags, pwcsName, &This->lockBytes); + else + { + This->lockBytes = pLkbyt; + ILockBytes_AddRef(pLkbyt); + } + + if (SUCCEEDED(hr)) + hr = StorageImpl_GrabLocks(This, openFlags); + + if (SUCCEEDED(hr)) + hr = StorageImpl_Refresh(This, TRUE, create); + if (FAILED(hr)) { IStorage_Release(&This->base.IStorage_iface); @@ -3018,6 +3313,17 @@ for (i=0; i<BLOCKCHAIN_CACHE_SIZE; i++) BlockChainStream_Destroy(This->blockChainCache[i]); + + for (i=0; i<sizeof(This->locked_bytes)/sizeof(This->locked_bytes[0]); i++) + { + ULARGE_INTEGER offset, cb; + cb.QuadPart = 1; + if (This->locked_bytes[i] != 0) + { + offset.QuadPart = This->locked_bytes[i]; + ILockBytes_UnlockRegion(This->lockBytes, offset, cb, LOCK_ONLYONCE); + } + } if (This->lockBytes) ILockBytes_Release(This->lockBytes); @@ -3092,7 +3398,7 @@ /* * Add a block depot. */ - Storage32Impl_AddBlockDepot(This, depotBlockIndexPos); + Storage32Impl_AddBlockDepot(This, depotBlockIndexPos, depotIndex); This->bigBlockDepotCount++; This->bigBlockDepotStart[depotIndex] = depotBlockIndexPos; @@ -3135,7 +3441,7 @@ /* * Add a block depot and mark it in the extended block. */ - Storage32Impl_AddBlockDepot(This, depotBlockIndexPos); + Storage32Impl_AddBlockDepot(This, depotBlockIndexPos, depotIndex); This->bigBlockDepotCount++; Storage32Impl_SetExtDepotBlock(This, depotIndex, depotBlockIndexPos); @@ -3200,14 +3506,24 @@ * This will create a depot block, essentially it is a block initialized * to BLOCK_UNUSEDs. */ -static void Storage32Impl_AddBlockDepot(StorageImpl* This, ULONG blockIndex) +static void Storage32Impl_AddBlockDepot(StorageImpl* This, ULONG blockIndex, ULONG depotIndex) { BYTE blockBuffer[MAX_BIG_BLOCK_SIZE]; + ULONG rangeLockIndex = RANGELOCK_FIRST / This->bigBlockSize - 1; + ULONG blocksPerDepot = This->bigBlockSize / sizeof(ULONG); + ULONG rangeLockDepot = rangeLockIndex / blocksPerDepot; /* * Initialize blocks as free */ memset(blockBuffer, BLOCK_UNUSED, This->bigBlockSize); + + /* Reserve the range lock sector */ + if (depotIndex == rangeLockDepot) + { + ((ULONG*)blockBuffer)[rangeLockIndex % blocksPerDepot] = BLOCK_END_OF_CHAIN; + } + StorageImpl_WriteBigBlock(This, blockIndex, blockBuffer); } @@ -3504,6 +3820,13 @@ assert(depotBlockCount < This->bigBlockDepotCount); assert(blockIndex != nextBlock); + if (blockIndex == (RANGELOCK_FIRST / This->bigBlockSize) - 1) + /* This should never happen (storage file format spec forbids it), but + * older versions of Wine may have generated broken files. We don't want to + * assert and potentially lose data, but we do want to know if this ever + * happens in a newly-created file. */ + ERR("Using range lock page\n"); + if (depotBlockCount < COUNT_BBDEPOTINHEADER) { depotBlockIndexPos = This->bigBlockDepotStart[depotBlockCount]; @@ -3592,6 +3915,11 @@ StorageUtl_ReadDWord( headerBigBlock, + OFFSET_TRANSACTIONSIG, + &This->transactionSig); + + StorageUtl_ReadDWord( + headerBigBlock, OFFSET_SMALLBLOCKLIMIT, &This->smallBlockLimit); @@ -3750,6 +4078,11 @@ StorageUtl_WriteDWord( headerBigBlock, + OFFSET_TRANSACTIONSIG, + This->transactionSig); + + StorageUtl_WriteDWord( + headerBigBlock, OFFSET_SMALLBLOCKLIMIT, This->smallBlockLimit); @@ -3801,8 +4134,7 @@ HRESULT hr; ULONG bytesRead; - offset.u.HighPart = 0; - offset.u.LowPart = index * RAW_DIRENTRY_SIZE; + offset.QuadPart = (ULONGLONG)index * RAW_DIRENTRY_SIZE; hr = BlockChainStream_ReadAt( This->rootBlockChain, @@ -3829,8 +4161,7 @@ ULARGE_INTEGER offset; ULONG bytesRead; - offset.u.HighPart = 0; - offset.u.LowPart = index * RAW_DIRENTRY_SIZE; + offset.QuadPart = (ULONGLONG)index * RAW_DIRENTRY_SIZE; return BlockChainStream_WriteAt( This->rootBlockChain, @@ -3912,6 +4243,11 @@ buffer, OFFSET_PS_SIZE, newData->size.u.LowPart); + + StorageUtl_WriteDWord( + buffer, + OFFSET_PS_SIZE_HIGH, + newData->size.u.HighPart); } /****************************************************************************** @@ -3995,7 +4331,10 @@ OFFSET_PS_SIZE, &buffer->size.u.LowPart); - buffer->size.u.HighPart = 0; + StorageUtl_ReadDWord( + currentEntry, + OFFSET_PS_SIZE_HIGH, + &buffer->size.u.HighPart); } return readRes; @@ -4026,8 +4365,7 @@ DWORD read=0; HRESULT hr; - ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This, blockIndex); + ulOffset.QuadPart = StorageImpl_GetBigBlockOffset(This, blockIndex); hr = StorageImpl_ReadAt(This, ulOffset, buffer, This->bigBlockSize, &read); @@ -4052,9 +4390,8 @@ DWORD read; DWORD tmp; - ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This, blockIndex); - ulOffset.u.LowPart += offset; + ulOffset.QuadPart = StorageImpl_GetBigBlockOffset(This, blockIndex); + ulOffset.QuadPart += offset; StorageImpl_ReadAt(This, ulOffset, &tmp, sizeof(DWORD), &read); *value = lendian32toh(tmp); @@ -4069,8 +4406,7 @@ ULARGE_INTEGER ulOffset; DWORD wrote; - ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This, blockIndex); + ulOffset.QuadPart = StorageImpl_GetBigBlockOffset(This, blockIndex); StorageImpl_WriteAt(This, ulOffset, buffer, This->bigBlockSize, &wrote); return (wrote == This->bigBlockSize); @@ -4085,9 +4421,8 @@ ULARGE_INTEGER ulOffset; DWORD wrote; - ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This, blockIndex); - ulOffset.u.LowPart += offset; + ulOffset.QuadPart = StorageImpl_GetBigBlockOffset(This, blockIndex); + ulOffset.QuadPart += offset; value = htole32(value); StorageImpl_WriteAt(This, ulOffset, &value, sizeof(DWORD), &wrote); @@ -4342,6 +4677,106 @@ return hr; } +static HRESULT StorageBaseImpl_DupStorageTree( + StorageBaseImpl *dst, DirRef *dst_entry, + StorageBaseImpl *src, DirRef src_entry) +{ + HRESULT hr; + DirEntry data; + BOOL has_stream=FALSE; + + if (src_entry == DIRENTRY_NULL) + { + *dst_entry = DIRENTRY_NULL; + return S_OK; + } + + hr = StorageBaseImpl_ReadDirEntry(src, src_entry, &data); + if (SUCCEEDED(hr)) + { + has_stream = (data.stgType == STGTY_STREAM && data.size.QuadPart != 0); + data.startingBlock = BLOCK_END_OF_CHAIN; + data.size.QuadPart = 0; + + hr = StorageBaseImpl_DupStorageTree(dst, &data.leftChild, src, data.leftChild); + } + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_DupStorageTree(dst, &data.rightChild, src, data.rightChild); + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_DupStorageTree(dst, &data.dirRootEntry, src, data.dirRootEntry); + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_CreateDirEntry(dst, &data, dst_entry); + + if (SUCCEEDED(hr) && has_stream) + hr = StorageBaseImpl_CopyStream(dst, *dst_entry, src, src_entry); + + return hr; +} + +static HRESULT StorageBaseImpl_CopyStorageTree( + StorageBaseImpl *dst, DirRef dst_entry, + StorageBaseImpl *src, DirRef src_entry) +{ + HRESULT hr; + DirEntry src_data, dst_data; + DirRef new_root_entry; + + hr = StorageBaseImpl_ReadDirEntry(src, src_entry, &src_data); + + if (SUCCEEDED(hr)) + { + hr = StorageBaseImpl_DupStorageTree(dst, &new_root_entry, src, src_data.dirRootEntry); + } + + if (SUCCEEDED(hr)) + { + hr = StorageBaseImpl_ReadDirEntry(dst, dst_entry, &dst_data); + dst_data.clsid = src_data.clsid; + dst_data.ctime = src_data.ctime; + dst_data.mtime = src_data.mtime; + dst_data.dirRootEntry = new_root_entry; + } + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_WriteDirEntry(dst, dst_entry, &dst_data); + + return hr; +} + +static HRESULT StorageBaseImpl_DeleteStorageTree(StorageBaseImpl *This, DirRef entry, BOOL include_siblings) +{ + HRESULT hr; + DirEntry data; + ULARGE_INTEGER zero; + + if (entry == DIRENTRY_NULL) + return S_OK; + + zero.QuadPart = 0; + + hr = StorageBaseImpl_ReadDirEntry(This, entry, &data); + + if (SUCCEEDED(hr) && include_siblings) + hr = StorageBaseImpl_DeleteStorageTree(This, data.leftChild, TRUE); + + if (SUCCEEDED(hr) && include_siblings) + hr = StorageBaseImpl_DeleteStorageTree(This, data.rightChild, TRUE); + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_DeleteStorageTree(This, data.dirRootEntry, TRUE); + + if (SUCCEEDED(hr) && data.stgType == STGTY_STREAM) + hr = StorageBaseImpl_StreamSetSize(This, entry, zero); + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_DestroyDirEntry(This, entry); + + return hr; +} + static DirRef TransactedSnapshotImpl_FindFreeEntry(TransactedSnapshotImpl *This) { DirRef result=This->firstFreeEntry; @@ -4696,6 +5131,7 @@ DirEntry data; ULARGE_INTEGER zero; HRESULT hr; + ULONG transactionSig; zero.QuadPart = 0; @@ -4705,89 +5141,116 @@ if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ ) return STG_E_ACCESSDENIED; - /* To prevent data loss, we create the new structure in the file before we - * delete the old one, so that in case of errors the old data is intact. We - * shouldn't do this if STGC_OVERWRITE is set, but that flag should only be - * needed in the rare situation where we have just enough free disk space to - * overwrite the existing data. */ - - root_entry = &This->entries[This->base.storageDirEntry]; - - if (!root_entry->read) - return S_OK; - - hr = TransactedSnapshotImpl_CopyTree(This); - if (FAILED(hr)) return hr; - - if (root_entry->data.dirRootEntry == DIRENTRY_NULL) - dir_root_ref = DIRENTRY_NULL; - else - dir_root_ref = This->entries[root_entry->data.dirRootEntry].newTransactedParentEntry; - - hr = StorageBaseImpl_Flush(This->transactedParent); - - /* Update the storage to use the new data in one step. */ + hr = StorageBaseImpl_LockTransaction(This->transactedParent, TRUE); + if (hr == E_NOTIMPL) hr = S_OK; if (SUCCEEDED(hr)) - hr = StorageBaseImpl_ReadDirEntry(This->transactedParent, - root_entry->transactedParentEntry, &data); - - if (SUCCEEDED(hr)) - { - data.dirRootEntry = dir_root_ref; - data.clsid = root_entry->data.clsid; - data.ctime = root_entry->data.ctime; - data.mtime = root_entry->data.mtime; - - hr = StorageBaseImpl_WriteDirEntry(This->transactedParent, - root_entry->transactedParentEntry, &data); - } - - /* Try to flush after updating the root storage, but if the flush fails, keep - * going, on the theory that it'll either succeed later or the subsequent - * writes will fail. */ - StorageBaseImpl_Flush(This->transactedParent); - - if (SUCCEEDED(hr)) - { - /* Destroy the old now-orphaned data. */ - for (i=0; i<This->entries_size; i++) - { - TransactedDirEntry *entry = &This->entries[i]; - if (entry->inuse) + { + hr = StorageBaseImpl_GetTransactionSig(This->transactedParent, &transactionSig, TRUE); + if (SUCCEEDED(hr)) + { + if (transactionSig != This->lastTransactionSig) { - if (entry->deleted) + ERR("file was externally modified\n"); + hr = STG_E_NOTCURRENT; + } + + if (SUCCEEDED(hr)) + { + This->lastTransactionSig = transactionSig+1; + hr = StorageBaseImpl_SetTransactionSig(This->transactedParent, This->lastTransactionSig); + } + } + else if (hr == E_NOTIMPL) + hr = S_OK; + + if (FAILED(hr)) goto end; + + /* To prevent data loss, we create the new structure in the file before we + * delete the old one, so that in case of errors the old data is intact. We + * shouldn't do this if STGC_OVERWRITE is set, but that flag should only be + * needed in the rare situation where we have just enough free disk space to + * overwrite the existing data. */ + + root_entry = &This->entries[This->base.storageDirEntry]; + + if (!root_entry->read) + goto end; + + hr = TransactedSnapshotImpl_CopyTree(This); + if (FAILED(hr)) goto end; + + if (root_entry->data.dirRootEntry == DIRENTRY_NULL) + dir_root_ref = DIRENTRY_NULL; + else + dir_root_ref = This->entries[root_entry->data.dirRootEntry].newTransactedParentEntry; + + hr = StorageBaseImpl_Flush(This->transactedParent); + + /* Update the storage to use the new data in one step. */ + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_ReadDirEntry(This->transactedParent, + root_entry->transactedParentEntry, &data); + + if (SUCCEEDED(hr)) + { + data.dirRootEntry = dir_root_ref; + data.clsid = root_entry->data.clsid; + data.ctime = root_entry->data.ctime; + data.mtime = root_entry->data.mtime; + + hr = StorageBaseImpl_WriteDirEntry(This->transactedParent, + root_entry->transactedParentEntry, &data); + } + + /* Try to flush after updating the root storage, but if the flush fails, keep + * going, on the theory that it'll either succeed later or the subsequent + * writes will fail. */ + StorageBaseImpl_Flush(This->transactedParent); + + if (SUCCEEDED(hr)) + { + /* Destroy the old now-orphaned data. */ + for (i=0; i<This->entries_size; i++) + { + TransactedDirEntry *entry = &This->entries[i]; + if (entry->inuse) { - StorageBaseImpl_StreamSetSize(This->transactedParent, - entry->transactedParentEntry, zero); - StorageBaseImpl_DestroyDirEntry(This->transactedParent, - entry->transactedParentEntry); - memset(entry, 0, sizeof(TransactedDirEntry)); - This->firstFreeEntry = min(i, This->firstFreeEntry); - } - else if (entry->read && entry->transactedParentEntry != entry->newTransactedParentEntry) - { - if (entry->transactedParentEntry != DIRENTRY_NULL) + if (entry->deleted) + { + StorageBaseImpl_StreamSetSize(This->transactedParent, + entry->transactedParentEntry, zero); StorageBaseImpl_DestroyDirEntry(This->transactedParent, entry->transactedParentEntry); - if (entry->stream_dirty) + memset(entry, 0, sizeof(TransactedDirEntry)); + This->firstFreeEntry = min(i, This->firstFreeEntry); + } + else if (entry->read && entry->transactedParentEntry != entry->newTransactedParentEntry) { - StorageBaseImpl_StreamSetSize(This->scratch, entry->stream_entry, zero); - StorageBaseImpl_DestroyDirEntry(This->scratch, entry->stream_entry); - entry->stream_dirty = FALSE; + if (entry->transactedParentEntry != DIRENTRY_NULL) + StorageBaseImpl_DestroyDirEntry(This->transactedParent, + entry->transactedParentEntry); + if (entry->stream_dirty) + { + StorageBaseImpl_StreamSetSize(This->scratch, entry->stream_entry, zero); + StorageBaseImpl_DestroyDirEntry(This->scratch, entry->stream_entry); + entry->stream_dirty = FALSE; + } + entry->dirty = FALSE; + entry->transactedParentEntry = entry->newTransactedParentEntry; } - entry->dirty = FALSE; - entry->transactedParentEntry = entry->newTransactedParentEntry; } } } - } - else - { - TransactedSnapshotImpl_DestroyTemporaryCopy(This, DIRENTRY_NULL); - } - - if (SUCCEEDED(hr)) - hr = StorageBaseImpl_Flush(This->transactedParent); + else + { + TransactedSnapshotImpl_DestroyTemporaryCopy(This, DIRENTRY_NULL); + } + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_Flush(This->transactedParent); +end: + StorageBaseImpl_UnlockTransaction(This->transactedParent, TRUE); + } return hr; } @@ -5080,6 +5543,28 @@ dst_entry->data.size = src_entry->data.size; return S_OK; +} + +static HRESULT TransactedSnapshotImpl_GetTransactionSig(StorageBaseImpl *base, + ULONG* result, BOOL refresh) +{ + return E_NOTIMPL; +} + +static HRESULT TransactedSnapshotImpl_SetTransactionSig(StorageBaseImpl *base, + ULONG value) +{ + return E_NOTIMPL; +} + +static HRESULT TransactedSnapshotImpl_LockTransaction(StorageBaseImpl *base, BOOL write) +{ + return E_NOTIMPL; +} + +static HRESULT TransactedSnapshotImpl_UnlockTransaction(StorageBaseImpl *base, BOOL write) +{ + return E_NOTIMPL; } static const IStorageVtbl TransactedSnapshotImpl_Vtbl = @@ -5117,7 +5602,11 @@ TransactedSnapshotImpl_StreamReadAt, TransactedSnapshotImpl_StreamWriteAt, TransactedSnapshotImpl_StreamSetSize, - TransactedSnapshotImpl_StreamLink + TransactedSnapshotImpl_StreamLink, + TransactedSnapshotImpl_GetTransactionSig, + TransactedSnapshotImpl_SetTransactionSig, + TransactedSnapshotImpl_LockTransaction, + TransactedSnapshotImpl_UnlockTransaction }; static HRESULT TransactedSnapshotImpl_Construct(StorageBaseImpl *parentStorage, @@ -5143,6 +5632,9 @@ (*result)->base.ref = 1; (*result)->base.openFlags = parentStorage->openFlags; + + /* This cannot fail, except with E_NOTIMPL in which case we don't care */ + StorageBaseImpl_GetTransactionSig(parentStorage, &(*result)->lastTransactionSig, FALSE); /* Create a new temporary storage to act as the scratch file. */ hr = StgCreateDocfile(NULL, STGM_READWRITE|STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_DELETEONRELEASE, @@ -5182,14 +5674,360 @@ return E_OUTOFMEMORY; } +static void TransactedSharedImpl_Invalidate(StorageBaseImpl* This) +{ + if (!This->reverted) + { + TRACE("Storage invalidated (stg=%p)\n", This); + + This->reverted = TRUE; + + StorageBaseImpl_DeleteAll(This); + } +} + +static void TransactedSharedImpl_Destroy( StorageBaseImpl *iface) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*) iface; + + TransactedSharedImpl_Invalidate(&This->base); + IStorage_Release(&This->transactedParent->IStorage_iface); + IStorage_Release(&This->scratch->base.IStorage_iface); + HeapFree(GetProcessHeap(), 0, This); +} + +static HRESULT TransactedSharedImpl_Flush(StorageBaseImpl* iface) +{ + /* We only need to flush when committing. */ + return S_OK; +} + +static HRESULT TransactedSharedImpl_GetFilename(StorageBaseImpl* iface, LPWSTR *result) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*) iface; + + return StorageBaseImpl_GetFilename(This->transactedParent, result); +} + +static HRESULT TransactedSharedImpl_CreateDirEntry(StorageBaseImpl *base, + const DirEntry *newData, DirRef *index) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*) base; + + return StorageBaseImpl_CreateDirEntry(&This->scratch->base, + newData, index); +} + +static HRESULT TransactedSharedImpl_WriteDirEntry(StorageBaseImpl *base, + DirRef index, const DirEntry *data) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*) base; + + return StorageBaseImpl_WriteDirEntry(&This->scratch->base, + index, data); +} + +static HRESULT TransactedSharedImpl_ReadDirEntry(StorageBaseImpl *base, + DirRef index, DirEntry *data) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*) base; + + return StorageBaseImpl_ReadDirEntry(&This->scratch->base, + index, data); +} + +static HRESULT TransactedSharedImpl_DestroyDirEntry(StorageBaseImpl *base, + DirRef index) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*) base; + + return StorageBaseImpl_DestroyDirEntry(&This->scratch->base, + index); +} + +static HRESULT TransactedSharedImpl_StreamReadAt(StorageBaseImpl *base, + DirRef index, ULARGE_INTEGER offset, ULONG size, void *buffer, ULONG *bytesRead) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*) base; + + return StorageBaseImpl_StreamReadAt(&This->scratch->base, + index, offset, size, buffer, bytesRead); +} + +static HRESULT TransactedSharedImpl_StreamWriteAt(StorageBaseImpl *base, + DirRef index, ULARGE_INTEGER offset, ULONG size, const void *buffer, ULONG *bytesWritten) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*) base; + + return StorageBaseImpl_StreamWriteAt(&This->scratch->base, + index, offset, size, buffer, bytesWritten); +} + +static HRESULT TransactedSharedImpl_StreamSetSize(StorageBaseImpl *base, + DirRef index, ULARGE_INTEGER newsize) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*) base; + + return StorageBaseImpl_StreamSetSize(&This->scratch->base, + index, newsize); +} + +static HRESULT TransactedSharedImpl_StreamLink(StorageBaseImpl *base, + DirRef dst, DirRef src) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*) base; + + return StorageBaseImpl_StreamLink(&This->scratch->base, + dst, src); +} + +static HRESULT TransactedSharedImpl_GetTransactionSig(StorageBaseImpl *base, + ULONG* result, BOOL refresh) +{ + return E_NOTIMPL; +} + +static HRESULT TransactedSharedImpl_SetTransactionSig(StorageBaseImpl *base, + ULONG value) +{ + return E_NOTIMPL; +} + +static HRESULT TransactedSharedImpl_LockTransaction(StorageBaseImpl *base, BOOL write) +{ + return E_NOTIMPL; +} + +static HRESULT TransactedSharedImpl_UnlockTransaction(StorageBaseImpl *base, BOOL write) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI TransactedSharedImpl_Commit( + IStorage* iface, + DWORD grfCommitFlags) /* [in] */ +{ + TransactedSharedImpl* This = (TransactedSharedImpl*)impl_from_IStorage(iface); + DirRef new_storage_ref, prev_storage_ref; + DirEntry src_data, dst_data; + HRESULT hr; + ULONG transactionSig; + + TRACE("(%p,%x)\n", iface, grfCommitFlags); + + /* Cannot commit a read-only transacted storage */ + if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ ) + return STG_E_ACCESSDENIED; + + hr = StorageBaseImpl_LockTransaction(This->transactedParent, TRUE); + if (hr == E_NOTIMPL) hr = S_OK; + if (SUCCEEDED(hr)) + { + hr = StorageBaseImpl_GetTransactionSig(This->transactedParent, &transactionSig, TRUE); + if (SUCCEEDED(hr)) + { + if ((grfCommitFlags & STGC_ONLYIFCURRENT) && transactionSig != This->lastTransactionSig) + hr = STG_E_NOTCURRENT; + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_SetTransactionSig(This->transactedParent, transactionSig+1); + } + else if (hr == E_NOTIMPL) + hr = S_OK; + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_ReadDirEntry(&This->scratch->base, This->scratch->base.storageDirEntry, &src_data); + + /* FIXME: If we're current, we should be able to copy only the changes in scratch. */ + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_DupStorageTree(This->transactedParent, &new_storage_ref, &This->scratch->base, src_data.dirRootEntry); + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_Flush(This->transactedParent); + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_ReadDirEntry(This->transactedParent, This->transactedParent->storageDirEntry, &dst_data); + + if (SUCCEEDED(hr)) + { + prev_storage_ref = dst_data.dirRootEntry; + dst_data.dirRootEntry = new_storage_ref; + dst_data.clsid = src_data.clsid; + dst_data.ctime = src_data.ctime; + dst_data.mtime = src_data.mtime; + hr = StorageBaseImpl_WriteDirEntry(This->transactedParent, This->transactedParent->storageDirEntry, &dst_data); + } + + if (SUCCEEDED(hr)) + { + /* Try to flush after updating the root storage, but if the flush fails, keep + * going, on the theory that it'll either succeed later or the subsequent + * writes will fail. */ + StorageBaseImpl_Flush(This->transactedParent); + + hr = StorageBaseImpl_DeleteStorageTree(This->transactedParent, prev_storage_ref, TRUE); + } + + if (SUCCEEDED(hr)) + hr = StorageBaseImpl_Flush(This->transactedParent); + + StorageBaseImpl_UnlockTransaction(This->transactedParent, TRUE); + + if (SUCCEEDED(hr)) + hr = IStorage_Commit(&This->scratch->base.IStorage_iface, STGC_DEFAULT); + + if (SUCCEEDED(hr)) + { + This->lastTransactionSig = transactionSig+1; + } + } + + return hr; +} + +static HRESULT WINAPI TransactedSharedImpl_Revert( + IStorage* iface) +{ + TransactedSharedImpl* This = (TransactedSharedImpl*)impl_from_IStorage(iface); + + TRACE("(%p)\n", iface); + + /* Destroy the open objects. */ + StorageBaseImpl_DeleteAll(&This->base); + + return IStorage_Revert(&This->scratch->base.IStorage_iface); +} + +static const IStorageVtbl TransactedSharedImpl_Vtbl = +{ + StorageBaseImpl_QueryInterface, + StorageBaseImpl_AddRef, + StorageBaseImpl_Release, + StorageBaseImpl_CreateStream, + StorageBaseImpl_OpenStream, + StorageBaseImpl_CreateStorage, + StorageBaseImpl_OpenStorage, + StorageBaseImpl_CopyTo, + StorageBaseImpl_MoveElementTo, + TransactedSharedImpl_Commit, + TransactedSharedImpl_Revert, + StorageBaseImpl_EnumElements, + StorageBaseImpl_DestroyElement, + StorageBaseImpl_RenameElement, + StorageBaseImpl_SetElementTimes, + StorageBaseImpl_SetClass, + StorageBaseImpl_SetStateBits, + StorageBaseImpl_Stat +}; + +static const StorageBaseImplVtbl TransactedSharedImpl_BaseVtbl = +{ + TransactedSharedImpl_Destroy, + TransactedSharedImpl_Invalidate, + TransactedSharedImpl_Flush, + TransactedSharedImpl_GetFilename, + TransactedSharedImpl_CreateDirEntry, + TransactedSharedImpl_WriteDirEntry, + TransactedSharedImpl_ReadDirEntry, + TransactedSharedImpl_DestroyDirEntry, + TransactedSharedImpl_StreamReadAt, + TransactedSharedImpl_StreamWriteAt, + TransactedSharedImpl_StreamSetSize, + TransactedSharedImpl_StreamLink, + TransactedSharedImpl_GetTransactionSig, + TransactedSharedImpl_SetTransactionSig, + TransactedSharedImpl_LockTransaction, + TransactedSharedImpl_UnlockTransaction +}; + +static HRESULT TransactedSharedImpl_Construct(StorageBaseImpl *parentStorage, + TransactedSharedImpl** result) +{ + HRESULT hr; + + *result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(TransactedSharedImpl)); + if (*result) + { + IStorage *scratch; + + (*result)->base.IStorage_iface.lpVtbl = &TransactedSharedImpl_Vtbl; + + /* This is OK because the property set storage functions use the IStorage functions. */ + (*result)->base.IPropertySetStorage_iface.lpVtbl = parentStorage->IPropertySetStorage_iface.lpVtbl; + (*result)->base.baseVtbl = &TransactedSharedImpl_BaseVtbl; + + list_init(&(*result)->base.strmHead); + + list_init(&(*result)->base.storageHead); + + (*result)->base.ref = 1; + + (*result)->base.openFlags = parentStorage->openFlags; + + hr = StorageBaseImpl_LockTransaction(parentStorage, FALSE); + + if (SUCCEEDED(hr)) + { + STGOPTIONS stgo; + + /* This cannot fail, except with E_NOTIMPL in which case we don't care */ + StorageBaseImpl_GetTransactionSig(parentStorage, &(*result)->lastTransactionSig, FALSE); + + stgo.usVersion = 1; + stgo.reserved = 0; + stgo.ulSectorSize = 4096; + stgo.pwcsTemplateFile = NULL; + + /* Create a new temporary storage to act as the scratch file. */ + hr = StgCreateStorageEx(NULL, STGM_READWRITE|STGM_SHARE_EXCLUSIVE|STGM_CREATE|STGM_DELETEONRELEASE|STGM_TRANSACTED, + STGFMT_DOCFILE, 0, &stgo, NULL, &IID_IStorage, (void**)&scratch); + (*result)->scratch = (TransactedSnapshotImpl*)impl_from_IStorage(scratch); + + if (SUCCEEDED(hr)) + { + hr = StorageBaseImpl_CopyStorageTree(&(*result)->scratch->base, (*result)->scratch->base.storageDirEntry, + parentStorage, parentStorage->storageDirEntry); + + if (SUCCEEDED(hr)) + { + hr = IStorage_Commit(scratch, STGC_DEFAULT); + + (*result)->base.storageDirEntry = (*result)->scratch->base.storageDirEntry; + (*result)->transactedParent = parentStorage; + } + + if (FAILED(hr)) + IStorage_Release(scratch); + } + + StorageBaseImpl_UnlockTransaction(parentStorage, FALSE); + } + + if (FAILED(hr)) HeapFree(GetProcessHeap(), 0, *result); + + return hr; + } + else + return E_OUTOFMEMORY; +} + static HRESULT Storage_ConstructTransacted(StorageBaseImpl *parentStorage, - StorageBaseImpl** result) -{ - static int fixme=0; - - if (parentStorage->openFlags & (STGM_NOSCRATCH|STGM_NOSNAPSHOT) && !fixme++) - { + BOOL toplevel, StorageBaseImpl** result) +{ + static int fixme_flags=STGM_NOSCRATCH|STGM_NOSNAPSHOT; + + if (parentStorage->openFlags & fixme_flags) + { + fixme_flags &= ~parentStorage->openFlags; FIXME("Unimplemented flags %x\n", parentStorage->openFlags); + } + + if (toplevel && !(parentStorage->openFlags & STGM_NOSNAPSHOT) && + STGM_SHARE_MODE(parentStorage->openFlags) != STGM_SHARE_DENY_WRITE && + STGM_SHARE_MODE(parentStorage->openFlags) != STGM_SHARE_EXCLUSIVE) + { + /* Need to create a temp file for the snapshot */ + return TransactedSharedImpl_Construct(parentStorage, (TransactedSharedImpl**)result); } return TransactedSnapshotImpl_Construct(parentStorage, @@ -5215,7 +6053,7 @@ if (openFlags & STGM_TRANSACTED) { - hr = Storage_ConstructTransacted(&newStorage->base, &newTransactedStorage); + hr = Storage_ConstructTransacted(&newStorage->base, TRUE, &newTransactedStorage); if (FAILED(hr)) IStorage_Release(&newStorage->base.IStorage_iface); else @@ -5339,6 +6177,28 @@ return StorageBaseImpl_StreamLink(This->parentStorage, dst, src); +} + +static HRESULT StorageInternalImpl_GetTransactionSig(StorageBaseImpl *base, + ULONG* result, BOOL refresh) +{ + return E_NOTIMPL; +} + +static HRESULT StorageInternalImpl_SetTransactionSig(StorageBaseImpl *base, + ULONG value) +{ + return E_NOTIMPL; +} + +static HRESULT StorageInternalImpl_LockTransaction(StorageBaseImpl *base, BOOL write) +{ + return E_NOTIMPL; +} + +static HRESULT StorageInternalImpl_UnlockTransaction(StorageBaseImpl *base, BOOL write) +{ + return E_NOTIMPL; } /****************************************************************************** @@ -5691,7 +6551,11 @@ StorageInternalImpl_StreamReadAt, StorageInternalImpl_StreamWriteAt, StorageInternalImpl_StreamSetSize, - StorageInternalImpl_StreamLink + StorageInternalImpl_StreamLink, + StorageInternalImpl_GetTransactionSig, + StorageInternalImpl_SetTransactionSig, + StorageInternalImpl_LockTransaction, + StorageInternalImpl_UnlockTransaction }; /****************************************************************************** @@ -6145,8 +7009,8 @@ void* buffer, ULONG* bytesRead) { - ULONG blockNoInSequence = offset.u.LowPart / This->parentStorage->bigBlockSize; - ULONG offsetInBlock = offset.u.LowPart % This->parentStorage->bigBlockSize; + ULONG blockNoInSequence = offset.QuadPart / This->parentStorage->bigBlockSize; + ULONG offsetInBlock = offset.QuadPart % This->parentStorage->bigBlockSize; ULONG bytesToReadInBuffer; ULONG blockIndex; BYTE* bufferWalker; @@ -6193,8 +7057,7 @@ if (!cachedBlock) { /* Not in cache, and we're going to read past the end of the block. */ - ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This->parentStorage, blockIndex) + + ulOffset.QuadPart = StorageImpl_GetBigBlockOffset(This->parentStorage, blockIndex) + offsetInBlock; StorageImpl_ReadAt(This->parentStorage, @@ -6243,8 +7106,8 @@ const void* buffer, ULONG* bytesWritten) { - ULONG blockNoInSequence = offset.u.LowPart / This->parentStorage->bigBlockSize; - ULONG offsetInBlock = offset.u.LowPart % This->parentStorage->bigBlockSize; + ULONG blockNoInSequence = offset.QuadPart / This->parentStorage->bigBlockSize; + ULONG offsetInBlock = offset.QuadPart % This->parentStorage->bigBlockSize; ULONG bytesToWrite; ULONG blockIndex; const BYTE* bufferWalker; @@ -6278,8 +7141,7 @@ if (!cachedBlock) { /* Not in cache, and we're going to write past the end of the block. */ - ulOffset.u.HighPart = 0; - ulOffset.u.LowPart = StorageImpl_GetBigBlockOffset(This->parentStorage, blockIndex) + + ulOffset.QuadPart = StorageImpl_GetBigBlockOffset(This->parentStorage, blockIndex) + offsetInBlock; StorageImpl_WriteAt(This->parentStorage, @@ -6331,9 +7193,9 @@ /* * Figure out how many blocks are needed to contain the new size */ - numBlocks = newSize.u.LowPart / This->parentStorage->bigBlockSize; - - if ((newSize.u.LowPart % This->parentStorage->bigBlockSize) != 0) + numBlocks = newSize.QuadPart / This->parentStorage->bigBlockSize; + + if ((newSize.QuadPart % This->parentStorage->bigBlockSize) != 0) numBlocks++; if (numBlocks) @@ -6462,9 +7324,9 @@ /* * Figure out how many blocks are needed to contain this stream */ - newNumBlocks = newSize.u.LowPart / This->parentStorage->bigBlockSize; - - if ((newSize.u.LowPart % This->parentStorage->bigBlockSize) != 0) + newNumBlocks = newSize.QuadPart / This->parentStorage->bigBlockSize; + + if ((newSize.QuadPart % This->parentStorage->bigBlockSize) != 0) newNumBlocks++; /* @@ -6539,10 +7401,10 @@ { ULARGE_INTEGER size = BlockChainStream_GetSize(This); - if (newSize.u.LowPart == size.u.LowPart) + if (newSize.QuadPart == size.QuadPart) return TRUE; - if (newSize.u.LowPart < size.u.LowPart) + if (newSize.QuadPart < size.QuadPart) { BlockChainStream_Shrink(This, newSize); } @@ -6584,10 +7446,8 @@ * size of them */ ULARGE_INTEGER result; - result.u.HighPart = 0; - - result.u.LowPart = - BlockChainStream_GetCount(This) * + result.QuadPart = + (ULONGLONG)BlockChainStream_GetCount(This) * This->parentStorage->bigBlockSize; return result; @@ -6672,8 +7532,7 @@ *nextBlockInChain = BLOCK_END_OF_CHAIN; - offsetOfBlockInDepot.u.HighPart = 0; - offsetOfBlockInDepot.u.LowPart = blockIndex * sizeof(ULONG); + offsetOfBlockInDepot.QuadPart = (ULONGLONG)blockIndex * sizeof(ULONG); /* * Read those bytes in the buffer from the small block file. @@ -6714,8 +7573,7 @@ DWORD buffer; ULONG bytesWritten; - offsetOfBlockInDepot.u.HighPart = 0; - offsetOfBlockInDepot.u.LowPart = blockIndex * sizeof(ULONG); + offsetOfBlockInDepot.QuadPart = (ULONGLONG)blockIndex * sizeof(ULONG); StorageUtl_WriteDWord((BYTE *)&buffer, 0, nextBlock); @@ -6770,7 +7628,7 @@ */ while (nextBlockIndex != BLOCK_UNUSED) { - offsetOfBlockInDepot.u.LowPart = blockIndex * sizeof(ULONG); + offsetOfBlockInDepot.QuadPart = (ULONGLONG)blockIndex * sizeof(ULONG); res = BlockChainStream_ReadAt( This->parentStorage->smallBlockDepotChain, @@ -6798,14 +7656,14 @@ ULARGE_INTEGER newSize, offset; ULONG bytesWritten; - newSize.QuadPart = (count + 1) * This->parentStorage->bigBlockSize; + newSize.QuadPart = (ULONGLONG)(count + 1) * This->parentStorage->bigBlockSize; BlockChainStream_Enlarge(This->parentStorage->smallBlockDepotChain, newSize); /* * Initialize all the small blocks to free */ memset(smallBlockDepot, BLOCK_UNUSED, This->parentStorage->bigBlockSize); - offset.QuadPart = count * This->parentStorage->bigBlockSize; + offset.QuadPart = (ULONGLONG)count * This->parentStorage->bigBlockSize; BlockChainStream_WriteAt(This->parentStorage->smallBlockDepotChain, offset, This->parentStorage->bigBlockSize, smallBlockDepot, &bytesWritten); @@ -6823,7 +7681,7 @@ */ blocksRequired = (blockIndex / smallBlocksPerBigBlock) + 1; - size_required.QuadPart = blocksRequired * This->parentStorage->bigBlockSize; + size_required.QuadPart = (ULONGLONG)blocksRequired * This->parentStorage->bigBlockSize; old_size = BlockChainStream_GetSize(This->parentStorage->smallBlockRootChain); @@ -6917,11 +7775,10 @@ /* * Calculate the offset of the small block in the small block file. */ - offsetInBigBlockFile.u.HighPart = 0; - offsetInBigBlockFile.u.LowPart = - blockIndex * This->parentStorage->smallBlockSize; - - offsetInBigBlockFile.u.LowPart += offsetInBlock; + offsetInBigBlockFile.QuadPart = + (ULONGLONG)blockIndex * This->parentStorage->smallBlockSize; + + offsetInBigBlockFile.QuadPart += offsetInBlock; /* * Read those bytes in the buffer from the small block file. @@ -7013,11 +7870,10 @@ /* * Calculate the offset of the small block in the small block file. */ - offsetInBigBlockFile.u.HighPart = 0; - offsetInBigBlockFile.u.LowPart = - blockIndex * This->parentStorage->smallBlockSize; - - offsetInBigBlockFile.u.LowPart += offsetInBlock; + offsetInBigBlockFile.QuadPart = + (ULONGLONG)blockIndex * This->parentStorage->smallBlockSize; + + offsetInBigBlockFile.QuadPart += offsetInBlock; /* * Write those bytes in the buffer to the small block file. @@ -7034,9 +7890,9 @@ /* * Step to the next big block. */ - if(FAILED(SmallBlockChainStream_GetNextBlockInChain(This, blockIndex, - &blockIndex))) - return FALSE; + res = SmallBlockChainStream_GetNextBlockInChain(This, blockIndex, &blockIndex); + if (FAILED(res)) + return res; bufferWalker += bytesWrittenToBigBlockFile; size -= bytesWrittenToBigBlockFile; *bytesWritten += bytesWrittenToBigBlockFile; @@ -7378,20 +8234,13 @@ /* * Interpret the STGM value grfMode */ - shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; + shareMode = GetShareModeFromSTGM(grfMode); accessMode = GetAccessModeFromSTGM(grfMode); if (grfMode & STGM_DELETEONRELEASE) fileAttributes = FILE_FLAG_RANDOM_ACCESS | FILE_FLAG_DELETE_ON_CLOSE; else fileAttributes = FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS; - - if (STGM_SHARE_MODE(grfMode) && !(grfMode & STGM_SHARE_DENY_NONE)) - { - static int fixme; - if (!fixme++) - FIXME("Storage share mode not implemented.\n"); - } *ppstgOpen = 0; @@ -7633,13 +8482,6 @@ return STG_E_INVALIDFLAG; grfMode &= ~0xf0; /* remove the existing sharing mode */ grfMode |= STGM_SHARE_DENY_NONE; - - /* STGM_PRIORITY stops other IStorage objects on the same file from - * committing until the STGM_PRIORITY IStorage is closed. it also - * stops non-transacted mode StgOpenStorage calls with write access from - * succeeding. obviously, both of these cannot be achieved through just - * file share flags */ - FIXME("STGM_PRIORITY mode not implemented correctly\n"); } /* @@ -8074,6 +8916,10 @@ case STGM_SHARE_DENY_WRITE: case STGM_SHARE_EXCLUSIVE: break; + case 0: + if (!(stgm & STGM_TRANSACTED)) + return E_FAIL; + break; default: return E_FAIL; } @@ -8129,14 +8975,16 @@ { switch (STGM_SHARE_MODE(stgm)) { + case 0: + assert(stgm & STGM_TRANSACTED); + /* fall-through */ case STGM_SHARE_DENY_NONE: return FILE_SHARE_READ | FILE_SHARE_WRITE; case STGM_SHARE_DENY_READ: return FILE_SHARE_WRITE; case STGM_SHARE_DENY_WRITE: + case STGM_SHARE_EXCLUSIVE: return FILE_SHARE_READ; - case STGM_SHARE_EXCLUSIVE: - return 0; } ERR("Invalid share mode!\n"); assert(0); Modified: trunk/reactos/dll/win32/ole32/storage32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
============================================================================== --- trunk/reactos/dll/win32/ole32/storage32.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ole32/storage32.h [iso-8859-1] Fri Oct 3 11:44:27 2014 @@ -42,6 +42,7 @@ static const ULONG OFFSET_DIRSECTORCOUNT = 0x00000028; static const ULONG OFFSET_BBDEPOTCOUNT = 0x0000002C; static const ULONG OFFSET_ROOTSTARTBLOCK = 0x00000030; +static const ULONG OFFSET_TRANSACTIONSIG = 0x00000034; static const ULONG OFFSET_SMALLBLOCKLIMIT = 0x00000038; static const ULONG OFFSET_SBDEPOTSTART = 0x0000003C; static const ULONG OFFSET_SBDEPOTCOUNT = 0x00000040; @@ -61,6 +62,7 @@ static const ULONG OFFSET_PS_MTIMEHIGH = 0x00000070; static const ULONG OFFSET_PS_STARTBLOCK = 0x00000074; static const ULONG OFFSET_PS_SIZE = 0x00000078; +static const ULONG OFFSET_PS_SIZE_HIGH = 0x0000007C; static const WORD DEF_BIG_BLOCK_SIZE_BITS = 0x0009; static const WORD MIN_BIG_BLOCK_SIZE_BITS = 0x0009; static const WORD MAX_BIG_BLOCK_SIZE_BITS = 0x000c; @@ -146,6 +148,8 @@ }; HRESULT FileLockBytesImpl_Construct(HANDLE hFile, DWORD openFlags, LPCWSTR pwcsName, ILockBytes **pLockBytes) DECLSPEC_HIDDEN; + +HRESULT FileLockBytesImpl_LockRegionSync(ILockBytes* iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb) DECLSPEC_HIDDEN; /************************************************************************* * Ole Convert support @@ -237,6 +241,10 @@ HRESULT (*StreamWriteAt)(StorageBaseImpl*,DirRef,ULARGE_INTEGER,ULONG,const void*,ULONG*); HRESULT (*StreamSetSize)(StorageBaseImpl*,DirRef,ULARGE_INTEGER); HRESULT (*StreamLink)(StorageBaseImpl*,DirRef,DirRef); + HRESULT (*GetTransactionSig)(StorageBaseImpl*,ULONG*,BOOL); + HRESULT (*SetTransactionSig)(StorageBaseImpl*,ULONG); + HRESULT (*LockTransaction)(StorageBaseImpl*,BOOL); + HRESULT (*UnlockTransaction)(StorageBaseImpl*,BOOL); }; static inline void StorageBaseImpl_Destroy(StorageBaseImpl *This) @@ -312,6 +320,28 @@ DirRef dst, DirRef src) { return This->baseVtbl->StreamLink(This, dst, src); +} + +static inline HRESULT StorageBaseImpl_GetTransactionSig(StorageBaseImpl *This, + ULONG* result, BOOL refresh) +{ + return This->baseVtbl->GetTransactionSig(This, result, refresh); +} + +static inline HRESULT StorageBaseImpl_SetTransactionSig(StorageBaseImpl *This, + ULONG value) +{ + return This->baseVtbl->SetTransactionSig(This, value); +} + +static inline HRESULT StorageBaseImpl_LockTransaction(StorageBaseImpl *This, BOOL write) +{ + return This->baseVtbl->LockTransaction(This, write); +} + +static inline HRESULT StorageBaseImpl_UnlockTransaction(StorageBaseImpl *This, BOOL write) +{ + return This->baseVtbl->UnlockTransaction(This, write); } /**************************************************************************** @@ -350,6 +380,7 @@ ULONG extBigBlockDepotLocationsSize; ULONG extBigBlockDepotCount; ULONG bigBlockDepotStart[COUNT_BBDEPOTINHEADER]; + ULONG transactionSig; ULONG extBlockDepotCached[MAX_BIG_BLOCK_SIZE / 4]; ULONG indexExtBlockDepotCached; @@ -373,6 +404,8 @@ UINT blockChainToEvict; ILockBytes* lockBytes; + + ULONG locked_bytes[8]; }; HRESULT StorageImpl_ReadRawDirEntry( @@ -457,6 +490,54 @@ StorageBaseImpl* parentStorage, DWORD grfMode, DirRef dirEntry) DECLSPEC_HIDDEN; + + +/* Range lock constants. + * + * The storage format reserves the region from 0x7fffff00-0x7fffffff for + * locking and synchronization. Unfortunately, the spec doesn't say which bytes + * within that range are used, and for what. These are guesses based on testing. + * In particular, ends of ranges may be wrong. + + 0x0 through 0x57: Unknown. Causes read-only exclusive opens to fail. + 0x58 through 0x6b: Priority mode. + 0x6c through 0x7f: No snapshot mode. + 0x80: Commit lock. + 0x81 through 0x91: Priority mode, again. Not sure why it uses two regions. + 0x92: Lock-checking lock. Held while opening so ranges can be tested without + causing spurious failures if others try to grab or test those ranges at the + same time. + 0x93 through 0xa6: Read mode. + 0xa7 through 0xba: Write mode. + 0xbb through 0xce: Deny read. + 0xcf through 0xe2: Deny write. + 0xe2 through 0xff: Unknown. Causes read-only exclusive opens to fail. +*/ + +#define RANGELOCK_UNK1_FIRST 0x7fffff00 +#define RANGELOCK_UNK1_LAST 0x7fffff57 +#define RANGELOCK_PRIORITY1_FIRST 0x7fffff58 +#define RANGELOCK_PRIORITY1_LAST 0x7fffff6b +#define RANGELOCK_NOSNAPSHOT_FIRST 0x7fffff6c +#define RANGELOCK_NOSNAPSHOT_LAST 0x7fffff7f +#define RANGELOCK_COMMIT 0x7fffff80 +#define RANGELOCK_PRIORITY2_FIRST 0x7fffff81 +#define RANGELOCK_PRIORITY2_LAST 0x7fffff91 +#define RANGELOCK_CHECKLOCKS 0x7fffff92 +#define RANGELOCK_READ_FIRST 0x7fffff93 +#define RANGELOCK_READ_LAST 0x7fffffa6 +#define RANGELOCK_WRITE_FIRST 0x7fffffa7 +#define RANGELOCK_WRITE_LAST 0x7fffffba +#define RANGELOCK_DENY_READ_FIRST 0x7fffffbb +#define RANGELOCK_DENY_READ_LAST 0x7fffffce +#define RANGELOCK_DENY_WRITE_FIRST 0x7fffffcf +#define RANGELOCK_DENY_WRITE_LAST 0x7fffffe2 +#define RANGELOCK_UNK2_FIRST 0x7fffffe3 +#define RANGELOCK_UNK2_LAST 0x7fffffff +#define RANGELOCK_TRANSACTION_FIRST RANGELOCK_COMMIT +#define RANGELOCK_TRANSACTION_LAST RANGELOCK_CHECKLOCKS +#define RANGELOCK_FIRST RANGELOCK_UNK1_FIRST +#define RANGELOCK_LAST RANGELOCK_UNK2_LAST /****************************************************************************** Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Oct 3 11:44:27 2014 @@ -150,7 +150,7 @@ reactos/dll/win32/objsel # Synced to Wine-1.7.17 reactos/dll/win32/odbc32 # Synced to Wine-1.7.17. Depends on port of Linux ODBC. reactos/dll/win32/odbccp32 # Synced to Wine-1.7.17 -reactos/dll/win32/ole32 # Synced to Wine-1.7.17 +reactos/dll/win32/ole32 # Synced to Wine-1.7.27 reactos/dll/win32/oleacc # Synced to Wine-1.7.17 reactos/dll/win32/oleaut32 # Synced to Wine-1.7.17 reactos/dll/win32/olecli32 # Synced to Wine-1.7.17
10 years, 3 months
1
0
0
0
← Newer
1
...
64
65
66
67
68
69
70
...
73
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Results per page:
10
25
50
100
200