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
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
July 2017
----- 2024 -----
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
213 discussions
Start a n
N
ew thread
[ashaposhnikov] 75324: [RAPPS] More code improvements - Replaced some functions with their Wide versions - Generalized `GetInstalledVersion` function so it could accept NULL - Minor cleanup
by ashaposhnikov@svn.reactos.org
Author: ashaposhnikov Date: Wed Jul 12 22:59:26 2017 New Revision: 75324 URL:
http://svn.reactos.org/svn/reactos?rev=75324&view=rev
Log: [RAPPS] More code improvements - Replaced some functions with their Wide versions - Generalized `GetInstalledVersion` function so it could accept NULL - Minor cleanup Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/crichedit.h branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/rapps.h branches/GSoC_2017/rapps/reactos/base/applications/rapps/settingsdlg.cpp Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp [iso-8859-1] Wed Jul 12 22:59:26 2017 @@ -42,43 +42,30 @@ } return TRUE; } - -//App is "installed" if the RegName or Name is in the registry -inline BOOL IsAppInstalledKey(PAPPLICATION_INFO Info, REGSAM key) -{ - return (!Info->szRegName.IsEmpty() - && (IsInstalledApplication(Info->szRegName, TRUE, key) - || IsInstalledApplication(Info->szRegName, FALSE, key))) - || (!Info->szName.IsEmpty() - && (IsInstalledApplication(Info->szName, TRUE, key) - || IsInstalledApplication(Info->szName, FALSE, key))); -} - - //Check both registry keys in 64bit system //TODO: check system type beforehand to avoid double checks? + +inline BOOL GetInstalledVersionEx(PAPPLICATION_INFO Info, ATL::CStringW* szVersion, REGSAM key) +{ + return (!Info->szRegName.IsEmpty() + && (GetInstalledVersion_WowUser(szVersion, Info->szRegName, TRUE, key) + || GetInstalledVersion_WowUser(szVersion, Info->szRegName, FALSE, key))) + || (!Info->szName.IsEmpty() + && (GetInstalledVersion_WowUser(szVersion, Info->szName, TRUE, key) + || GetInstalledVersion_WowUser(szVersion, Info->szName, FALSE, key))); +} + +inline BOOL GetInstalledVersion(PAPPLICATION_INFO Info, ATL::CStringW* szVersion) +{ + return GetInstalledVersionEx(Info, szVersion, KEY_WOW64_32KEY) + || GetInstalledVersionEx(Info, szVersion, KEY_WOW64_64KEY); +} + inline BOOL IsAppInstalled(PAPPLICATION_INFO Info) { - return IsAppInstalledKey(Info, KEY_WOW64_32KEY) - || IsAppInstalledKey(Info, KEY_WOW64_64KEY); -} - -//App is "installed" if the RegName or Name is in the registry -inline BOOL GetInstalledVersionWithKey(PAPPLICATION_INFO Info, ATL::CStringW& szVersion, REGSAM key) -{ - return (!Info->szRegName.IsEmpty() - && (InstalledVersion(szVersion, Info->szRegName, TRUE, key) - || InstalledVersion(szVersion, Info->szRegName, FALSE, key))) - || (!Info->szName.IsEmpty() - && (InstalledVersion(szVersion, Info->szName, TRUE, key) - || InstalledVersion(szVersion, Info->szName, FALSE, key))); -} - -inline BOOL GetInstalledVersion(PAPPLICATION_INFO Info, ATL::CStringW& szVersion) -{ - return GetInstalledVersionWithKey(Info, szVersion, KEY_WOW64_32KEY) - || GetInstalledVersionWithKey(Info, szVersion, KEY_WOW64_64KEY); -} + return GetInstalledVersion(Info, NULL); +} + LIST_ENTRY CachedEntriesHead = {&CachedEntriesHead, &CachedEntriesHead}; PLIST_ENTRY pCachedEntry = &CachedEntriesHead; @@ -90,7 +77,7 @@ ATL::CStringW szVersion; ATL::CStringW szLicense; BOOL bIsInstalled = IsAppInstalled(Info), - bHasVersion = GetInstalledVersion(Info, szVersion); + bHasVersion = GetInstalledVersion(Info, &szVersion); if (!Info) return FALSE; @@ -221,7 +208,6 @@ ATL::CStringW szAppsPath; ATL::CStringW szCabPath; PAPPLICATION_INFO Info; - if (!GetStorageDirectory(szPath)) return FALSE; @@ -301,7 +287,6 @@ InfoList.AddTail(Info); skip_if_cached: - if (Info->Category == FALSE) continue; @@ -349,10 +334,8 @@ { Info = InfoList.GetAt(InfoListPosition); InfoList.RemoveHead(); - - /* flush them down the toilet :D */ + InfoListPosition = InfoList.GetHeadPosition(); + delete Info; - - InfoListPosition = InfoList.GetHeadPosition(); } } Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/crichedit.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/crichedit.h [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/crichedit.h [iso-8859-1] Wed Jul 12 22:59:26 2017 @@ -22,7 +22,7 @@ public: VOID SetRangeFormatting(LONG Start, LONG End, DWORD dwEffects) { - CHARFORMAT2 CharFormat; + CHARFORMAT2W CharFormat; SendMessageW(EM_SETSEL, Start, End); Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1] Wed Jul 12 22:59:26 2017 @@ -37,12 +37,12 @@ { HICON hImage; - if (!(hImage = (HICON) LoadImage(hInst, - MAKEINTRESOURCE(ImageIndex), - IMAGE_ICON, - TOOLBAR_HEIGHT, - TOOLBAR_HEIGHT, - 0))) + if (!(hImage = (HICON) LoadImageW(hInst, + MAKEINTRESOURCE(ImageIndex), + IMAGE_ICON, + TOOLBAR_HEIGHT, + TOOLBAR_HEIGHT, + 0))) { /* TODO: Error message */ } @@ -266,7 +266,7 @@ INT CompareFunc(LPARAM lParam1, LPARAM lParam2, INT iSubItem) { ATL::CStringW Item1, Item2; - LVFINDINFO IndexInfo; + LVFINDINFOW IndexInfo; INT Index; IndexInfo.flags = LVFI_PARAM; @@ -366,7 +366,7 @@ public: VOID SetText(LPCWSTR lpszText) { - SendMessage(SB_SETTEXT, SBT_NOBORDERS, (LPARAM) lpszText); + SendMessageW(SB_SETTEXT, SBT_NOBORDERS, (LPARAM) lpszText); } HWND Create(HWND hwndParent) @@ -626,21 +626,31 @@ /* Size tool bar */ m_Toolbar->AutoSize(); - RECT r = {0, 0, LOWORD(lParam), HIWORD(lParam)}; - HDWP hdwp = NULL; - int count = m_ClientPanel->CountSizableChildren(); + hdwp = BeginDeferWindowPos(count); - if (hdwp) hdwp = m_ClientPanel->OnParentSize(r, hdwp); - if (hdwp) EndDeferWindowPos(hdwp); + if (hdwp) + { + hdwp = m_ClientPanel->OnParentSize(r, hdwp); + } + if (hdwp) + { + EndDeferWindowPos(hdwp); + } // TODO: Sub-layouts for children of children count = m_SearchBar->CountSizableChildren(); hdwp = BeginDeferWindowPos(count); - if (hdwp) hdwp = m_SearchBar->OnParentSize(r, hdwp); - if (hdwp) EndDeferWindowPos(hdwp); + if (hdwp) + { + hdwp = m_SearchBar->OnParentSize(r, hdwp); + } + if (hdwp) + { + EndDeferWindowPos(hdwp); + } } BOOL ProcessWindowMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT& theResult, DWORD dwMapId) @@ -781,10 +791,10 @@ EnableMenuItem(lvwMenu, ID_UNINSTALL, MF_ENABLED); EnableMenuItem(lvwMenu, ID_MODIFY, MF_ENABLED); - m_Toolbar->SendMessage(TB_ENABLEBUTTON, ID_REGREMOVE, TRUE); - m_Toolbar->SendMessage(TB_ENABLEBUTTON, ID_INSTALL, FALSE); - m_Toolbar->SendMessage(TB_ENABLEBUTTON, ID_UNINSTALL, TRUE); - m_Toolbar->SendMessage(TB_ENABLEBUTTON, ID_MODIFY, TRUE); + m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, TRUE); + m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, FALSE); + m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, TRUE); + m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, TRUE); } else { @@ -798,10 +808,10 @@ EnableMenuItem(lvwMenu, ID_UNINSTALL, MF_GRAYED); EnableMenuItem(lvwMenu, ID_MODIFY, MF_GRAYED); - m_Toolbar->SendMessage(TB_ENABLEBUTTON, ID_REGREMOVE, FALSE); - m_Toolbar->SendMessage(TB_ENABLEBUTTON, ID_INSTALL, TRUE); - m_Toolbar->SendMessage(TB_ENABLEBUTTON, ID_UNINSTALL, FALSE); - m_Toolbar->SendMessage(TB_ENABLEBUTTON, ID_MODIFY, FALSE); + m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_REGREMOVE, FALSE); + m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_INSTALL, TRUE); + m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_UNINSTALL, FALSE); + m_Toolbar->SendMessageW(TB_ENABLEBUTTON, ID_MODIFY, FALSE); } } break; @@ -905,10 +915,10 @@ case WM_SYSCOLORCHANGE: { /* Forward WM_SYSCOLORCHANGE to common controls */ - m_ListView->SendMessage(WM_SYSCOLORCHANGE, 0, 0); - m_TreeView->SendMessage(WM_SYSCOLORCHANGE, 0, 0); - m_Toolbar->SendMessage(WM_SYSCOLORCHANGE, 0, 0); - m_ListView->SendMessage(EM_SETBKGNDCOLOR, 0, GetSysColor(COLOR_BTNFACE)); + m_ListView->SendMessageW(WM_SYSCOLORCHANGE, 0, 0); + m_TreeView->SendMessageW(WM_SYSCOLORCHANGE, 0, 0); + m_Toolbar->SendMessageW(WM_SYSCOLORCHANGE, 0, 0); + m_ListView->SendMessageW(EM_SETBKGNDCOLOR, 0, GetSysColor(COLOR_BTNFACE)); } break; @@ -1028,7 +1038,7 @@ } DWORD dwDelay; - SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &dwDelay, 0); + SystemParametersInfoW(SPI_GETMENUSHOWDELAY, 0, &dwDelay, 0); SetTimer(SEARCH_TIMER_ID, dwDelay); } break; @@ -1186,7 +1196,7 @@ if (!hIcon) { /* Load default icon */ - hIcon = (HICON) LoadIcon(hInst, MAKEINTRESOURCEW(IDI_MAIN)); + hIcon = (HICON) LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN)); } Index = ImageList_AddIcon(hImageListView, hIcon); DestroyIcon(hIcon); @@ -1208,7 +1218,7 @@ ATL::CStringW szBuffer1, szBuffer2; HIMAGELIST hImageListView = NULL; - m_ListView->SendMessage(WM_SETREDRAW, FALSE, 0); + m_ListView->SendMessageW(WM_SETREDRAW, FALSE, 0); if (EnumType < 0) EnumType = SelectedEnumType; @@ -1244,7 +1254,7 @@ if (ListView_GetItemCount(hListView) > 0) ListView_SetColumnWidth(hListView, 0, LVSCW_AUTOSIZE); - SendMessage(hListView, WM_SETREDRAW, TRUE, 0); + SendMessageW(hListView, WM_SETREDRAW, TRUE, 0); } public: @@ -1253,12 +1263,20 @@ DWORD csStyle = CS_VREDRAW | CS_HREDRAW; static ATL::CWndClassInfo wc = { - { sizeof(WNDCLASSEX), csStyle, StartWindowProc, - 0, 0, NULL, - LoadIcon(_AtlBaseModule.GetModuleInstance(), MAKEINTRESOURCE(IDI_MAIN)), - LoadCursor(NULL, IDC_ARROW), - (HBRUSH) (COLOR_BTNFACE + 1), MAKEINTRESOURCE(IDR_MAINMENU), - L"RAppsWnd", NULL }, + { + sizeof(WNDCLASSEX), + csStyle, + StartWindowProc, + 0, + 0, + NULL, + LoadIconW(_AtlBaseModule.GetModuleInstance(), MAKEINTRESOURCEW(IDI_MAIN)), + LoadCursorW(NULL, IDC_ARROW), + (HBRUSH) (COLOR_BTNFACE + 1), + MAKEINTRESOURCEW(IDR_MAINMENU), + L"RAppsWnd", + NULL + }, NULL, NULL, IDC_ARROW, TRUE, 0, _T("") }; return wc; Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp [iso-8859-1] Wed Jul 12 22:59:26 2017 @@ -37,27 +37,10 @@ } BOOL -IsInstalledApplication(const ATL::CStringW &RegName, BOOL IsUserKey, REGSAM keyWow) -{ - HKEY hKey = NULL; - BOOL IsInstalled = FALSE; - ATL::CStringW szPath = L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + RegName; - - if (RegOpenKeyExW(IsUserKey ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE, - szPath, 0, keyWow | KEY_READ, - &hKey) == ERROR_SUCCESS) - { - IsInstalled = TRUE; - } - RegCloseKey(hKey); - return IsInstalled; -} - -BOOL -InstalledVersion(ATL::CStringW& szVersionResult, const ATL::CStringW& RegName, BOOL IsUserKey, REGSAM keyWow) +GetInstalledVersion_WowUser(_Out_opt_ ATL::CStringW* szVersionResult, _In_z_ const ATL::CStringW& RegName, _In_ BOOL IsUserKey, _In_ REGSAM keyWow) { HKEY hKey; - BOOL bHasVersion = FALSE; + BOOL bHasSucceded = FALSE; ATL::CStringW szVersion; ATL::CStringW szPath = L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + RegName; @@ -65,27 +48,36 @@ szPath.GetString(), 0, keyWow | KEY_READ, &hKey) == ERROR_SUCCESS) { - DWORD dwSize = MAX_PATH * sizeof(WCHAR); - DWORD dwType = REG_SZ; - if (RegQueryValueExW(hKey, - L"DisplayVersion", - NULL, - &dwType, - (LPBYTE) szVersion.GetBuffer(MAX_PATH), - &dwSize) == ERROR_SUCCESS) + if (szVersionResult) { - szVersion.ReleaseBuffer(); - szVersionResult = szVersion; - bHasVersion = TRUE; + DWORD dwSize = MAX_PATH * sizeof(WCHAR); + DWORD dwType = REG_SZ; + if (RegQueryValueExW(hKey, + L"DisplayVersion", + NULL, + &dwType, + (LPBYTE) szVersion.GetBuffer(MAX_PATH), + &dwSize) == ERROR_SUCCESS) + { + szVersion.ReleaseBuffer(); + *szVersionResult = szVersion; + bHasSucceded = TRUE; + } + else + { + szVersion.ReleaseBuffer(); + } } else { + bHasSucceded = TRUE; szVersion.ReleaseBuffer(); } + } RegCloseKey(hKey); - return bHasVersion; + return bHasSucceded; } Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/rapps.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/rapps.h [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/rapps.h [iso-8859-1] Wed Jul 12 22:59:26 2017 @@ -159,10 +159,9 @@ BOOL ShowInstalledAppInfo(INT Index); BOOL UninstallApplication(INT Index, BOOL bModify); -BOOL IsInstalledApplication(const ATL::CStringW& RegName, BOOL IsUserKey, REGSAM keyWow); VOID RemoveAppFromRegistry(INT Index); -BOOL InstalledVersion(ATL::CStringW& szVersionResult, const ATL::CStringW& RegName, BOOL IsUserKey, REGSAM keyWow); +BOOL GetInstalledVersion_WowUser(ATL::CStringW* szVersionResult, const ATL::CStringW& RegName, BOOL IsUserKey, REGSAM keyWow); /* winmain.cpp */ extern HWND hMainWnd; Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/settingsdlg.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/settingsdlg.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/settingsdlg.cpp [iso-8859-1] Wed Jul 12 22:59:26 2017 @@ -12,7 +12,7 @@ SETTINGS_INFO NewSettingsInfo; #define IS_CHECKED(a, b) \ - a = (SendDlgItemMessage(hDlg, b, BM_GETCHECK, 0, 0) == BST_CHECKED) ? TRUE : FALSE + a = (SendDlgItemMessageW(hDlg, b, BM_GETCHECK, 0, 0) == BST_CHECKED) ? TRUE : FALSE BOOL ChooseFolder(HWND hwnd) @@ -32,13 +32,13 @@ szBuf.Empty(); if (SUCCEEDED(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED))) { - LPITEMIDLIST lpItemList = SHBrowseForFolder(&bi); - if (lpItemList && SHGetPathFromIDList(lpItemList, szBuf.GetBuffer(MAX_PATH))) + LPITEMIDLIST lpItemList = SHBrowseForFolderW(&bi); + if (lpItemList && SHGetPathFromIDListW(lpItemList, szBuf.GetBuffer(MAX_PATH))) { szBuf.ReleaseBuffer(); if (!szBuf.IsEmpty()) { - SetDlgItemTextW(hwnd, IDC_DOWNLOAD_DIR_EDIT, szBuf.GetString()); + SetDlgItemTextW(hwnd, IDC_DOWNLOAD_DIR_EDIT, szBuf); bRet = TRUE; } } @@ -55,10 +55,10 @@ static VOID InitSettingsControls(HWND hDlg, PSETTINGS_INFO Info) { - SendDlgItemMessage(hDlg, IDC_SAVE_WINDOW_POS, BM_SETCHECK, Info->bSaveWndPos, 0); - SendDlgItemMessage(hDlg, IDC_UPDATE_AVLIST, BM_SETCHECK, Info->bUpdateAtStart, 0); - SendDlgItemMessage(hDlg, IDC_LOG_ENABLED, BM_SETCHECK, Info->bLogEnabled, 0); - SendDlgItemMessage(hDlg, IDC_DEL_AFTER_INSTALL, BM_SETCHECK, Info->bDelInstaller, 0); + SendDlgItemMessageW(hDlg, IDC_SAVE_WINDOW_POS, BM_SETCHECK, Info->bSaveWndPos, 0); + SendDlgItemMessageW(hDlg, IDC_UPDATE_AVLIST, BM_SETCHECK, Info->bUpdateAtStart, 0); + SendDlgItemMessageW(hDlg, IDC_LOG_ENABLED, BM_SETCHECK, Info->bLogEnabled, 0); + SendDlgItemMessageW(hDlg, IDC_DEL_AFTER_INSTALL, BM_SETCHECK, Info->bDelInstaller, 0); SetWindowTextW(GetDlgItem(hDlg, IDC_DOWNLOAD_DIR_EDIT), Info->szDownloadDir);
7 years, 3 months
1
0
0
0
[hbelusca] 75323: Sync with trunk r75322.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Jul 12 22:39:36 2017 New Revision: 75323 URL:
http://svn.reactos.org/svn/reactos?rev=75323&view=rev
Log: Sync with trunk r75322. Added: branches/setup_improvements/dll/appcompat/apphelp/shimeng.h - copied unchanged from r75322, trunk/reactos/dll/appcompat/apphelp/shimeng.h branches/setup_improvements/sdk/lib/drivers/copysup/ - copied from r75322, trunk/reactos/sdk/lib/drivers/copysup/ branches/setup_improvements/win32ss/gdi/gdi32/wine/path.c - copied unchanged from r75322, trunk/reactos/win32ss/gdi/gdi32/wine/path.c Removed: branches/setup_improvements/dll/win32/netapi32/ds.c Modified: branches/setup_improvements/ (props changed) branches/setup_improvements/base/applications/network/net/cmdUse.c branches/setup_improvements/base/applications/regedit/edit.c branches/setup_improvements/base/setup/usetup/muifonts.h branches/setup_improvements/base/setup/welcome/lang/bg-BG.rc branches/setup_improvements/base/setup/welcome/lang/cs-CZ.rc branches/setup_improvements/base/setup/welcome/lang/da-DK.rc branches/setup_improvements/base/setup/welcome/lang/de-DE.rc branches/setup_improvements/base/setup/welcome/lang/el-GR.rc branches/setup_improvements/base/setup/welcome/lang/en-US.rc branches/setup_improvements/base/setup/welcome/lang/es-ES.rc branches/setup_improvements/base/setup/welcome/lang/et-EE.rc branches/setup_improvements/base/setup/welcome/lang/fr-FR.rc branches/setup_improvements/base/setup/welcome/lang/he-IL.rc branches/setup_improvements/base/setup/welcome/lang/hu-HU.rc branches/setup_improvements/base/setup/welcome/lang/id-ID.rc branches/setup_improvements/base/setup/welcome/lang/it-IT.rc branches/setup_improvements/base/setup/welcome/lang/ja-JP.rc branches/setup_improvements/base/setup/welcome/lang/lt-LT.rc branches/setup_improvements/base/setup/welcome/lang/ms-MY.rc branches/setup_improvements/base/setup/welcome/lang/nl-NL.rc branches/setup_improvements/base/setup/welcome/lang/no-NO.rc branches/setup_improvements/base/setup/welcome/lang/pl-PL.rc branches/setup_improvements/base/setup/welcome/lang/pt-BR.rc branches/setup_improvements/base/setup/welcome/lang/ro-RO.rc branches/setup_improvements/base/setup/welcome/lang/ru-RU.rc branches/setup_improvements/base/setup/welcome/lang/sk-SK.rc branches/setup_improvements/base/setup/welcome/lang/sq-AL.rc branches/setup_improvements/base/setup/welcome/lang/sv-SE.rc branches/setup_improvements/base/setup/welcome/lang/th-TH.rc branches/setup_improvements/base/setup/welcome/lang/tr-TR.rc branches/setup_improvements/base/setup/welcome/lang/uk-UA.rc branches/setup_improvements/base/setup/welcome/lang/zh-CN.rc branches/setup_improvements/base/setup/welcome/lang/zh-TW.rc branches/setup_improvements/base/setup/welcome/resource.h branches/setup_improvements/base/setup/welcome/welcome.c branches/setup_improvements/base/setup/welcome/welcome.rc branches/setup_improvements/base/shell/explorer/resource.h branches/setup_improvements/base/shell/explorer/traywnd.cpp branches/setup_improvements/boot/bootdata/hivesft.inf branches/setup_improvements/boot/bootdata/hivesys.inf branches/setup_improvements/dll/appcompat/apphelp/CMakeLists.txt branches/setup_improvements/dll/appcompat/apphelp/apphelp.h branches/setup_improvements/dll/appcompat/apphelp/shimeng.c branches/setup_improvements/dll/shellext/acppage/CLayerUIPropPage.cpp branches/setup_improvements/dll/win32/mpr/wnet.c branches/setup_improvements/dll/win32/netapi32/CMakeLists.txt branches/setup_improvements/dll/win32/netapi32/dssetup.c branches/setup_improvements/dll/win32/netapi32/netapi32.spec branches/setup_improvements/dll/win32/netapi32/netlogon.c branches/setup_improvements/dll/win32/shell32/CDefView.cpp branches/setup_improvements/dll/win32/shell32/folders/CAdminToolsFolder.cpp branches/setup_improvements/dll/win32/shell32/folders/CControlPanelFolder.cpp branches/setup_improvements/dll/win32/shell32/folders/CDesktopFolder.cpp branches/setup_improvements/dll/win32/shell32/folders/CDrivesFolder.cpp branches/setup_improvements/dll/win32/shell32/folders/CFSFolder.cpp branches/setup_improvements/dll/win32/shell32/folders/CFontsFolder.cpp branches/setup_improvements/dll/win32/shell32/folders/CMyDocsFolder.cpp branches/setup_improvements/dll/win32/shell32/folders/CNetFolder.cpp branches/setup_improvements/dll/win32/shell32/folders/CPrinterFolder.cpp branches/setup_improvements/dll/win32/shell32/folders/CRecycleBin.cpp branches/setup_improvements/dll/win32/shell32/folders/CRegFolder.cpp branches/setup_improvements/dll/win32/shell32/shfldr.h branches/setup_improvements/dll/win32/shell32/shlfolder.cpp branches/setup_improvements/dll/win32/shell32/wine/shell32_main.h branches/setup_improvements/dll/win32/shell32/wine/shellord.c branches/setup_improvements/drivers/filesystems/nfs/CMakeLists.txt branches/setup_improvements/drivers/usb/usbhub_new/ioctl.c branches/setup_improvements/drivers/usb/usbhub_new/pnp.c branches/setup_improvements/drivers/usb/usbhub_new/usbhub.c branches/setup_improvements/drivers/usb/usbhub_new/usbhub.h branches/setup_improvements/drivers/usb/usbport/debug.c branches/setup_improvements/drivers/usb/usbport/iface.c branches/setup_improvements/drivers/usb/usbport/pnp.c branches/setup_improvements/drivers/usb/usbport/roothub.c branches/setup_improvements/drivers/usb/usbport/usbport.c branches/setup_improvements/drivers/usb/usbport/usbport.h branches/setup_improvements/media/inf/syssetup.inf branches/setup_improvements/sdk/include/ddk/buffring.h branches/setup_improvements/sdk/include/ddk/fcb.h branches/setup_improvements/sdk/include/ddk/mrx.h branches/setup_improvements/sdk/include/ddk/mrxfcb.h branches/setup_improvements/sdk/include/ddk/nodetype.h branches/setup_improvements/sdk/include/ddk/ntrxdef.h branches/setup_improvements/sdk/include/ddk/rxcontx.h branches/setup_improvements/sdk/include/ddk/rxprocs.h branches/setup_improvements/sdk/include/ddk/rxtimer.h branches/setup_improvements/sdk/include/ddk/scavengr.h branches/setup_improvements/sdk/include/psdk/dsgetdc.h branches/setup_improvements/sdk/include/psdk/usb200.h branches/setup_improvements/sdk/include/reactos/drivers/usbport/usbmport.h branches/setup_improvements/sdk/include/reactos/idl/netlogon.idl branches/setup_improvements/sdk/lib/drivers/CMakeLists.txt branches/setup_improvements/sdk/lib/drivers/rdbsslib/CMakeLists.txt branches/setup_improvements/sdk/lib/drivers/rdbsslib/rdbss.c branches/setup_improvements/sdk/lib/drivers/rxce/rxce.c branches/setup_improvements/win32ss/gdi/eng/gradient.c branches/setup_improvements/win32ss/gdi/gdi32/include/wine/gdi_driver.h branches/setup_improvements/win32ss/gdi/gdi32/misc/misc.c branches/setup_improvements/win32ss/gdi/gdi32/wine/CMakeLists.txt branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmetafile.c branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/bitblt.c branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/dc.c branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/enhmetafiledrv.h branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/graphics.c branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/init.c branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/objects.c branches/setup_improvements/win32ss/gdi/gdi32/wine/gdi_private.h branches/setup_improvements/win32ss/gdi/gdi32/wine/metafile.c branches/setup_improvements/win32ss/gdi/gdi32/wine/mfdrv/bitblt.c branches/setup_improvements/win32ss/gdi/gdi32/wine/mfdrv/init.c branches/setup_improvements/win32ss/gdi/gdi32/wine/mfdrv/objects.c branches/setup_improvements/win32ss/gdi/gdi32/wine/rosglue.c branches/setup_improvements/win32ss/gdi/ntgdi/dcutil.c branches/setup_improvements/win32ss/gdi/ntgdi/fillshap.c branches/setup_improvements/win32ss/gdi/ntgdi/freetype.c branches/setup_improvements/win32ss/gdi/ntgdi/line.c branches/setup_improvements/win32ss/printing/base/spoolss/monitors.c branches/setup_improvements/win32ss/printing/base/spoolss/ports.c branches/setup_improvements/win32ss/printing/base/spoolss/printers.c branches/setup_improvements/win32ss/printing/base/spoolsv/init.c branches/setup_improvements/win32ss/printing/base/spoolsv/jobs.c branches/setup_improvements/win32ss/printing/base/spoolsv/monitors.c branches/setup_improvements/win32ss/printing/base/spoolsv/ports.c branches/setup_improvements/win32ss/printing/base/spoolsv/printers.c branches/setup_improvements/win32ss/printing/base/spoolsv/printprocessors.c branches/setup_improvements/win32ss/printing/monitors/localmon/ports.c branches/setup_improvements/win32ss/printing/providers/localspl/jobs.c branches/setup_improvements/win32ss/printing/providers/localspl/main.c branches/setup_improvements/win32ss/printing/providers/localspl/monitors.c branches/setup_improvements/win32ss/printing/providers/localspl/ports.c branches/setup_improvements/win32ss/printing/providers/localspl/precomp.h branches/setup_improvements/win32ss/printing/providers/localspl/printerdata.c branches/setup_improvements/win32ss/printing/providers/localspl/printers.c branches/setup_improvements/win32ss/printing/providers/localspl/printingthread.c branches/setup_improvements/win32ss/printing/providers/localspl/printprocessors.c branches/setup_improvements/win32ss/reactx/dxg/ddraw.c branches/setup_improvements/win32ss/user/ntuser/windc.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/setup_improvements/base/applications/network/net/cmdUse.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/applica…
Modified: branches/setup_improvements/base/applications/regedit/edit.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/applica…
Modified: branches/setup_improvements/base/setup/usetup/muifonts.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
Modified: branches/setup_improvements/base/setup/welcome/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/da-DK.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/et-EE.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/he-IL.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/lt-LT.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/ms-MY.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/th-TH.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/lang/zh-TW.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/resource.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/welcome.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/setup/welcome/welcome.rc URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/w…
Modified: branches/setup_improvements/base/shell/explorer/resource.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/shell/e…
Modified: branches/setup_improvements/base/shell/explorer/traywnd.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/shell/e…
Modified: branches/setup_improvements/boot/bootdata/hivesft.inf URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/boot/bootdat…
Modified: branches/setup_improvements/boot/bootdata/hivesys.inf URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/boot/bootdat…
Modified: branches/setup_improvements/dll/appcompat/apphelp/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/appcompa…
Modified: branches/setup_improvements/dll/appcompat/apphelp/apphelp.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/appcompa…
Modified: branches/setup_improvements/dll/appcompat/apphelp/shimeng.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/appcompa…
Modified: branches/setup_improvements/dll/shellext/acppage/CLayerUIPropPage.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/shellext…
Modified: branches/setup_improvements/dll/win32/mpr/wnet.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/mp…
Modified: branches/setup_improvements/dll/win32/netapi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ne…
Removed: branches/setup_improvements/dll/win32/netapi32/ds.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ne…
Modified: branches/setup_improvements/dll/win32/netapi32/dssetup.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ne…
Modified: branches/setup_improvements/dll/win32/netapi32/netapi32.spec URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ne…
Modified: branches/setup_improvements/dll/win32/netapi32/netlogon.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/ne…
Modified: branches/setup_improvements/dll/win32/shell32/CDefView.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CAdminToolsFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CControlPanelFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CDesktopFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CDrivesFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CFSFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CFontsFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CMyDocsFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CNetFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CPrinterFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CRecycleBin.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/folders/CRegFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/shfldr.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/shlfolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/wine/shell32_main.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/dll/win32/shell32/wine/shellord.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/dll/win32/sh…
Modified: branches/setup_improvements/drivers/filesystems/nfs/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/file…
Modified: branches/setup_improvements/drivers/usb/usbhub_new/ioctl.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/usb/…
Modified: branches/setup_improvements/drivers/usb/usbhub_new/pnp.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/usb/…
Modified: branches/setup_improvements/drivers/usb/usbhub_new/usbhub.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/usb/…
Modified: branches/setup_improvements/drivers/usb/usbhub_new/usbhub.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/usb/…
Modified: branches/setup_improvements/drivers/usb/usbport/debug.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/usb/…
Modified: branches/setup_improvements/drivers/usb/usbport/iface.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/usb/…
Modified: branches/setup_improvements/drivers/usb/usbport/pnp.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/usb/…
Modified: branches/setup_improvements/drivers/usb/usbport/roothub.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/usb/…
Modified: branches/setup_improvements/drivers/usb/usbport/usbport.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/usb/…
Modified: branches/setup_improvements/drivers/usb/usbport/usbport.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/drivers/usb/…
Modified: branches/setup_improvements/media/inf/syssetup.inf URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/media/inf/sy…
Modified: branches/setup_improvements/sdk/include/ddk/buffring.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/ddk/fcb.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/ddk/mrx.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/ddk/mrxfcb.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/ddk/nodetype.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/ddk/ntrxdef.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/ddk/rxcontx.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/ddk/rxprocs.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/ddk/rxtimer.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/ddk/scavengr.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/psdk/dsgetdc.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/psdk/usb200.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/reactos/drivers/usbport/usbmport.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/include/reactos/idl/netlogon.idl URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/include/…
Modified: branches/setup_improvements/sdk/lib/drivers/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/lib/driv…
Modified: branches/setup_improvements/sdk/lib/drivers/rdbsslib/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/lib/driv…
Modified: branches/setup_improvements/sdk/lib/drivers/rdbsslib/rdbss.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/lib/driv…
Modified: branches/setup_improvements/sdk/lib/drivers/rxce/rxce.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/sdk/lib/driv…
Modified: branches/setup_improvements/win32ss/gdi/eng/gradient.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/include/wine/gdi_driver.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/misc/misc.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmetafile.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/dc.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/enhmetafiledrv.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/graphics.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/init.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/enhmfdrv/objects.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/gdi_private.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/metafile.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/mfdrv/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/mfdrv/init.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/mfdrv/objects.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/gdi32/wine/rosglue.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/ntgdi/dcutil.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/ntgdi/fillshap.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/ntgdi/freetype.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/gdi/ntgdi/line.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/gdi/…
Modified: branches/setup_improvements/win32ss/printing/base/spoolss/monitors.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/base/spoolss/ports.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/base/spoolss/printers.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/base/spoolsv/init.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/base/spoolsv/jobs.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/base/spoolsv/monitors.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/base/spoolsv/ports.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/base/spoolsv/printers.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/base/spoolsv/printprocessors.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/monitors/localmon/ports.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/providers/localspl/jobs.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/providers/localspl/main.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/providers/localspl/monitors.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/providers/localspl/ports.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/providers/localspl/precomp.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/providers/localspl/printerdata.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/providers/localspl/printers.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/providers/localspl/printingthread.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/printing/providers/localspl/printprocessors.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/prin…
Modified: branches/setup_improvements/win32ss/reactx/dxg/ddraw.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/reac…
Modified: branches/setup_improvements/win32ss/user/ntuser/windc.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/win32ss/user…
7 years, 3 months
1
0
0
0
[hbelusca] 75322: [WELCOME]: Diverse improvements: - Compute once, when loading the list of topics with their associated commands, their special arguments or starting paths. The computed values can...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Jul 12 22:16:50 2017 New Revision: 75322 URL:
http://svn.reactos.org/svn/reactos?rev=75322&view=rev
Log: [WELCOME]: Diverse improvements: - Compute once, when loading the list of topics with their associated commands, their special arguments or starting paths. The computed values can then be used each time a topic command is invoked. - Distinguish between runnable commands (aka. external executables or files to be started), and internal actions like <msg> and <exit>. - I have recently discovered that Windows' welcome.exe could also use a custom (OEM) "welcome.ini" file, much like what we already supported: see
http://i.imgur.com/Se3IoQN.png
. To make ours backwards-compatible with Windows' one, rename the "Button" keyword into "MenuText", and introduce two new keywords "ConfigCommand" and "ConfigArgs" that specify respectively the command to be started and its associated arguments. We continue to support our "Action" keyword for specifying internal actions. - Improve the loading of the localized resources from the INI files. - Correctly print the ReactOS version text, at a correct position depending on whether the checked box is display or not. - Simplify some StringCchCopy + StringCchCat calls into StringCchPrintf. - Simplify the code that creates the different fonts to be used within the program. - Use more readable resource ID names. Modified: trunk/reactos/base/setup/welcome/lang/bg-BG.rc trunk/reactos/base/setup/welcome/lang/cs-CZ.rc trunk/reactos/base/setup/welcome/lang/da-DK.rc trunk/reactos/base/setup/welcome/lang/de-DE.rc trunk/reactos/base/setup/welcome/lang/el-GR.rc trunk/reactos/base/setup/welcome/lang/en-US.rc trunk/reactos/base/setup/welcome/lang/es-ES.rc trunk/reactos/base/setup/welcome/lang/et-EE.rc trunk/reactos/base/setup/welcome/lang/fr-FR.rc trunk/reactos/base/setup/welcome/lang/he-IL.rc trunk/reactos/base/setup/welcome/lang/hu-HU.rc trunk/reactos/base/setup/welcome/lang/id-ID.rc trunk/reactos/base/setup/welcome/lang/it-IT.rc trunk/reactos/base/setup/welcome/lang/ja-JP.rc trunk/reactos/base/setup/welcome/lang/lt-LT.rc trunk/reactos/base/setup/welcome/lang/ms-MY.rc trunk/reactos/base/setup/welcome/lang/nl-NL.rc trunk/reactos/base/setup/welcome/lang/no-NO.rc trunk/reactos/base/setup/welcome/lang/pl-PL.rc trunk/reactos/base/setup/welcome/lang/pt-BR.rc trunk/reactos/base/setup/welcome/lang/ro-RO.rc trunk/reactos/base/setup/welcome/lang/ru-RU.rc trunk/reactos/base/setup/welcome/lang/sk-SK.rc trunk/reactos/base/setup/welcome/lang/sq-AL.rc trunk/reactos/base/setup/welcome/lang/sv-SE.rc trunk/reactos/base/setup/welcome/lang/th-TH.rc trunk/reactos/base/setup/welcome/lang/tr-TR.rc trunk/reactos/base/setup/welcome/lang/uk-UA.rc trunk/reactos/base/setup/welcome/lang/zh-CN.rc trunk/reactos/base/setup/welcome/lang/zh-TW.rc trunk/reactos/base/setup/welcome/resource.h trunk/reactos/base/setup/welcome/welcome.c trunk/reactos/base/setup/welcome/welcome.rc [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/base/setup/welcome/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/bg…
Modified: trunk/reactos/base/setup/welcome/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/cs…
Modified: trunk/reactos/base/setup/welcome/lang/da-DK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/da…
Modified: trunk/reactos/base/setup/welcome/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/de…
Modified: trunk/reactos/base/setup/welcome/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/el…
Modified: trunk/reactos/base/setup/welcome/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/en…
Modified: trunk/reactos/base/setup/welcome/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/es…
Modified: trunk/reactos/base/setup/welcome/lang/et-EE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/et…
Modified: trunk/reactos/base/setup/welcome/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/fr…
Modified: trunk/reactos/base/setup/welcome/lang/he-IL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/he…
Modified: trunk/reactos/base/setup/welcome/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/hu…
Modified: trunk/reactos/base/setup/welcome/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/id…
Modified: trunk/reactos/base/setup/welcome/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/it…
Modified: trunk/reactos/base/setup/welcome/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/ja…
Modified: trunk/reactos/base/setup/welcome/lang/lt-LT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/lt…
Modified: trunk/reactos/base/setup/welcome/lang/ms-MY.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/ms…
Modified: trunk/reactos/base/setup/welcome/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/nl…
Modified: trunk/reactos/base/setup/welcome/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/no…
Modified: trunk/reactos/base/setup/welcome/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/pl…
Modified: trunk/reactos/base/setup/welcome/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/pt…
Modified: trunk/reactos/base/setup/welcome/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/ro…
Modified: trunk/reactos/base/setup/welcome/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/ru…
Modified: trunk/reactos/base/setup/welcome/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/sk…
Modified: trunk/reactos/base/setup/welcome/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/sq…
Modified: trunk/reactos/base/setup/welcome/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/sv…
Modified: trunk/reactos/base/setup/welcome/lang/th-TH.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/th…
Modified: trunk/reactos/base/setup/welcome/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/tr…
Modified: trunk/reactos/base/setup/welcome/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/uk…
Modified: trunk/reactos/base/setup/welcome/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/zh…
Modified: trunk/reactos/base/setup/welcome/lang/zh-TW.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/lang/zh…
Modified: trunk/reactos/base/setup/welcome/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/resourc…
Modified: trunk/reactos/base/setup/welcome/welcome.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/welcome…
Modified: trunk/reactos/base/setup/welcome/welcome.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/welcome…
7 years, 3 months
1
0
0
0
[mjansen] 75321: [WIN32SS] Fix EqualFamilyInfo function logic. Patch by Victor Martinez Calvo, modified by Katayama Hirofumi MZ. CORE-13411 #resolve, CID 1411971
by mjansen@svn.reactos.org
Author: mjansen Date: Wed Jul 12 18:40:49 2017 New Revision: 75321 URL:
http://svn.reactos.org/svn/reactos?rev=75321&view=rev
Log: [WIN32SS] Fix EqualFamilyInfo function logic. Patch by Victor Martinez Calvo, modified by Katayama Hirofumi MZ. CORE-13411 #resolve, CID 1411971 Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/freetype…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] Wed Jul 12 18:40:49 2017 @@ -4550,28 +4550,23 @@ } static BOOL -EqualFamilyInfo(FONTFAMILYINFO *pInfo1, FONTFAMILYINFO *pInfo2) -{ - UNICODE_STRING Str1, Str2; - ENUMLOGFONTEXW *pLog1 = &pInfo1->EnumLogFontEx; - ENUMLOGFONTEXW *pLog2 = &pInfo2->EnumLogFontEx; - RtlInitUnicodeString(&Str1, pLog1->elfLogFont.lfFaceName); - RtlInitUnicodeString(&Str2, pLog2->elfLogFont.lfFaceName); - if (!RtlEqualUnicodeString(&Str1, &Str2, TRUE)) +EqualFamilyInfo(const FONTFAMILYINFO *pInfo1, const FONTFAMILYINFO *pInfo2) +{ + const ENUMLOGFONTEXW *pLog1 = &pInfo1->EnumLogFontEx; + const ENUMLOGFONTEXW *pLog2 = &pInfo2->EnumLogFontEx; + const LOGFONTW *plf1 = &pLog1->elfLogFont; + const LOGFONTW *plf2 = &pLog2->elfLogFont; + + if (_wcsicmp(plf1->lfFaceName, plf2->lfFaceName) != 0) { return FALSE; } - if ((pLog1->elfStyle != NULL) != (pLog2->elfStyle != NULL)) + + if (_wcsicmp(pLog1->elfStyle, pLog2->elfStyle) != 0) + { return FALSE; - if (pLog1->elfStyle != NULL) - { - RtlInitUnicodeString(&Str1, pLog1->elfStyle); - RtlInitUnicodeString(&Str2, pLog2->elfStyle); - if (!RtlEqualUnicodeString(&Str1, &Str2, TRUE)) - { - return FALSE; - } - } + } + return TRUE; }
7 years, 3 months
1
0
0
0
[gadamopoulos] 75320: [COMCTL32_APITEST] - Log the dwDrawStage when the NM_CUSTOMDRAW is received to make the test slightly more descriptive.
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Wed Jul 12 12:17:05 2017 New Revision: 75320 URL:
http://svn.reactos.org/svn/reactos?rev=75320&view=rev
Log: [COMCTL32_APITEST] - Log the dwDrawStage when the NM_CUSTOMDRAW is received to make the test slightly more descriptive. Modified: trunk/rostests/apitests/comctl32/button.c Modified: trunk/rostests/apitests/comctl32/button.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/comctl32/button.…
============================================================================== --- trunk/rostests/apitests/comctl32/button.c [iso-8859-1] (original) +++ trunk/rostests/apitests/comctl32/button.c [iso-8859-1] Wed Jul 12 12:17:05 2017 @@ -444,7 +444,15 @@ case WM_NOTIFY: { NMHDR* pnmhdr = (NMHDR*)lParam; - RECORD_MESSAGE(iwnd, message, SENT, pnmhdr->idFrom,pnmhdr->code); + if (pnmhdr->code == NM_CUSTOMDRAW) + { + NMCUSTOMDRAW* pnmcd = (NMCUSTOMDRAW*)lParam; + RECORD_MESSAGE(iwnd, message, SENT, pnmhdr->code, pnmcd->dwDrawStage); + } + else + { + RECORD_MESSAGE(iwnd, message, SENT, pnmhdr->idFrom,pnmhdr->code); + } break; } default: @@ -460,7 +468,15 @@ if (iwnd != 0 && message == WM_NOTIFY) { NMHDR* pnmhdr = (NMHDR*)lParam; - RECORD_MESSAGE(iwnd, message, SENT, pnmhdr->idFrom,pnmhdr->code); + if (pnmhdr->code == NM_CUSTOMDRAW) + { + NMCUSTOMDRAW* pnmcd = (NMCUSTOMDRAW*)lParam; + RECORD_MESSAGE(iwnd, message, SENT, pnmhdr->code, pnmcd->dwDrawStage); + } + else + { + RECORD_MESSAGE(iwnd, message, SENT, pnmhdr->idFrom,pnmhdr->code); + } } else if (iwnd != 0 && message < WM_USER && message != WM_GETICON) { @@ -491,15 +507,15 @@ {1, WM_ERASEBKGND}, {1, WM_PRINTCLIENT}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; MSG_ENTRY paint_nonthemed_sequence[]={ {2, WM_PAINT, POST}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; MSG_ENTRY redraw_sequence[]={ @@ -508,29 +524,29 @@ {1, WM_ERASEBKGND}, {1, WM_PRINTCLIENT}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; MSG_ENTRY redraw_nonthemed_sequence[]={ {2, WM_PAINT, POST}, {2, WM_ERASEBKGND}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; MSG_ENTRY printclnt_nonthemed_sequence[]={ {2, WM_PRINTCLIENT}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; MSG_ENTRY printclnt_sequence[]={ {2, WM_PRINTCLIENT}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, {0,0}}; MSG_ENTRY pseudomove_sequence[]={ @@ -543,8 +559,8 @@ {1, WM_ERASEBKGND}, {1, WM_PRINTCLIENT}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; MSG_ENTRY pseudomove_nonthemed_sequence[]={ @@ -555,8 +571,8 @@ {2, WM_PAINT, POST}, {2, WM_ERASEBKGND}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; MSG_ENTRY pseudohover_sequence[]={ @@ -578,8 +594,8 @@ {1, WM_ERASEBKGND}, {1, WM_PRINTCLIENT}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; MSG_ENTRY mouseenter_nonthemed_sequence[]={ @@ -591,8 +607,8 @@ {2, WM_PAINT, POST}, {2, WM_ERASEBKGND}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; MSG_ENTRY mousemove_sequence[]={ @@ -610,8 +626,8 @@ {1, WM_ERASEBKGND}, {1, WM_PRINTCLIENT}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; MSG_ENTRY mouseleave_nonthemed_sequence[]={ @@ -620,8 +636,8 @@ {2, WM_PAINT, POST}, {2, WM_ERASEBKGND}, {1, WM_CTLCOLORBTN}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, - {1, WM_NOTIFY, SENT, 0, NM_CUSTOMDRAW}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREERASE}, + {1, WM_NOTIFY, SENT, NM_CUSTOMDRAW, CDDS_PREPAINT}, {0,0}}; void Test_MessagesNonThemed()
7 years, 3 months
1
0
0
0
[ashaposhnikov] 75319: [SDK] Added atlex for future use - atlex is ATL wrappers for WINAPI functions - It is header-only library licensed under GPLv3 - For details see https://github.com/Amebis/atlex
by ashaposhnikov@svn.reactos.org
Author: ashaposhnikov Date: Tue Jul 11 22:08:48 2017 New Revision: 75319 URL:
http://svn.reactos.org/svn/reactos?rev=75319&view=rev
Log: [SDK] Added atlex for future use - atlex is ATL wrappers for WINAPI functions - It is header-only library licensed under GPLv3 - For details see
https://github.com/Amebis/atlex
Added: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/ branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlcrypt.h (with props) branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atleap.h (with props) branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlex.h (with props) branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlmsi.h (with props) branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlsec.h (with props) branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlshlwapi.h (with props) branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlwin.h (with props) branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlwlan.h (with props) Added: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlcrypt.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/sdk/inc…
============================================================================== --- branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlcrypt.h (added) +++ branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlcrypt.h [iso-8859-1] Tue Jul 11 22:08:48 2017 @@ -0,0 +1,498 @@ +/* + Copyright 1991-2017 Amebis + + This file is part of atlex. + + Setup is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Setup is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Setup. If not, see <
http://www.gnu.org/licenses/
>. +*/ + +#pragma once + +#include "atlex.h" +#include <atlcoll.h> +#include <atlstr.h> +#include <WinCrypt.h> + +/// +/// \defgroup ATLCryptoAPI Cryptography API +/// Integrates ATL classes with Microsoft Cryptography API +/// +/// @{ + +/// +/// Obtains the subject or issuer name from a certificate [
CERT_CONTEXT](https://msdn.microsoft.com/en-us/library/windows/desktop/aa37…
structure and stores it in a ATL::CAtlStringA string. +/// +/// \sa [CertGetNameString
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376086…
+/// +inline DWORD CertGetNameStringA(_In_ PCCERT_CONTEXT pCertContext, _In_ DWORD dwType, _In_ DWORD dwFlags, _In_ void *pvTypePara, _Out_ ATL::CAtlStringA &sNameString) +{ + // Query the final string length first. + DWORD dwSize = ::CertGetNameStringA(pCertContext, dwType, dwFlags, pvTypePara, NULL, 0); + + // Allocate buffer on heap to format the string data into and read it. + LPSTR szBuffer = sNameString.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + dwSize = ::CertGetNameStringA(pCertContext, dwType, dwFlags, pvTypePara, szBuffer, dwSize); + sNameString.ReleaseBuffer(dwSize); + return dwSize; +} + + +/// +/// Obtains the subject or issuer name from a certificate [
CERT_CONTEXT](https://msdn.microsoft.com/en-us/library/windows/desktop/aa37…
structure and stores it in a ATL::CAtlStringW string. +/// +/// \sa [CertGetNameString
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376086…
+/// +inline DWORD CertGetNameStringW(_In_ PCCERT_CONTEXT pCertContext, _In_ DWORD dwType, _In_ DWORD dwFlags, _In_ void *pvTypePara, _Out_ ATL::CAtlStringW &sNameString) +{ + // Query the final string length first. + DWORD dwSize = ::CertGetNameStringW(pCertContext, dwType, dwFlags, pvTypePara, NULL, 0); + + // Allocate buffer on heap to format the string data into and read it. + LPWSTR szBuffer = sNameString.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + dwSize = ::CertGetNameStringW(pCertContext, dwType, dwFlags, pvTypePara, szBuffer, dwSize); + sNameString.ReleaseBuffer(dwSize); + return dwSize; +} + + +/// +/// Retrieves data that governs the operations of a hash object. The actual hash value can be retrieved by using this function. +/// +/// \sa [CryptGetHashParam
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379947…
+/// +inline BOOL CryptGetHashParam(_In_ HCRYPTHASH hHash, _In_ DWORD dwParam, _Out_ ATL::CAtlArray<BYTE> &aData, _In_ DWORD dwFlags) +{ + DWORD dwHashSize; + + if (CryptGetHashParam(hHash, dwParam, NULL, &dwHashSize, dwFlags)) { + if (aData.SetCount(dwHashSize)) { + if (CryptGetHashParam(hHash, dwParam, aData.GetData(), &dwHashSize, dwFlags)) { + return TRUE; + } else { + aData.SetCount(0); + return FALSE; + } + } else { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + } else + return FALSE; +} + + +/// +/// Exports a cryptographic key or a key pair from a cryptographic service provider (CSP) in a secure manner. +/// +/// \sa [CryptExportKey
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379931…
+/// +inline BOOL CryptExportKey(_In_ HCRYPTKEY hKey, _In_ HCRYPTKEY hExpKey, _In_ DWORD dwBlobType, _In_ DWORD dwFlags, _Out_ ATL::CAtlArray<BYTE> &aData) +{ + DWORD dwKeyBLOBSize; + + if (CryptExportKey(hKey, hExpKey, dwBlobType, dwFlags, NULL, &dwKeyBLOBSize)) { + if (aData.SetCount(dwKeyBLOBSize)) { + if (CryptExportKey(hKey, hExpKey, dwBlobType, dwFlags, aData.GetData(), &dwKeyBLOBSize)) { + return TRUE; + } else { + aData.SetCount(0); + return FALSE; + } + } else { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + } else + return FALSE; +} + +/// @} + + +namespace ATL +{ + namespace Crypt + { + /// \addtogroup ATLCryptoAPI + /// @{ + + /// + /// PCCERT_CONTEXT wrapper class + /// + class CCertContext : public ATL::CObjectWithHandleDuplT<PCCERT_CONTEXT> + { + public: + /// + /// Destroys the certificate context. + /// + /// \sa [CertFreeCertificateContext
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376075…
+ /// + virtual ~CCertContext() + { + if (m_h) + CertFreeCertificateContext(m_h); + } + + /// + /// Creates the certificate context. + /// + /// \return + /// - TRUE when creation succeeds; + /// - FALSE when creation fails. For extended error information, call `GetLastError()`. + /// \sa [CertCreateCertificateContext
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376033…
+ /// + inline BOOL Create(_In_ DWORD dwCertEncodingType, _In_ const BYTE *pbCertEncoded, _In_ DWORD cbCertEncoded) + { + HANDLE h = CertCreateCertificateContext(dwCertEncodingType, pbCertEncoded, cbCertEncoded); + if (h) { + Attach(h); + return TRUE; + } else + return FALSE; + } + + protected: + /// + /// Destroys the certificate context. + /// + /// \sa [CertFreeCertificateContext
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376075…
+ /// + virtual void InternalFree() + { + CertFreeCertificateContext(m_h); + } + + /// + /// Duplicates the certificate context. + /// + /// \param[in] h Object handle of existing certificate context + /// \return Duplicated certificate context handle + /// \sa [CertDuplicateCertificateContext
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376045…
+ /// + virtual HANDLE InternalDuplicate(_In_ HANDLE h) const + { + return CertDuplicateCertificateContext(h); + } + }; + + + /// + /// PCCERT_CHAIN_CONTEXT wrapper class + /// + class CCertChainContext : public ATL::CObjectWithHandleDuplT<PCCERT_CHAIN_CONTEXT> + { + public: + /// + /// Destroys the certificate chain context. + /// + /// \sa [CertFreeCertificateChain
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376073…
+ /// + virtual ~CCertChainContext() + { + if (m_h) + CertFreeCertificateChain(m_h); + } + + /// + /// Creates the certificate chain context. + /// + /// \return + /// - TRUE when creation succeeds; + /// - FALSE when creation fails. For extended error information, call `GetLastError()`. + /// \sa [CertGetCertificateChain
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376078…
+ /// + inline BOOL Create(_In_opt_ HCERTCHAINENGINE hChainEngine, _In_ PCCERT_CONTEXT pCertContext, _In_opt_ LPFILETIME pTime, _In_opt_ HCERTSTORE hAdditionalStore, _In_ PCERT_CHAIN_PARA pChainPara, _In_ DWORD dwFlags, __reserved LPVOID pvReserved) + { + HANDLE h; + if (CertGetCertificateChain(hChainEngine, pCertContext, pTime, hAdditionalStore, pChainPara, dwFlags, pvReserved, &h)) { + Attach(h); + return TRUE; + } else + return FALSE; + } + + protected: + /// + /// Destroys the certificate chain context. + /// + /// \sa [CertFreeCertificateChain
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376073…
+ /// + virtual void InternalFree() + { + CertFreeCertificateChain(m_h); + } + + /// + /// Duplicates the certificate chain context. + /// + /// \param[in] h Object handle of existing certificate chain context + /// \return Duplicated certificate chain context handle + /// \sa [CertDuplicateCertificateContext
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376045…
+ /// + virtual HANDLE InternalDuplicate(_In_ HANDLE h) const + { + return CertDuplicateCertificateChain(h); + } + }; + + + /// + /// HCERTSTORE wrapper class + /// + class CCertStore : public ATL::CObjectWithHandleT<HCERTSTORE> + { + public: + /// + /// Closes the certificate store. + /// + /// \sa [CertCloseStore
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376026…
+ /// + virtual ~CCertStore() + { + if (m_h) + CertCloseStore(m_h, 0); + } + + /// + /// Opens the certificate store. + /// + /// \return + /// - TRUE when creation succeeds; + /// - FALSE when creation fails. For extended error information, call `GetLastError()`. + /// \sa [CertOpenStore
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376559…
+ /// + inline BOOL Create(_In_ LPCSTR lpszStoreProvider, _In_ DWORD dwEncodingType, _In_opt_ HCRYPTPROV_LEGACY hCryptProv, _In_ DWORD dwFlags, _In_opt_ const void *pvPara) + { + HANDLE h = CertOpenStore(lpszStoreProvider, dwEncodingType, hCryptProv, dwFlags, pvPara); + if (h) { + Attach(h); + return TRUE; + } else + return FALSE; + } + + protected: + /// + /// Closes the certificate store. + /// + /// \sa [CertCloseStore
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa376026…
+ /// + virtual void InternalFree() + { + CertCloseStore(m_h, 0); + } + }; + + + /// + /// HCRYPTPROV wrapper class + /// + class CContext : public ATL::CObjectWithHandleT<HCRYPTPROV> + { + public: + /// + /// Releases the cryptographi context. + /// + /// \sa [CryptReleaseContext
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380268…
+ /// + virtual ~CContext() + { + if (m_h) + CryptReleaseContext(m_h, 0); + } + + /// + /// Acquires the cryptographic context. + /// + /// \return + /// - TRUE when creation succeeds; + /// - FALSE when creation fails. For extended error information, call `GetLastError()`. + /// \sa [CryptAcquireContext
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379886…
+ /// + inline BOOL Create(_In_opt_ LPCTSTR szContainer, _In_opt_ LPCTSTR szProvider, _In_ DWORD dwProvType, _In_ DWORD dwFlags) + { + HANDLE h; + if (CryptAcquireContext(&h, szContainer, szProvider, dwProvType, dwFlags)) { + Attach(h); + return TRUE; + } else + return FALSE; + } + + protected: + /// + /// Releases the cryptographic context. + /// + /// \sa [CryptReleaseContext
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380268…
+ /// + virtual void InternalFree() + { + CryptReleaseContext(m_h, 0); + } + }; + + + /// + /// HCRYPTHASH wrapper class + /// + class CHash : public ATL::CObjectWithHandleDuplT<HCRYPTHASH> + { + public: + /// + /// Destroys the hash context. + /// + /// \sa [CryptDestroyHash
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379917…
+ /// + virtual ~CHash() + { + if (m_h) + CryptDestroyHash(m_h); + } + + /// + /// Creates the hash context. + /// + /// \return + /// - TRUE when creation succeeds; + /// - FALSE when creation fails. For extended error information, call `GetLastError()`. + /// \sa [CryptCreateHash
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379908…
+ /// + inline BOOL Create(_In_ HCRYPTPROV hProv, _In_ ALG_ID Algid, _In_ HCRYPTKEY hKey, _In_ DWORD dwFlags) + { + HANDLE h; + if (CryptCreateHash(hProv, Algid, hKey, dwFlags, &h)) { + Attach(h); + return TRUE; + } else + return FALSE; + } + + protected: + /// + /// Destroys the hash context. + /// + /// \sa [CryptDestroyHash
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379917…
+ /// + virtual void InternalFree() + { + CryptDestroyHash(m_h); + } + + /// + /// Duplicates the hash context. + /// + /// \param[in] h Object handle of existing hash context + /// \return Duplicated hash context handle + /// \sa [CryptDuplicateHash
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379919…
+ /// + virtual HANDLE InternalDuplicate(_In_ HANDLE h) const + { + HANDLE hNew = NULL; + return CryptDuplicateHash(h, NULL, 0, &hNew) ? hNew : NULL; + } + }; + + + /// + /// HCRYPTKEY wrapper class + /// + class CKey : public ATL::CObjectWithHandleDuplT<HCRYPTKEY> + { + public: + /// + /// Destroys the key. + /// + /// \sa [CryptDestroyKey
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379918…
+ /// + virtual ~CKey() + { + if (m_h) + CryptDestroyKey(m_h); + } + + /// + /// Generates the key. + /// + /// \sa [CryptGenKey
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379941…
+ /// + inline BOOL Generate(_In_ HCRYPTPROV hProv, _In_ ALG_ID Algid, _In_ DWORD dwFlags) + { + HANDLE h; + if (CryptGenKey(hProv, Algid, dwFlags, &h)) { + Attach(h); + return TRUE; + } else + return FALSE; + } + + /// + /// Imports the key. + /// + /// \sa [CryptImportKey
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380207…
+ /// + inline BOOL Import(_In_ HCRYPTPROV hProv, __in_bcount(dwDataLen) CONST BYTE *pbData, _In_ DWORD dwDataLen, _In_ HCRYPTKEY hPubKey, _In_ DWORD dwFlags) + { + HANDLE h; + if (CryptImportKey(hProv, pbData, dwDataLen, hPubKey, dwFlags, &h)) { + Attach(h); + return TRUE; + } else + return FALSE; + } + + /// + /// Imports the public key. + /// + /// \sa [CryptImportPublicKeyInfo
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa380209…
+ /// + inline BOOL ImportPublic(_In_ HCRYPTPROV hCryptProv, _In_ DWORD dwCertEncodingType, _In_ PCERT_PUBLIC_KEY_INFO pInfo) + { + HANDLE h; + if (CryptImportPublicKeyInfo(hCryptProv, dwCertEncodingType, pInfo, &h)) { + Attach(h); + return TRUE; + } else + return FALSE; + } + + protected: + /// + /// Destroys the key. + /// + /// \sa [CryptDestroyKey
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379918…
+ /// + virtual void InternalFree() + { + CryptDestroyKey(m_h); + } + + /// + /// Duplicates the key. + /// + /// \param[in] h Object handle of existing key + /// \return Duplicated key handle + /// \sa [CryptDuplicateKey
function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa379920…
+ /// + virtual HANDLE InternalDuplicate(_In_ HANDLE h) const + { + HANDLE hNew = NULL; + return CryptDuplicateKey(h, NULL, 0, &hNew) ? hNew : NULL; + } + }; + + /// @} + } +} Propchange: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlcrypt.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atleap.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/sdk/inc…
============================================================================== --- branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atleap.h (added) +++ branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atleap.h [iso-8859-1] Tue Jul 11 22:08:48 2017 @@ -0,0 +1,63 @@ +/* + Copyright 1991-2017 Amebis + + This file is part of atlex. + + Setup is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Setup is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Setup. If not, see <
http://www.gnu.org/licenses/
>. +*/ + +#pragma once + +#include <eaptypes.h> + + +namespace ATL +{ + namespace EAP + { + /// + /// \defgroup ATLEAPAPI Extensible Authentication Protocol API + /// Integrates ATL classes with Microsoft EAP API + /// + /// @{ + + /// + /// EAP_ATTRIBUTE wrapper class + /// + class CEAPAttribute : public EAP_ATTRIBUTE + { + public: + /// + /// Initializes a new EAP attribute set to eatReserved. + /// + CEAPAttribute() + { + eaType = eatReserved; + dwLength = 0; + pValue = NULL; + } + + /// + /// Destroys the EAP attribute. + /// + ~CEAPAttribute() + { + if (pValue) + delete pValue; + } + }; + + /// @} + } +} Propchange: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atleap.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlex.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/sdk/inc…
============================================================================== --- branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlex.h (added) +++ branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlex.h [iso-8859-1] Tue Jul 11 22:08:48 2017 @@ -0,0 +1,654 @@ +/* + Copyright 1991-2017 Amebis + + This file is part of atlex. + + Setup is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Setup is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Setup. If not, see <
http://www.gnu.org/licenses/
>. +*/ + +#pragma once + +#include <atlconv.h> +#include <atldef.h> +#include <atlstr.h> + +#ifndef ATL_STACK_BUFFER_BYTES +/// +/// Size of the stack buffer in bytes used for initial system function call +/// +/// Some system functions with variable length output data fail for +/// insufficient buffer sizes, and return an exact buffer length required. +/// The function helpers use a fixed size stack buffer first. If the stack +/// buffer really prooved sufficient, the helper allocates the exact length +/// output on heap and copies the data without calling the system function +/// again. Otherwise it allocates the exact length output on heap and retries. +/// +/// \note +/// Decrease this value in case of stack overflow. +/// +#define ATL_STACK_BUFFER_BYTES 1024 +#endif + + +namespace ATL +{ + /// + /// \defgroup ATLSysHandles System Handles + /// Simplifies work with object handles of various type + /// + /// @{ + + /// + /// Base abstract template class to support generic object handle keeping + /// + /// It provides basic operators and methods common to all descendands of this class establishing a base to ease the replacement of native object handle type with classes in object-oriented approach. + /// + template <class T> class CObjectWithHandleT + { + public: + /// + /// Datatype of the object handle this template class handles + /// + typedef T HANDLE; + + /// + /// Initializes a new class instance with the object handle set to NULL. + /// + inline CObjectWithHandleT() : m_h(NULL) + { + } + + /// + /// Initializes a new class instance with an available object handle. + /// + /// \param[in] h Initial object handle value + /// + inline CObjectWithHandleT(_In_opt_ HANDLE h) : m_h(h) + { + } + + /// \name Operators for transparent usage of this class + /// @{ + + /// + /// Auto-typecasting operator + /// + /// \return Object handle + /// + inline operator HANDLE() const + { + return m_h; + } + + /// + /// Returns the object handle value when the object handle is a pointer to a value (class, struct, etc.). + /// + /// \return Object handle value + /// + inline HANDLE*& operator*() const + { + ATLENSURE(m_h != NULL); + return *m_h; + } + + /// + /// Returns the object handle reference. + /// \return Object handle reference + /// + inline HANDLE* operator&() + { + ATLASSERT(m_h == NULL); + return &m_h; + } + + /// + /// Provides object handle member access when the object handle is a pointer to a class or struct. + /// + /// \return Object handle + /// + inline HANDLE operator->() const + { + ATLASSERT(m_h != NULL); + return m_h; + } + + /// @} + + /// \name Comparison operators + /// @{ + + /// + /// Tests if the object handle is NULL. + /// + /// \return + /// - Non zero when object handle is NULL; + /// - Zero otherwise. + /// + inline bool operator!() const + { + return m_h == NULL; + } + + /// + /// Is handle less than? + /// + /// \param[in] h Object handle to compare against + /// \return + /// - Non zero when object handle is less than h; + /// - Zero otherwise. + /// + inline bool operator<(_In_opt_ HANDLE h) const + { + return m_h < h; + } + + /// + /// Is handle less than or equal to? + /// + /// \param[in] h Object handle to compare against + /// \return + /// - Non zero when object handle is less than or equal to h; + /// - Zero otherwise. + /// + inline bool operator<=(_In_opt_ HANDLE h) const + { + return m_h <= h; + } + + /// + /// Is handle greater than or equal to? + /// + /// \param[in] h Object handle to compare against + /// \return + /// - Non zero when object handle is greater than or equal to h; + /// - Zero otherwise. + /// + inline bool operator>=(_In_opt_ HANDLE h) const + { + return m_h >= h; + } + + /// + /// Is handle greater than? + /// + /// \param[in] h Object handle to compare against + /// \return + /// - Non zero when object handle is greater than h; + /// - Zero otherwise. + /// + inline bool operator>(_In_opt_ HANDLE h) const + { + return m_h > h; + } + + /// + /// Is handle not equal to? + /// + /// \param[in] h Object handle to compare against + /// \return + /// - Non zero when object handle is not equal to h; + /// - Zero otherwise. + /// + inline bool operator!=(_In_opt_ HANDLE h) const + { + return !operator==(h); + } + + /// + /// Is handle equal to? + /// + /// \param[in] h Object handle to compare against + /// \return + /// - Non zero when object handle is equal to h; + /// - Zero otherwise. + /// + inline bool operator==(_In_opt_ HANDLE h) const + { + return m_h == h; + } + + /// @} + + /// + /// Sets a new object handle for the class + /// + /// When the current object handle of the class is non-NULL, the object is destroyed first. + /// + /// \param[in] h New object handle + /// + inline void Attach(_In_opt_ HANDLE h) + { + if (m_h) + InternalFree(); + m_h = h; + } + + /// + /// Dismisses the object handle from this class + /// + /// \return Object handle + /// + inline HANDLE Detach() + { + HANDLE h = m_h; + m_h = NULL; + return h; + } + + /// + /// Destroys the object + /// + inline void Free() + { + if (m_h) { + InternalFree(); + m_h = NULL; + } + } + + /// @} + + protected: + /// + /// Abstract member function that must be implemented by child classes to do the actual object destruction. + /// + virtual void InternalFree() = 0; + + protected: + HANDLE m_h; ///< Object handle + }; + + + /// + /// Base abstract template class to support object handle keeping for objects that support handle duplication + /// + template <class T> + class CObjectWithHandleDuplT : public CObjectWithHandleT<T> + { + public: + /// + /// Duplicates and returns a new object handle. + /// + /// \return Duplicated object handle + /// + inline HANDLE GetDuplicate() const + { + return m_h ? InternalDuplicate(m_h) : NULL; + } + + /// + /// Duplicates an object handle and sets a new object handle. + /// + /// \param[in] h Object handle of existing object + /// \return + /// - TRUE when duplication succeeds; + /// - FALSE when duplication fails. In case of failure obtaining the extended error information is object type specific (for example: `GetLastError()`). + /// + inline BOOL DuplicateAndAttach(_In_opt_ HANDLE h) + { + if (m_h) + InternalFree(); + + return h ? (m_h = InternalDuplicate(h)) != NULL : (m_h = NULL, TRUE); + } + + // + // Do not allow = operators. They are semantically ambigious: + // Do they attach the class to the existing instance of object, or do they duplicate it? + // To avoid confusion, user should use Attach() and Duplicate() methods explicitly. + // + //inline const CObjectWithHandleDuplT<T>& operator=(_In_ const HANDLE src) + //{ + // Attach(src ? InternalDuplicate(src) : NULL); + // return *this; + //} + + //inline const CObjectWithHandleDuplT<T>& operator=(_In_ const CObjectWithHandleDuplT<T> &src) + //{ + // Attach(src.m_h ? InternalDuplicate(src.m_h) : NULL); + // return *this; + //} + + protected: + /// + /// Abstract member function that must be implemented by child classes to do the actual object handle duplication. + /// + /// \param[in] h Object handle of existing object + /// \return Duplicated object handle + /// + virtual HANDLE InternalDuplicate(_In_ HANDLE h) const = 0; + }; + + /// @} + + /// + /// \defgroup ATLStrFormat String Formatting + /// Formatted string generation + /// + /// \par Example + /// \code + /// // Please note the PCSTR typecasting invokes an operator to return + /// // pointer to formatted buffer rather than class reference itself. + /// cout << (PCSTR)(CStrFormatA("%i is less than %i.\n", 1, 5)); + /// \endcode + /// + /// @{ + + /// + /// Base template class to support string formatting using `printf()` style templates + /// + template<typename BaseType, class StringTraits> + class CStrFormatT : public CStringT<BaseType, StringTraits> + { + public: + /// \name Initializing string using template in memory + /// @{ + + /// + /// Initializes a new string and formats its contents using `printf()` style template. + /// + /// \param[in] pszFormat String template using `printf()` style + /// + CStrFormatT(_In_z_ _Printf_format_string_ PCXSTR pszFormat, ...) + { + ATLASSERT(AtlIsValidString(pszFormat)); + + va_list argList; + va_start(argList, pszFormat); + FormatV(pszFormat, argList); + va_end(argList); + } + + /// @} + + /// \name Initializing string using template in resources + /// @{ + + /// + /// Initializes a new string and formats its contents using `printf()` style template in resources. + /// + /// \param[in] nFormatID Resource ID of the string template using `printf()` style + /// + CStrFormatT(_In_ UINT nFormatID, ...) + { + CStringT strFormat(GetManager()); + ATLENSURE(strFormat.LoadString(nFormatID)); + + va_list argList; + va_start(argList, nFormatID); + FormatV(strFormat, argList); + va_end(argList); + } + + /// + /// Initializes a new string and formats its contents using `printf()` style template in resources. + /// + /// \param[in] hInstance Resource module handle + /// \param[in] nFormatID Resource ID of the string template using `printf()` style + /// + CStrFormatT(_In_ HINSTANCE hInstance, _In_ UINT nFormatID, ...) + { + CStringT strFormat(GetManager()); + ATLENSURE(strFormat.LoadString(hInstance, nFormatID)); + + va_list argList; + va_start(argList, nFormatID); + FormatV(strFormat, argList); + va_end(argList); + } + + /// + /// Initializes a new string and formats its contents using `printf()` style template in resources. + /// + /// \param[in] hInstance Resource module handle + /// \param[in] wLanguageID Resource language + /// \param[in] nFormatID Resource ID of the string template using `printf()` style + /// + CStrFormatT(_In_ HINSTANCE hInstance, _In_ WORD wLanguageID, _In_ UINT nFormatID, ...) + { + CStringT strFormat(GetManager()); + ATLENSURE(strFormat.LoadString(hInstance, nFormatID, wLanguageID)); + + va_list argList; + va_start(argList, nFormatID); + FormatV(strFormat, argList); + va_end(argList); + } + + /// }@ + }; + + /// + /// Wide character implementation of a class to support string formatting using `printf()` style templates + /// + typedef CStrFormatT< wchar_t, StrTraitATL< wchar_t, ChTraitsCRT< wchar_t > > > CStrFormatW; + + /// + /// Single-byte character implementation of a class to support string formatting using `printf()` style templates + /// + typedef CStrFormatT< char, StrTraitATL< char, ChTraitsCRT< char > > > CStrFormatA; + + /// + /// TCHAR implementation of a class to support string formatting using `printf()` style templates + /// + typedef CStrFormatT< TCHAR, StrTraitATL< TCHAR, ChTraitsCRT< TCHAR > > > CStrFormat; + + + /// + /// Base template class to support string formatting using `FormatMessage()` style templates + /// + template<typename BaseType, class StringTraits> + class CStrFormatMsgT : public CStringT<BaseType, StringTraits> + { + public: + /// \name Initializing string using template in memory + /// @{ + + /// + /// Initializes a new string and formats its contents using `FormatMessage()` style template. + /// + /// \param[in] pszFormat String template using `FormatMessage()` style + /// + CStrFormatMsgT(_In_z_ _FormatMessage_format_string_ PCXSTR pszFormat, ...) + { + ATLASSERT(AtlIsValidString(pszFormat)); + + va_list argList; + va_start(argList, pszFormat); + FormatMessageV(pszFormat, &argList); + va_end(argList); + } + + /// @} + + /// \name Initializing string using template in resources + /// @{ + + /// + /// Initializes a new string and formats its contents using `FormatMessage()` style template in resources. + /// + /// \param[in] nFormatID Resource ID of the string template using `FormatMessage()` style + /// + CStrFormatMsgT(_In_ UINT nFormatID, ...) + { + CStringT strFormat(GetManager()); + ATLENSURE(strFormat.LoadString(nFormatID)); + + va_list argList; + va_start(argList, nFormatID); + FormatMessageV(strFormat, &argList); + va_end(argList); + } + + /// + /// Initializes a new string and formats its contents using `FormatMessage()` style template in resources. + /// + /// \param[in] hInstance Resource module handle + /// \param[in] nFormatID Resource ID of the string template using `FormatMessage()` style + /// + CStrFormatMsgT(_In_ HINSTANCE hInstance, _In_ UINT nFormatID, ...) + { + CStringT strFormat(GetManager()); + ATLENSURE(strFormat.LoadString(hInstance, nFormatID)); + + va_list argList; + va_start(argList, nFormatID); + FormatMessageV(strFormat, &argList); + va_end(argList); + } + + /// + /// Initializes a new string and formats its contents using `FormatMessage()` style template in resources. + /// + /// \param[in] hInstance Resource module handle + /// \param[in] wLanguageID Resource language + /// \param[in] nFormatID Resource ID of the string template using `FormatMessage()` style + /// + CStrFormatMsgT(_In_ HINSTANCE hInstance, _In_ WORD wLanguageID, _In_ UINT nFormatID, ...) + { + CStringT strFormat(GetManager()); + ATLENSURE(strFormat.LoadString(hInstance, nFormatID, wLanguageID)); + + va_list argList; + va_start(argList, nFormatID); + FormatMessageV(strFormat, &argList); + va_end(argList); + } + + /// @} + }; + + /// + /// Wide character implementation of a class to support string formatting using `FormatMessage()` style templates + /// + typedef CStrFormatMsgT< wchar_t, StrTraitATL< wchar_t, ChTraitsCRT< wchar_t > > > CStrFormatMsgW; + + /// + /// Single-byte character implementation of a class to support string formatting using `FormatMessage()` style templates + /// + typedef CStrFormatMsgT< char, StrTraitATL< char, ChTraitsCRT< char > > > CStrFormatMsgA; + + /// + /// TCHAR implementation of a class to support string formatting using `FormatMessage()` style templates + /// + typedef CStrFormatMsgT< TCHAR, StrTraitATL< TCHAR, ChTraitsCRT< TCHAR > > > CStrFormatMsg; + + /// @} + + /// \defgroup ATLMemSanitize Auto-sanitize Memory Management + /// Sanitizes memory before dismissed + /// + /// @{ + + /// + /// A heap template that sanitizes each memory block before it is destroyed or reallocated + /// + /// This template is typcally used to extend one of the base ATL heap management classes. + /// + /// \par Example + /// \code + /// CParanoidHeap<CWin32Heap> myHeap; + /// \endcode + /// + /// \note + /// CParanoidHeap introduces a performance penalty. However, it provides an additional level of security. + /// Use for security sensitive data memory storage only. + /// + /// \sa [Memory Management
Classes](https://msdn.microsoft.com/en-us/library/44yh1z4f.aspx)
+ /// + template <class BaseHeap> + class CParanoidHeap : public BaseHeap { + public: + /// + /// Sanitizes memory before freeing it + /// + /// \param[in] p Pointer to heap memory block + /// + virtual void Free(_In_opt_ void* p) + { + // Sanitize then free. + SecureZeroMemory(p, GetSize(p)); + BaseHeap::Free(p); + } + + /// + /// Safely reallocates the memory block by sanitizing memory at the previous location + /// + /// This member function always performs the following steps (regardless of the current and new size): + /// 1. Allocates a new memory block, + /// 2. Copies the data, + /// 3. Sanitizes the old memory block, + /// 4. Frees the old memory block. + /// + /// \param[in] p Pointer to heap memory block + /// \param[in] nBytes New size in bytes + /// \return Pointer to the new heap memory block + /// + virtual /*_Ret_opt_bytecap_(nBytes)*/ void* Reallocate(_In_opt_ void* p, _In_ size_t nBytes) + { + // Create a new sized copy. + void *pNew = Allocate(nBytes); + size_t nSizePrev = GetSize(p); + CopyMemory(pNew, p, nSizePrev); + + // Sanitize the old data then free. + SecureZeroMemory(p, nSizePrev); + Free(p); + + return pNew; + } + }; + + + /// + /// Base template class to support string conversion with memory sanitization after use + /// + template<int t_nBufferLength = 128> + class CW2AParanoidEX : public CW2AEX<t_nBufferLength> { + public: + /// + /// Initializes a new class instance with the string provided. + /// + /// \param[in] psz Pointer to wide string + /// + CW2AParanoidEX(_In_z_ LPCWSTR psz) throw(...) : CW2AEX<t_nBufferLength>(psz) {} + + /// + /// Initializes a new class instance with the string provided. + /// + /// \param[in] psz Pointer to wide string + /// \param[in] nCodePage Code page to use when converting to single-byte string + /// + CW2AParanoidEX(_In_z_ LPCWSTR psz, _In_ UINT nCodePage) throw(...) : CW2AEX<t_nBufferLength>(psz, nCodePage) {} + + /// + /// Sanitizes string memory, then destroys it + /// + ~CW2AParanoidEX() + { + // Sanitize before free. + if (m_psz != m_szBuffer) + SecureZeroMemory(m_psz, _msize(m_psz)); + else + SecureZeroMemory(m_szBuffer, sizeof(m_szBuffer)); + } + }; + + /// + /// Support for string conversion with memory sanitization after use + /// + typedef CW2AParanoidEX<> CW2AParanoid; + + /// @} +} Propchange: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlex.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlmsi.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/sdk/inc…
============================================================================== --- branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlmsi.h (added) +++ branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlmsi.h [iso-8859-1] Tue Jul 11 22:08:48 2017 @@ -0,0 +1,326 @@ +/* + Copyright 1991-2017 Amebis + + This file is part of atlex. + + Setup is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Setup is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Setup. If not, see <
http://www.gnu.org/licenses/
>. +*/ + +#pragma once + +#include "atlex.h" +#include <atlcoll.h> +#include <atlstr.h> +#include <MsiQuery.h> + +/// +/// \defgroup ATLMSIAPI Microsoft Installer API +/// Integrates ATL classes with Microsoft Installer API +/// +/// @{ + +/// +/// Gets the value for an installer property and stores it in a ATL::CAtlStringA string. +/// +/// \sa [MsiGetProperty
function](https://msdn.microsoft.com/en-us/library/aa370134.aspx)
+/// +inline UINT MsiGetPropertyA(_In_ MSIHANDLE hInstall, _In_ LPCSTR szName, _Out_ ATL::CAtlStringA &sValue) +{ + CHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(CHAR)]; + DWORD dwSize = _countof(szStackBuffer); + UINT uiResult; + + // Try with stack buffer first. + uiResult = ::MsiGetPropertyA(hInstall, szName, szStackBuffer, &dwSize); + if (uiResult == NO_ERROR) { + // Allocate buffer on heap, copy from stack buffer, and zero terminate. + LPSTR szBuffer = sValue.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + memcpy(szBuffer, szStackBuffer, dwSize); + sValue.ReleaseBuffer(dwSize); + return NO_ERROR; + } else if (uiResult == ERROR_MORE_DATA) { + // Allocate buffer on heap to read the string data into and read it. + LPSTR szBuffer = sValue.GetBuffer(dwSize++); + if (!szBuffer) return ERROR_OUTOFMEMORY; + uiResult = ::MsiGetPropertyA(hInstall, szName, szBuffer, &dwSize); + sValue.ReleaseBuffer(uiResult == NO_ERROR ? dwSize : 0); + return uiResult; + } else { + // Return error code. + return uiResult; + } +} + + +/// +/// Gets the value for an installer property and stores it in a ATL::CAtlStringW string. +/// +/// \sa [MsiGetProperty
function](https://msdn.microsoft.com/en-us/library/aa370134.aspx)
+/// +inline UINT MsiGetPropertyW(_In_ MSIHANDLE hInstall, _In_ LPCWSTR szName, _Out_ ATL::CAtlStringW &sValue) +{ + WCHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(WCHAR)]; + DWORD dwSize = _countof(szStackBuffer); + UINT uiResult; + + // Try with stack buffer first. + uiResult = ::MsiGetPropertyW(hInstall, szName, szStackBuffer, &dwSize); + if (uiResult == NO_ERROR) { + // Allocate buffer on heap, copy from stack buffer, and zero terminate. + LPWSTR szBuffer = sValue.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + wmemcpy(szBuffer, szStackBuffer, dwSize); + sValue.ReleaseBuffer(dwSize); + return NO_ERROR; + } else if (uiResult == ERROR_MORE_DATA) { + // Allocate buffer on heap to read the string data into and read it. + LPWSTR szBuffer = sValue.GetBuffer(dwSize++); + if (!szBuffer) return ERROR_OUTOFMEMORY; + uiResult = ::MsiGetPropertyW(hInstall, szName, szBuffer, &dwSize); + sValue.ReleaseBuffer(uiResult == NO_ERROR ? dwSize : 0); + return uiResult; + } else { + // Return error code. + return uiResult; + } +} + + +/// +/// Returns the string value of a record field and stores it in a ATL::CAtlStringA string. +/// +/// \sa [MsiRecordGetString
function](https://msdn.microsoft.com/en-us/library/aa370368.aspx)
+/// +inline UINT MsiRecordGetStringA(_In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Out_ ATL::CAtlStringA &sValue) +{ + CHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(CHAR)]; + DWORD dwSize = _countof(szStackBuffer); + UINT uiResult; + + // Try with stack buffer first. + uiResult = ::MsiRecordGetStringA(hRecord, iField, szStackBuffer, &dwSize); + if (uiResult == NO_ERROR) { + // Allocate buffer on heap, copy from stack buffer, and zero terminate. + LPSTR szBuffer = sValue.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + memcpy(szBuffer, szStackBuffer, dwSize); + sValue.ReleaseBuffer(dwSize); + return NO_ERROR; + } else if (uiResult == ERROR_MORE_DATA) { + // Allocate buffer on heap to read the string data into and read it. + LPSTR szBuffer = sValue.GetBuffer(dwSize++); + if (!szBuffer) return ERROR_OUTOFMEMORY; + uiResult = ::MsiRecordGetStringA(hRecord, iField, szBuffer, &dwSize); + sValue.ReleaseBuffer(uiResult == NO_ERROR ? dwSize : 0); + return uiResult; + } else { + // Return error code. + return uiResult; + } +} + + +/// +/// Returns the string value of a record field and stores it in a ATL::CAtlStringW string. +/// +/// \sa [MsiRecordGetString
function](https://msdn.microsoft.com/en-us/library/aa370368.aspx)
+/// +inline UINT MsiRecordGetStringW(_In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Out_ ATL::CAtlStringW &sValue) +{ + WCHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(WCHAR)]; + DWORD dwSize = _countof(szStackBuffer); + UINT uiResult; + + // Try with stack buffer first. + uiResult = ::MsiRecordGetStringW(hRecord, iField, szStackBuffer, &dwSize); + if (uiResult == NO_ERROR) { + // Allocate buffer on heap, copy from stack buffer, and zero terminate. + LPWSTR szBuffer = sValue.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + wmemcpy(szBuffer, szStackBuffer, dwSize); + sValue.ReleaseBuffer(dwSize); + return NO_ERROR; + } else if (uiResult == ERROR_MORE_DATA) { + // Allocate buffer on heap to read the string data into and read it. + LPWSTR szBuffer = sValue.GetBuffer(dwSize++); + if (!szBuffer) return ERROR_OUTOFMEMORY; + uiResult = ::MsiRecordGetStringW(hRecord, iField, szBuffer, &dwSize); + sValue.ReleaseBuffer(uiResult == NO_ERROR ? dwSize : 0); + return uiResult; + } else { + // Return error code. + return uiResult; + } +} + + +/// +/// Formats record field data and properties using a format string and stores it in a ATL::CAtlStringA string. +/// +/// \sa [MsiFormatRecord
function](https://msdn.microsoft.com/en-us/library/aa370109.aspx)
+/// +inline UINT MsiFormatRecordA(MSIHANDLE hInstall, MSIHANDLE hRecord, ATL::CAtlStringA &sValue) +{ + CHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(CHAR)]; + DWORD dwSize = _countof(szStackBuffer); + UINT uiResult; + + // Try with stack buffer first. + uiResult = ::MsiFormatRecordA(hInstall, hRecord, szStackBuffer, &dwSize); + if (uiResult == NO_ERROR) { + // Allocate buffer on heap, copy from stack buffer, and zero terminate. + LPSTR szBuffer = sValue.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + memcpy(szBuffer, szStackBuffer, dwSize); + sValue.ReleaseBuffer(dwSize); + return NO_ERROR; + } else if (uiResult == ERROR_MORE_DATA) { + // Allocate buffer on heap to format the string data into and read it. + LPSTR szBuffer = sValue.GetBuffer(dwSize++); + if (!szBuffer) return ERROR_OUTOFMEMORY; + uiResult = ::MsiFormatRecordA(hInstall, hRecord, szBuffer, &dwSize); + sValue.ReleaseBuffer(uiResult == NO_ERROR ? dwSize : 0); + return uiResult; + } else { + // Return error code. + return uiResult; + } +} + + +/// +/// Formats record field data and properties using a format string and stores it in a ATL::CAtlStringW string. +/// +/// \sa [MsiFormatRecord
function](https://msdn.microsoft.com/en-us/library/aa370109.aspx)
+/// +inline UINT MsiFormatRecordW(MSIHANDLE hInstall, MSIHANDLE hRecord, ATL::CAtlStringW &sValue) +{ + WCHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(WCHAR)]; + DWORD dwSize = _countof(szStackBuffer); + UINT uiResult; + + // Try with stack buffer first. + uiResult = ::MsiFormatRecordW(hInstall, hRecord, szStackBuffer, &dwSize); + if (uiResult == NO_ERROR) { + // Allocate buffer on heap, copy from stack buffer, and zero terminate. + LPWSTR szBuffer = sValue.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + wmemcpy(szBuffer, szStackBuffer, dwSize); + sValue.ReleaseBuffer(dwSize); + return NO_ERROR; + } else if (uiResult == ERROR_MORE_DATA) { + // Allocate buffer on heap to format the string data into and read it. + LPWSTR szBuffer = sValue.GetBuffer(dwSize++); + if (!szBuffer) return ERROR_OUTOFMEMORY; + uiResult = ::MsiFormatRecordW(hInstall, hRecord, szBuffer, &dwSize); + sValue.ReleaseBuffer(uiResult == NO_ERROR ? dwSize : 0); + return uiResult; + } else { + // Return error code. + return uiResult; + } +} + + +/// +/// Reads bytes from a record stream field into a ATL::CAtlArray<BYTE> buffer. +/// +/// \sa [MsiRecordReadStream
function](https://msdn.microsoft.com/en-us/library/aa370370.aspx)
+/// +inline UINT MsiRecordReadStream(_In_ MSIHANDLE hRecord, _In_ unsigned int iField, _Out_ ATL::CAtlArray<BYTE> &binData) +{ + DWORD dwSize = 0; + UINT uiResult; + + // Query the actual data length first. + uiResult = ::MsiRecordReadStream(hRecord, iField, NULL, &dwSize); + if (uiResult == NO_ERROR) { + if (!binData.SetCount(dwSize)) return ERROR_OUTOFMEMORY; + return ::MsiRecordReadStream(hRecord, iField, (char*)binData.GetData(), &dwSize); + } else { + // Return error code. + return uiResult; + } +} + + +/// +/// Returns the full target path for a folder in the Directory table and stores it in a ATL::CAtlStringA string. +/// +/// \sa [MsiGetTargetPath
function](https://msdn.microsoft.com/en-us/library/aa370303.aspx)
+/// +inline UINT MsiGetTargetPathA(_In_ MSIHANDLE hInstall, _In_ LPCSTR szFolder, _Out_ ATL::CAtlStringA &sValue) +{ + CHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(CHAR)]; + DWORD dwSize = _countof(szStackBuffer); + UINT uiResult; + + // Try with stack buffer first. + uiResult = ::MsiGetTargetPathA(hInstall, szFolder, szStackBuffer, &dwSize); + if (uiResult == NO_ERROR) { + // Allocate buffer on heap, copy from stack buffer, and zero terminate. + LPSTR szBuffer = sValue.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + memcpy(szBuffer, szStackBuffer, dwSize); + sValue.ReleaseBuffer(dwSize); + return NO_ERROR; + } else if (uiResult == ERROR_MORE_DATA) { + // Allocate buffer on heap to format the string data into and read it. + LPSTR szBuffer = sValue.GetBuffer(dwSize++); + if (!szBuffer) return ERROR_OUTOFMEMORY; + uiResult = ::MsiGetTargetPathA(hInstall, szFolder, szBuffer, &dwSize); + sValue.ReleaseBuffer(uiResult == NO_ERROR ? dwSize : 0); + return uiResult; + } else { + // Return error code. + return uiResult; + } +} + + +/// +/// Returns the full target path for a folder in the Directory table and stores it in a ATL::CAtlStringW string. +/// +/// \sa [MsiGetTargetPath
function](https://msdn.microsoft.com/en-us/library/aa370303.aspx)
+/// +inline UINT MsiGetTargetPathW(_In_ MSIHANDLE hInstall, _In_ LPCWSTR szFolder, _Out_ ATL::CAtlStringW &sValue) +{ + WCHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(WCHAR)]; + DWORD dwSize = _countof(szStackBuffer); + UINT uiResult; + + // Try with stack buffer first. + uiResult = ::MsiGetTargetPathW(hInstall, szFolder, szStackBuffer, &dwSize); + if (uiResult == NO_ERROR) { + // Allocate buffer on heap, copy from stack buffer, and zero terminate. + LPWSTR szBuffer = sValue.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + wmemcpy(szBuffer, szStackBuffer, dwSize); + sValue.ReleaseBuffer(dwSize); + return NO_ERROR; + } else if (uiResult == ERROR_MORE_DATA) { + // Allocate buffer on heap to format the string data into and read it. + LPWSTR szBuffer = sValue.GetBuffer(dwSize++); + if (!szBuffer) return ERROR_OUTOFMEMORY; + uiResult = ::MsiGetTargetPathW(hInstall, szFolder, szBuffer, &dwSize); + sValue.ReleaseBuffer(uiResult == NO_ERROR ? dwSize : 0); + return uiResult; + } else { + // Return error code. + return uiResult; + } +} + +/// @} Propchange: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlmsi.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlsec.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/sdk/inc…
============================================================================== --- branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlsec.h (added) +++ branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlsec.h [iso-8859-1] Tue Jul 11 22:08:48 2017 @@ -0,0 +1,117 @@ +/* + Copyright 1991-2017 Amebis + + This file is part of atlex. + + Setup is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Setup is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Setup. If not, see <
http://www.gnu.org/licenses/
>. +*/ + +#pragma once + +#include <Security.h> + +/// +/// \defgroup ATLSecurityAPI Security API +/// Integrates ATL classes with Microsoft Security API +/// +/// @{ + +/// +/// Retrieves the name of the user or other security principal associated with the calling thread and stores it in a ATL::CAtlStringA string. +/// +/// \sa [GetUserNameEx
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724435…
+/// +BOOLEAN GetUserNameExA(_In_ EXTENDED_NAME_FORMAT NameFormat, _Out_ ATL::CAtlStringA &sName) +{ + CHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(CHAR)]; + ULONG ulSize = _countof(szStackBuffer); + + // Try with stack buffer first. + if (::GetUserNameExA(NameFormat, szStackBuffer, &ulSize)) { + // Allocate buffer on heap, copy from stack buffer, and zero terminate. + LPSTR szBuffer = sName.GetBuffer(ulSize); + if (!szBuffer) { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + memcpy(szBuffer, szStackBuffer, ulSize); + sName.ReleaseBuffer(ulSize); + return TRUE; + } else { + if (::GetLastError() == ERROR_MORE_DATA) { + // Allocate buffer on heap and retry. + LPSTR szBuffer = sName.GetBuffer(ulSize - 1); + if (!szBuffer) { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + if (::GetUserNameExA(NameFormat, szBuffer, &ulSize)) { + sName.ReleaseBuffer(ulSize); + return TRUE; + } else { + sName.ReleaseBuffer(0); + return FALSE; + } + } else { + // Return error. + return FALSE; + } + } +} + + +/// +/// Retrieves the name of the user or other security principal associated with the calling thread and stores it in a ATL::CAtlStringW string. +/// +/// \sa [GetUserNameEx
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724435…
+/// +BOOLEAN GetUserNameExW(_In_ EXTENDED_NAME_FORMAT NameFormat, _Out_ ATL::CAtlStringW &sName) +{ + WCHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(WCHAR)]; + ULONG ulSize = _countof(szStackBuffer); + + // Try with stack buffer first. + if (::GetUserNameExW(NameFormat, szStackBuffer, &ulSize)) { + // Allocate buffer on heap, copy from stack buffer, and zero terminate. + LPWSTR szBuffer = sName.GetBuffer(ulSize); + if (!szBuffer) { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + wmemcpy(szBuffer, szStackBuffer, ulSize); + sName.ReleaseBuffer(ulSize); + return TRUE; + } else { + if (::GetLastError() == ERROR_MORE_DATA) { + // Allocate buffer on heap and retry. + LPWSTR szBuffer = sName.GetBuffer(ulSize - 1); + if (!szBuffer) { + SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + if (::GetUserNameExW(NameFormat, szBuffer, &ulSize)) { + sName.ReleaseBuffer(ulSize); + return TRUE; + } else { + sName.ReleaseBuffer(0); + return FALSE; + } + } else { + // Return error. + return FALSE; + } + } +} + +/// @} Propchange: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlsec.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlshlwapi.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/sdk/inc…
============================================================================== --- branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlshlwapi.h (added) +++ branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlshlwapi.h [iso-8859-1] Tue Jul 11 22:08:48 2017 @@ -0,0 +1,70 @@ +/* + Copyright 1991-2017 Amebis + + This file is part of atlex. + + Setup is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Setup is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Setup. If not, see <
http://www.gnu.org/licenses/
>. +*/ + +#pragma once + +#include <atlstr.h> +#include <Shlwapi.h> + +/// +/// \defgroup ATLShellWAPI Shell API +/// Integrates ATL classes with Microsoft Shell API +/// +/// @{ + +/// +/// Simplifies a path by removing navigation elements such as "." and ".." to produce a direct, well-formed path, and stores it in a ATL::CAtlStringA string. +/// +/// \sa [PathCanonicalize
function](https://msdn.microsoft.com/en-us/library/windows/desktop/bb773569…
+/// +inline BOOL PathCanonicalizeA(__out ATL::CAtlStringA &sValue, __in LPCSTR pszPath) +{ + // Allocate buffer on heap and read into it. + LPSTR szBuffer = sValue.GetBuffer(MAX_PATH); + if (!szBuffer) { + ::SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + BOOL bResult = ::PathCanonicalizeA(szBuffer, pszPath); + sValue.ReleaseBuffer(bResult ? (int)strnlen(szBuffer, MAX_PATH) : 0); + sValue.FreeExtra(); + return bResult; +} + + +/// +/// Simplifies a path by removing navigation elements such as "." and ".." to produce a direct, well-formed path, and stores it in a ATL::CAtlStringW string. +/// +/// \sa [PathCanonicalize
function](https://msdn.microsoft.com/en-us/library/windows/desktop/bb773569…
+/// +inline BOOL PathCanonicalizeW(__out ATL::CAtlStringW &sValue, __in LPCWSTR pszPath) +{ + // Allocate buffer on heap and read into it. + LPWSTR szBuffer = sValue.GetBuffer(MAX_PATH); + if (!szBuffer) { + ::SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + BOOL bResult = ::PathCanonicalizeW(szBuffer, pszPath); + sValue.ReleaseBuffer(bResult ? (int)wcsnlen(szBuffer, MAX_PATH) : 0); + sValue.FreeExtra(); + return bResult; +} + +/// @} Propchange: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlshlwapi.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlwin.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/sdk/inc…
============================================================================== --- branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlwin.h (added) +++ branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlwin.h [iso-8859-1] Tue Jul 11 22:08:48 2017 @@ -0,0 +1,623 @@ +/* + Copyright 1991-2017 Amebis + + This file is part of atlex. + + Setup is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Setup is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Setup. If not, see <
http://www.gnu.org/licenses/
>. +*/ + +#pragma once + +#include "atlex.h" +#include <atlcoll.h> +#include <atlstr.h> +#include <Windows.h> + +/// +/// \defgroup ATLWinAPI Windows API +/// Integrates ATL classes with Microsoft Windows API +/// +/// @{ + +/// +/// Retrieves the fully qualified path for the file that contains the specified module and stores it in a ATL::CAtlStringA string. +/// +/// \sa [GetModuleFileName
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms683197…
+/// +inline DWORD GetModuleFileNameA(_In_opt_ HMODULE hModule, _Out_ ATL::CAtlStringA &sValue) +{ + DWORD dwSize = 0; + + for (;;) { + // Increment size and allocate buffer. + LPSTR szBuffer = sValue.GetBuffer(dwSize += 1024); + if (!szBuffer) { + ::SetLastError(ERROR_OUTOFMEMORY); + return 0; + } + + // Try! + DWORD dwResult = ::GetModuleFileNameA(hModule, szBuffer, dwSize); + if (dwResult == 0) { + // Error. + sValue.ReleaseBuffer(0); + return 0; + } else if (dwResult < dwSize) { + DWORD dwLength = (DWORD)strnlen(szBuffer, dwSize); + sValue.ReleaseBuffer(dwLength++); + if (dwLength == dwSize) { + // Buffer was long exactly enough. + return dwResult; + } if (dwLength < dwSize) { + // Buffer was long enough to get entire string, and has some extra space left. + sValue.FreeExtra(); + return dwResult; + } + } + } +} + + +/// +/// Retrieves the fully qualified path for the file that contains the specified module and stores it in a ATL::CAtlStringW string. +/// +/// \sa [GetModuleFileName
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms683197…
+/// +inline DWORD GetModuleFileNameW(_In_opt_ HMODULE hModule, _Out_ ATL::CAtlStringW &sValue) +{ + DWORD dwSize = 0; + + for (;;) { + // Increment size and allocate buffer. + LPWSTR szBuffer = sValue.GetBuffer(dwSize += 1024); + if (!szBuffer) { + ::SetLastError(ERROR_OUTOFMEMORY); + return 0; + } + + // Try! + DWORD dwResult = ::GetModuleFileNameW(hModule, szBuffer, dwSize); + if (dwResult == 0) { + // Error. + sValue.ReleaseBuffer(0); + return 0; + } else if (dwResult < dwSize) { + DWORD dwLength = (DWORD)wcsnlen(szBuffer, dwSize); + sValue.ReleaseBuffer(dwLength++); + if (dwLength == dwSize) { + // Buffer was long exactly enough. + return dwResult; + } if (dwLength < dwSize) { + // Buffer was long enough to get entire string, and has some extra space left. + sValue.FreeExtra(); + return dwResult; + } + } + } +} + + +/// +/// Copies the text of the specified window's title bar (if it has one) into a ATL::CAtlStringA string. +/// +/// \sa [GetWindowText
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633520…
+/// +inline int GetWindowTextA(_In_ HWND hWnd, _Out_ ATL::CAtlStringA &sValue) +{ + int iResult; + + // Query the final string length first. + iResult = ::GetWindowTextLengthA(hWnd); + if (iResult > 0) { + // Allocate buffer on heap and read the string data into it. + LPSTR szBuffer = sValue.GetBuffer(iResult++); + if (!szBuffer) { + SetLastError(ERROR_OUTOFMEMORY); + return 0; + } + iResult = ::GetWindowTextA(hWnd, szBuffer, iResult); + sValue.ReleaseBuffer(iResult); + return iResult; + } else { + // The result is empty. + sValue.Empty(); + return 0; + } +} + + +/// +/// Copies the text of the specified window's title bar (if it has one) into a ATL::CAtlStringW string. +/// +/// \sa [GetWindowText
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633520…
+/// +inline int GetWindowTextW(_In_ HWND hWnd, _Out_ ATL::CAtlStringW &sValue) +{ + int iResult; + + // Query the final string length first. + iResult = ::GetWindowTextLengthW(hWnd); + if (iResult > 0) { + // Allocate buffer on heap and read the string data into it. + LPWSTR szBuffer = sValue.GetBuffer(iResult++); + if (!szBuffer) { + SetLastError(ERROR_OUTOFMEMORY); + return 0; + } + iResult = ::GetWindowTextW(hWnd, szBuffer, iResult); + sValue.ReleaseBuffer(iResult); + return iResult; + } else { + // The result is empty. + sValue.Empty(); + return 0; + } +} + + +/// +/// Retrieves version information for the specified file and stores it in a ATL::CAtlStringA string. +/// +/// \sa [GetFileVersionInfo
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms647003…
+/// +inline BOOL GetFileVersionInfoA(_In_ LPCSTR lptstrFilename, __reserved DWORD dwHandle, _Out_ ATL::CAtlArray<BYTE> &aValue) +{ + // Get version info size. + DWORD dwVerInfoSize = ::GetFileVersionInfoSizeA(lptstrFilename, &dwHandle); + if (dwVerInfoSize != 0) { + if (aValue.SetCount(dwVerInfoSize)) { + // Read version info. + return ::GetFileVersionInfoA(lptstrFilename, dwHandle, dwVerInfoSize, aValue.GetData()); + } else { + ::SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + } else + return FALSE; +} + + +/// +/// Retrieves version information for the specified file and stores it in a ATL::CAtlStringW string. +/// +/// \sa [GetFileVersionInfo
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms647003…
+/// +inline BOOL GetFileVersionInfoW(_In_ LPCWSTR lptstrFilename, __reserved DWORD dwHandle, _Out_ ATL::CAtlArray<BYTE> &aValue) +{ + // Get version info size. + DWORD dwVerInfoSize = ::GetFileVersionInfoSizeW(lptstrFilename, &dwHandle); + if (dwVerInfoSize != 0) { + if (aValue.SetCount(dwVerInfoSize)) { + // Read version info. + return ::GetFileVersionInfoW(lptstrFilename, dwHandle, dwVerInfoSize, aValue.GetData()); + } else { + ::SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + } else + return FALSE; +} + + +/// +/// Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a ATL::CAtlStringA string. +/// +/// \sa [ExpandEnvironmentStrings
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724265…
+/// +inline DWORD ExpandEnvironmentStringsA(_In_ LPCSTR lpSrc, ATL::CAtlStringA &sValue) +{ + DWORD dwBufferSizeEst = (DWORD)strlen(lpSrc) + 0x100; // Initial estimate + + for (;;) { + DWORD dwBufferSize = dwBufferSizeEst; + LPSTR szBuffer = sValue.GetBuffer(dwBufferSize); + if (!szBuffer) { + ::SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + dwBufferSizeEst = ::ExpandEnvironmentStringsA(lpSrc, szBuffer, dwBufferSize); + if (dwBufferSizeEst > dwBufferSize) { + // The buffer was to small. Repeat with a bigger one. + sValue.ReleaseBuffer(0); + } else if (dwBufferSizeEst == 0) { + // Error. + sValue.ReleaseBuffer(0); + return 0; + } else { + // The buffer was sufficient. Break. + sValue.ReleaseBuffer(); + sValue.FreeExtra(); + return dwBufferSizeEst; + } + } +} + + +/// +/// Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a ATL::CAtlStringW string. +/// +/// \sa [ExpandEnvironmentStrings
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724265…
+/// +inline DWORD ExpandEnvironmentStringsW(_In_ LPCWSTR lpSrc, ATL::CAtlStringW &sValue) +{ + DWORD dwBufferSizeEst = (DWORD)wcslen(lpSrc) + 0x100; // Initial estimate + + for (;;) { + DWORD dwBufferSize = dwBufferSizeEst; + LPWSTR szBuffer = sValue.GetBuffer(dwBufferSize); + if (!szBuffer) { + ::SetLastError(ERROR_OUTOFMEMORY); + return FALSE; + } + dwBufferSizeEst = ::ExpandEnvironmentStringsW(lpSrc, szBuffer, dwBufferSize); + if (dwBufferSizeEst > dwBufferSize) { + // The buffer was to small. Repeat with a bigger one. + sValue.ReleaseBuffer(0); + } else if (dwBufferSizeEst == 0) { + // Error. + sValue.ReleaseBuffer(0); + return 0; + } else { + // The buffer was sufficient. Break. + sValue.ReleaseBuffer(); + sValue.FreeExtra(); + return dwBufferSizeEst; + } + } +} + + +/// +/// Formats GUID and stores it in a ATL::CAtlStringA string. +/// +/// \param[in] lpGuid Pointer to GUID +/// \param[out] str String to store the result to +/// +inline VOID GuidToString(_In_ LPCGUID lpGuid, _Out_ ATL::CAtlStringA &str) +{ + str.Format("{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + lpGuid->Data1, + lpGuid->Data2, + lpGuid->Data3, + lpGuid->Data4[0], lpGuid->Data4[1], + lpGuid->Data4[2], lpGuid->Data4[3], lpGuid->Data4[4], lpGuid->Data4[5], lpGuid->Data4[6], lpGuid->Data4[7]); +} + + +/// +/// Formats GUID and stores it in a ATL::CAtlStringW string. +/// +/// \param[in] lpGuid Pointer to GUID +/// \param[out] str String to store the result to +/// +inline VOID GuidToString(_In_ LPCGUID lpGuid, _Out_ ATL::CAtlStringW &str) +{ + str.Format(L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + lpGuid->Data1, + lpGuid->Data2, + lpGuid->Data3, + lpGuid->Data4[0], lpGuid->Data4[1], + lpGuid->Data4[2], lpGuid->Data4[3], lpGuid->Data4[4], lpGuid->Data4[5], lpGuid->Data4[6], lpGuid->Data4[7]); +} + + +/// +/// Queries for a string value in the registry and stores it in a ATL::CAtlStringA string. +/// +/// `REG_EXPAND_SZ` are expanded using `ExpandEnvironmentStrings()` before storing to sValue. +/// +/// \param[in] hReg A handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right. +/// \param[in] pszName The name of the registry value. If lpValueName is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any. +/// \param[out] sValue String to store the value to +/// \return +/// - `ERROR_SUCCESS` when query succeeds; +/// - `ERROR_INVALID_DATA` when the registy value type is not `REG_SZ`, `REG_MULTI_SZ`, or `REG_EXPAND_SZ`; +/// - `ERROR_OUTOFMEMORY` when the memory allocation for the sValue buffer fails; +/// - Error code when query fails. See `RegQueryValueEx()` for the list of error codes. +/// \sa [RegQueryValueEx
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724911…
+/// \sa [ExpandEnvironmentStrings
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724265…
+/// +inline LSTATUS RegQueryStringValue(_In_ HKEY hReg, _In_z_ LPCSTR pszName, _Out_ ATL::CAtlStringA &sValue) +{ + LSTATUS lResult; + BYTE aStackBuffer[ATL_STACK_BUFFER_BYTES]; + DWORD dwSize = sizeof(aStackBuffer), dwType; + + // Try with stack buffer first. + lResult = ::RegQueryValueExA(hReg, pszName, NULL, &dwType, aStackBuffer, &dwSize); + if (lResult == ERROR_SUCCESS) { + if (dwType == REG_SZ || dwType == REG_MULTI_SZ) { + // The value is REG_SZ or REG_MULTI_SZ. Allocate buffer on heap, copy from stack buffer. + LPSTR szBuffer = sValue.GetBuffer(dwSize / sizeof(CHAR)); + if (!szBuffer) return ERROR_OUTOFMEMORY; + memcpy(szBuffer, aStackBuffer, dwSize); + sValue.ReleaseBuffer(); + } else if (dwType == REG_EXPAND_SZ) { + // The value is REG_EXPAND_SZ. Expand it from stack buffer. + if (::ExpandEnvironmentStringsA((const CHAR*)aStackBuffer, sValue) == 0) + lResult = ::GetLastError(); + } else { + // The value is not a string type. + lResult = ERROR_INVALID_DATA; + } + } else if (lResult == ERROR_MORE_DATA) { + if (dwType == REG_SZ || dwType == REG_MULTI_SZ) { + // The value is REG_SZ or REG_MULTI_SZ. Read it now. + LPSTR szBuffer = sValue.GetBuffer(dwSize / sizeof(CHAR)); + if (!szBuffer) return ERROR_OUTOFMEMORY; + if ((lResult = ::RegQueryValueExA(hReg, pszName, NULL, NULL, (LPBYTE)szBuffer, &dwSize)) == ERROR_SUCCESS) { + sValue.ReleaseBuffer(); + } else { + // Reading of the value failed. + sValue.ReleaseBuffer(0); + } + } else if (dwType == REG_EXPAND_SZ) { + // The value is REG_EXPAND_SZ. Read it and expand environment variables. + ATL::CTempBuffer<CHAR> sTemp(dwSize / sizeof(CHAR)); + if ((lResult = ::RegQueryValueExA(hReg, pszName, NULL, NULL, (LPBYTE)(CHAR*)sTemp, &dwSize)) == ERROR_SUCCESS) + if (::ExpandEnvironmentStringsA((const CHAR*)sTemp, sValue) == 0) + lResult = ::GetLastError(); + } else { + // The value is not a string type. + lResult = ERROR_INVALID_DATA; + } + } + + return lResult; +} + + +/// +/// Queries for a string value in the registry and stores it in a ATL::CAtlStringW string. +/// +/// `REG_EXPAND_SZ` are expanded using `ExpandEnvironmentStrings()` before storing to sValue. +/// +/// \param[in] hReg A handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right. +/// \param[in] pszName The name of the registry value. If lpValueName is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any. +/// \param[out] sValue String to store the value to +/// \return +/// - `ERROR_SUCCESS` when query succeeds; +/// - `ERROR_INVALID_DATA` when the registy value type is not `REG_SZ`, `REG_MULTI_SZ`, or `REG_EXPAND_SZ`; +/// - `ERROR_OUTOFMEMORY` when the memory allocation for the sValue buffer fails; +/// - Error code when query fails. See `RegQueryValueEx()` for the list of error codes. +/// \sa [RegQueryValueEx
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724911…
+/// \sa [ExpandEnvironmentStrings
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724265…
+/// +inline LSTATUS RegQueryStringValue(_In_ HKEY hReg, _In_z_ LPCWSTR pszName, _Out_ ATL::CAtlStringW &sValue) +{ + LSTATUS lResult; + BYTE aStackBuffer[ATL_STACK_BUFFER_BYTES]; + DWORD dwSize = sizeof(aStackBuffer), dwType; + + // Try with stack buffer first. + lResult = ::RegQueryValueExW(hReg, pszName, NULL, &dwType, aStackBuffer, &dwSize); + if (lResult == ERROR_SUCCESS) { + if (dwType == REG_SZ || dwType == REG_MULTI_SZ) { + // The value is REG_SZ or REG_MULTI_SZ. Allocate buffer on heap, copy from stack buffer. + LPWSTR szBuffer = sValue.GetBuffer(dwSize / sizeof(WCHAR)); + if (!szBuffer) return ERROR_OUTOFMEMORY; + memcpy(szBuffer, aStackBuffer, dwSize); + sValue.ReleaseBuffer(); + } else if (dwType == REG_EXPAND_SZ) { + // The value is REG_EXPAND_SZ. Expand it from stack buffer. + if (::ExpandEnvironmentStringsW((const WCHAR*)aStackBuffer, sValue) == 0) + lResult = ::GetLastError(); + } else { + // The value is not a string type. + lResult = ERROR_INVALID_DATA; + } + } else if (lResult == ERROR_MORE_DATA) { + if (dwType == REG_SZ || dwType == REG_MULTI_SZ) { + // The value is REG_SZ or REG_MULTI_SZ. Read it now. + LPWSTR szBuffer = sValue.GetBuffer(dwSize / sizeof(WCHAR)); + if (!szBuffer) return ERROR_OUTOFMEMORY; + if ((lResult = ::RegQueryValueExW(hReg, pszName, NULL, NULL, (LPBYTE)szBuffer, &dwSize)) == ERROR_SUCCESS) { + sValue.ReleaseBuffer(); + } else { + // Reading of the value failed. + sValue.ReleaseBuffer(0); + } + } else if (dwType == REG_EXPAND_SZ) { + // The value is REG_EXPAND_SZ. Read it and expand environment variables. + ATL::CTempBuffer<WCHAR> sTemp(dwSize / sizeof(WCHAR)); + if ((lResult = ::RegQueryValueExW(hReg, pszName, NULL, NULL, (LPBYTE)(WCHAR*)sTemp, &dwSize)) == ERROR_SUCCESS) + if (::ExpandEnvironmentStringsW((const WCHAR*)sTemp, sValue) == 0) + lResult = ::GetLastError(); + } else { + // The value is not a string type. + lResult = ERROR_INVALID_DATA; + } + } + + return lResult; +} + + +/// +/// Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a ATL::CAtlArray<BYTE> buffer. +/// +/// \sa [RegQueryValueEx
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724911…
+/// +inline LSTATUS RegQueryValueExA(_In_ HKEY hKey, _In_opt_ LPCSTR lpValueName, __reserved LPDWORD lpReserved, _Out_opt_ LPDWORD lpType, _Out_ ATL::CAtlArray<BYTE> &aData) +{ + LSTATUS lResult; + BYTE aStackBuffer[ATL_STACK_BUFFER_BYTES]; + DWORD dwSize = sizeof(aStackBuffer); + + // Try with stack buffer first. + lResult = RegQueryValueExA(hKey, lpValueName, lpReserved, NULL, aStackBuffer, &dwSize); + if (lResult == ERROR_SUCCESS) { + // Allocate buffer on heap, copy from stack buffer. + if (!aData.SetCount(dwSize)) return ERROR_OUTOFMEMORY; + memcpy(aData.GetData(), aStackBuffer, dwSize); + } else if (lResult == ERROR_MORE_DATA) { + // Allocate buffer on heap and retry. + if (!aData.SetCount(dwSize)) return ERROR_OUTOFMEMORY; + if ((lResult = RegQueryValueExA(hKey, lpValueName, lpReserved, lpType, aData.GetData(), &dwSize)) != ERROR_SUCCESS) + aData.SetCount(0); + } + + return lResult; +} + + +/// +/// Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a ATL::CAtlArray<BYTE> buffer. +/// +/// \sa [RegQueryValueEx
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724911…
+/// +inline LSTATUS RegQueryValueExW(_In_ HKEY hKey, _In_opt_ LPCWSTR lpValueName, __reserved LPDWORD lpReserved, _Out_opt_ LPDWORD lpType, _Out_ ATL::CAtlArray<BYTE> &aData) +{ + LSTATUS lResult; + BYTE aStackBuffer[ATL_STACK_BUFFER_BYTES]; + DWORD dwSize = sizeof(aStackBuffer); + + // Try with stack buffer first. + lResult = RegQueryValueExW(hKey, lpValueName, lpReserved, NULL, aStackBuffer, &dwSize); + if (lResult == ERROR_SUCCESS) { + // Allocate buffer on heap, copy from stack buffer. + if (!aData.SetCount(dwSize)) return ERROR_OUTOFMEMORY; + memcpy(aData.GetData(), aStackBuffer, dwSize); + } else if (lResult == ERROR_MORE_DATA) { + // Allocate buffer on heap and retry. + if (!aData.SetCount(dwSize)) return ERROR_OUTOFMEMORY; + if ((lResult = RegQueryValueExW(hKey, lpValueName, lpReserved, lpType, aData.GetData(), &dwSize)) != ERROR_SUCCESS) + aData.SetCount(0); + } + + return lResult; +} + + +#if _WIN32_WINNT >= _WIN32_WINNT_VISTA + +/// +/// Loads the specified string from the specified key and subkey, and stores it in a ATL::CAtlStringA string. +/// +/// \sa [RegLoadMUIString
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724890…
+/// +inline LSTATUS RegLoadMUIStringA(_In_ HKEY hKey, _In_opt_ LPCSTR pszValue, _Out_ ATL::CAtlStringA &sOut, _In_ DWORD Flags, _In_opt_ LPCSTR pszDirectory) +{ + LSTATUS lResult; + CHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(CHAR)]; + DWORD dwSize; + + Flags &= ~REG_MUI_STRING_TRUNCATE; + + // Try with stack buffer first. + lResult = RegLoadMUIStringA(hKey, pszValue, szStackBuffer, _countof(szStackBuffer), &dwSize, Flags, pszDirectory); + if (lResult == ERROR_SUCCESS) { + // Allocate buffer on heap, copy from stack buffer. + LPSTR szBuffer = sOut.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + memcpy(szBuffer, szStackBuffer, dwSize); + sOut.ReleaseBuffer(dwSize); + } else if (lResult == ERROR_MORE_DATA) { + // Allocate buffer on heap and retry. + LPSTR szBuffer = sOut.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + sOut.ReleaseBuffer((lResult = RegLoadMUIStringA(hKey, pszValue, szBuffer, dwSize, &dwSize, Flags, pszDirectory)) == ERROR_SUCCESS ? dwSize : 0); + } + + return lResult; +} + + +/// +/// Loads the specified string from the specified key and subkey, and stores it in a ATL::CAtlStringW string. +/// +/// \sa [RegLoadMUIString
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724890…
+/// +inline LSTATUS RegLoadMUIStringW(_In_ HKEY hKey, _In_opt_ LPCWSTR pszValue, _Out_ ATL::CAtlStringW &sOut, _In_ DWORD Flags, _In_opt_ LPCWSTR pszDirectory) +{ + LSTATUS lResult; + WCHAR szStackBuffer[ATL_STACK_BUFFER_BYTES/sizeof(WCHAR)]; + DWORD dwSize; + + Flags &= ~REG_MUI_STRING_TRUNCATE; + + // Try with stack buffer first. + lResult = RegLoadMUIStringW(hKey, pszValue, szStackBuffer, _countof(szStackBuffer), &dwSize, Flags, pszDirectory); + if (lResult == ERROR_SUCCESS) { + // Allocate buffer on heap, copy from stack buffer. + LPWSTR szBuffer = sOut.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + wmemcpy(szBuffer, szStackBuffer, dwSize); + sOut.ReleaseBuffer(dwSize); + } else if (lResult == ERROR_MORE_DATA) { + // Allocate buffer on heap and retry. + LPWSTR szBuffer = sOut.GetBuffer(dwSize); + if (!szBuffer) return ERROR_OUTOFMEMORY; + sOut.ReleaseBuffer((lResult = RegLoadMUIStringW(hKey, pszValue, szBuffer, dwSize, &dwSize, Flags, pszDirectory)) == ERROR_SUCCESS ? dwSize : 0); + } + + return lResult; +} + +#endif + +/// @} + + +namespace ATL +{ + /// \addtogroup ATLWinAPI + /// @{ + + /// + /// Module handle wrapper + /// + class CAtlLibrary : public CObjectWithHandleT<HMODULE> + { + public: + /// + /// Frees the module. + /// + /// \sa [
FreeLibrary](https://msdn.microsoft.com/en-us/library/windows/desktop/ms683…
+ /// + virtual ~CAtlLibrary() + { + if (m_h) + FreeLibrary(m_h); + } + + /// + /// Loads the specified module into the address space of the calling process. + /// + /// \sa [
LoadLibraryEx](https://msdn.microsoft.com/en-us/library/windows/desktop/ms6…
+ /// + inline BOOL Load(_In_ LPCTSTR lpFileName, __reserved HANDLE hFile, _In_ DWORD dwFlags) + { + HANDLE h = LoadLibraryEx(lpFileName, hFile, dwFlags); + if (h) { + Attach(h); + return TRUE; + } else + return FALSE; + } + + protected: + /// + /// Frees the module. + /// + /// \sa [
FreeLibrary](https://msdn.microsoft.com/en-us/library/windows/desktop/ms683…
+ /// + virtual void InternalFree() + { + FreeLibrary(m_h); + } + }; + + /// @} +} Propchange: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlwin.h ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlwlan.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/sdk/inc…
============================================================================== --- branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlwlan.h (added) +++ branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlwlan.h [iso-8859-1] Tue Jul 11 22:08:48 2017 @@ -0,0 +1,79 @@ +/* + Copyright 1991-2017 Amebis + + This file is part of atlex. + + Setup is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Setup is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Setup. If not, see <
http://www.gnu.org/licenses/
>. +*/ + +#pragma once + +#include <atlstr.h> +#include <wlanapi.h> + + +// Must not statically link to Wlanapi.dll as it is not available on Windows +// without a WLAN interface. +extern DWORD (WINAPI *pfnWlanReasonCodeToString)(__in DWORD dwReasonCode, __in DWORD dwBufferSize, __in_ecount(dwBufferSize) PWCHAR pStringBuffer, __reserved PVOID pReserved); + + +/// +/// \defgroup ATLWLANAPI WLAN API +/// Integrates ATL classes with Microsoft WLAN API +/// +/// @{ + +/// +/// Retrieves a string that describes a specified reason code and stores it in a ATL::CAtlStringW string. +/// +/// \sa [WlanReasonCodeToString
function](https://msdn.microsoft.com/en-us/library/windows/desktop/ms706768…
+/// +/// \note +/// Since Wlanapi.dll is not always present, the \c pfnWlanReasonCodeToString pointer to \c WlanReasonCodeToString +/// function must be loaded dynamically. +/// +inline DWORD WlanReasonCodeToString(_In_ DWORD dwReasonCode, _Out_ ATL::CAtlStringW &sValue, __reserved PVOID pReserved) +{ + DWORD dwSize = 0; + + if (!::pfnWlanReasonCodeToString) + return ERROR_CALL_NOT_IMPLEMENTED; + + for (;;) { + // Increment size and allocate buffer. + LPWSTR szBuffer = sValue.GetBuffer(dwSize += 1024); + if (!szBuffer) return ERROR_OUTOFMEMORY; + + // Try! + DWORD dwResult = ::pfnWlanReasonCodeToString(dwReasonCode, dwSize, szBuffer, pReserved); + if (dwResult == NO_ERROR) { + DWORD dwLength = (DWORD)wcsnlen(szBuffer, dwSize); + sValue.ReleaseBuffer(dwLength++); + if (dwLength == dwSize) { + // Buffer was long exactly enough. + return NO_ERROR; + } else if (dwLength < dwSize) { + // Buffer was long enough to get entire string, and has some extra space left. + sValue.FreeExtra(); + return NO_ERROR; + } + } else { + // Return error code. + sValue.ReleaseBuffer(0); + return dwResult; + } + } +} + +/// @} Propchange: branches/GSoC_2017/rapps/reactos/sdk/include/reactos/atlex/atlwlan.h ------------------------------------------------------------------------------ svn:eol-style = native
7 years, 3 months
1
0
0
0
[ashaposhnikov] 75318: [ATL] - Added missing operator+=
by ashaposhnikov@svn.reactos.org
Author: ashaposhnikov Date: Tue Jul 11 21:58:31 2017 New Revision: 75318 URL:
http://svn.reactos.org/svn/reactos?rev=75318&view=rev
Log: [ATL] - Added missing operator+= Modified: branches/GSoC_2017/rapps/reactos/sdk/lib/atl/cstringt.h Modified: branches/GSoC_2017/rapps/reactos/sdk/lib/atl/cstringt.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/sdk/lib…
============================================================================== --- branches/GSoC_2017/rapps/reactos/sdk/lib/atl/cstringt.h [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/sdk/lib/atl/cstringt.h [iso-8859-1] Tue Jul 11 21:58:31 2017 @@ -453,6 +453,12 @@ return *this; } + CStringT& operator+=(_In_ XCHAR ch) + { + CThisSimpleString::operator+=(ch); + return *this; + } + BOOL LoadString(_In_ UINT nID) { return LoadString(_AtlBaseModule.GetResourceInstance(), nID);
7 years, 3 months
1
0
0
0
[ashaposhnikov] 75317: [RAPPS] Fixes - Minor style improvements - Not resizing with GetBuffer() calls where not nessesary - loaddlg.cpp: Wrong logic fixed - rosui.h: Fixed length determination
by ashaposhnikov@svn.reactos.org
Author: ashaposhnikov Date: Mon Jul 10 22:45:53 2017 New Revision: 75317 URL:
http://svn.reactos.org/svn/reactos?rev=75317&view=rev
Log: [RAPPS] Fixes - Minor style improvements - Not resizing with GetBuffer() calls where not nessesary - loaddlg.cpp: Wrong logic fixed - rosui.h: Fixed length determination Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/rosui.h Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1] Mon Jul 10 22:45:53 2017 @@ -1148,12 +1148,12 @@ /* Get version info */ GetApplicationString(ItemInfo->hSubKey, L"DisplayVersion", szText); - ListView_SetItemText(hListView, Index, 1, szText.GetBuffer(MAX_PATH)); + ListView_SetItemText(hListView, Index, 1, szText.GetBuffer()); szText.ReleaseBuffer(); /* Get comments */ GetApplicationString(ItemInfo->hSubKey, L"Comments", szText); - ListView_SetItemText(hListView, Index, 2, szText.GetBuffer(MAX_PATH)); + ListView_SetItemText(hListView, Index, 2, szText.GetBuffer()); szText.ReleaseBuffer(); return TRUE; } @@ -1163,8 +1163,7 @@ INT Index; HICON hIcon = NULL; ATL::CStringW szIconPath; - HIMAGELIST hImageListView = NULL; - hImageListView = ListView_GetImageList(hListView, LVSIL_SMALL); + HIMAGELIST hImageListView = ListView_GetImageList(hListView, LVSIL_SMALL); if (!SearchPatternMatch(Info->szName, szSearchPattern) && !SearchPatternMatch(Info->szDesc, szSearchPattern)) @@ -1195,10 +1194,10 @@ Index = ListViewAddItem(Info->Category, Index, Info->szName, (LPARAM) Info); hImageListView = ListView_SetImageList(hListView, hImageListView, LVSIL_SMALL); - ListView_SetItemText(hListView, Index, 1, Info->szVersion.GetBuffer(MAX_PATH)); + ListView_SetItemText(hListView, Index, 1, Info->szVersion.GetBuffer()); Info->szVersion.ReleaseBuffer(); - ListView_SetItemText(hListView, Index, 2, Info->szDesc.GetBuffer(MAX_PATH)); + ListView_SetItemText(hListView, Index, 2, Info->szDesc.GetBuffer()); Info->szDesc.ReleaseBuffer(); return TRUE; } Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp [iso-8859-1] Mon Jul 10 22:45:53 2017 @@ -366,11 +366,8 @@ memset(&urlComponents, 0, sizeof(urlComponents)); urlComponents.dwStructSize = sizeof(urlComponents); - - if (AppInfo->szUrlDownload.GetLength() > urlLength) - goto end; - - urlLength /= sizeof(WCHAR); + + urlLength = AppInfo->szUrlDownload.GetLength(); urlComponents.dwSchemeLength = urlLength + 1; urlComponents.lpszScheme = (LPWSTR) malloc(urlComponents.dwSchemeLength * sizeof(WCHAR)); urlComponents.dwHostNameLength = urlLength + 1; Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/rosui.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/rosui.h [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/rosui.h [iso-8859-1] Mon Jul 10 22:45:53 2017 @@ -495,8 +495,8 @@ void GetWindowTextW(ATL::CStringW& szText) { - INT length = CWindow::GetWindowTextLengthW(); - CWindow::GetWindowText(szText.GetBuffer(length), length); + INT length = CWindow::GetWindowTextLengthW() + 1; + CWindow::GetWindowTextW(szText.GetBuffer(length), length); szText.ReleaseBuffer(); } };
7 years, 3 months
1
0
0
0
[ashaposhnikov] 75316: [RAPPS] Some fixes - winmain.cpp, loaddlg.cpp, installed.cpp: Changed string-related opreations - installed.cpp: Fixed buffer sizing when calling RegQueryValueExW() - misc.cp...
by ashaposhnikov@svn.reactos.org
Author: ashaposhnikov Date: Mon Jul 10 22:26:01 2017 New Revision: 75316 URL:
http://svn.reactos.org/svn/reactos?rev=75316&view=rev
Log: [RAPPS] Some fixes - winmain.cpp, loaddlg.cpp, installed.cpp: Changed string-related opreations - installed.cpp: Fixed buffer sizing when calling RegQueryValueExW() - misc.cpp: Removed unused function - rosui.h: Made use of GetWindowTextLength() Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/misc.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/rosui.h branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp [iso-8859-1] Mon Jul 10 22:26:01 2017 @@ -32,7 +32,7 @@ return TRUE; } - szString = L"---"; + StringCchCopyW(szString, MAX_PATH, L"---"); return FALSE; } @@ -44,8 +44,8 @@ ATL::CStringW szPath = L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + RegName; if (RegOpenKeyExW(IsUserKey ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE, - szPath, 0, keyWow | KEY_READ, - &hKey) == ERROR_SUCCESS) + szPath, 0, keyWow | KEY_READ, + &hKey) == ERROR_SUCCESS) { IsInstalled = TRUE; } @@ -62,17 +62,17 @@ ATL::CStringW szPath = L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + RegName; if (RegOpenKeyExW(IsUserKey ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE, - szPath.GetString(), 0, keyWow | KEY_READ, - &hKey) == ERROR_SUCCESS) - { - DWORD dwSize = MAX_PATH; + szPath.GetString(), 0, keyWow | KEY_READ, + &hKey) == ERROR_SUCCESS) + { + DWORD dwSize = MAX_PATH * sizeof(WCHAR); DWORD dwType = REG_SZ; if (RegQueryValueExW(hKey, - L"DisplayVersion", - NULL, - &dwType, - (LPBYTE) szVersion.GetBuffer(dwSize), - &dwSize) == ERROR_SUCCESS) + L"DisplayVersion", + NULL, + &dwType, + (LPBYTE) szVersion.GetBuffer(MAX_PATH), + &dwSize) == ERROR_SUCCESS) { szVersion.ReleaseBuffer(); szVersionResult = szVersion; @@ -126,11 +126,11 @@ if (!ListView_GetItem(hListView, &Item)) return FALSE; - ItemInfo = (PINSTALLED_INFO)Item.lParam; + ItemInfo = (PINSTALLED_INFO) Item.lParam; hKey = ItemInfo->hSubKey; dwType = REG_SZ; - dwSize = sizeof(szPath); + dwSize = MAX_PATH * sizeof(WCHAR); if (RegQueryValueExW(hKey, bModify ? szModify : szUninstall, NULL, @@ -208,11 +208,14 @@ if (MessageBoxW(hMainWnd, szMsgText, szMsgTitle, MB_YESNO | MB_ICONQUESTION) == IDYES) { - wcsncat(szFullName, Info->szKeyName.GetString(), MAX_PATH - wcslen(szFullName)); + ATL::CStringW::CopyChars(szFullName, + MAX_PATH, + Info->szKeyName.GetString(), + MAX_PATH - wcslen(szFullName)); if (RegDeleteKeyW(Info->hRootKey, szFullName) == ERROR_SUCCESS) { - (VOID) ListView_DeleteItem(hListView, ItemIndex); + ListView_DeleteItem(hListView, ItemIndex); return; } @@ -267,21 +270,22 @@ } dwType = REG_SZ; - dwSize = MAX_PATH; + dwSize = MAX_PATH * sizeof(WCHAR); bIsUpdate = (RegQueryValueExW(Info.hSubKey, L"ParentKeyName", NULL, &dwType, - (LPBYTE) szParentKeyName.GetBuffer(dwSize), + (LPBYTE) szParentKeyName.GetBuffer(MAX_PATH), &dwSize) == ERROR_SUCCESS); szParentKeyName.ReleaseBuffer(); - dwSize = sizeof(szDisplayName); + dwType = REG_SZ; + dwSize = MAX_PATH * sizeof(WCHAR); if (RegQueryValueExW(Info.hSubKey, L"DisplayName", NULL, &dwType, - (LPBYTE) szDisplayName.GetBuffer(dwSize), + (LPBYTE) szDisplayName.GetBuffer(MAX_PATH), &dwSize) == ERROR_SUCCESS) { szDisplayName.ReleaseBuffer(); Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp [iso-8859-1] Mon Jul 10 22:26:01 2017 @@ -366,8 +366,8 @@ memset(&urlComponents, 0, sizeof(urlComponents)); urlComponents.dwStructSize = sizeof(urlComponents); - - if (FAILED(StringCbLengthW(AppInfo->szUrlDownload, sizeof(AppInfo->szUrlDownload), &urlLength))) + + if (AppInfo->szUrlDownload.GetLength() > urlLength) goto end; urlLength /= sizeof(WCHAR); Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/misc.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/misc.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/misc.cpp [iso-8859-1] Mon Jul 10 22:26:01 2017 @@ -493,10 +493,3 @@ return (UINT) Result; } - -LPWSTR HeapBufferFromCStringW(const ATL::CStringW& String) -{ - LPWSTR szBuffer = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); - ATL::CString::CopyChars(szBuffer, MAX_PATH, String.GetString(), String.GetLength() + 1); - return szBuffer; -} Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/rosui.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/rosui.h [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/rosui.h [iso-8859-1] Mon Jul 10 22:26:01 2017 @@ -495,7 +495,8 @@ void GetWindowTextW(ATL::CStringW& szText) { - CWindow::GetWindowText(szText.GetBuffer(MAX_STR_LEN), MAX_STR_LEN); + INT length = CWindow::GetWindowTextLengthW(); + CWindow::GetWindowText(szText.GetBuffer(length), length); szText.ReleaseBuffer(); } }; Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp [iso-8859-1] Mon Jul 10 22:26:01 2017 @@ -69,7 +69,10 @@ szDownloadDir.ReleaseBuffer(); szDownloadDir += L"\\RAPPS Downloads"; - StringCchCopyW(pSettingsInfo->szDownloadDir, _countof(pSettingsInfo->szDownloadDir), szDownloadDir.GetString()); + ATL::CStringW::CopyChars(pSettingsInfo->szDownloadDir, + _countof(pSettingsInfo->szDownloadDir), + szDownloadDir.GetString(), + szDownloadDir.GetLength() + 1); pSettingsInfo->bDelInstaller = FALSE; pSettingsInfo->Maximized = FALSE; @@ -79,8 +82,8 @@ pSettingsInfo->Height = 450; pSettingsInfo->Proxy = 0; - StringCbCopyW(pSettingsInfo->szProxyServer, sizeof(pSettingsInfo->szProxyServer), L""); - StringCbCopyW(pSettingsInfo->szNoProxyFor, sizeof(pSettingsInfo->szNoProxyFor), L""); + pSettingsInfo->szProxyServer[0] = UNICODE_NULL; + pSettingsInfo->szNoProxyFor[0] = UNICODE_NULL; } static BOOL
7 years, 3 months
1
0
0
0
[ashaposhnikov] 75315: [RAPPS] Extensive conversion to ATL and general improvements * Converted most of the WCHAR buffers to ATL::CStringW * available.cpp: replaced C heap list with ATL::CAtlList *...
by ashaposhnikov@svn.reactos.org
Author: ashaposhnikov Date: Mon Jul 10 21:02:24 2017 New Revision: 75315 URL:
http://svn.reactos.org/svn/reactos?rev=75315&view=rev
Log: [RAPPS] Extensive conversion to ATL and general improvements * Converted most of the WCHAR buffers to ATL::CStringW * available.cpp: replaced C heap list with ATL::CAtlList * Improved style consistency * Added myself to the headers * Other improvements Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/crichedit.h branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/integrity.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/misc.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/rapps.h branches/GSoC_2017/rapps/reactos/base/applications/rapps/resource.h branches/GSoC_2017/rapps/reactos/base/applications/rapps/rosui.h branches/GSoC_2017/rapps/reactos/base/applications/rapps/settingsdlg.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/available.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/crichedit.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/integrity.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/loaddlg.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/misc.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/rapps.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/resource.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/rosui.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/settingsdlg.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
7 years, 3 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
22
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
Results per page:
10
25
50
100
200