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
September 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
18 participants
342 discussions
Start a n
N
ew thread
[mjansen] 72690: [SYSSETUP][UNATTENDED] Remove dead code for VmwInst. Found by Jared Smudde.
by mjansen@svn.reactos.org
Author: mjansen Date: Thu Sep 15 19:58:29 2016 New Revision: 72690 URL:
http://svn.reactos.org/svn/reactos?rev=72690&view=rev
Log: [SYSSETUP][UNATTENDED] Remove dead code for VmwInst. Found by Jared Smudde. Modified: trunk/reactos/boot/bootdata/bootcd/unattend.inf trunk/reactos/boot/bootdata/bootcdregtest/unattend.inf trunk/reactos/dll/win32/syssetup/wizard.c trunk/reactos/sdk/include/reactos/libs/syssetup/syssetup.h Modified: trunk/reactos/boot/bootdata/bootcd/unattend.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/bootcd/unatt…
============================================================================== --- trunk/reactos/boot/bootdata/bootcd/unattend.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/bootcd/unattend.inf [iso-8859-1] Thu Sep 15 19:58:29 2016 @@ -39,11 +39,6 @@ ; 0 - disabled AutoPartition = 1 -; enable this setting to disable vmware driver install -; yes - disabled -; no - enabled -DisableVmwInst = yes - ; enable this setting to disable Gecko install ; yes - disabled ; no - enabled Modified: trunk/reactos/boot/bootdata/bootcdregtest/unattend.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/bootcdregtes…
============================================================================== --- trunk/reactos/boot/bootdata/bootcdregtest/unattend.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/bootcdregtest/unattend.inf [iso-8859-1] Thu Sep 15 19:58:29 2016 @@ -39,10 +39,9 @@ ; 0 - disabled AutoPartition = 1 -; enable this setting to disable vmware driver install -; yes - disabled -; no - enabled -DisableVmwInst = yes +; set this option to automatically +; specify language in 2nd mode setup +; see hivesys.inf for available languages LocaleID = 409 ; enable this section to automatically launch programs Modified: trunk/reactos/dll/win32/syssetup/wizard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.…
============================================================================== --- trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] Thu Sep 15 19:58:29 2016 @@ -20,8 +20,6 @@ #define NDEBUG #include <debug.h> -#undef VMWINST - #define PM_REGISTRATION_NOTIFY (WM_APP + 1) /* Private Message used to communicate progress from the background registration thread to the main thread. @@ -53,47 +51,6 @@ BOOL GetRosInstallCD(WCHAR *pwszPath, DWORD cchPathMax); -#ifdef VMWINST -static BOOL -RunVMWInstall(HWND hWnd) -{ - PROCESS_INFORMATION ProcInfo; - MSG msg; - DWORD ret; - STARTUPINFOW si; - WCHAR InstallName[] = L"vmwinst.exe"; - - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - - if(CreateProcessW(NULL, InstallName, NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS, - NULL, NULL, &si, &ProcInfo)) - { - EnableWindow(hWnd, FALSE); - for (;;) - { - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - if (msg.message == WM_QUIT) - goto done; - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - ret = MsgWaitForMultipleObjects(1, &ProcInfo.hProcess, FALSE, INFINITE, QS_ALLEVENTS | QS_ALLINPUT); - if (ret == WAIT_OBJECT_0) - break; - } -done: - EnableWindow(hWnd, TRUE); - - CloseHandle(ProcInfo.hThread); - CloseHandle(ProcInfo.hProcess); - return TRUE; - } - return FALSE; -} -#endif static VOID CenterWindow(HWND hWnd) @@ -1986,11 +1943,6 @@ if (wParam) { -#ifdef VMWINST - if(!SetupData->UnattendSetup && !SetupData->DisableVmwInst) - RunVMWInstall(GetParent(hwndDlg)); -#endif - /* Enable the Back and Next buttons */ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT); PropSheet_PressButton(GetParent(hwndDlg), PSBTN_NEXT); @@ -2233,13 +2185,6 @@ else if (!wcscmp(szName, L"DisableAutoDaylightTimeSet")) { pSetupData->DisableAutoDaylightTimeSet = _wtoi(szValue); - } - else if (!wcscmp(szName, L"DisableVmwInst")) - { - if(!wcscmp(szValue, L"yes")) - pSetupData->DisableVmwInst = 1; - else - pSetupData->DisableVmwInst = 0; } else if (!wcscmp(szName, L"DisableGeckoInst")) { Modified: trunk/reactos/sdk/include/reactos/libs/syssetup/syssetup.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/libs/s…
============================================================================== --- trunk/reactos/sdk/include/reactos/libs/syssetup/syssetup.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/reactos/libs/syssetup/syssetup.h [iso-8859-1] Thu Sep 15 19:58:29 2016 @@ -54,7 +54,6 @@ WCHAR ComputerName[MAX_COMPUTERNAME_LENGTH + 1]; /* max. 15 characters */ WCHAR AdminPassword[128]; /* max. 127 characters */ BOOL UnattendSetup; - BOOL DisableVmwInst; BOOL DisableGeckoInst; SYSTEMTIME SystemTime;
8 years, 3 months
1
0
0
0
[mjansen] 72689: [ATL_APITEST] Update CImage apitest to be in line with the CSimpleArray / CSimpleMap tests. Patch from Katayama Hirofumi MZ. CORE-11946 #resolve #comment Thanks!
by mjansen@svn.reactos.org
Author: mjansen Date: Thu Sep 15 19:42:45 2016 New Revision: 72689 URL:
http://svn.reactos.org/svn/reactos?rev=72689&view=rev
Log: [ATL_APITEST] Update CImage apitest to be in line with the CSimpleArray / CSimpleMap tests. Patch from Katayama Hirofumi MZ. CORE-11946 #resolve #comment Thanks! Modified: trunk/rostests/apitests/atl/CImage.cpp Modified: trunk/rostests/apitests/atl/CImage.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/CImage.cpp?r…
============================================================================== --- trunk/rostests/apitests/atl/CImage.cpp [iso-8859-1] (original) +++ trunk/rostests/apitests/atl/CImage.cpp [iso-8859-1] Thu Sep 15 19:42:45 2016 @@ -14,17 +14,15 @@ #include <stdlib.h> #include <stdio.h> #include <stdarg.h> - const char *g_file = NULL; - int g_line = 0; int g_tests_executed = 0; int g_tests_failed = 0; - void ok_func(BOOL value, const char *fmt, ...) + void ok_func(const char *file, int line, BOOL value, const char *fmt, ...) { va_list va; va_start(va, fmt); if (!value) { - printf("%s (%d): ", g_file, g_line); + printf("%s (%d): ", file, line); vprintf(fmt, va); g_tests_failed++; } @@ -32,7 +30,7 @@ va_end(va); } #undef ok - #define ok g_file = __FILE__; g_line = __LINE__; ok_func + #define ok(value, ...) ok_func(__FILE__, __LINE__, value, __VA_ARGS__) #define START_TEST(x) int main(void) #endif @@ -59,7 +57,7 @@ { HRSRC rsrc; - rsrc = FindResource(hInst, MAKEINTRESOURCE(id), MAKEINTRESOURCE(RT_BITMAP)); + rsrc = FindResource(hInst, MAKEINTRESOURCE(id), RT_BITMAP); ok(rsrc != NULL, "Expected to find an image resource\n"); if (rsrc) { @@ -274,5 +272,6 @@ #ifndef __REACTOS__ printf("CImage: %i tests executed (0 marked as todo, %i failures), 0 skipped.\n", g_tests_executed, g_tests_failed); -#endif -} + return g_tests_failed; +#endif +}
8 years, 3 months
1
0
0
0
[mjansen] 72688: [ATL][ATL_APITEST] Implemente CSimpleArray + CSimpleMap. Based on a patch from Katayama Hirofumi MZ. CORE-11946 Most of the code is from Katayama Hirofumi MZ, the placement new / d...
by mjansen@svn.reactos.org
Author: mjansen Date: Thu Sep 15 19:41:03 2016 New Revision: 72688 URL:
http://svn.reactos.org/svn/reactos?rev=72688&view=rev
Log: [ATL][ATL_APITEST] Implemente CSimpleArray + CSimpleMap. Based on a patch from Katayama Hirofumi MZ. CORE-11946 Most of the code is from Katayama Hirofumi MZ, the placement new / delete is written by me, based on a hint from Giannis. Added: trunk/reactos/sdk/lib/atl/atlsimpcoll.h (with props) trunk/rostests/apitests/atl/CSimpleArray.cpp (with props) trunk/rostests/apitests/atl/CSimpleMap.cpp (with props) trunk/rostests/apitests/atl/devenv/ATLTest.sln (with props) trunk/rostests/apitests/atl/devenv/CSimpleArray.vcxproj (with props) trunk/rostests/apitests/atl/devenv/CSimpleMap.vcxproj (with props) Removed: trunk/rostests/apitests/atl/devenv/CImage.sln Modified: trunk/rostests/apitests/atl/CMakeLists.txt trunk/rostests/apitests/atl/devenv/CImage.vcxproj trunk/rostests/apitests/atl/testlist.c Added: trunk/reactos/sdk/lib/atl/atlsimpcoll.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/atl/atlsimpcoll.h?…
============================================================================== --- trunk/reactos/sdk/lib/atl/atlsimpcoll.h (added) +++ trunk/reactos/sdk/lib/atl/atlsimpcoll.h [iso-8859-1] Thu Sep 15 19:41:03 2016 @@ -0,0 +1,453 @@ +// PROJECT: ReactOS ATL Simple Collection +// LICENSE: Public Domain +// PURPOSE: Provides compatibility to Microsoft ATL +// PROGRAMMERS: Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com) + +#ifndef __ATLSIMPCOLL_H__ +#define __ATLSIMPCOLL_H__ + +#pragma once + +#include "atlcore.h" // for ATL Core + +namespace ATL +{ +template <typename T> +class CSimpleArrayEqualHelper +{ +public: + static bool IsEqual(const T& t1, const T& t2) + { + return t1 == t2; + } +}; + +// This class exists for the element types of no comparison. +template <typename T> +class CSimpleArrayEqualHelperFalse +{ +public: + static bool IsEqual(const T&, const T&) + { + ATLASSERT(FALSE); + return false; + } +}; + +template <typename T, typename TEqual = CSimpleArrayEqualHelper<T> > +class CSimpleArray +{ +public: + typedef T _ArrayElementType; + + CSimpleArray() : m_pData(NULL), m_nCount(0), m_nCapacity(0) + { + } + + CSimpleArray(const CSimpleArray<T, TEqual>& src) : + m_pData(NULL), m_nCount(0), m_nCapacity(0) + { + *this = src; + } + + ~CSimpleArray() + { + RemoveAll(); + } + + BOOL Add(const T& t) + { + // is the capacity enough? + if (m_nCapacity < m_nCount + 1) + { + // allocate extra capacity for optimization + const int nNewCapacity = (m_nCount + 1) + c_nGrow; + T *pNewData = (T *)realloc(m_pData, nNewCapacity * sizeof(T)); + if (pNewData == NULL) + return FALSE; // failure + + m_pData = pNewData; + m_nCapacity = nNewCapacity; + } + + // call constructor + ConstructItemInPlace(m_nCount, t); + + // increment + ++m_nCount; + + return TRUE; + } + + int Find(const T& t) const + { + for (int nIndex = 0; nIndex < m_nCount; ++nIndex) + { + if (TEqual::IsEqual(m_pData[nIndex], t)) + { + return nIndex; // success + } + } + return -1; // failure + } + + T* GetData() + { + return m_pData; + } + + const T* GetData() const + { + return m_pData; + } + + int GetSize() const + { + return m_nCount; + } + + BOOL Remove(const T& t) + { + return RemoveAt(Find(t)); + } + + void RemoveAll() + { + if (m_pData) + { + // call destructor + const int nCount = m_nCount; + for (int nIndex = 0; nIndex < nCount; ++nIndex) + { + DestructItem(nIndex); + } + + free(m_pData); + m_pData = NULL; + } + m_nCount = 0; + m_nCapacity = 0; + } + + BOOL RemoveAt(int nIndex) + { + // boundary check + if (nIndex < 0 || m_nCount <= nIndex) + return FALSE; // failure + + // call destructor + DestructItem(nIndex); + + // move range [nIndex + 1, m_nCount) to nIndex + const int nRightCount = m_nCount - (nIndex + 1); + const int nRightSize = nRightCount * sizeof(T); + memmove(&m_pData[nIndex], &m_pData[nIndex + 1], nRightSize); + + // decrement + --m_nCount; + + return TRUE; + } + + BOOL SetAtIndex(int nIndex, const T& t) + { + // boundary check + if (nIndex < 0 || m_nCount <= nIndex) + return FALSE; // failure + + // store it + m_pData[nIndex] = t; + return TRUE; + } + + T& operator[](int nIndex) + { + ATLASSERT(0 <= nIndex && nIndex < m_nCount); + return m_pData[nIndex]; + } + + const T& operator[](int nIndex) const + { + ATLASSERT(0 <= nIndex && nIndex < m_nCount); + return m_pData[nIndex]; + } + + CSimpleArray<T, TEqual>& operator=(const CSimpleArray<T, TEqual>& src) + { + // don't copy if two objects are same + if (this == &src) + return *this; + + if (src.GetSize() != GetSize()) + { + RemoveAll(); + + m_nCapacity = src.GetSize(); + + T *pNewData = (T *)realloc(m_pData, m_nCapacity * sizeof(T)); + ATLASSERT(pNewData); + if (pNewData == NULL) + return *this; // failure + + // store new data and capacity + m_pData = pNewData; + m_nCount = m_nCapacity; + } + else + { + for (int nIndex = 0; nIndex < m_nCount; ++nIndex) + { + DestructItem(nIndex); + } + } + + ATLASSERT(GetSize() == src.GetSize()); + for (int nIndex = 0; nIndex < src.GetSize(); ++nIndex) + { + ConstructItemInPlace(nIndex, src[nIndex]); + } + + return *this; + } + +protected: + T * m_pData; // malloc'ed + int m_nCount; // # of items of type T + int m_nCapacity; // for optimization + static const int c_nGrow = 8; // for optimization + + // NOTE: Range m_pData[0] .. m_pData[m_nCapacity - 1] are accessible. + // NOTE: Range [0, m_nCount) are constructed. + // NOTE: Range [m_nCount, m_nCapacity) are not constructed. + // NOTE: 0 <= m_nCount && m_nCount <= m_nCapacity. + + // call constructor at nIndex + void ConstructItemInPlace(int nIndex, const T& src) + { + new(&m_pData[nIndex]) ConstructImpl(src); + } + + // call destructor at nIndex + void DestructItem(int nIndex) + { + m_pData[nIndex].~T(); + } + +private: + + struct ConstructImpl + { + ConstructImpl(const T& obj) + :m_ConstructHelper(obj) + { + } + + static void *operator new(size_t, void *ptr) + { + return ptr; + } + + static void operator delete(void *p, void* ) + { + } + + T m_ConstructHelper; + }; + +}; + +template <typename TKey, typename TVal> +class CSimpleMapEqualHelper +{ +public: + static bool IsEqualKey(const TKey& k1, const TKey& k2) + { + return k1 == k2; + } + + static bool IsEqualValue(const TVal& v1, const TVal& v2) + { + return v1 == v2; + } +}; + +// This class exists for the keys and the values of no comparison. +template <typename TKey, typename TVal> +class CSimpleMapEqualHelperFalse +{ +public: + static bool IsEqualKey(const TKey& k1, const TKey& k2) + { + ATLASSERT(FALSE); + return false; + } + + static bool IsEqualValue(const TVal& v1, const TVal& v2) + { + ATLASSERT(FALSE); + return false; + } +}; + +template <typename TKey, typename TVal, + typename TEqual = CSimpleMapEqualHelper<TKey, TVal> > +class CSimpleMap +{ +public: + typedef TKey _ArrayKeyType; + typedef TVal _ArrayElementType; + + CSimpleMap() + { + } + + ~CSimpleMap() + { + } + + BOOL Add(const TKey& key, const TVal& val) + { + Pair pair(key, val); + return m_Pairs.Add(pair); + } + + int FindKey(const TKey& key) const + { + const int nCount = GetSize(); + for (int nIndex = 0; nIndex < nCount; ++nIndex) + { + if (TEqual::IsEqualKey(m_Pairs[nIndex].key, key)) + { + return nIndex; // success + } + } + return -1; // failure + } + + int FindVal(const TVal& val) const + { + const int nCount = GetSize(); + for (int nIndex = 0; nIndex < nCount; ++nIndex) + { + if (TEqual::IsEqualValue(m_Pairs[nIndex].val, val)) + { + return nIndex; // success + } + } + return -1; // failure + } + + TKey& GetKeyAt(int nIndex) + { + ATLASSERT(0 <= nIndex && nIndex < GetSize()); + return m_Pairs[nIndex].key; + } + + const TKey& GetKeyAt(int nIndex) const + { + ATLASSERT(0 <= nIndex && nIndex < GetSize()); + return m_Pairs[nIndex].key; + } + + int GetSize() const + { + return m_Pairs.GetSize(); + } + + TVal& GetValueAt(int nIndex) + { + ATLASSERT(0 <= nIndex && nIndex < GetSize()); + return m_Pairs[nIndex].val; + } + + const TVal& GetValueAt(int nIndex) const + { + ATLASSERT(0 <= nIndex && nIndex < GetSize()); + return m_Pairs[nIndex].val; + } + + TVal Lookup(const TKey& key) const + { + int nIndex = FindKey(key); + if (nIndex < 0) + return TVal(); + return m_Pairs[nIndex].val; + } + + BOOL Remove(const TKey& key) + { + int nIndex = FindKey(key); + return RemoveAt(nIndex); + } + + void RemoveAll() + { + m_Pairs.RemoveAll(); + } + + BOOL RemoveAt(int nIndex) + { + return m_Pairs.RemoveAt(nIndex); + } + + TKey ReverseLookup(const TVal& val) const + { + int nIndex = FindVal(val); + if (nIndex < 0) + return TKey(); + return m_Pairs[nIndex].key; + } + + BOOL SetAt(const TKey& key, const TVal& val) + { + int nIndex = FindKey(key); + if (nIndex < 0) + return Add(key, val); + + m_Pairs[nIndex].val = val; + return TRUE; + } + + BOOL SetAtIndex(int nIndex, const TKey& key, const TVal& val) + { + // boundary check + if (nIndex < 0 || GetSize() <= nIndex) + return FALSE; + + m_Pairs[nIndex].key = key; + m_Pairs[nIndex].val = val; + return TRUE; + } + +protected: + struct Pair + { + TKey key; + TVal val; + + Pair() + { + } + + Pair(const TKey& k, const TVal& v) : key(k), val(v) + { + } + + Pair(const Pair& pair) : key(pair.key), val(pair.val) + { + } + + Pair& operator=(const Pair& pair) + { + key = pair.key; + val = pair.val; + return *this; + } + }; + + CSimpleArray<Pair, CSimpleArrayEqualHelperFalse<Pair> > m_Pairs; +}; + +} + +#endif Propchange: trunk/reactos/sdk/lib/atl/atlsimpcoll.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/atl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/CMakeLists.t…
============================================================================== --- trunk/rostests/apitests/atl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/atl/CMakeLists.txt [iso-8859-1] Thu Sep 15 19:41:03 2016 @@ -10,6 +10,8 @@ CComHeapPtr.cpp CImage.cpp CRegKey.cpp + CSimpleArray.cpp + CSimpleMap.cpp CString.cpp testlist.c atl_apitest.rc) Added: trunk/rostests/apitests/atl/CSimpleArray.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/CSimpleArray…
============================================================================== --- trunk/rostests/apitests/atl/CSimpleArray.cpp (added) +++ trunk/rostests/apitests/atl/CSimpleArray.cpp [iso-8859-1] Thu Sep 15 19:41:03 2016 @@ -0,0 +1,186 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory + * PURPOSE: Test for CSimpleArray + * PROGRAMMER: Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com) + */ + +#ifdef __REACTOS__ + #include <apitest.h> +#else + #include <stdlib.h> + #include <stdio.h> + #include <stdarg.h> + int g_tests_executed = 0; + int g_tests_failed = 0; + void ok_func(const char *file, int line, bool value, const char *fmt, ...) + { + va_list va; + va_start(va, fmt); + if (!value) + { + printf("%s (%d): ", file, line); + vprintf(fmt, va); + g_tests_failed++; + } + g_tests_executed++; + va_end(va); + } + #undef ok + #define ok(value, ...) ok_func(__FILE__, __LINE__, value, __VA_ARGS__) + #define START_TEST(x) int main(void) +#endif + +#include <atlbase.h> +#include <atlsimpcoll.h> + +struct CCreature +{ + static int s_nCount; + static int s_nCopyCount; + CCreature() + { + CCreature::s_nCount++; + } + CCreature(const CCreature& c) + { + CCreature::s_nCount++; + } + ~CCreature() + { + CCreature::s_nCount--; + } + CCreature& operator=(const CCreature& other) + { + CCreature::s_nCopyCount++; + return *this; + } +}; + +int CCreature::s_nCount = 0; +int CCreature::s_nCopyCount = 0; + + +START_TEST(CSimpleArray) +{ + CSimpleArray<int> array1; + + ok(array1.GetSize() == 0, "Expected array1's size is zero, was %d\n", array1.GetSize()); + + array1.Add(123); + + ok(array1.GetSize() == 1, "Expected array1's size is 1, was %d\n", array1.GetSize()); + ok(array1.GetData()[0] == 123, "Expected array1.GetData()[0] is 123, was %d\n", array1.GetData()[0]); + ok(array1[0] == 123, "Expected array1[0] is 123, was %d\n", array1[0]); + + array1.Add(456); + + ok(array1.GetSize() == 2, "Expected array1's size is 2, was %d\n", array1.GetSize()); + ok(array1.GetData()[0] == 123, "Expected array1.GetData()[0] is 123, was %d\n", array1.GetData()[0]); + ok(array1[0] == 123, "Expected array1[0] is 123, was %d\n", array1[0]); + ok(array1.GetData()[1] == 456, "Expected array1.GetData()[1] is 456, was %d\n", array1.GetData()[1]); + ok(array1[1] == 456, "Expected array1[1] is 456, was %d\n", array1[1]); + + array1.RemoveAll(); + ok(array1.GetSize() == 0, "Expected array1's size is 0, was %d\n", array1.GetSize()); + + array1.Add(1); + array1.Add(1); + array1.Add(1); + array1.Add(2); + array1.Add(2); + array1.Add(3); + ok(array1.GetSize() == 6, "Expected array1's size is 6, was %d\n", array1.GetSize()); + + array1.Remove(2); + ok(array1.GetSize() == 5, "Expected array1's size is 5, was %d\n", array1.GetSize()); + + array1.Remove(1); + ok(array1.GetSize() == 4, "Expected array1's size is 4, was %d\n", array1.GetSize()); + + ok(array1[0] == 1, "Expected array1[0] is 1, was %d\n", array1[0]); + ok(array1[1] == 1, "Expected array1[1] is 1, was %d\n", array1[1]); + ok(array1[2] == 2, "Expected array1[2] is 2, was %d\n", array1[2]); + ok(array1[3] == 3, "Expected array1[3] is 3, was %d\n", array1[3]); + + ok(CCreature::s_nCount == 0, "Expected CCreature::s_nCount is zero, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + + CSimpleArray<CCreature> array2; + { + CCreature creature1, creature2; + + ok(CCreature::s_nCount == 2, "Expected CCreature::s_nCount is 2, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + array2.Add(creature1); + ok(CCreature::s_nCount == 3, "Expected CCreature::s_nCount is 3, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + array2.Add(creature2); + ok(CCreature::s_nCount == 4, "Expected CCreature::s_nCount is 4, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + } + ok(CCreature::s_nCount == 2, "Expected CCreature::s_nCount is 2, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + + { + CSimpleArray<CCreature> array3(array2), array4, array5; + ok(CCreature::s_nCount == 4, "Expected CCreature::s_nCount is 4, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + + array4 = array2; + ok(CCreature::s_nCount == 6, "Expected CCreature::s_nCount is 6, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + + CCreature creature1; + ok(CCreature::s_nCount == 7, "Expected CCreature::s_nCount is 7, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + + array4.Add(creature1); + ok(CCreature::s_nCount == 8, "Expected CCreature::s_nCount is 8, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + + array3 = array4; + ok(CCreature::s_nCount == 9, "Expected CCreature::s_nCount is 9, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + + array5 = array2; + ok(CCreature::s_nCount == 11, "Expected CCreature::s_nCount is 11, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + + array5 = array2; + ok(CCreature::s_nCount == 11, "Expected CCreature::s_nCount is 11, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + } + ok(CCreature::s_nCount == 2, "Expected CCreature::s_nCount is 2, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + + array2.RemoveAll(); + ok(CCreature::s_nCount == 0, "Expected CCreature::s_nCount is zero, was: %d\n", CCreature::s_nCount); + ok(CCreature::s_nCopyCount == 0, "Expected CCreature::s_nCopyCount is zero, was: %d\n", CCreature::s_nCopyCount); + + array1.RemoveAll(); + ok(array1.GetSize() == 0, "Expected array1.GetSize() is zero, was: %d\n", array1.GetSize()); + for (int i = 0; i < 100; ++i) + { + array1.Add(i); + } + ok(array1.GetSize() == 100, "Expected array1.GetSize() is 100, was: %d\n", array1.GetSize()); + + array1.RemoveAll(); + ok(array1.GetSize() == 0, "Expected array1.GetSize() is zero, was: %d\n", array1.GetSize()); + array1.Add(123); + array1.Add(321); + ok(!!array1.RemoveAt(0), "Expected RemoveAt(0) to succeed\n"); + ok(array1.GetSize() == 1, "Expected array1.GetSize() is 1, was: %d\n", array1.GetSize()); + if (array1.GetSize() == 1) + { + ok(array1[0] == 321, "Expected array1[0] is 321, was %d\n", array1[0]); + } + ok(!!array1.RemoveAt(0), "Expected RemoveAt(0) to succeed\n"); + ok(array1.GetSize() == 0, "Expected array1.GetSize() is 0, was: %d\n", array1.GetSize()); + +#ifndef __REACTOS__ + printf("CSimpleArray: %i tests executed (0 marked as todo, %i failures), 0 skipped.\n", g_tests_executed, g_tests_failed); + return g_tests_failed; +#endif +} Propchange: trunk/rostests/apitests/atl/CSimpleArray.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/apitests/atl/CSimpleMap.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/CSimpleMap.c…
============================================================================== --- trunk/rostests/apitests/atl/CSimpleMap.cpp (added) +++ trunk/rostests/apitests/atl/CSimpleMap.cpp [iso-8859-1] Thu Sep 15 19:41:03 2016 @@ -0,0 +1,206 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory + * PURPOSE: Test for CSimpleMap + * PROGRAMMER: Katayama Hirofumi MZ (katayama.hirofumi.mz(a)gmail.com) + */ + +#ifdef __REACTOS__ + #include <apitest.h> +#else + #include <stdlib.h> + #include <stdio.h> + #include <stdarg.h> + int g_tests_executed = 0; + int g_tests_failed = 0; + void ok_func(const char *file, int line, bool value, const char *fmt, ...) + { + va_list va; + va_start(va, fmt); + if (!value) + { + printf("%s (%d): ", file, line); + vprintf(fmt, va); + g_tests_failed++; + } + g_tests_executed++; + va_end(va); + } + #undef ok + #define ok(value, ...) ok_func(__FILE__, __LINE__, value, __VA_ARGS__) + #define START_TEST(x) int main(void) +#endif + +#include <atlbase.h> +#include <atlsimpcoll.h> + +struct CMonster +{ + static int s_nCount; + static int s_nCopyCount; + + CMonster() + { + CMonster::s_nCount++; + } + CMonster(const CMonster& c) + { + CMonster::s_nCount++; + } + ~CMonster() + { + CMonster::s_nCount--; + } + CMonster& operator=(const CMonster& other) + { + CMonster::s_nCopyCount++; + return *this; + } +}; + +int CMonster::s_nCount = 0; +int CMonster::s_nCopyCount = 0; + +START_TEST(CSimpleMap) +{ + CSimpleMap<int, int> map1; + + ok(map1.GetSize() == 0, "Expected map1's size is zero, was %d\n", map1.GetSize()); + + map1.Add(1, 2); + ok(map1.GetSize() == 1, "Expected map1's size is 1, was %d\n", map1.GetSize()); + map1.Add(2, 3); + ok(map1.GetSize() == 2, "Expected map1's size is 2, was %d\n", map1.GetSize()); + + ok(map1.Lookup(1) == 2, "Expected map1.Lookup(1) is 2, was %d\n", map1.Lookup(1)); + ok(map1.Lookup(2) == 3, "Expected map1.Lookup(2) is 3, was %d\n", map1.Lookup(2)); + ok(map1.Lookup(-1) == 0, "Expected map1.Lookup(-1) is 0, was %d\n", map1.Lookup(-1)); + + ok(map1.ReverseLookup(2) == 1, "Expected map1.ReverseLookup(2) is 1, was %d\n", map1.ReverseLookup(2)); + ok(map1.ReverseLookup(3) == 2, "Expected map1.ReverseLookup(3) is 2, was %d\n", map1.ReverseLookup(3)); + + ok(map1.GetKeyAt(0) == 1, "Expected map1.GetKeyAt(0) is 1, was %d\n", map1.GetKeyAt(0)); + ok(map1.GetKeyAt(1) == 2, "Expected map1.GetKeyAt(1) is 2, was %d\n", map1.GetKeyAt(1)); + + ok(map1.GetValueAt(0) == 2, "Expected map1.GetValueAt(0) is 2, was %d\n", map1.GetValueAt(0)); + ok(map1.GetValueAt(1) == 3, "Expected map1.GetValueAt(1) is 3, was %d\n", map1.GetValueAt(1)); + + map1.SetAt(2, 4); + + ok(map1.Lookup(1) == 2, "Expected map1.Lookup(1) is 2, was %d\n", map1.Lookup(1)); + ok(map1.Lookup(2) == 4, "Expected map1.Lookup(2) is 4, was %d\n", map1.Lookup(2)); + + ok(map1.ReverseLookup(2) == 1, "Expected map1.ReverseLookup(2) is 1, was %d\n", map1.ReverseLookup(2)); + ok(map1.ReverseLookup(4) == 2, "Expected map1.ReverseLookup(4) is 2, was %d\n", map1.ReverseLookup(4)); + + map1.Remove(1); + ok(map1.GetSize() == 1, "Expected map1's size is 1, was %d\n", map1.GetSize()); + map1.Remove(2); + ok(map1.GetSize() == 0, "Expected map1's size is 0, was %d\n", map1.GetSize()); + + map1.Add(1, 4); + ok(map1.GetSize() == 1, "Expected map1's size is 1, was %d\n", map1.GetSize()); + map1.Add(2, 8); + ok(map1.GetSize() == 2, "Expected map1's size is 2, was %d\n", map1.GetSize()); + map1.Add(3, 12); + ok(map1.GetSize() == 3, "Expected map1's size is 3, was %d\n", map1.GetSize()); + + map1.RemoveAll(); + ok(map1.GetSize() == 0, "Expected map1's size is 0, was %d\n", map1.GetSize()); + + ok(CMonster::s_nCount == 0, "Expected CMonster::s_nCount is 0, was %d\n", CMonster::s_nCount); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + + CSimpleMap<CMonster, CMonster> map2; + ok(map2.GetSize() == 0, "Expected map2's size is zero, was %d\n", map2.GetSize()); + + ok(CMonster::s_nCount == 0, "Expected CMonster::s_nCount is 0, was %d\n", CMonster::s_nCount); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + + { + CMonster m1; + ok(CMonster::s_nCount == 1, "Expected CMonster::s_nCount is 1, was %d\n", CMonster::s_nCount); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + + CMonster m2; + ok(CMonster::s_nCount == 2, "Expected CMonster::s_nCount is 2, was %d\n", CMonster::s_nCount); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + + map2.Add(m1, m2); + ok(CMonster::s_nCount == 4, "Expected CMonster::s_nCount is 4, was %d\n", CMonster::s_nCount); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + } + + ok(map2.GetSize() == 1, "Expected map2's size is 1, was %d\n", map2.GetSize()); + ok(CMonster::s_nCount == 2, "Expected CMonster::s_nCount is 2, was %d\n", CMonster::s_nCount); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + + { + CMonster m1; + ok(CMonster::s_nCount == 3, "Expected CMonster::s_nCount is 3, was %d\n", CMonster::s_nCount); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + + CMonster m2; + ok(CMonster::s_nCount == 4, "Expected CMonster::s_nCount is 4, was %d\n", CMonster::s_nCount); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + + map2.Add(m1, m2); + ok(CMonster::s_nCount == 6, "Expected CMonster::s_nCount is 6, was %d\n", CMonster::s_nCount); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + } + + ok(map2.GetSize() == 2, "Expected map2's size is 2, was %d\n", map2.GetSize()); + ok(CMonster::s_nCount == 4, "Expected CMonster::s_nCount is 4, was %d\n", CMonster::s_nCount); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + + map2.RemoveAt(0); + ok(CMonster::s_nCount == 2, "Expected CMonster::s_nCount is 2, was %d\n", CMonster::s_nCount); + ok(map2.GetSize() == 1, "Expected map2's size is 1, was %d\n", map2.GetSize()); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + + map2.RemoveAt(0); + ok(CMonster::s_nCount == 0, "Expected CMonster::s_nCount is 0, was %d\n", CMonster::s_nCount); + ok(map2.GetSize() == 0, "Expected map2's size is 0, was %d\n", map2.GetSize()); + ok(CMonster::s_nCopyCount == 0, "Expected CMonster::s_nCopyCount is 0, was %d\n", CMonster::s_nCopyCount); + + CSimpleMap<int, CMonster> map3; + ok(map3.GetSize() == 0, "Expected map3's size is 0, was %d\n", map3.GetSize()); + + CMonster m3; + ok(CMonster::s_nCount == 1, "Expected CMonster::s_nCount is 1, was %d\n", CMonster::s_nCount); + + map3.Add(1, m3); + ok(map3.GetSize() == 1, "Expected map3's size is 1, was %d\n", map3.GetSize()); + ok(CMonster::s_nCount == 2, "Expected CMonster::s_nCount is 2, was %d\n", CMonster::s_nCount); + + map3.Add(2, m3); + ok(map3.GetSize() == 2, "Expected map3's size is 2, was %d\n", map3.GetSize()); + ok(CMonster::s_nCount == 3, "Expected CMonster::s_nCount is 3, was %d\n", CMonster::s_nCount); + + map3.Add(3, m3); + ok(map3.GetSize() == 3, "Expected map3's size is 3, was %d\n", map3.GetSize()); + ok(CMonster::s_nCount == 4, "Expected CMonster::s_nCount is 4, was %d\n", CMonster::s_nCount); + + map3.Remove(2); + ok(map3.GetSize() == 2, "Expected map3's size is 2, was %d\n", map3.GetSize()); + ok(CMonster::s_nCount == 3, "Expected CMonster::s_nCount is 3, was %d\n", CMonster::s_nCount); + + map3.RemoveAll(); + ok(map3.GetSize() == 0, "Expected map3's size is 0, was %d\n", map3.GetSize()); + ok(CMonster::s_nCount == 1, "Expected CMonster::s_nCount is 1, was %d\n", CMonster::s_nCount); + + map1.Add(1, 2); + ok(map1.GetSize() == 1, "Expected map1's size is 1, was %d\n", map1.GetSize()); + map1.Add(2, 3); + ok(map1.GetSize() == 2, "Expected map1's size is 2, was %d\n", map1.GetSize()); + + ok(!!map1.RemoveAt(0), "Expected RemoveAt(0) to succeed\n"); + ok(map1.GetSize() == 1, "Expected map1's size is 1, was %d\n", map1.GetSize()); + ok(!!map1.RemoveAt(0), "Expected RemoveAt(0) to succeed\n"); + ok(map1.GetSize() == 0, "Expected map1's size is 0, was %d\n", map1.GetSize()); + +#ifndef __REACTOS__ + printf("CSimpleMap: %i tests executed (0 marked as todo, %i failures), 0 skipped.\n", g_tests_executed, g_tests_failed); + return g_tests_failed; +#endif +} Propchange: trunk/rostests/apitests/atl/CSimpleMap.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/apitests/atl/devenv/ATLTest.sln URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/devenv/ATLTe…
============================================================================== --- trunk/rostests/apitests/atl/devenv/ATLTest.sln (added) +++ trunk/rostests/apitests/atl/devenv/ATLTest.sln [iso-8859-1] Thu Sep 15 19:41:03 2016 @@ -0,0 +1,48 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CImage", "CImage.vcxproj", "{AE520E17-2DAE-40FF-B082-F32A7A935FB2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSimpleArray", "CSimpleArray.vcxproj", "{9F029341-87C2-4BFD-B1FC-D5F5B8D28D55}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CSimpleMap", "CSimpleMap.vcxproj", "{EC560DE6-6DB3-437D-85CA-582491FE6F95}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x64.ActiveCfg = Debug|x64 + {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x64.Build.0 = Debug|x64 + {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x86.ActiveCfg = Debug|Win32 + {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x86.Build.0 = Debug|Win32 + {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x64.ActiveCfg = Release|x64 + {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x64.Build.0 = Release|x64 + {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x86.ActiveCfg = Release|Win32 + {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x86.Build.0 = Release|Win32 + {9F029341-87C2-4BFD-B1FC-D5F5B8D28D55}.Debug|x64.ActiveCfg = Debug|x64 + {9F029341-87C2-4BFD-B1FC-D5F5B8D28D55}.Debug|x64.Build.0 = Debug|x64 + {9F029341-87C2-4BFD-B1FC-D5F5B8D28D55}.Debug|x86.ActiveCfg = Debug|Win32 + {9F029341-87C2-4BFD-B1FC-D5F5B8D28D55}.Debug|x86.Build.0 = Debug|Win32 + {9F029341-87C2-4BFD-B1FC-D5F5B8D28D55}.Release|x64.ActiveCfg = Release|x64 + {9F029341-87C2-4BFD-B1FC-D5F5B8D28D55}.Release|x64.Build.0 = Release|x64 + {9F029341-87C2-4BFD-B1FC-D5F5B8D28D55}.Release|x86.ActiveCfg = Release|Win32 + {9F029341-87C2-4BFD-B1FC-D5F5B8D28D55}.Release|x86.Build.0 = Release|Win32 + {EC560DE6-6DB3-437D-85CA-582491FE6F95}.Debug|x64.ActiveCfg = Debug|x64 + {EC560DE6-6DB3-437D-85CA-582491FE6F95}.Debug|x64.Build.0 = Debug|x64 + {EC560DE6-6DB3-437D-85CA-582491FE6F95}.Debug|x86.ActiveCfg = Debug|Win32 + {EC560DE6-6DB3-437D-85CA-582491FE6F95}.Debug|x86.Build.0 = Debug|Win32 + {EC560DE6-6DB3-437D-85CA-582491FE6F95}.Release|x64.ActiveCfg = Release|x64 + {EC560DE6-6DB3-437D-85CA-582491FE6F95}.Release|x64.Build.0 = Release|x64 + {EC560DE6-6DB3-437D-85CA-582491FE6F95}.Release|x86.ActiveCfg = Release|Win32 + {EC560DE6-6DB3-437D-85CA-582491FE6F95}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Propchange: trunk/rostests/apitests/atl/devenv/ATLTest.sln ------------------------------------------------------------------------------ svn:eol-style = CRLF Removed: trunk/rostests/apitests/atl/devenv/CImage.sln URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/devenv/CImag…
============================================================================== --- trunk/rostests/apitests/atl/devenv/CImage.sln [iso-8859-1] (original) +++ trunk/rostests/apitests/atl/devenv/CImage.sln (removed) @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CImage", "CImage.vcxproj", "{AE520E17-2DAE-40FF-B082-F32A7A935FB2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x64.ActiveCfg = Debug|x64 - {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x64.Build.0 = Debug|x64 - {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x86.ActiveCfg = Debug|Win32 - {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x86.Build.0 = Debug|Win32 - {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x64.ActiveCfg = Release|x64 - {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x64.Build.0 = Release|x64 - {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x86.ActiveCfg = Release|Win32 - {AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal Modified: trunk/rostests/apitests/atl/devenv/CImage.vcxproj URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/devenv/CImag…
============================================================================== --- trunk/rostests/apitests/atl/devenv/CImage.vcxproj [iso-8859-1] (original) +++ trunk/rostests/apitests/atl/devenv/CImage.vcxproj [iso-8859-1] Thu Sep 15 19:41:03 2016 @@ -27,7 +27,7 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v140</PlatformToolset> + <PlatformToolset>v120_xp</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> @@ -39,13 +39,13 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v140</PlatformToolset> <CharacterSet>Unicode</CharacterSet> + <PlatformToolset>v120_xp</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v140</PlatformToolset> + <PlatformToolset>v120_xp</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> Added: trunk/rostests/apitests/atl/devenv/CSimpleArray.vcxproj URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/devenv/CSimp…
============================================================================== --- trunk/rostests/apitests/atl/devenv/CSimpleArray.vcxproj (added) +++ trunk/rostests/apitests/atl/devenv/CSimpleArray.vcxproj [iso-8859-1] Thu Sep 15 19:41:03 2016 @@ -0,0 +1,180 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="
http://schemas.microsoft.com/developer/msbuild/2003
"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{9F029341-87C2-4BFD-B1FC-D5F5B8D28D55}</ProjectGuid> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + <Keyword>AtlProj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v120_xp</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v120_xp</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v120_xp</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v120_xp</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <IgnoreImportLibrary>true</IgnoreImportLibrary> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <IgnoreImportLibrary>true</IgnoreImportLibrary> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <IgnoreImportLibrary>true</IgnoreImportLibrary> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <IgnoreImportLibrary>true</IgnoreImportLibrary> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <ResourceCompile> + <Culture>0x0409</Culture> + <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <RegisterOutput>true</RegisterOutput> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <ResourceCompile> + <Culture>0x0409</Culture> + <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <RegisterOutput>true</RegisterOutput> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <ResourceCompile> + <Culture>0x0409</Culture> + <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <RegisterOutput>true</RegisterOutput> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <ResourceCompile> + <Culture>0x0409</Culture> + <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <RegisterOutput>true</RegisterOutput> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="../CSimpleArray.cpp"> + <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MultiThreaded</RuntimeLibrary> + <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MultiThreaded</RuntimeLibrary> + <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MultiThreadedDebug</RuntimeLibrary> + <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader> + </ClCompile> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> Propchange: trunk/rostests/apitests/atl/devenv/CSimpleArray.vcxproj ------------------------------------------------------------------------------ svn:eol-style = CRLF Added: trunk/rostests/apitests/atl/devenv/CSimpleMap.vcxproj URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/devenv/CSimp…
============================================================================== --- trunk/rostests/apitests/atl/devenv/CSimpleMap.vcxproj (added) +++ trunk/rostests/apitests/atl/devenv/CSimpleMap.vcxproj [iso-8859-1] Thu Sep 15 19:41:03 2016 @@ -0,0 +1,180 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="
http://schemas.microsoft.com/developer/msbuild/2003
"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{EC560DE6-6DB3-437D-85CA-582491FE6F95}</ProjectGuid> + <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> + <Keyword>AtlProj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v120_xp</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v120_xp</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v120_xp</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v120_xp</PlatformToolset> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <IgnoreImportLibrary>true</IgnoreImportLibrary> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <IgnoreImportLibrary>true</IgnoreImportLibrary> + <LinkIncremental>true</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <IgnoreImportLibrary>true</IgnoreImportLibrary> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <IgnoreImportLibrary>true</IgnoreImportLibrary> + <LinkIncremental>false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <ResourceCompile> + <Culture>0x0409</Culture> + <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <RegisterOutput>true</RegisterOutput> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <ResourceCompile> + <Culture>0x0409</Culture> + <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <RegisterOutput>true</RegisterOutput> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <ResourceCompile> + <Culture>0x0409</Culture> + <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <RegisterOutput>true</RegisterOutput> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + </ClCompile> + <ResourceCompile> + <Culture>0x0409</Culture> + <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + </ResourceCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <RegisterOutput>true</RegisterOutput> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="../CSimpleMap.cpp"> + <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MultiThreaded</RuntimeLibrary> + <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MultiThreaded</RuntimeLibrary> + <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MultiThreadedDebug</RuntimeLibrary> + <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader> + </ClCompile> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> Propchange: trunk/rostests/apitests/atl/devenv/CSimpleMap.vcxproj ------------------------------------------------------------------------------ svn:eol-style = CRLF Modified: trunk/rostests/apitests/atl/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/atl/testlist.c?r…
============================================================================== --- trunk/rostests/apitests/atl/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/atl/testlist.c [iso-8859-1] Thu Sep 15 19:41:03 2016 @@ -6,6 +6,8 @@ extern void func_CComHeapPtr(void); extern void func_CImage(void); extern void func_CRegKey(void); +extern void func_CSimpleArray(void); +extern void func_CSimpleMap(void); extern void func_CString(void); const struct test winetest_testlist[] = @@ -15,6 +17,8 @@ { "CComHeapPtr", func_CComHeapPtr }, { "CImage", func_CImage }, { "CRegKey", func_CRegKey }, + { "CSimpleArray", func_CSimpleArray }, + { "CSimpleMap", func_CSimpleMap }, { "CString", func_CString }, { 0, 0 } };
8 years, 3 months
1
0
0
0
[dchapyshev] 72687: [RTL] Add missed IN/OUT/OPTIONAL/PAGED_CODE_RTL
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Thu Sep 15 19:35:59 2016 New Revision: 72687 URL:
http://svn.reactos.org/svn/reactos?rev=72687&view=rev
Log: [RTL] Add missed IN/OUT/OPTIONAL/PAGED_CODE_RTL Modified: trunk/reactos/sdk/lib/rtl/nls.c Modified: trunk/reactos/sdk/lib/rtl/nls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/rtl/nls.c?rev=7268…
============================================================================== --- trunk/reactos/sdk/lib/rtl/nls.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/rtl/nls.c [iso-8859-1] Thu Sep 15 19:35:59 2016 @@ -43,14 +43,16 @@ */ NTSTATUS NTAPI RtlCustomCPToUnicodeN(IN PCPTABLEINFO CustomCP, - PWCHAR UnicodeString, - ULONG UnicodeSize, - PULONG ResultSize, - PCHAR CustomString, - ULONG CustomSize) + OUT PWCHAR UnicodeString, + IN ULONG UnicodeSize, + OUT PULONG ResultSize OPTIONAL, + IN PCHAR CustomString, + IN ULONG CustomSize) { ULONG Size = 0; ULONG i; + + PAGED_CODE_RTL(); if (CustomCP->DBCSCodePage == 0) { @@ -88,6 +90,8 @@ { USHORT Offset; + PAGED_CODE_RTL(); + if (Source < L'A') return Source; @@ -127,6 +131,8 @@ RtlGetDefaultCodePage(OUT PUSHORT AnsiCodePage, OUT PUSHORT OemCodePage) { + PAGED_CODE_RTL(); + *AnsiCodePage = NlsAnsiCodePage; *OemCodePage = NlsOemCodePage; } @@ -139,6 +145,8 @@ OUT PCPTABLEINFO CodePageTable) { PNLS_FILE_HEADER NlsFileHeader; + + PAGED_CODE_RTL(); DPRINT("RtlInitCodePageTable() called\n"); @@ -191,6 +199,8 @@ IN PUSHORT CaseTableBase, OUT PNLSTABLEINFO NlsTable) { + PAGED_CODE_RTL(); + DPRINT("RtlInitNlsTables()called\n"); if (AnsiTableBase && OemTableBase && CaseTableBase) @@ -300,9 +310,9 @@ */ NTSTATUS NTAPI -RtlMultiByteToUnicodeSize(PULONG UnicodeSize, - PCSTR MbString, - ULONG MbSize) +RtlMultiByteToUnicodeSize(OUT PULONG UnicodeSize, + IN PCSTR MbString, + IN ULONG MbSize) { ULONG Length = 0; @@ -348,14 +358,16 @@ * @unimplemented */ NTSTATUS NTAPI -RtlOemToUnicodeN(PWCHAR UnicodeString, - ULONG UnicodeSize, - PULONG ResultSize, - PCCH OemString, - ULONG OemSize) +RtlOemToUnicodeN(OUT PWCHAR UnicodeString, + IN ULONG UnicodeSize, + OUT PULONG ResultSize OPTIONAL, + IN PCCH OemString, + IN ULONG OemSize) { ULONG Size = 0; ULONG i; + + PAGED_CODE_RTL(); if (NlsMbOemCodePageTag == FALSE) { @@ -420,6 +432,8 @@ VOID NTAPI RtlResetRtlTranslations(IN PNLSTABLEINFO NlsTable) { + PAGED_CODE_RTL(); + DPRINT("RtlResetRtlTranslations() called\n"); /* Set ANSI data */ @@ -454,14 +468,16 @@ */ NTSTATUS NTAPI RtlUnicodeToCustomCPN(IN PCPTABLEINFO CustomCP, - PCHAR CustomString, - ULONG CustomSize, - PULONG ResultSize, - PWCHAR UnicodeString, - ULONG UnicodeSize) + OUT PCHAR CustomString, + IN ULONG CustomSize, + OUT PULONG ResultSize OPTIONAL, + IN PWCHAR UnicodeString, + IN ULONG UnicodeSize) { ULONG Size = 0; ULONG i; + + PAGED_CODE_RTL(); if (CustomCP->DBCSCodePage == 0) { @@ -495,11 +511,11 @@ * @unimplemented */ NTSTATUS NTAPI -RtlUnicodeToMultiByteN(PCHAR MbString, - ULONG MbSize, - PULONG ResultSize, - PCWCH UnicodeString, - ULONG UnicodeSize) +RtlUnicodeToMultiByteN(OUT PCHAR MbString, + IN ULONG MbSize, + OUT PULONG ResultSize OPTIONAL, + IN PCWCH UnicodeString, + IN ULONG UnicodeSize) { ULONG Size = 0; ULONG i; @@ -569,13 +585,15 @@ */ NTSTATUS NTAPI -RtlUnicodeToMultiByteSize(PULONG MbSize, - PCWCH UnicodeString, - ULONG UnicodeSize) +RtlUnicodeToMultiByteSize(OUT PULONG MbSize, + IN PCWCH UnicodeString, + IN ULONG UnicodeSize) { ULONG UnicodeLength = UnicodeSize / sizeof(WCHAR); ULONG MbLength = 0; + PAGED_CODE_RTL(); + if (!NlsMbCodePageTag) { /* single-byte code page */ @@ -611,14 +629,16 @@ * @unimplemented */ NTSTATUS NTAPI -RtlUnicodeToOemN(PCHAR OemString, - ULONG OemSize, - PULONG ResultSize, - PCWCH UnicodeString, - ULONG UnicodeSize) +RtlUnicodeToOemN(OUT PCHAR OemString, + IN ULONG OemSize, + OUT PULONG ResultSize OPTIONAL, + IN PCWCH UnicodeString, + IN ULONG UnicodeSize) { ULONG Size = 0; ULONG i; + + PAGED_CODE_RTL(); if (NlsMbOemCodePageTag == FALSE) { @@ -687,6 +707,8 @@ RtlUpcaseUnicodeChar(IN WCHAR Source) { USHORT Offset; + + PAGED_CODE_RTL(); if (Source < 'a') return Source; @@ -721,6 +743,8 @@ ULONG Size = 0; ULONG i; + PAGED_CODE_RTL(); + if (!CustomCP->DBCSCodePage) { /* single-byte code page */ @@ -754,15 +778,17 @@ * @unimplemented */ NTSTATUS NTAPI -RtlUpcaseUnicodeToMultiByteN(PCHAR MbString, - ULONG MbSize, - PULONG ResultSize, - PCWCH UnicodeString, - ULONG UnicodeSize) +RtlUpcaseUnicodeToMultiByteN(OUT PCHAR MbString, + IN ULONG MbSize, + OUT PULONG ResultSize OPTIONAL, + IN PCWCH UnicodeString, + IN ULONG UnicodeSize) { WCHAR UpcaseChar; ULONG Size = 0; ULONG i; + + PAGED_CODE_RTL(); if (NlsMbCodePageTag == FALSE) { @@ -797,15 +823,17 @@ * @unimplemented */ NTSTATUS NTAPI -RtlUpcaseUnicodeToOemN(PCHAR OemString, - ULONG OemSize, - PULONG ResultSize, - PCWCH UnicodeString, - ULONG UnicodeSize) +RtlUpcaseUnicodeToOemN(OUT PCHAR OemString, + IN ULONG OemSize, + OUT PULONG ResultSize OPTIONAL, + IN PCWCH UnicodeString, + IN ULONG UnicodeSize) { WCHAR UpcaseChar; ULONG Size = 0; ULONG i; + + PAGED_CODE_RTL(); ASSERT(NlsUnicodeToOemTable != NULL); @@ -879,6 +907,8 @@ WCHAR Unicode; CHAR Destination; + PAGED_CODE_RTL(); + /* Check for simple ANSI case */ if (Source <= 'z') {
8 years, 3 months
1
0
0
0
[dchapyshev] 72686: [RTL] Formatting only
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Thu Sep 15 19:17:47 2016 New Revision: 72686 URL:
http://svn.reactos.org/svn/reactos?rev=72686&view=rev
Log: [RTL] Formatting only Modified: trunk/reactos/sdk/lib/rtl/nls.c Modified: trunk/reactos/sdk/lib/rtl/nls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/rtl/nls.c?rev=7268…
============================================================================== --- trunk/reactos/sdk/lib/rtl/nls.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/rtl/nls.c [iso-8859-1] Thu Sep 15 19:17:47 2016 @@ -49,78 +49,76 @@ PCHAR CustomString, ULONG CustomSize) { - ULONG Size = 0; - ULONG i; - - if (CustomCP->DBCSCodePage == 0) - { - /* single-byte code page */ - if (CustomSize > (UnicodeSize / sizeof(WCHAR))) - Size = UnicodeSize / sizeof(WCHAR); - else - Size = CustomSize; - - if (ResultSize != NULL) - *ResultSize = Size * sizeof(WCHAR); - - for (i = 0; i < Size; i++) - { - *UnicodeString = CustomCP->MultiByteTable[(UCHAR)*CustomString]; - UnicodeString++; - CustomString++; - } - } - else - { - /* multi-byte code page */ - /* FIXME */ - ASSERT(FALSE); - } - - return(STATUS_SUCCESS); -} - - - + ULONG Size = 0; + ULONG i; + + if (CustomCP->DBCSCodePage == 0) + { + /* single-byte code page */ + if (CustomSize > (UnicodeSize / sizeof(WCHAR))) + Size = UnicodeSize / sizeof(WCHAR); + else + Size = CustomSize; + + if (ResultSize != NULL) + *ResultSize = Size * sizeof(WCHAR); + + for (i = 0; i < Size; i++) + { + *UnicodeString = CustomCP->MultiByteTable[(UCHAR)*CustomString]; + UnicodeString++; + CustomString++; + } + } + else + { + /* multi-byte code page */ + /* FIXME */ + ASSERT(FALSE); + } + + return STATUS_SUCCESS; +} + +/* + * @implemented + */ WCHAR NTAPI -RtlDowncaseUnicodeChar (IN WCHAR Source) -{ - USHORT Offset; - - if (Source < L'A') - return Source; - - if (Source <= L'Z') - return Source + (L'a' - L'A'); - - if (Source < 0x80) - return Source; - - Offset = ((USHORT)Source >> 8); - DPRINT("Offset: %hx\n", Offset); - - Offset = NlsUnicodeLowercaseTable[Offset]; - DPRINT("Offset: %hx\n", Offset); - - Offset += (((USHORT)Source & 0x00F0) >> 4); - DPRINT("Offset: %hx\n", Offset); - - Offset = NlsUnicodeLowercaseTable[Offset]; - DPRINT("Offset: %hx\n", Offset); - - Offset += ((USHORT)Source & 0x000F); - DPRINT("Offset: %hx\n", Offset); - - Offset = NlsUnicodeLowercaseTable[Offset]; - DPRINT("Offset: %hx\n", Offset); - - DPRINT("Result: %hx\n", Source + (SHORT)Offset); - - return Source + (SHORT)Offset; -} - - - +RtlDowncaseUnicodeChar(IN WCHAR Source) +{ + USHORT Offset; + + if (Source < L'A') + return Source; + + if (Source <= L'Z') + return Source + (L'a' - L'A'); + + if (Source < 0x80) + return Source; + + Offset = ((USHORT)Source >> 8); + DPRINT("Offset: %hx\n", Offset); + + Offset = NlsUnicodeLowercaseTable[Offset]; + DPRINT("Offset: %hx\n", Offset); + + Offset += (((USHORT)Source & 0x00F0) >> 4); + DPRINT("Offset: %hx\n", Offset); + + Offset = NlsUnicodeLowercaseTable[Offset]; + DPRINT("Offset: %hx\n", Offset); + + Offset += ((USHORT)Source & 0x000F); + DPRINT("Offset: %hx\n", Offset); + + Offset = NlsUnicodeLowercaseTable[Offset]; + DPRINT("Offset: %hx\n", Offset); + + DPRINT("Result: %hx\n", Source + (SHORT)Offset); + + return Source + (SHORT)Offset; +} /* * @implemented @@ -129,12 +127,9 @@ RtlGetDefaultCodePage(OUT PUSHORT AnsiCodePage, OUT PUSHORT OemCodePage) { - *AnsiCodePage = NlsAnsiCodePage; - *OemCodePage = NlsOemCodePage; -} - - - + *AnsiCodePage = NlsAnsiCodePage; + *OemCodePage = NlsOemCodePage; +} /* * @implemented @@ -143,52 +138,49 @@ RtlInitCodePageTable(IN PUSHORT TableBase, OUT PCPTABLEINFO CodePageTable) { - PNLS_FILE_HEADER NlsFileHeader; - - DPRINT("RtlInitCodePageTable() called\n"); - - NlsFileHeader = (PNLS_FILE_HEADER)TableBase; - - /* Copy header fields first */ - CodePageTable->CodePage = NlsFileHeader->CodePage; - CodePageTable->MaximumCharacterSize = NlsFileHeader->MaximumCharacterSize; - CodePageTable->DefaultChar = NlsFileHeader->DefaultChar; - CodePageTable->UniDefaultChar = NlsFileHeader->UniDefaultChar; - CodePageTable->TransDefaultChar = NlsFileHeader->TransDefaultChar; - CodePageTable->TransUniDefaultChar = NlsFileHeader->TransUniDefaultChar; - - RtlCopyMemory(&CodePageTable->LeadByte, - &NlsFileHeader->LeadByte, - MAXIMUM_LEADBYTES); - - /* Offset to wide char table is after the header */ - CodePageTable->WideCharTable = TableBase + NlsFileHeader->HeaderSize + 1 + - TableBase[NlsFileHeader->HeaderSize]; - - /* Then multibyte table (256 wchars) follows */ - CodePageTable->MultiByteTable = TableBase + NlsFileHeader->HeaderSize + 1; - - /* Check the presence of glyph table (256 wchars) */ - if (!CodePageTable->MultiByteTable[256]) - CodePageTable->DBCSRanges = CodePageTable->MultiByteTable + 256 + 1; - else - CodePageTable->DBCSRanges = CodePageTable->MultiByteTable + 256 + 1 + 256; - - /* Is this double-byte code page? */ - if (*CodePageTable->DBCSRanges) - { - CodePageTable->DBCSCodePage = 1; - CodePageTable->DBCSOffsets = CodePageTable->DBCSRanges + 1; - } - else - { - CodePageTable->DBCSCodePage = 0; - CodePageTable->DBCSOffsets = NULL; - } -} - - - + PNLS_FILE_HEADER NlsFileHeader; + + DPRINT("RtlInitCodePageTable() called\n"); + + NlsFileHeader = (PNLS_FILE_HEADER)TableBase; + + /* Copy header fields first */ + CodePageTable->CodePage = NlsFileHeader->CodePage; + CodePageTable->MaximumCharacterSize = NlsFileHeader->MaximumCharacterSize; + CodePageTable->DefaultChar = NlsFileHeader->DefaultChar; + CodePageTable->UniDefaultChar = NlsFileHeader->UniDefaultChar; + CodePageTable->TransDefaultChar = NlsFileHeader->TransDefaultChar; + CodePageTable->TransUniDefaultChar = NlsFileHeader->TransUniDefaultChar; + + RtlCopyMemory(&CodePageTable->LeadByte, + &NlsFileHeader->LeadByte, + MAXIMUM_LEADBYTES); + + /* Offset to wide char table is after the header */ + CodePageTable->WideCharTable = + TableBase + NlsFileHeader->HeaderSize + 1 + TableBase[NlsFileHeader->HeaderSize]; + + /* Then multibyte table (256 wchars) follows */ + CodePageTable->MultiByteTable = TableBase + NlsFileHeader->HeaderSize + 1; + + /* Check the presence of glyph table (256 wchars) */ + if (!CodePageTable->MultiByteTable[256]) + CodePageTable->DBCSRanges = CodePageTable->MultiByteTable + 256 + 1; + else + CodePageTable->DBCSRanges = CodePageTable->MultiByteTable + 256 + 1 + 256; + + /* Is this double-byte code page? */ + if (*CodePageTable->DBCSRanges) + { + CodePageTable->DBCSCodePage = 1; + CodePageTable->DBCSOffsets = CodePageTable->DBCSRanges + 1; + } + else + { + CodePageTable->DBCSCodePage = 0; + CodePageTable->DBCSOffsets = NULL; + } +} /* * @implemented @@ -199,103 +191,97 @@ IN PUSHORT CaseTableBase, OUT PNLSTABLEINFO NlsTable) { - DPRINT("RtlInitNlsTables()called\n"); - - if (AnsiTableBase == NULL || - OemTableBase == NULL || - CaseTableBase == NULL) - return; - - RtlInitCodePageTable(AnsiTableBase, &NlsTable->AnsiTableInfo); - - RtlInitCodePageTable(OemTableBase, &NlsTable->OemTableInfo); - - NlsTable->UpperCaseTable = (PUSHORT)CaseTableBase + 2; - NlsTable->LowerCaseTable = (PUSHORT)CaseTableBase + *((PUSHORT)CaseTableBase + 1) + 2; -} - + DPRINT("RtlInitNlsTables()called\n"); + + if (AnsiTableBase && OemTableBase && CaseTableBase) + { + RtlInitCodePageTable(AnsiTableBase, &NlsTable->AnsiTableInfo); + + RtlInitCodePageTable(OemTableBase, &NlsTable->OemTableInfo); + + NlsTable->UpperCaseTable = (PUSHORT)CaseTableBase + 2; + NlsTable->LowerCaseTable = (PUSHORT)CaseTableBase + *((PUSHORT)CaseTableBase + 1) + 2; + } +} /* * @unimplemented */ NTSTATUS NTAPI -RtlMultiByteToUnicodeN( - OUT PWCHAR UnicodeString, - IN ULONG UnicodeSize, - OUT PULONG ResultSize, - IN PCSTR MbString, - IN ULONG MbSize) -{ - ULONG Size = 0; - ULONG i; - - PAGED_CODE_RTL(); - - if (NlsMbCodePageTag == FALSE) - { - /* single-byte code page */ - if (MbSize > (UnicodeSize / sizeof(WCHAR))) - Size = UnicodeSize / sizeof(WCHAR); - else - Size = MbSize; - - if (ResultSize != NULL) - *ResultSize = Size * sizeof(WCHAR); - - for (i = 0; i < Size; i++) - UnicodeString[i] = NlsAnsiToUnicodeTable[(UCHAR)MbString[i]]; - } - else - { - /* multi-byte code page */ - /* FIXME */ - - UCHAR Char; - USHORT LeadByteInfo; - PCSTR MbEnd = MbString + MbSize; - - for (i = 0; i < UnicodeSize / sizeof(WCHAR) && MbString < MbEnd; i++) - { - Char = *(PUCHAR)MbString++; - - if (Char < 0x80) - { - *UnicodeString++ = Char; - continue; - } - - LeadByteInfo = NlsLeadByteInfo[Char]; - - if (!LeadByteInfo) - { - *UnicodeString++ = NlsAnsiToUnicodeTable[Char]; - continue; - } - - if (MbString < MbEnd) - *UnicodeString++ = NlsLeadByteInfo[LeadByteInfo + *(PUCHAR)MbString++]; - } - - if (ResultSize != NULL) - *ResultSize = i * sizeof(WCHAR); - } - - return STATUS_SUCCESS; -} - +RtlMultiByteToUnicodeN(OUT PWCHAR UnicodeString, + IN ULONG UnicodeSize, + OUT PULONG ResultSize, + IN PCSTR MbString, + IN ULONG MbSize) +{ + ULONG Size = 0; + ULONG i; + + PAGED_CODE_RTL(); + + if (NlsMbCodePageTag == FALSE) + { + /* single-byte code page */ + if (MbSize > (UnicodeSize / sizeof(WCHAR))) + Size = UnicodeSize / sizeof(WCHAR); + else + Size = MbSize; + + if (ResultSize != NULL) + *ResultSize = Size * sizeof(WCHAR); + + for (i = 0; i < Size; i++) + UnicodeString[i] = NlsAnsiToUnicodeTable[(UCHAR)MbString[i]]; + } + else + { + /* multi-byte code page */ + /* FIXME */ + + UCHAR Char; + USHORT LeadByteInfo; + PCSTR MbEnd = MbString + MbSize; + + for (i = 0; i < UnicodeSize / sizeof(WCHAR) && MbString < MbEnd; i++) + { + Char = *(PUCHAR)MbString++; + + if (Char < 0x80) + { + *UnicodeString++ = Char; + continue; + } + + LeadByteInfo = NlsLeadByteInfo[Char]; + + if (!LeadByteInfo) + { + *UnicodeString++ = NlsAnsiToUnicodeTable[Char]; + continue; + } + + if (MbString < MbEnd) + *UnicodeString++ = NlsLeadByteInfo[LeadByteInfo + *(PUCHAR)MbString++]; + } + + if (ResultSize != NULL) + *ResultSize = i * sizeof(WCHAR); + } + + return STATUS_SUCCESS; +} /* * @unimplemented */ NTSTATUS NTAPI -RtlConsoleMultiByteToUnicodeN( - OUT PWCHAR UnicodeString, - IN ULONG UnicodeSize, - OUT PULONG ResultSize, - IN PCSTR MbString, - IN ULONG MbSize, - OUT PULONG Unknown) +RtlConsoleMultiByteToUnicodeN(OUT PWCHAR UnicodeString, + IN ULONG UnicodeSize, + OUT PULONG ResultSize, + IN PCSTR MbString, + IN ULONG MbSize, + OUT PULONG Unknown) { PAGED_CODE_RTL(); @@ -309,8 +295,6 @@ MbSize); } - - /* * @implemented */ @@ -360,79 +344,75 @@ return STATUS_SUCCESS; } - - /* * @unimplemented */ NTSTATUS NTAPI -RtlOemToUnicodeN (PWCHAR UnicodeString, - ULONG UnicodeSize, - PULONG ResultSize, - PCCH OemString, - ULONG OemSize) -{ - ULONG Size = 0; - ULONG i; - - if (NlsMbOemCodePageTag == FALSE) - { - /* single-byte code page */ - if (OemSize > (UnicodeSize / sizeof(WCHAR))) - Size = UnicodeSize / sizeof(WCHAR); - else - Size = OemSize; - - if (ResultSize != NULL) - *ResultSize = Size * sizeof(WCHAR); - - for (i = 0; i < Size; i++) - { - *UnicodeString = NlsOemToUnicodeTable[(UCHAR)*OemString]; - UnicodeString++; - OemString++; - } - } - else - { - /* multi-byte code page */ - /* FIXME */ - - UCHAR Char; - USHORT OemLeadByteInfo; - PCCH OemEnd = OemString + OemSize; - - for (i = 0; i < UnicodeSize / sizeof(WCHAR) && OemString < OemEnd; i++) - { - Char = *(PUCHAR)OemString++; - - if (Char < 0x80) - { - *UnicodeString++ = Char; - continue; - } - - OemLeadByteInfo = NlsOemLeadByteInfo[Char]; - - if (!OemLeadByteInfo) - { - *UnicodeString++ = NlsOemToUnicodeTable[Char]; - continue; - } - - if (OemString < OemEnd) - *UnicodeString++ = - NlsOemLeadByteInfo[OemLeadByteInfo + *(PUCHAR)OemString++]; - } - - if (ResultSize != NULL) - *ResultSize = i * sizeof(WCHAR); - } - - return STATUS_SUCCESS; -} - - +RtlOemToUnicodeN(PWCHAR UnicodeString, + ULONG UnicodeSize, + PULONG ResultSize, + PCCH OemString, + ULONG OemSize) +{ + ULONG Size = 0; + ULONG i; + + if (NlsMbOemCodePageTag == FALSE) + { + /* single-byte code page */ + if (OemSize > (UnicodeSize / sizeof(WCHAR))) + Size = UnicodeSize / sizeof(WCHAR); + else + Size = OemSize; + + if (ResultSize != NULL) + *ResultSize = Size * sizeof(WCHAR); + + for (i = 0; i < Size; i++) + { + *UnicodeString = NlsOemToUnicodeTable[(UCHAR)*OemString]; + UnicodeString++; + OemString++; + } + } + else + { + /* multi-byte code page */ + /* FIXME */ + + UCHAR Char; + USHORT OemLeadByteInfo; + PCCH OemEnd = OemString + OemSize; + + for (i = 0; i < UnicodeSize / sizeof(WCHAR) && OemString < OemEnd; i++) + { + Char = *(PUCHAR)OemString++; + + if (Char < 0x80) + { + *UnicodeString++ = Char; + continue; + } + + OemLeadByteInfo = NlsOemLeadByteInfo[Char]; + + if (!OemLeadByteInfo) + { + *UnicodeString++ = NlsOemToUnicodeTable[Char]; + continue; + } + + if (OemString < OemEnd) + *UnicodeString++ = + NlsOemLeadByteInfo[OemLeadByteInfo + *(PUCHAR)OemString++]; + } + + if (ResultSize != NULL) + *ResultSize = i * sizeof(WCHAR); + } + + return STATUS_SUCCESS; +} /* * @implemented @@ -440,36 +420,34 @@ VOID NTAPI RtlResetRtlTranslations(IN PNLSTABLEINFO NlsTable) { - DPRINT("RtlResetRtlTranslations() called\n"); - - /* Set ANSI data */ - NlsAnsiToUnicodeTable = (PUSHORT)NlsTable->AnsiTableInfo.MultiByteTable; - NlsUnicodeToAnsiTable = NlsTable->AnsiTableInfo.WideCharTable; - NlsUnicodeToMbAnsiTable = (PUSHORT)NlsTable->AnsiTableInfo.WideCharTable; - NlsMbCodePageTag = (NlsTable->AnsiTableInfo.DBCSCodePage != 0); - NlsLeadByteInfo = NlsTable->AnsiTableInfo.DBCSOffsets; - NlsAnsiCodePage = NlsTable->AnsiTableInfo.CodePage; - DPRINT("Ansi codepage %hu\n", NlsAnsiCodePage); - - /* Set OEM data */ - NlsOemToUnicodeTable = (PUSHORT)NlsTable->OemTableInfo.MultiByteTable; - NlsUnicodeToOemTable = NlsTable->OemTableInfo.WideCharTable; - NlsUnicodeToMbOemTable = (PUSHORT)NlsTable->OemTableInfo.WideCharTable; - NlsMbOemCodePageTag = (NlsTable->OemTableInfo.DBCSCodePage != 0); - NlsOemLeadByteInfo = NlsTable->OemTableInfo.DBCSOffsets; - NlsOemCodePage = NlsTable->OemTableInfo.CodePage; - DPRINT("Oem codepage %hu\n", NlsOemCodePage); - - /* Set Unicode case map data */ - NlsUnicodeUpcaseTable = NlsTable->UpperCaseTable; - NlsUnicodeLowercaseTable = NlsTable->LowerCaseTable; - - /* set the default characters for RtlpDidUnicodeToOemWork */ - NlsOemDefaultChar = NlsTable->OemTableInfo.DefaultChar; - NlsUnicodeDefaultChar = NlsTable->OemTableInfo.TransDefaultChar; -} - - + DPRINT("RtlResetRtlTranslations() called\n"); + + /* Set ANSI data */ + NlsAnsiToUnicodeTable = (PUSHORT)NlsTable->AnsiTableInfo.MultiByteTable; + NlsUnicodeToAnsiTable = NlsTable->AnsiTableInfo.WideCharTable; + NlsUnicodeToMbAnsiTable = (PUSHORT)NlsTable->AnsiTableInfo.WideCharTable; + NlsMbCodePageTag = (NlsTable->AnsiTableInfo.DBCSCodePage != 0); + NlsLeadByteInfo = NlsTable->AnsiTableInfo.DBCSOffsets; + NlsAnsiCodePage = NlsTable->AnsiTableInfo.CodePage; + DPRINT("Ansi codepage %hu\n", NlsAnsiCodePage); + + /* Set OEM data */ + NlsOemToUnicodeTable = (PUSHORT)NlsTable->OemTableInfo.MultiByteTable; + NlsUnicodeToOemTable = NlsTable->OemTableInfo.WideCharTable; + NlsUnicodeToMbOemTable = (PUSHORT)NlsTable->OemTableInfo.WideCharTable; + NlsMbOemCodePageTag = (NlsTable->OemTableInfo.DBCSCodePage != 0); + NlsOemLeadByteInfo = NlsTable->OemTableInfo.DBCSOffsets; + NlsOemCodePage = NlsTable->OemTableInfo.CodePage; + DPRINT("Oem codepage %hu\n", NlsOemCodePage); + + /* Set Unicode case map data */ + NlsUnicodeUpcaseTable = NlsTable->UpperCaseTable; + NlsUnicodeLowercaseTable = NlsTable->LowerCaseTable; + + /* set the default characters for RtlpDidUnicodeToOemWork */ + NlsOemDefaultChar = NlsTable->OemTableInfo.DefaultChar; + NlsUnicodeDefaultChar = NlsTable->OemTableInfo.TransDefaultChar; +} /* * @unimplemented @@ -482,111 +460,108 @@ PWCHAR UnicodeString, ULONG UnicodeSize) { - ULONG Size = 0; - ULONG i; - - if (CustomCP->DBCSCodePage == 0) - { - /* single-byte code page */ - if (UnicodeSize > (CustomSize * sizeof(WCHAR))) - Size = CustomSize; - else - Size = UnicodeSize / sizeof(WCHAR); - - if (ResultSize != NULL) - *ResultSize = Size; - - for (i = 0; i < Size; i++) - { - *CustomString = ((PCHAR)CustomCP->WideCharTable)[*UnicodeString]; - CustomString++; - UnicodeString++; - } - } - else - { - /* multi-byte code page */ - /* FIXME */ - ASSERT(FALSE); - } - - return STATUS_SUCCESS; -} - - + ULONG Size = 0; + ULONG i; + + if (CustomCP->DBCSCodePage == 0) + { + /* single-byte code page */ + if (UnicodeSize > (CustomSize * sizeof(WCHAR))) + Size = CustomSize; + else + Size = UnicodeSize / sizeof(WCHAR); + + if (ResultSize != NULL) + *ResultSize = Size; + + for (i = 0; i < Size; i++) + { + *CustomString = ((PCHAR)CustomCP->WideCharTable)[*UnicodeString]; + CustomString++; + UnicodeString++; + } + } + else + { + /* multi-byte code page */ + /* FIXME */ + ASSERT(FALSE); + } + + return STATUS_SUCCESS; +} /* * @unimplemented */ NTSTATUS NTAPI -RtlUnicodeToMultiByteN (PCHAR MbString, - ULONG MbSize, - PULONG ResultSize, - PCWCH UnicodeString, - ULONG UnicodeSize) -{ - ULONG Size = 0; - ULONG i; - - PAGED_CODE_RTL(); - - if (NlsMbCodePageTag == FALSE) - { - /* single-byte code page */ - Size = (UnicodeSize > (MbSize * sizeof (WCHAR))) - ? MbSize - : (UnicodeSize / sizeof (WCHAR)); - - if (ResultSize != NULL) - { - *ResultSize = Size; - } - - for (i = 0; i < Size; i++) - { - *MbString++ = NlsUnicodeToAnsiTable[*UnicodeString++]; - } - } - else - { - /* multi-byte code page */ - /* FIXME */ - - USHORT WideChar; - USHORT MbChar; - - for (i = MbSize, Size = UnicodeSize / sizeof(WCHAR); i && Size; i--, Size--) - { - WideChar = *UnicodeString++; - - if (WideChar < 0x80) - { - *MbString++ = LOBYTE(WideChar); - continue; - } - - MbChar = NlsUnicodeToMbAnsiTable[WideChar]; - - if (!HIBYTE(MbChar)) - { - *MbString++ = LOBYTE(MbChar); - continue; - } - - if (i >= 2) - { - *MbString++ = HIBYTE(MbChar); - *MbString++ = LOBYTE(MbChar); - i--; - } - else break; - } - - if (ResultSize != NULL) - *ResultSize = MbSize - i; - } - - return STATUS_SUCCESS; +RtlUnicodeToMultiByteN(PCHAR MbString, + ULONG MbSize, + PULONG ResultSize, + PCWCH UnicodeString, + ULONG UnicodeSize) +{ + ULONG Size = 0; + ULONG i; + + PAGED_CODE_RTL(); + + if (NlsMbCodePageTag == FALSE) + { + /* single-byte code page */ + Size = (UnicodeSize > (MbSize * sizeof (WCHAR))) + ? MbSize : (UnicodeSize / sizeof (WCHAR)); + + if (ResultSize != NULL) + { + *ResultSize = Size; + } + + for (i = 0; i < Size; i++) + { + *MbString++ = NlsUnicodeToAnsiTable[*UnicodeString++]; + } + } + else + { + /* multi-byte code page */ + /* FIXME */ + + USHORT WideChar; + USHORT MbChar; + + for (i = MbSize, Size = UnicodeSize / sizeof(WCHAR); i && Size; i--, Size--) + { + WideChar = *UnicodeString++; + + if (WideChar < 0x80) + { + *MbString++ = LOBYTE(WideChar); + continue; + } + + MbChar = NlsUnicodeToMbAnsiTable[WideChar]; + + if (!HIBYTE(MbChar)) + { + *MbString++ = LOBYTE(MbChar); + continue; + } + + if (i >= 2) + { + *MbString++ = HIBYTE(MbChar); + *MbString++ = LOBYTE(MbChar); + i--; + } + else break; + } + + if (ResultSize != NULL) + *ResultSize = MbSize - i; + } + + return STATUS_SUCCESS; } /* @@ -636,77 +611,74 @@ * @unimplemented */ NTSTATUS NTAPI -RtlUnicodeToOemN (PCHAR OemString, - ULONG OemSize, - PULONG ResultSize, - PCWCH UnicodeString, - ULONG UnicodeSize) -{ - ULONG Size = 0; - ULONG i; - - if (NlsMbOemCodePageTag == FALSE) - { - /* single-byte code page */ - if (UnicodeSize > (OemSize * sizeof(WCHAR))) - Size = OemSize; - else - Size = UnicodeSize / sizeof(WCHAR); - - if (ResultSize != NULL) - *ResultSize = Size; - - for (i = 0; i < Size; i++) - { - *OemString = NlsUnicodeToOemTable[*UnicodeString]; - OemString++; - UnicodeString++; - } - } - else - { - /* multi-byte code page */ - /* FIXME */ - - USHORT WideChar; - USHORT OemChar; - - for (i = OemSize, Size = UnicodeSize / sizeof(WCHAR); i && Size; i--, Size--) - { - WideChar = *UnicodeString++; - - if (WideChar < 0x80) - { - *OemString++ = LOBYTE(WideChar); - continue; - } - - OemChar = NlsUnicodeToMbOemTable[WideChar]; - - if (!HIBYTE(OemChar)) - { - *OemString++ = LOBYTE(OemChar); - continue; - } - - if (i >= 2) - { - *OemString++ = HIBYTE(OemChar); - *OemString++ = LOBYTE(OemChar); - i--; - } - else break; - } - - if (ResultSize != NULL) - *ResultSize = OemSize - i; - } - - return STATUS_SUCCESS; -} - - - +RtlUnicodeToOemN(PCHAR OemString, + ULONG OemSize, + PULONG ResultSize, + PCWCH UnicodeString, + ULONG UnicodeSize) +{ + ULONG Size = 0; + ULONG i; + + if (NlsMbOemCodePageTag == FALSE) + { + /* single-byte code page */ + if (UnicodeSize > (OemSize * sizeof(WCHAR))) + Size = OemSize; + else + Size = UnicodeSize / sizeof(WCHAR); + + if (ResultSize != NULL) + *ResultSize = Size; + + for (i = 0; i < Size; i++) + { + *OemString = NlsUnicodeToOemTable[*UnicodeString]; + OemString++; + UnicodeString++; + } + } + else + { + /* multi-byte code page */ + /* FIXME */ + + USHORT WideChar; + USHORT OemChar; + + for (i = OemSize, Size = UnicodeSize / sizeof(WCHAR); i && Size; i--, Size--) + { + WideChar = *UnicodeString++; + + if (WideChar < 0x80) + { + *OemString++ = LOBYTE(WideChar); + continue; + } + + OemChar = NlsUnicodeToMbOemTable[WideChar]; + + if (!HIBYTE(OemChar)) + { + *OemString++ = LOBYTE(OemChar); + continue; + } + + if (i >= 2) + { + *OemString++ = HIBYTE(OemChar); + *OemString++ = LOBYTE(OemChar); + i--; + } + else break; + } + + if (ResultSize != NULL) + *ResultSize = OemSize - i; + } + + return STATUS_SUCCESS; +} /* * @implemented @@ -714,222 +686,216 @@ WCHAR NTAPI RtlUpcaseUnicodeChar(IN WCHAR Source) { - USHORT Offset; - - if (Source < 'a') - return Source; - - if (Source <= 'z') - return (Source - ('a' - 'A')); - - Offset = ((USHORT)Source >> 8) & 0xFF; - Offset = NlsUnicodeUpcaseTable[Offset]; - - Offset += ((USHORT)Source >> 4) & 0xF; - Offset = NlsUnicodeUpcaseTable[Offset]; - - Offset += ((USHORT)Source & 0xF); - Offset = NlsUnicodeUpcaseTable[Offset]; - - return Source + (SHORT)Offset; -} - - + USHORT Offset; + + if (Source < 'a') + return Source; + + if (Source <= 'z') + return (Source - ('a' - 'A')); + + Offset = ((USHORT)Source >> 8) & 0xFF; + Offset = NlsUnicodeUpcaseTable[Offset]; + + Offset += ((USHORT)Source >> 4) & 0xF; + Offset = NlsUnicodeUpcaseTable[Offset]; + + Offset += ((USHORT)Source & 0xF); + Offset = NlsUnicodeUpcaseTable[Offset]; + + return Source + (SHORT)Offset; +} + +/* + * @implemented + */ +NTSTATUS NTAPI +RtlUpcaseUnicodeToCustomCPN(IN PCPTABLEINFO CustomCP, + OUT PCHAR CustomString, + IN ULONG CustomSize, + OUT PULONG ResultSize OPTIONAL, + IN PWCHAR UnicodeString, + IN ULONG UnicodeSize) +{ + WCHAR UpcaseChar; + ULONG Size = 0; + ULONG i; + + if (!CustomCP->DBCSCodePage) + { + /* single-byte code page */ + if (UnicodeSize > (CustomSize * sizeof(WCHAR))) + Size = CustomSize; + else + Size = UnicodeSize / sizeof(WCHAR); + + if (ResultSize) + *ResultSize = Size; + + for (i = 0; i < Size; i++) + { + UpcaseChar = RtlUpcaseUnicodeChar(*UnicodeString); + *CustomString = ((PCHAR)CustomCP->WideCharTable)[UpcaseChar]; + ++CustomString; + ++UnicodeString; + } + } + else + { + /* multi-byte code page */ + /* FIXME */ + ASSERT(FALSE); + } + + return STATUS_SUCCESS; +} /* * @unimplemented */ NTSTATUS NTAPI -RtlUpcaseUnicodeToCustomCPN (IN PCPTABLEINFO CustomCP, - PCHAR CustomString, - ULONG CustomSize, +RtlUpcaseUnicodeToMultiByteN(PCHAR MbString, + ULONG MbSize, PULONG ResultSize, - PWCHAR UnicodeString, + PCWCH UnicodeString, ULONG UnicodeSize) { - WCHAR UpcaseChar; - ULONG Size = 0; - ULONG i; - - if (CustomCP->DBCSCodePage == 0) - { - /* single-byte code page */ - if (UnicodeSize > (CustomSize * sizeof(WCHAR))) - Size = CustomSize; - else - Size = UnicodeSize / sizeof(WCHAR); - - if (ResultSize != NULL) - *ResultSize = Size; - - for (i = 0; i < Size; i++) - { - UpcaseChar = RtlUpcaseUnicodeChar(*UnicodeString); - *CustomString = ((PCHAR)CustomCP->WideCharTable)[UpcaseChar]; - CustomString++; - UnicodeString++; - } - } - else - { - /* multi-byte code page */ - /* FIXME */ - ASSERT(FALSE); - } - - return STATUS_SUCCESS; -} - + WCHAR UpcaseChar; + ULONG Size = 0; + ULONG i; + + if (NlsMbCodePageTag == FALSE) + { + /* single-byte code page */ + if (UnicodeSize > (MbSize * sizeof(WCHAR))) + Size = MbSize; + else + Size = UnicodeSize / sizeof(WCHAR); + + if (ResultSize != NULL) + *ResultSize = Size; + + for (i = 0; i < Size; i++) + { + UpcaseChar = RtlUpcaseUnicodeChar(*UnicodeString); + *MbString = NlsUnicodeToAnsiTable[UpcaseChar]; + MbString++; + UnicodeString++; + } + } + else + { + /* multi-byte code page */ + /* FIXME */ + ASSERT(FALSE); + } + + return STATUS_SUCCESS; +} /* * @unimplemented */ NTSTATUS NTAPI -RtlUpcaseUnicodeToMultiByteN (PCHAR MbString, - ULONG MbSize, - PULONG ResultSize, - PCWCH UnicodeString, - ULONG UnicodeSize) -{ - WCHAR UpcaseChar; - ULONG Size = 0; - ULONG i; - - if (NlsMbCodePageTag == FALSE) - { - /* single-byte code page */ - if (UnicodeSize > (MbSize * sizeof(WCHAR))) - Size = MbSize; - else - Size = UnicodeSize / sizeof(WCHAR); - - if (ResultSize != NULL) - *ResultSize = Size; - - for (i = 0; i < Size; i++) - { - UpcaseChar = RtlUpcaseUnicodeChar(*UnicodeString); - *MbString = NlsUnicodeToAnsiTable[UpcaseChar]; - MbString++; - UnicodeString++; - } - } - else - { - /* multi-byte code page */ - /* FIXME */ - ASSERT(FALSE); - } - - return STATUS_SUCCESS; -} - +RtlUpcaseUnicodeToOemN(PCHAR OemString, + ULONG OemSize, + PULONG ResultSize, + PCWCH UnicodeString, + ULONG UnicodeSize) +{ + WCHAR UpcaseChar; + ULONG Size = 0; + ULONG i; + + ASSERT(NlsUnicodeToOemTable != NULL); + + if (NlsMbOemCodePageTag == FALSE) + { + /* single-byte code page */ + if (UnicodeSize > (OemSize * sizeof(WCHAR))) + Size = OemSize; + else + Size = UnicodeSize / sizeof(WCHAR); + + if (ResultSize != NULL) + *ResultSize = Size; + + for (i = 0; i < Size; i++) + { + UpcaseChar = RtlUpcaseUnicodeChar(*UnicodeString); + *OemString = NlsUnicodeToOemTable[UpcaseChar]; + OemString++; + UnicodeString++; + } + } + else + { + /* multi-byte code page */ + /* FIXME */ + + USHORT WideChar; + USHORT OemChar; + + for (i = OemSize, Size = UnicodeSize / sizeof(WCHAR); i && Size; i--, Size--) + { + WideChar = RtlUpcaseUnicodeChar(*UnicodeString++); + + if (WideChar < 0x80) + { + *OemString++ = LOBYTE(WideChar); + continue; + } + + OemChar = NlsUnicodeToMbOemTable[WideChar]; + + if (!HIBYTE(OemChar)) + { + *OemString++ = LOBYTE(OemChar); + continue; + } + + if (i >= 2) + { + *OemString++ = HIBYTE(OemChar); + *OemString++ = LOBYTE(OemChar); + i--; + } + else break; + } + + if (ResultSize != NULL) + *ResultSize = OemSize - i; + } + + return STATUS_SUCCESS; +} /* * @unimplemented */ -NTSTATUS NTAPI -RtlUpcaseUnicodeToOemN (PCHAR OemString, - ULONG OemSize, - PULONG ResultSize, - PCWCH UnicodeString, - ULONG UnicodeSize) -{ - WCHAR UpcaseChar; - ULONG Size = 0; - ULONG i; - - ASSERT(NlsUnicodeToOemTable != NULL); - - if (NlsMbOemCodePageTag == FALSE) - { - /* single-byte code page */ - if (UnicodeSize > (OemSize * sizeof(WCHAR))) - Size = OemSize; - else - Size = UnicodeSize / sizeof(WCHAR); - - if (ResultSize != NULL) - *ResultSize = Size; - - for (i = 0; i < Size; i++) - { - UpcaseChar = RtlUpcaseUnicodeChar(*UnicodeString); - *OemString = NlsUnicodeToOemTable[UpcaseChar]; - OemString++; - UnicodeString++; - } - } - else - { - /* multi-byte code page */ - /* FIXME */ - - USHORT WideChar; - USHORT OemChar; - - for (i = OemSize, Size = UnicodeSize / sizeof(WCHAR); i && Size; i--, Size--) - { - WideChar = RtlUpcaseUnicodeChar(*UnicodeString++); - - if (WideChar < 0x80) - { - *OemString++ = LOBYTE(WideChar); - continue; - } - - OemChar = NlsUnicodeToMbOemTable[WideChar]; - - if (!HIBYTE(OemChar)) - { - *OemString++ = LOBYTE(OemChar); - continue; - } - - if (i >= 2) - { - *OemString++ = HIBYTE(OemChar); - *OemString++ = LOBYTE(OemChar); - i--; - } - else break; - } - - if (ResultSize != NULL) - *ResultSize = OemSize - i; - } - - return STATUS_SUCCESS; -} - - - -/* - * @unimplemented - */ CHAR NTAPI -RtlUpperChar (IN CHAR Source) -{ - WCHAR Unicode; - CHAR Destination; - - /* Check for simple ANSI case */ - if (Source <= 'z') - { - /* Check for simple downcase a-z case */ - if (Source >= 'a') - { - /* Just XOR with the difference */ - return Source ^ ('a' - 'A'); - } - else - { - /* Otherwise return the same char, it's already upcase */ - return Source; - } - } - else - { +RtlUpperChar(IN CHAR Source) +{ + WCHAR Unicode; + CHAR Destination; + + /* Check for simple ANSI case */ + if (Source <= 'z') + { + /* Check for simple downcase a-z case */ + if (Source >= 'a') + { + /* Just XOR with the difference */ + return Source ^ ('a' - 'A'); + } + else + { + /* Otherwise return the same char, it's already upcase */ + return Source; + } + } + else + { if (NlsMbCodePageTag == FALSE) { /* single-byte code page */ @@ -949,9 +915,9 @@ /* FIXME */ Destination = Source; } - } - - return Destination; + } + + return Destination; } /* EOF */
8 years, 3 months
1
0
0
0
[cwittich] 72685: [SHELL32] try to fix testman hang, by "breaking" CreateViewWindow2 again
by cwittich@svn.reactos.org
Author: cwittich Date: Thu Sep 15 16:12:50 2016 New Revision: 72685 URL:
http://svn.reactos.org/svn/reactos?rev=72685&view=rev
Log: [SHELL32] try to fix testman hang, by "breaking" CreateViewWindow2 again Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
============================================================================== --- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Thu Sep 15 16:12:50 2016 @@ -2518,9 +2518,12 @@ if (view_params->cbSize != sizeof(SV2CVW2_PARAMS)) return E_FAIL; - if (view_params->pvid != 0) - FIXME("SHELLVIEWID not handled\n"); - + if (view_params->pvid != NULL) + { + FIXME("SHELLVIEWID not handled, FAIL\n"); + return E_NOTIMPL; + } + view_params->hwndView = 0; TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n", this, view_params->psvPrev, view_params->pfs, view_params->psbOwner, view_params->prcView, view_params->hwndView);
8 years, 3 months
1
0
0
0
[cwittich] 72684: [SHELL32] halfplement CreateViewWindow2 (SHELLVIEWID not handled yet)
by cwittich@svn.reactos.org
Author: cwittich Date: Thu Sep 15 15:09:22 2016 New Revision: 72684 URL:
http://svn.reactos.org/svn/reactos?rev=72684&view=rev
Log: [SHELL32] halfplement CreateViewWindow2 (SHELLVIEWID not handled yet) Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
============================================================================== --- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Thu Sep 15 15:09:22 2016 @@ -2144,59 +2144,20 @@ HRESULT WINAPI CDefView::CreateViewWindow(IShellView *lpPrevView, LPCFOLDERSETTINGS lpfs, IShellBrowser *psb, RECT *prcView, HWND *phWnd) { - OLEMENUGROUPWIDTHS omw = { { 0, 0, 0, 0, 0, 0 } }; - - *phWnd = 0; - - TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n", this, lpPrevView, lpfs, psb, prcView, phWnd); - - if (lpfs != NULL) - TRACE("-- vmode=%x flags=%x\n", lpfs->ViewMode, lpfs->fFlags); - if (prcView != NULL) - TRACE("-- left=%i top=%i right=%i bottom=%i\n", prcView->left, prcView->top, prcView->right, prcView->bottom); - - /* Validate the Shell Browser */ - if (psb == NULL || m_hWnd) - return E_UNEXPECTED; - - /* Set up the member variables */ - m_pShellBrowser = psb; - m_FolderSettings = *lpfs; - - /* Get our parent window */ - m_pShellBrowser->GetWindow(&m_hWndParent); - - /* Try to get the ICommDlgBrowserInterface, adds a reference !!! */ - m_pCommDlgBrowser = NULL; - if (SUCCEEDED(m_pShellBrowser->QueryInterface(IID_PPV_ARG(ICommDlgBrowser, &m_pCommDlgBrowser)))) - { - TRACE("-- CommDlgBrowser\n"); - } - - Create(m_hWndParent, prcView, NULL, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP, 0, 0U); - if (m_hWnd == NULL) - return E_FAIL; - - *phWnd = m_hWnd; - - CheckToolbar(); - - if (!*phWnd) - return E_FAIL; - - SetWindowPos(HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); - UpdateWindow(); - - if (!m_hMenu) - { - m_hMenu = CreateMenu(); - m_pShellBrowser->InsertMenusSB(m_hMenu, &omw); - TRACE("-- after fnInsertMenusSB\n"); - } - - _MergeToolbar(); - - return S_OK; + SV2CVW2_PARAMS view_params; + HRESULT hr; + + view_params.cbSize = sizeof(view_params); + view_params.pfs = lpfs; + view_params.psvPrev = lpPrevView; + view_params.psbOwner = psb; + view_params.prcView = prcView; + view_params.pvid = NULL; + + hr = CreateViewWindow2(&view_params); + *phWnd = view_params.hwndView; + + return hr; } HRESULT WINAPI CDefView::DestroyViewWindow() @@ -2552,8 +2513,65 @@ HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow2(LPSV2CVW2_PARAMS view_params) { - FIXME("(%p)->(%p) stub\n", this, view_params); - return E_NOTIMPL; + OLEMENUGROUPWIDTHS omw = { { 0, 0, 0, 0, 0, 0 } }; + + if (view_params->cbSize != sizeof(SV2CVW2_PARAMS)) + return E_FAIL; + + if (view_params->pvid != 0) + FIXME("SHELLVIEWID not handled\n"); + + view_params->hwndView = 0; + + TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n", this, view_params->psvPrev, view_params->pfs, view_params->psbOwner, view_params->prcView, view_params->hwndView); + + if (view_params->pfs != NULL) + TRACE("-- vmode=%x flags=%x\n", view_params->pfs->ViewMode, view_params->pfs->fFlags); + if (view_params->prcView != NULL) + TRACE("-- left=%i top=%i right=%i bottom=%i\n", view_params->prcView->left, view_params->prcView->top, view_params->prcView->right, view_params->prcView->bottom); + + /* Validate the Shell Browser */ + if (view_params->psbOwner == NULL || m_hWnd) + return E_UNEXPECTED; + + /* Set up the member variables */ + m_pShellBrowser = view_params->psbOwner; + m_FolderSettings = *view_params->pfs; + + /* Get our parent window */ + m_pShellBrowser->GetWindow(&m_hWndParent); + + /* Try to get the ICommDlgBrowserInterface, adds a reference !!! */ + m_pCommDlgBrowser = NULL; + if (SUCCEEDED(m_pShellBrowser->QueryInterface(IID_PPV_ARG(ICommDlgBrowser, &m_pCommDlgBrowser)))) + { + TRACE("-- CommDlgBrowser\n"); + } + + Create(m_hWndParent, view_params->prcView, NULL, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP, 0, 0U); + if (m_hWnd == NULL) + return E_FAIL; + + view_params->hwndView = m_hWnd; + + CheckToolbar(); + + if (!view_params->hwndView) + return E_FAIL; + + SetWindowPos(HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); + UpdateWindow(); + + if (!m_hMenu) + { + m_hMenu = CreateMenu(); + m_pShellBrowser->InsertMenusSB(m_hMenu, &omw); + TRACE("-- after fnInsertMenusSB\n"); + } + + _MergeToolbar(); + + return S_OK; } HRESULT STDMETHODCALLTYPE CDefView::HandleRename(LPCITEMIDLIST new_pidl)
8 years, 3 months
1
0
0
0
[tfaber] 72683: [LIBUSB] - Correctly fail IRP_MN_START_DEVICE if PnpStart failed. Spotted by Vadim Galyant. CORE-11929 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Sep 15 13:37:26 2016 New Revision: 72683 URL:
http://svn.reactos.org/svn/reactos?rev=72683&view=rev
Log: [LIBUSB] - Correctly fail IRP_MN_START_DEVICE if PnpStart failed. Spotted by Vadim Galyant. CORE-11929 #resolve Modified: trunk/reactos/sdk/lib/drivers/libusb/hcd_controller.cpp Modified: trunk/reactos/sdk/lib/drivers/libusb/hcd_controller.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/libusb/hcd…
============================================================================== --- trunk/reactos/sdk/lib/drivers/libusb/hcd_controller.cpp [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/libusb/hcd_controller.cpp [iso-8859-1] Thu Sep 15 13:37:26 2016 @@ -417,10 +417,13 @@ Status = m_Hardware->PnpStart(RawResourceList, TranslatedResourceList); } - // - // enable symbolic link - // - Status = SetSymbolicLink(TRUE); + if (NT_SUCCESS(Status)) + { + // + // enable symbolic link + // + Status = SetSymbolicLink(TRUE); + } } DPRINT("[%s] HandlePnp IRP_MN_START FDO: Status %x\n", m_USBType ,Status);
8 years, 3 months
1
0
0
0
[tfaber] 72682: [NTOS:IO] - Avoid IRP allocation failure in IopDeleteFile and IopCloseFile. Based on a patch by Volodymyr Shcherbyna. CORE-11959
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Sep 15 13:25:20 2016 New Revision: 72682 URL:
http://svn.reactos.org/svn/reactos?rev=72682&view=rev
Log: [NTOS:IO] - Avoid IRP allocation failure in IopDeleteFile and IopCloseFile. Based on a patch by Volodymyr Shcherbyna. CORE-11959 Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/file.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] Thu Sep 15 13:25:20 2016 @@ -1283,8 +1283,7 @@ KeInitializeEvent(&Event, SynchronizationEvent, FALSE); /* Allocate an IRP */ - Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE); - if (!Irp) return; + Irp = IopAllocateIrpMustSucceed(DeviceObject->StackSize); /* Set it up */ Irp->UserEvent = &Event; @@ -1977,8 +1976,7 @@ KeInitializeEvent(&Event, SynchronizationEvent, FALSE); /* Allocate an IRP */ - Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE); - if (!Irp) return; + Irp = IopAllocateIrpMustSucceed(DeviceObject->StackSize); /* Set it up */ Irp->UserEvent = &Event;
8 years, 3 months
1
0
0
0
[tfaber] 72681: [FASTFAT] - Acquire DirResource before MainResource in DoQuery to keep locking order consistent and avoid deadlocks. Patch by Volodymyr Shcherbyna with small modification by me. COR...
by tfaber@svn.reactos.org
Author: tfaber Date: Thu Sep 15 13:12:02 2016 New Revision: 72681 URL:
http://svn.reactos.org/svn/reactos?rev=72681&view=rev
Log: [FASTFAT] - Acquire DirResource before MainResource in DoQuery to keep locking order consistent and avoid deadlocks. Patch by Volodymyr Shcherbyna with small modification by me. CORE-11959 CORE-11652 Modified: trunk/reactos/drivers/filesystems/fastfat/dir.c Modified: trunk/reactos/drivers/filesystems/fastfat/dir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] Thu Sep 15 13:12:02 2016 @@ -158,7 +158,7 @@ pInfo->AllocationSize.u.LowPart = ROUND_UP(DirContext->DirEntry.FatX.FileSize, DeviceExt->FatInfo.BytesPerCluster); } - + pInfo->FileAttributes = DirContext->DirEntry.FatX.Attrib & 0x3f; } else @@ -421,9 +421,20 @@ #endif Buffer = VfatGetUserBuffer(IrpContext->Irp, FALSE); + if (!ExAcquireResourceExclusiveLite(&IrpContext->DeviceExt->DirResource, + BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT))) + { + Status = VfatLockUserBuffer(IrpContext->Irp, BufferLength, IoWriteAccess); + if (NT_SUCCESS(Status)) + Status = STATUS_PENDING; + + return Status; + } + if (!ExAcquireResourceSharedLite(&pFcb->MainResource, BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT))) { + ExReleaseResourceLite(&IrpContext->DeviceExt->DirResource); Status = VfatLockUserBuffer(IrpContext->Irp, BufferLength, IoWriteAccess); if (NT_SUCCESS(Status)) Status = STATUS_PENDING; @@ -447,7 +458,7 @@ * -> The pattern length is not null * -> The pattern buffer is not null * Otherwise, we'll fall later and allocate a match all (*) pattern - */ + */ if (pSearchPattern && pSearchPattern->Length != 0 && pSearchPattern->Buffer != NULL) { @@ -461,6 +472,7 @@ if (!pCcb->SearchPattern.Buffer) { ExReleaseResourceLite(&pFcb->MainResource); + ExReleaseResourceLite(&IrpContext->DeviceExt->DirResource); return STATUS_INSUFFICIENT_RESOURCES; } RtlCopyUnicodeString(&pCcb->SearchPattern, pSearchPattern); @@ -477,6 +489,7 @@ if (!pCcb->SearchPattern.Buffer) { ExReleaseResourceLite(&pFcb->MainResource); + ExReleaseResourceLite(&IrpContext->DeviceExt->DirResource); return STATUS_INSUFFICIENT_RESOURCES; } pCcb->SearchPattern.Buffer[0] = L'*'; @@ -503,13 +516,6 @@ DirContext.LongNameU.MaximumLength = sizeof(LongNameBuffer); DirContext.ShortNameU.Buffer = ShortNameBuffer; DirContext.ShortNameU.MaximumLength = sizeof(ShortNameBuffer); - - if (!ExAcquireResourceExclusiveLite(&IrpContext->DeviceExt->DirResource, - BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT))) - { - ExReleaseResourceLite(&pFcb->MainResource); - return STATUS_PENDING; - } while ((Status == STATUS_SUCCESS) && (BufferLength > 0)) { @@ -586,8 +592,8 @@ IrpContext->Irp->IoStatus.Information = Stack->Parameters.QueryDirectory.Length - BufferLength; } + ExReleaseResourceLite(&pFcb->MainResource); ExReleaseResourceLite(&IrpContext->DeviceExt->DirResource); - ExReleaseResourceLite(&pFcb->MainResource); return Status; } @@ -600,7 +606,7 @@ Stack = IrpContext->Stack; pVcb = IrpContext->DeviceExt; pFcb = (PVFATFCB) IrpContext->FileObject->FsContext; - + FsRtlNotifyFullChangeDirectory(pVcb->NotifySync, &(pVcb->NotifyList), IrpContext->FileObject->FsContext2,
8 years, 3 months
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
35
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
Results per page:
10
25
50
100
200