ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2016
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
15 participants
317 discussions
Start a n
N
ew thread
[janderwald] 73150: [USBAUDIO] - partly implement GetDataRangeIndexForFormat
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Nov 6 13:59:39 2016 New Revision: 73150 URL:
http://svn.reactos.org/svn/reactos?rev=73150&view=rev
Log: [USBAUDIO] - partly implement GetDataRangeIndexForFormat Modified: trunk/reactos/drivers/usb/usbaudio/pin.c Modified: trunk/reactos/drivers/usb/usbaudio/pin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbaudio/pin.c…
============================================================================== --- trunk/reactos/drivers/usb/usbaudio/pin.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbaudio/pin.c [iso-8859-1] Sun Nov 6 13:59:39 2016 @@ -694,6 +694,71 @@ return STATUS_SUCCESS; } +ULONG +GetDataRangeIndexForFormat( + IN PKSDATARANGE ConnectionFormat, + IN PKSDATARANGE * DataRanges, + IN ULONG DataRangesCount) +{ + ULONG Index; + PKSDATARANGE CurrentDataRange; + PKSDATARANGE_AUDIO CurrentAudioDataRange; + PKSDATAFORMAT_WAVEFORMATEX ConnectionDataFormat; + + if (ConnectionFormat->FormatSize != sizeof(KSDATAFORMAT) + sizeof(WAVEFORMATEX)) + { + /* unsupported connection format */ + DPRINT1("GetDataRangeIndexForFormat expected KSDATARANGE_AUDIO\n"); + return MAXULONG; + } + + /* cast to right type */ + ConnectionDataFormat = (PKSDATAFORMAT_WAVEFORMATEX)ConnectionFormat; + + for (Index = 0; Index < DataRangesCount; Index++) + { + /* get current data range */ + CurrentDataRange = DataRanges[Index]; + + /* compare guids */ + if (!IsEqualGUIDAligned(&CurrentDataRange->MajorFormat, &ConnectionFormat->MajorFormat) || + !IsEqualGUIDAligned(&CurrentDataRange->SubFormat, &ConnectionFormat->SubFormat) || + !IsEqualGUIDAligned(&CurrentDataRange->Specifier, &ConnectionFormat->Specifier)) + { + /* no match */ + continue; + } + + /* all pin data ranges are KSDATARANGE_AUDIO */ + CurrentAudioDataRange = (PKSDATARANGE_AUDIO)CurrentDataRange; + + /* check if number of channel match */ + if (CurrentAudioDataRange->MaximumChannels != ConnectionDataFormat->WaveFormatEx.nChannels) + { + /* number of channels mismatch */ + continue; + } + + if (CurrentAudioDataRange->MinimumSampleFrequency > ConnectionDataFormat->WaveFormatEx.nSamplesPerSec) + { + /* channel frequency too low */ + continue; + } + + if (CurrentAudioDataRange->MaximumSampleFrequency < ConnectionDataFormat->WaveFormatEx.nSamplesPerSec) + { + /* channel frequency too high */ + continue; + } + + /* FIXME add checks for bitrate / sample size etc */ + return Index; + } + + /* no datarange found */ + return MAXULONG; +} + NTSTATUS NTAPI USBAudioPinCreate( @@ -704,6 +769,7 @@ PFILTER_CONTEXT FilterContext; PPIN_CONTEXT PinContext; NTSTATUS Status; + ULONG FormatIndex; Filter = KsPinGetParentFilter(Pin); if (Filter == NULL) @@ -741,9 +807,16 @@ ASSERT(Status == STATUS_SUCCESS); } + /* choose correct dataformat */ + FormatIndex = GetDataRangeIndexForFormat(Pin->ConnectionFormat, Pin->Descriptor->PinDescriptor.DataRanges, Pin->Descriptor->PinDescriptor.DataRangesCount); + if (FormatIndex == MAXULONG) + { + /* no format match */ + return STATUS_NO_MATCH; + } + /* select streaming interface */ - /* FIXME choose correct dataformat */ - Status = USBAudioSelectAudioStreamingInterface(Pin, PinContext, PinContext->DeviceExtension, PinContext->DeviceExtension->ConfigurationDescriptor, 0); + Status = USBAudioSelectAudioStreamingInterface(Pin, PinContext, PinContext->DeviceExtension, PinContext->DeviceExtension->ConfigurationDescriptor, FormatIndex); if (!NT_SUCCESS(Status)) { /* failed */ @@ -980,7 +1053,7 @@ /* calculate offset*/ Offset = TotalPacketSize - PinContext->BufferLength; - if (PinContext->BufferOffset + Offset >= PinContext->BufferSize) + if (PinContext->BufferOffset + TotalPacketSize >= PinContext->BufferSize) { RtlMoveMemory(PinContext->Buffer, &PinContext->Buffer[PinContext->BufferOffset - PinContext->BufferLength], PinContext->BufferLength); PinContext->BufferOffset = PinContext->BufferLength; @@ -1025,7 +1098,7 @@ PinContext->BufferLength = CloneStreamPointer->OffsetIn.Remaining - ((PacketCount * TotalPacketSize) + Offset); /* check for overflow */ - if (PinContext->BufferOffset + Offset >= PinContext->BufferSize) + if (PinContext->BufferOffset + TotalPacketSize >= PinContext->BufferSize) { /* reset buffer offset*/ PinContext->BufferOffset = 0;
8 years, 1 month
1
0
0
0
[tfaber] 73149: [PSEH] - Correctly restore the old frame pointer when unwinding in _except_handler3. CORE-12283 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Nov 6 11:49:19 2016 New Revision: 73149 URL:
http://svn.reactos.org/svn/reactos?rev=73149&view=rev
Log: [PSEH] - Correctly restore the old frame pointer when unwinding in _except_handler3. CORE-12283 #resolve Modified: trunk/reactos/sdk/lib/pseh/i386/seh.s Modified: trunk/reactos/sdk/lib/pseh/i386/seh.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/pseh/i386/seh.s?re…
============================================================================== --- trunk/reactos/sdk/lib/pseh/i386/seh.s [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/pseh/i386/seh.s [iso-8859-1] Sun Nov 6 11:49:19 2016 @@ -426,7 +426,7 @@ /* Do local unwind */ except_unwind3: push ebp - mov ebp, [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_OriginalEbp] + lea ebp, [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_OriginalEbp] push -1 push ebx call __local_unwind2
8 years, 1 month
1
0
0
0
[tfaber] 73148: [KMTESTS:RTL] - Add a test checking stack frame correctness in a nested __finally handler CORE-12283
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Nov 6 09:31:09 2016 New Revision: 73148 URL:
http://svn.reactos.org/svn/reactos?rev=73148&view=rev
Log: [KMTESTS:RTL] - Add a test checking stack frame correctness in a nested __finally handler CORE-12283 Modified: trunk/rostests/kmtests/rtl/RtlException.c Modified: trunk/rostests/kmtests/rtl/RtlException.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/rtl/RtlException.…
============================================================================== --- trunk/rostests/kmtests/rtl/RtlException.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/rtl/RtlException.c [iso-8859-1] Sun Nov 6 09:31:09 2016 @@ -7,6 +7,104 @@ #define KMT_EMULATE_KERNEL #include <kmt_test.h> + +static +VOID +PossiblyRaise( + _In_ BOOLEAN Raise) +{ + if (Raise) + { + ExRaiseStatus(STATUS_ASSERTION_FAILURE); + } +} + +static +VOID +InnerFunction( + _Inout_ PULONG State, + _In_ BOOLEAN Raise) +{ + _SEH2_VOLATILE INT Var = 123; + static _SEH2_VOLATILE INT *AddressOfVar; + + AddressOfVar = &Var; + ok_eq_ulong(*State, 1); + _SEH2_TRY + { + *State = 2; + PossiblyRaise(Raise); + ok_eq_ulong(*State, 2); + *State = 3; + } + _SEH2_FINALLY + { + ok_eq_int(Var, 123); + ok_eq_pointer(&Var, AddressOfVar); + if (Raise) + ok_eq_ulong(*State, 2); + else + ok_eq_ulong(*State, 3); + *State = 4; + } + _SEH2_END; + + ok_eq_int(Var, 123); + ok_eq_pointer(&Var, AddressOfVar); + ok_eq_ulong(*State, 4); + *State = 5; +} + +static +VOID +OuterFunction( + _Inout_ PULONG State, + _In_ BOOLEAN Raise) +{ + _SEH2_VOLATILE INT Var = 456; + static _SEH2_VOLATILE INT *AddressOfVar; + + AddressOfVar = &Var; + ok_eq_ulong(*State, 0); + _SEH2_TRY + { + *State = 1; + InnerFunction(State, Raise); + ok_eq_ulong(*State, 5); + *State = 6; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + ok_eq_int(Var, 456); + ok_eq_pointer(&Var, AddressOfVar); + ok_eq_ulong(*State, 4); + *State = 7; + } + _SEH2_END; + + ok_eq_int(Var, 456); + ok_eq_pointer(&Var, AddressOfVar); + if (Raise) + ok_eq_ulong(*State, 7); + else + ok_eq_ulong(*State, 6); + *State = 8; +} + +static +VOID +TestNestedExceptionHandler(VOID) +{ + ULONG State; + + State = 0; + OuterFunction(&State, FALSE); + ok_eq_ulong(State, 8); + + State = 0; + OuterFunction(&State, TRUE); + ok_eq_ulong(State, 8); +} START_TEST(RtlException) { @@ -56,6 +154,8 @@ ExRaiseStatus(STATUS_GUARD_PAGE_VIOLATION); KmtEndSeh(STATUS_GUARD_PAGE_VIOLATION); + TestNestedExceptionHandler(); + /* We cannot test this in kernel mode easily - the stack is just "somewhere" * in system space, and there's no guard page below it */ #if CORE_6640_IS_FIXED
8 years, 1 month
1
0
0
0
[gadamopoulos] 73147: [SHELL32] - Only specific shell folders are supposed to return their display name. Consequently, only CRegFolder reads the registry now to get the display name of items.
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sat Nov 5 19:55:29 2016 New Revision: 73147 URL:
http://svn.reactos.org/svn/reactos?rev=73147&view=rev
Log: [SHELL32] - Only specific shell folders are supposed to return their display name. Consequently, only CRegFolder reads the registry now to get the display name of items. Modified: trunk/reactos/dll/win32/shell32/folders/CAdminToolsFolder.cpp trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp trunk/reactos/dll/win32/shell32/folders/CFontsFolder.cpp trunk/reactos/dll/win32/shell32/folders/CMyDocsFolder.cpp trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp trunk/reactos/dll/win32/shell32/folders/CPrinterFolder.cpp trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp trunk/reactos/dll/win32/shell32/folders/CRegFolder.cpp Modified: trunk/reactos/dll/win32/shell32/folders/CAdminToolsFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CAdminToolsFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CAdminToolsFolder.cpp [iso-8859-1] Sat Nov 5 19:55:29 2016 @@ -113,8 +113,8 @@ return m_pisfInner->GetDisplayNameOf(pidl, dwFlags, strRet); } - /* Return the display name from the registry */ - return HCR_GetClassName(CLSID_AdminFolderShortcut, strRet); + ERR("Got empty pidl without SHGDN_FORPARSING\n"); + return E_INVALIDARG; } HRESULT WINAPI CAdminToolsFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /* simple pidl */ Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] Sat Nov 5 19:55:29 2016 @@ -683,7 +683,7 @@ if ((GET_SHGDN_RELATION(dwFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING)) return SHSetStrRet(strRet, sPathTarget); else - return HCR_GetClassName(CLSID_ShellDesktop, strRet); + return m_regFolder->GetDisplayNameOf(pidl, dwFlags, strRet); } /* file system folder or file rooted at the desktop */ Modified: trunk/reactos/dll/win32/shell32/folders/CFontsFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CFontsFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CFontsFolder.cpp [iso-8859-1] Sat Nov 5 19:55:29 2016 @@ -114,8 +114,8 @@ return m_pisfInner->GetDisplayNameOf(pidl, dwFlags, strRet); } - /* Return the display name from the registry */ - return HCR_GetClassName(CLSID_FontsFolderShortcut, strRet); + ERR("Got empty pidl without SHGDN_FORPARSING\n"); + return E_INVALIDARG; } HRESULT WINAPI CFontsFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /* simple pidl */ Modified: trunk/reactos/dll/win32/shell32/folders/CMyDocsFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CMyDocsFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CMyDocsFolder.cpp [iso-8859-1] Sat Nov 5 19:55:29 2016 @@ -113,8 +113,8 @@ return m_pisfInner->GetDisplayNameOf(pidl, dwFlags, strRet); } - /* Return the display name from the registry */ - return HCR_GetClassName(CLSID_MyDocuments, strRet); + ERR("Got empty pidl without SHGDN_FORPARSING\n"); + return E_INVALIDARG; } HRESULT WINAPI CMyDocsFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /* simple pidl */ Modified: trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp [iso-8859-1] Sat Nov 5 19:55:29 2016 @@ -457,14 +457,11 @@ */ HRESULT WINAPI CNetFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) { - if (!strRet) + if (!strRet || !pidl || !pidl->mkid.cb) return E_INVALIDARG; - if (!pidl->mkid.cb) - return SHSetStrRet(strRet, IDS_NETWORKPLACE); #ifdef HACKY_UNC_PATHS - else - return SHSetStrRet(strRet, (LPCWSTR)pidl->mkid.abID); + return SHSetStrRet(strRet, (LPCWSTR)pidl->mkid.abID); #endif return E_NOTIMPL; } Modified: trunk/reactos/dll/win32/shell32/folders/CPrinterFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CPrinterFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CPrinterFolder.cpp [iso-8859-1] Sat Nov 5 19:55:29 2016 @@ -367,13 +367,10 @@ return E_INVALIDARG; } - if (!pidl->mkid.cb) - return SHSetStrRet(strRet, IDS_PRINTERS); - p = _ILGetPrinterStruct(pidl); if (!p) { - WARN("no printer struct\n"); + ERR("no printer struct\n"); return E_INVALIDARG; } Modified: trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CRecycleBin.cpp [iso-8859-1] Sat Nov 5 19:55:29 2016 @@ -626,19 +626,6 @@ LPWSTR pFileName; TRACE("(%p, %p, %x, %p)\n", this, pidl, (unsigned int)uFlags, pName); - - - if (_ILIsBitBucket (pidl)) - { - WCHAR pszPath[100]; - - if (HCR_GetClassNameW(CLSID_RecycleBin, pszPath, MAX_PATH)) - { - pName->uType = STRRET_WSTR; - pName->pOleStr = StrDupW(pszPath); - return S_OK; - } - } pFileDetails = _ILGetRecycleStruct(pidl); if (!pFileDetails) Modified: trunk/reactos/dll/win32/shell32/folders/CRegFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CRegFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CRegFolder.cpp [iso-8859-1] Sat Nov 5 19:55:29 2016 @@ -361,19 +361,26 @@ if (!pidl->mkid.cb) { - LPWSTR pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR)); - if (!pszPath) - return E_OUTOFMEMORY; - - /* parsing name like ::{...} */ - pszPath[0] = ':'; - pszPath[1] = ':'; - SHELL32_GUIDToStringW(m_guid, &pszPath[2]); - - strRet->uType = STRRET_WSTR; - strRet->pOleStr = pszPath; - - return S_OK; + if ((GET_SHGDN_RELATION(dwFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING)) + { + LPWSTR pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR)); + if (!pszPath) + return E_OUTOFMEMORY; + + /* parsing name like ::{...} */ + pszPath[0] = ':'; + pszPath[1] = ':'; + SHELL32_GUIDToStringW(m_guid, &pszPath[2]); + + strRet->uType = STRRET_WSTR; + strRet->pOleStr = pszPath; + + return S_OK; + } + else + { + return HCR_GetClassName(m_guid, strRet); + } } HRESULT hr;
8 years, 1 month
1
0
0
0
[tfaber] 73146: [ASM] - Addendum to r73145 aka fix build
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Nov 5 18:34:44 2016 New Revision: 73146 URL:
http://svn.reactos.org/svn/reactos?rev=73146&view=rev
Log: [ASM] - Addendum to r73145 aka fix build Modified: trunk/reactos/sdk/include/asm/ks386.template.h Modified: trunk/reactos/sdk/include/asm/ks386.template.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/asm/ks386.temp…
============================================================================== --- trunk/reactos/sdk/include/asm/ks386.template.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/asm/ks386.template.h [iso-8859-1] Sat Nov 5 18:34:44 2016 @@ -693,6 +693,11 @@ SIZE(SIZEOF_EXCEPTION_RECORD, EXCEPTION_RECORD), CONSTANT(EXCEPTION_RECORD_LENGTH), +HEADER("EXCEPTION_POINTERS"), +OFFSET(EXCEPTION_POINTERS_EXCEPTION_RECORD, EXCEPTION_POINTERS, ExceptionRecord), +OFFSET(EXCEPTION_POINTERS_CONTEXT_RECORD, EXCEPTION_POINTERS, ContextRecord), +SIZE(SIZEOF_EXCEPTION_POINTERS, EXCEPTION_POINTERS), + HEADER("KTHREAD"), OFFSET(KTHREAD_DEBUG_ACTIVE, KTHREAD, Header.DebugActive), OFFSET(KTHREAD_INITIAL_STACK, KTHREAD, InitialStack),
8 years, 1 month
1
0
0
0
[tfaber] 73145: [PSEH] - Make _except_handler3 human-readable CORE-12283
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Nov 5 18:33:50 2016 New Revision: 73145 URL:
http://svn.reactos.org/svn/reactos?rev=73145&view=rev
Log: [PSEH] - Make _except_handler3 human-readable CORE-12283 Modified: trunk/reactos/sdk/lib/pseh/i386/seh.s Modified: trunk/reactos/sdk/lib/pseh/i386/seh.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/pseh/i386/seh.s?re…
============================================================================== --- trunk/reactos/sdk/lib/pseh/i386/seh.s [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/pseh/i386/seh.s [iso-8859-1] Sat Nov 5 18:33:50 2016 @@ -9,6 +9,7 @@ /* INCLUDES ******************************************************************/ #include <asm.inc> +#include <ks386.inc> #define DISPOSITION_DISMISS 0 #define DISPOSITION_CONTINUE_SEARCH 1 @@ -16,6 +17,16 @@ #define EXCEPTION_EXIT_UNWIND 4 #define EXCEPTION_UNWINDING 2 + +/* See seh_prolog.s */ +SEH_FRAME_NewEsp = 0 /* 0x00 */ +SEH_FRAME_unused = 4 /* 0x04 */ +SEH_FRAME_PreviousRecord = 8 /* 0x08 */ +SEH_FRAME_Handler = 12 /* 0x0c */ +SEH_FRAME_SEHTable = 16 /* 0x10 */ +SEH_FRAME_Disable = 20 /* 0x14 */ +SEH_FRAME_OriginalEbp = 24 /* 0x18 */ +SEH_FRAME_Size = 28 /* 0x1c */ EXTERN _RtlUnwind@16:PROC @@ -301,7 +312,9 @@ __except_handler3: - +PARAM_ExceptionRecord = 8 +PARAM_RegistrationFrame = 12 +PARAM_Context = 16 /* Setup stack and save volatiles */ push ebp mov ebp, esp @@ -315,23 +328,23 @@ cld /* Get exception registration and record */ - mov ebx, [ebp+12] - mov eax, [ebp+8] + mov ebx, [ebp+PARAM_RegistrationFrame] + mov eax, [ebp+PARAM_ExceptionRecord] /* Check if this is an unwind */ - test dword ptr [eax+4], EXCEPTION_EXIT_UNWIND + EXCEPTION_UNWINDING + test dword ptr [eax+EXCEPTION_RECORD_EXCEPTION_FLAGS], EXCEPTION_EXIT_UNWIND + EXCEPTION_UNWINDING jnz except_unwind3 /* Save exception pointers structure */ - mov [ebp-8], eax - mov eax, [ebp+16] - mov [ebp-4], eax + mov [ebp-8+EXCEPTION_POINTERS_EXCEPTION_RECORD], eax + mov eax, [ebp+PARAM_Context] + mov [ebp-8+EXCEPTION_POINTERS_CONTEXT_RECORD], eax lea eax, [ebp-8] - mov [ebx-4], eax + mov [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_unused], eax /* Get the try level and scope table */ - mov esi, [ebx+12] - mov edi, [ebx+8] + mov esi, [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_Disable] + mov edi, [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_SEHTable] /* FIXME: Validate the SEH exception */ @@ -343,13 +356,13 @@ /* Check if this is the termination handler */ lea ecx, [esi+esi*2] mov eax, [edi+ecx*4+4] - or eax, eax + test eax, eax jz except_continue3 /* Save registers clear them all */ push esi push ebp - lea ebp, [ebx+16] + lea ebp, [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_OriginalEbp] xor ebx, ebx xor ecx, ecx xor edx, edx @@ -362,19 +375,19 @@ pop esi /* Restore ebx and check the result */ - mov ebx, [ebp+12] - or eax, eax + mov ebx, [ebp+PARAM_RegistrationFrame] + test eax, eax jz except_continue3 js except_dismiss3 /* So this is an accept, call the termination handlers */ - mov edi, [ebx+8] + mov edi, [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_SEHTable] push ebx call __global_unwind2 add esp, 4 /* Restore ebp */ - lea ebp, [ebx+16] + lea ebp, [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_OriginalEbp] /* Do local unwind */ push esi @@ -387,7 +400,7 @@ /* Set new try level */ lea ecx, [esi+esi*2] mov eax, [edi+ecx*4] - mov [ebx+12], eax + mov [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_Disable], eax /* Clear registers and call except handler */ mov eax, [edi+ecx*4+8] @@ -400,7 +413,7 @@ except_continue3: /* Reload try level and except again */ - mov edi, [ebx+8] + mov edi, [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_SEHTable] lea ecx, [esi+esi*2] mov esi, [edi+ecx*4] jmp except_loop3 @@ -410,23 +423,21 @@ mov eax, DISPOSITION_DISMISS jmp except_return3 + /* Do local unwind */ +except_unwind3: + push ebp + mov ebp, [ebx-SEH_FRAME_PreviousRecord+SEH_FRAME_OriginalEbp] + push -1 + push ebx + call __local_unwind2 + add esp, 8 + + /* Restore EBP */ + pop ebp + except_search3: /* Continue searching */ mov eax, DISPOSITION_CONTINUE_SEARCH - jmp except_return3 - - /* Do local unwind */ -except_unwind3: - push ebp - mov ebp, [ebx+16] - push -1 - push ebx - call __local_unwind2 - add esp, 8 - - /* Retore EBP and set return disposition */ - pop ebp - mov eax, DISPOSITION_CONTINUE_SEARCH except_return3: /* Restore registers and stack */
8 years, 1 month
1
0
0
0
[tfaber] 73144: [CRT] - Avoid 'except' as a variable name in math.h, for compatibility with SEH tests
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Nov 5 18:27:30 2016 New Revision: 73144 URL:
http://svn.reactos.org/svn/reactos?rev=73144&view=rev
Log: [CRT] - Avoid 'except' as a variable name in math.h, for compatibility with SEH tests Modified: trunk/reactos/sdk/include/crt/math.h Modified: trunk/reactos/sdk/include/crt/math.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/crt/math.h?rev…
============================================================================== --- trunk/reactos/sdk/include/crt/math.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/crt/math.h [iso-8859-1] Sat Nov 5 18:27:30 2016 @@ -101,7 +101,7 @@ #ifndef _CRT_MATHERR_DEFINED #define _CRT_MATHERR_DEFINED -int __CRTDECL _matherr(_Inout_ struct _exception *except); +int __CRTDECL _matherr(_Inout_ struct _exception *exception); #endif #ifndef _CRT_ATOF_DEFINED
8 years, 1 month
1
0
0
0
[mjansen] 73143: [ADVAPI32] Set REG_NONE type in RegQueryValueExW with certain failure cases. Patch by Victor Martinez Calvo. CORE-9666 #resolve #comment Thanks!
by mjansen@svn.reactos.org
Author: mjansen Date: Sat Nov 5 17:46:30 2016 New Revision: 73143 URL:
http://svn.reactos.org/svn/reactos?rev=73143&view=rev
Log: [ADVAPI32] Set REG_NONE type in RegQueryValueExW with certain failure cases. Patch by Victor Martinez Calvo. CORE-9666 #resolve #comment Thanks! Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Sat Nov 5 17:46:30 2016 @@ -4135,19 +4135,25 @@ RtlInitUnicodeString( &name_str, name ); - if (data) total_size = min( sizeof(buffer), *count + info_size ); + if (data) + total_size = min( sizeof(buffer), *count + info_size ); else - { total_size = info_size; - if (count) *count = 0; - } - - /* this matches Win9x behaviour - NT sets *type to a random value */ - if (type) *type = REG_NONE; + status = NtQueryValueKey( hkey, &name_str, KeyValuePartialInformation, buffer, total_size, &total_size ); - if (!NT_SUCCESS(status) && status != STATUS_BUFFER_OVERFLOW) goto done; + + if (!NT_SUCCESS(status) && status != STATUS_BUFFER_OVERFLOW) + { + // NT: Valid handles with inexistant/null values or invalid (but not NULL) handles sets type to REG_NONE + if ((status == STATUS_OBJECT_NAME_NOT_FOUND) ||(status == STATUS_INVALID_HANDLE && hkey)) + { + if (type) *type = REG_NONE; + if (count) *count = 0; + } + goto done; + } if (data) {
8 years, 1 month
1
0
0
0
[mjansen] 73142: [ADVAPI32_APITEST] Add tests for RegQueryValueExW. Patch by Victor Martinez Calvo. ROSTESTS-171 #resolve #comment Thanks!
by mjansen@svn.reactos.org
Author: mjansen Date: Sat Nov 5 17:43:24 2016 New Revision: 73142 URL:
http://svn.reactos.org/svn/reactos?rev=73142&view=rev
Log: [ADVAPI32_APITEST] Add tests for RegQueryValueExW. Patch by Victor Martinez Calvo. ROSTESTS-171 #resolve #comment Thanks! Added: trunk/rostests/apitests/advapi32/RegQueryValueExW.c (with props) Modified: trunk/rostests/apitests/advapi32/CMakeLists.txt trunk/rostests/apitests/advapi32/testlist.c Modified: trunk/rostests/apitests/advapi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/CMakeLi…
============================================================================== --- trunk/rostests/apitests/advapi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/advapi32/CMakeLists.txt [iso-8859-1] Sat Nov 5 17:43:24 2016 @@ -10,6 +10,7 @@ RegEnumKey.c RegEnumValueW.c RegQueryInfoKey.c + RegQueryValueExW.c RtlEncryptMemory.c SaferIdentifyLevel.c testlist.c) Added: trunk/rostests/apitests/advapi32/RegQueryValueExW.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/RegQuer…
============================================================================== --- trunk/rostests/apitests/advapi32/RegQueryValueExW.c (added) +++ trunk/rostests/apitests/advapi32/RegQueryValueExW.c [iso-8859-1] Sat Nov 5 17:43:24 2016 @@ -0,0 +1,312 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Test for the RegQueryValueW API + * PROGRAMMER: Victor Martinez Calvo <victor.martinez(a)reactos.org> + */ +#include <apitest.h> + +#define WIN32_NO_STATUS +#include <winreg.h> + +static DWORD delete_key(HKEY hkey) +{ + WCHAR name[MAX_PATH]; + DWORD ret; + + while (!(ret = RegEnumKeyW(hkey, 0, name, _countof(name)))) + { + HKEY tmp; + if (!(ret = RegOpenKeyExW(hkey, name, 0, KEY_ENUMERATE_SUB_KEYS, &tmp))) + { + ret = delete_key(tmp); + } + if (ret) + break; + } + if (ret == ERROR_NO_MORE_ITEMS) + { + RegDeleteKeyW(hkey, L""); + ret = 0; + } + RegCloseKey(hkey); + return ret; +} + +START_TEST(RegQueryValueExW) +{ + HKEY hkey_main; + HKEY subkey; + DWORD type, size, ret, reserved; + const WCHAR string1W[] = L"1"; + const WCHAR string22W[] = L"Thisstringhas22letters"; + WCHAR data22[22]; + WCHAR data23[23]; + WCHAR data24[24]; + + + /* If the tree key already exist, delete it to ensure proper testing*/ + if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\ReactOS\\advapi32_apitest", 0, KEY_ALL_ACCESS, &hkey_main) == ERROR_SUCCESS) + delete_key(hkey_main); + + /* Ready to recreate it */ + SetLastError(0xdeadbeef); + ret = RegCreateKeyExW(HKEY_CURRENT_USER, L"Software\\ReactOS\\advapi32_apitest", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey_main, NULL); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", ret); + ok(GetLastError(), "RegCreateKeyExW failed: %lx\n", GetLastError()); + if(ret != ERROR_SUCCESS) + { + trace("Unable to create test key, aborting!\n"); + return; + } + + SetLastError(0xdeadbeef); + ret = RegCreateKeyExW(hkey_main, L"subkey", 0, L"subkey class", 0, KEY_ALL_ACCESS, NULL, &subkey, NULL); + ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %lu\n", ret); + ok(GetLastError(), "RegCreateKeyExW failed: %lx\n", GetLastError()); + + /* All NULL */ + SetLastError(0xdeadbeef); + ret = RegQueryValueExW(NULL, NULL, NULL, NULL, NULL, NULL); + ok(ret == ERROR_INVALID_HANDLE, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + + /* All NULL. Reserved not NULL */ + type = 666; + size = 666; + reserved = 3; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW(NULL, NULL, &reserved, NULL, NULL, NULL); + ok(ret == ERROR_INVALID_PARAMETER, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(reserved == 3, "Expected reserved=3, reserved is: %ld \n", reserved); + + /* NULL handle. NULL value. Reserved not NULL */ + type = 666; + size = 666; + reserved = 3; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW(NULL, NULL, &reserved, &type, NULL, &size); + ok(ret == ERROR_INVALID_PARAMETER, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == 666, "Expected untouched, Type was set with: %ld\n", type); + ok(size == 666, "Expected untouched, Size was set with: %ld \n", size); + ok(reserved == 3, "Expected reserved = 3, reserved is: %ld \n", reserved); + + /* NULL handle. NULL value */ + type = 666; + size = 666; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW(NULL, NULL, NULL, &type, NULL, &size); + ok(ret == ERROR_INVALID_HANDLE, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == 666, "Expected untouched, Type was set with: %ld\n", type); + ok(size == 666, "Expected untouched, Size was set with: %ld \n", size); + + /* NULL handle . Inexistent value. Reserved not NULL */ + type = 666; + size = 666; + reserved = 3; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW(NULL, L"MSITESTVAR11", &reserved, &type, NULL, &size); + ok(ret == ERROR_INVALID_PARAMETER, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == 666, "Expected untouched, Type was set with: %ld\n", type); + ok(size == 666, "Expected untouched, Size was set with: %ld \n", size); + ok(reserved == 3, "Expected reserved = 3, reserved is: %ld \n", reserved); + + /* NULL handle . Inexistent value. */ + type = 666; + size = 666; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW(NULL, L"MSITESTVAR11", NULL, &type, NULL, &size); + ok(ret == ERROR_INVALID_HANDLE, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == 666, "Expected untouched, Type was set with: %ld\n", type); + ok(size == 666, "Expected untouched, Size was set with: %ld \n", size); + + /* NULL handle */ + type = 666; + size = 666; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW(NULL, L"MSITESTVAR11", NULL, &type, NULL, &size); + ok(ret == ERROR_INVALID_HANDLE, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == 666, "Expected untouched, Type was set with: %ld\n", type); + ok(size == 666, "Expected untouched, Size was set with: %ld \n", size); + + /* INVALID handle. NULL value. Reserved not NULL */ + type = 666; + size = 666; + reserved = 3; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW((HKEY)-4, NULL, &reserved, &type, NULL, &size); + ok(ret == ERROR_INVALID_PARAMETER, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == 666, "Expected untouched, Type was set with: %ld\n", type); + ok(size == 666, "Expected untouched, Size was set with: %ld \n", size); + ok(reserved == 3, "Expected reserved = 3, reserved is: %ld \n", reserved); + + /* INVALID handle. NULL value.*/ + type = 666; + size = 666; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW((HKEY)-4, NULL, NULL, &type, NULL, &size); + ok(ret == ERROR_INVALID_HANDLE, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == REG_NONE, "Expected REG_NONE, Type is: %ld\n", type); + ok(size == 0, "Expected size = 0, size is: %ld\n", size); + ok(reserved == 3, "Expected reserved = 3, reserved is: %ld \n", reserved); + + /* INVALID handle. Non-existent value. Reserved not NULL*/ + type = 666; + size = 666; + reserved = 3; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW((HKEY)-4, L"MSITESTVAR11", &reserved, &type, NULL, &size); + ok(ret == ERROR_INVALID_PARAMETER, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == 666, "Expected untouched, Type was set with: %ld\n", type); + ok(size == 666, "Expected untouched, Size was set with: %ld \n", size); + ok(reserved == 3, "Expected reserved = 3, reserved is: %ld \n", reserved); + + /* INVALID handle. Non-existent value. */ + type = 666; + size = 666; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW((HKEY)-4, L"MSITESTVAR11", NULL, &type, NULL, &size); + ok(ret == ERROR_INVALID_HANDLE, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == REG_NONE, "Expected REG_NONE, Type is: %ld\n", type); + ok(size == 0, "Expected size = 0, size is: %ld\n", size); + + /* VALID handle, Non-existent value, Reserved not NULL */ + type = 666; + size = 666; + reserved = 3; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW(hkey_main, L"MSITESTVAR11", &reserved, &type, NULL, &size); + ok(ret == ERROR_INVALID_PARAMETER, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == 666, "Expected untouched, Type was set with: %ld\n", type); + ok(size == 666, "Expected untouched, Size was set with: %ld \n", size); + ok(reserved == 3, "Expected reserved = 3, reserved is: %ld\n", reserved); + + /* VALID handle, Non-existent value */ + type = 666; + size = 666; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW(hkey_main, L"MSITESTVAR11", NULL, &type, NULL, &size); + ok(ret == ERROR_FILE_NOT_FOUND, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == REG_NONE, "Expected REG_NONE, Type is: %ld\n", type); + ok(size == 0, "Expected size = 0, size is: %ld\n", size); + + /* VALID handle, NULL value */ + type = 666; + size = 666; + SetLastError(0xdeadbeef); + ret = RegQueryValueExW(hkey_main, NULL, NULL, &type, NULL, &size); + ok(ret == ERROR_FILE_NOT_FOUND, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == REG_NONE, "Expected REG_NONE, Type is: %ld\n", type); + ok(size == 0, "Expected size = 0, size is: %ld\n", size); + + /* Create the value */ + SetLastError(0xdeadbeef); + if ((ret = RegSetValueExW(hkey_main, L"MSITESTVAR11", 0, REG_NONE, (const BYTE *)string1W, 4)) != ERROR_SUCCESS) + { + ok(1, "RegSetValueExW failed: %lx, %lx\n", ret, GetLastError()); + } + if ((ret = RegSetValueExW(hkey_main, L"LONGSTRING", 0, REG_SZ, (const BYTE *)string22W, (wcslen(string22W)+1) * sizeof(WCHAR))) != ERROR_SUCCESS) + { + ok(1, "RegSetValueExW failed: %lx, %lx\n", ret, GetLastError()); + } + + /* Existent value. Reserved not NULL */ + SetLastError(0xdeadbeef); + size = 666; + type = 666; + reserved = 3; + ret = RegQueryValueExW(hkey_main, L"MSITESTVAR11", &reserved, &type, NULL, &size); + ok(ret == ERROR_INVALID_PARAMETER, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == 666, "Expected untouched, Type was set with: %ld\n", type); + ok(size == 666, "Expected untouched, Size was set with: %ld \n", size); + ok(reserved == 3, "Expected reserved = 3, reserved is: %ld \n", reserved); + + /* Existent value */ + SetLastError(0xdeadbeef); + size = 666; + type = 666; + ret = RegQueryValueExW(hkey_main, L"MSITESTVAR11", NULL, &type, NULL, &size); + ok(ret == ERROR_SUCCESS, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == REG_NONE, "Expected REG_NONE, Type is: %ld\n", type); + ok(size == 4, "Expected size = 4, size is: %ld\n", size); + + /* Data tests */ + /* Buffer one wchar smaller than needed */ + SetLastError(0xdeadbeef); + size = sizeof(data22); + type = 666; + ret = RegQueryValueExW(hkey_main, L"LONGSTRING", NULL, &type, (LPBYTE)data22, &size); + ok(ret == ERROR_MORE_DATA, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == REG_SZ, "Expected REG_NONE, Type is: %ld\n", type); + ok(size == 46, "Expected size = 46, size is: %ld\n", size); + ok(wcscmp(data22, string22W), "Expected being different!"); + + /* Buffer has perfect size */ + SetLastError(0xdeadbeef); + size = sizeof(data23); + type = 666; + ret = RegQueryValueExW(hkey_main, L"LONGSTRING", NULL, &type, (LPBYTE)data23, &size); + ok(ret == ERROR_SUCCESS, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == REG_SZ, "Expected REG_NONE, Type is: %ld\n", type); + ok(size == 46, "Expected size = 46, size is: %ld", size); + ok(!wcscmp(data23,string22W), "Expected same string! data23: %S, string22W: %S", data23, string22W); + + /* Buffer one wchar bigger than needed */ + SetLastError(0xdeadbeef); + size = sizeof(data24); + type = 666; + ret = RegQueryValueExW(hkey_main, L"LONGSTRING", NULL, &type, (LPBYTE)data24, &size); + ok(ret == ERROR_SUCCESS, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == REG_SZ, "Expected REG_NONE, Type is: %ld\n", type); + ok(size == 46, "Expected size = 46, size is: %ld\n", size); + ok(!wcscmp(data24, string22W), "Expected same string! data24: %S, string22W: %S\n", data24, string22W); + + /* Buffer has perfect size. Size wrong: 1 WCHAR less */ + SetLastError(0xdeadbeef); + memset(data23, 0, sizeof(data23)); + size = sizeof(data23) - 2; + type = 666; + ret = RegQueryValueExW(hkey_main, L"LONGSTRING", NULL, &type, (LPBYTE)data23, &size); + ok(ret == ERROR_MORE_DATA, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == REG_SZ, "Expected REG_NONE, Type is: %ld\n", type); + ok(size == 46, "Expected size = 46, size is: %ld", size); + ok(wcscmp(data23, string22W), "Expected different string!\n"); + + /* Buffer has perfect size. Size wrong: 1 WCHAR more */ + SetLastError(0xdeadbeef); + memset(data23, 0, sizeof(data23)); + size = sizeof(data23) + 2; + type = 666; + ret = RegQueryValueExW(hkey_main, L"LONGSTRING", NULL, &type, (LPBYTE)data23, &size); + ok(ret == ERROR_SUCCESS, "RegQueryValueExW returned: %lx\n", ret); + ok(GetLastError() == 0xdeadbeef, "RegQueryValueExW returned: %lx\n", GetLastError()); + ok(type == REG_SZ, "Expected REG_NONE, Type is: %ld\n", type); + ok(size == 46, "Expected size = 46, size is: %ld", size); + ok(!wcscmp(data23, string22W), "Expected same string! data23: %S, string22W: %S", data23, string22W); + + RegCloseKey(hkey_main); + RegCloseKey(subkey); + + /* Delete the whole test key */ + RegOpenKeyW(HKEY_CURRENT_USER, L"Software\\ReactOS\\advapi32_apitest", &hkey_main); + delete_key(hkey_main); +} Propchange: trunk/rostests/apitests/advapi32/RegQueryValueExW.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/advapi32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/testlis…
============================================================================== --- trunk/rostests/apitests/advapi32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/advapi32/testlist.c [iso-8859-1] Sat Nov 5 17:43:24 2016 @@ -13,6 +13,7 @@ extern void func_RegEnumKey(void); extern void func_RegEnumValueW(void); extern void func_RegQueryInfoKey(void); +extern void func_RegQueryValueExW(void); extern void func_RtlEncryptMemory(void); extern void func_SaferIdentifyLevel(void); @@ -28,6 +29,7 @@ { "RegEnumKey", func_RegEnumKey }, { "RegEnumValueW", func_RegEnumValueW }, { "RegQueryInfoKey", func_RegQueryInfoKey }, + { "RegQueryValueExW", func_RegQueryValueExW }, { "RtlEncryptMemory", func_RtlEncryptMemory }, { "SaferIdentifyLevel", func_SaferIdentifyLevel },
8 years, 1 month
1
0
0
0
[mjansen] 73141: [MKISOFS] Silence progress spam.
by mjansen@svn.reactos.org
Author: mjansen Date: Sat Nov 5 17:28:00 2016 New Revision: 73141 URL:
http://svn.reactos.org/svn/reactos?rev=73141&view=rev
Log: [MKISOFS] Silence progress spam. Modified: trunk/reactos/boot/CMakeLists.txt Modified: trunk/reactos/boot/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/CMakeLists.txt?rev=73…
============================================================================== --- trunk/reactos/boot/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/CMakeLists.txt [iso-8859-1] Sat Nov 5 17:28:00 2016 @@ -67,7 +67,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bootcd.lst "${CMAKE_CURRENT_BINARY_DIR}/empty\n") add_custom_target(bootcd - COMMAND native-mkisofs -o ${REACTOS_BINARY_DIR}/bootcd.iso -iso-level 4 + COMMAND native-mkisofs -quiet -o ${REACTOS_BINARY_DIR}/bootcd.iso -iso-level 4 -publisher ${ISO_MANUFACTURER} -preparer ${ISO_MANUFACTURER} -volid ${ISO_VOLNAME} -volset ${ISO_VOLNAME} -eltorito-boot loader/isoboot.bin -no-emul-boot -boot-load-size 4 -eltorito-alt-boot -eltorito-platform efi -eltorito-boot loader/efisys.bin -no-emul-boot -hide boot.catalog -sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort @@ -89,7 +89,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest.lst "${CMAKE_CURRENT_BINARY_DIR}/empty\n") add_custom_target(bootcdregtest - COMMAND native-mkisofs -o ${REACTOS_BINARY_DIR}/bootcdregtest.iso -iso-level 4 + COMMAND native-mkisofs -quiet -o ${REACTOS_BINARY_DIR}/bootcdregtest.iso -iso-level 4 -publisher ${ISO_MANUFACTURER} -preparer ${ISO_MANUFACTURER} -volid ${ISO_VOLNAME} -volset ${ISO_VOLNAME} -eltorito-boot loader/isobtrt.bin -no-emul-boot -boot-load-size 4 -eltorito-alt-boot -eltorito-platform efi -eltorito-boot loader/efisys.bin -no-emul-boot -hide boot.catalog -sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort @@ -116,7 +116,7 @@ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.lst "Profiles/Default User/Start Menu/Programs=${CMAKE_CURRENT_BINARY_DIR}/empty\n") add_custom_target(livecd - COMMAND native-mkisofs -o ${REACTOS_BINARY_DIR}/livecd.iso -iso-level 4 + COMMAND native-mkisofs -quiet -o ${REACTOS_BINARY_DIR}/livecd.iso -iso-level 4 -publisher ${ISO_MANUFACTURER} -preparer ${ISO_MANUFACTURER} -volid ${ISO_VOLNAME} -volset ${ISO_VOLNAME} -eltorito-boot loader/isoboot.bin -no-emul-boot -boot-load-size 4 -eltorito-alt-boot -eltorito-platform efi -eltorito-boot loader/efisys.bin -no-emul-boot -hide boot.catalog -sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort @@ -148,7 +148,7 @@ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/hybridcd.lst "livecd/Profiles/Default User/Start Menu/Programs=${CMAKE_CURRENT_BINARY_DIR}/empty\n") add_custom_target(hybridcd - COMMAND native-mkisofs -o ${REACTOS_BINARY_DIR}/hybridcd.iso -iso-level 4 + COMMAND native-mkisofs -quiet -o ${REACTOS_BINARY_DIR}/hybridcd.iso -iso-level 4 -publisher ${ISO_MANUFACTURER} -preparer ${ISO_MANUFACTURER} -volid ${ISO_VOLNAME} -volset ${ISO_VOLNAME} -eltorito-boot loader/isoboot.bin -no-emul-boot -boot-load-size 4 -eltorito-alt-boot -eltorito-platform efi -eltorito-boot loader/efisys.bin -no-emul-boot -hide boot.catalog -sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort
8 years, 1 month
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
31
32
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
Results per page:
10
25
50
100
200