ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2017
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
355 discussions
Start a n
N
ew thread
[reactos] 01/01: [RAPPS] Remove conversion helper that is now obsolete. #179
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c5e033e64327da2ca2a3f…
commit c5e033e64327da2ca2a3f0c9e4e24d009eee3b9e Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Mon Dec 25 20:57:04 2017 +0100 [RAPPS] Remove conversion helper that is now obsolete. #179 --- base/applications/rapps/integrity.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/base/applications/rapps/integrity.cpp b/base/applications/rapps/integrity.cpp index d0fda8af90..10e022c90d 100644 --- a/base/applications/rapps/integrity.cpp +++ b/base/applications/rapps/integrity.cpp @@ -6,15 +6,11 @@ * COPYRIGHT: Copyright Ismael Ferreras Morezuelas (swyterzone+ros(a)gmail.com) * Copyright Mark Jansen */ + #include "rapps.h" #include <sha1.h> -BOOL VerifyInteg(const ATL::CStringW &SHA1Hash, const ATL::CStringW &FileName) -{ - return VerifyInteg(SHA1Hash.GetString(), FileName.GetString()); -} - BOOL VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName) { BOOL ret = FALSE;
6 years, 12 months
1
0
0
0
[reactos] 01/01: [MSCONFIG_NEW] Add missing header guard. Rename Update_Btn_States() and iSortedColumn. #179
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ce192a8077962446bd20…
commit 9ce192a8077962446bd207f9afa96518b47ed7ee Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Mon Dec 25 20:31:27 2017 +0100 [MSCONFIG_NEW] Add missing header guard. Rename Update_Btn_States() and iSortedColumn. #179 --- base/applications/msconfig_new/srvpage.cpp | 14 +++++++------- base/applications/msconfig_new/toolspage.cpp | 6 +++--- base/applications/msconfig_new/xmldomparser.hpp | 2 ++ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/base/applications/msconfig_new/srvpage.cpp b/base/applications/msconfig_new/srvpage.cpp index 816382482b..c19e075a73 100644 --- a/base/applications/msconfig_new/srvpage.cpp +++ b/base/applications/msconfig_new/srvpage.cpp @@ -582,7 +582,7 @@ static BOOL ValidateItem(int index, BOOL bNewState, BOOL bDisplayErrors) static void -Update_Btn_States(HWND hDlg) +UpdateBtnStates(HWND hDlg) { // HWND hTree = GetDlgItem(hDlg, IDC_SYSTEM_TREE); @@ -714,7 +714,7 @@ ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) // GetServices(); ListView_Sort(hServicesListCtrl, 0); - Update_Btn_States(hDlg); + UpdateBtnStates(hDlg); // Select the first item. ListView_SetItemState(hServicesListCtrl, 0, LVIS_SELECTED, LVIS_SELECTED); @@ -745,7 +745,7 @@ ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) if (bAreThereMods) { - Update_Btn_States(hDlg); + UpdateBtnStates(hDlg); PropSheet_Changed(GetParent(hServicesPage), hServicesPage); } @@ -764,7 +764,7 @@ ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) if (bAreThereMods) { - Update_Btn_States(hDlg); + UpdateBtnStates(hDlg); PropSheet_Changed(GetParent(hServicesPage), hServicesPage); } @@ -775,7 +775,7 @@ ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { bMaskProprietarySvcs = !bMaskProprietarySvcs; GetServices(bMaskProprietarySvcs); - Update_Btn_States(hDlg); + UpdateBtnStates(hDlg); return TRUE; } @@ -792,7 +792,7 @@ ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) if (ValidateItem(/*reinterpret_cast<int>*/ int(lParam), bNewCheckState, !HideEssentialServiceWarning())) { - Update_Btn_States(hDlg); + UpdateBtnStates(hDlg); PropSheet_Changed(GetParent(hServicesPage), hServicesPage); } @@ -1058,7 +1058,7 @@ ServicesPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) } GetServices(bMaskProprietarySvcs); - Update_Btn_States(hDlg); + UpdateBtnStates(hDlg); return TRUE; } diff --git a/base/applications/msconfig_new/toolspage.cpp b/base/applications/msconfig_new/toolspage.cpp index fcf3e4a65d..6a6f090e0f 100644 --- a/base/applications/msconfig_new/toolspage.cpp +++ b/base/applications/msconfig_new/toolspage.cpp @@ -15,7 +15,7 @@ static HWND hToolsPage = NULL; static HWND hToolsListCtrl = NULL; -static int iSortedColumn = 0; +static int iToolsPageSortedColumn = 0; struct TOOL { @@ -442,8 +442,8 @@ ToolsPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { int iSortingColumn = ((LPNMLISTVIEW)lParam)->iSubItem; - ListView_SortEx(hToolsListCtrl, iSortingColumn, iSortedColumn); - iSortedColumn = iSortingColumn; + ListView_SortEx(hToolsListCtrl, iSortingColumn, iToolsPageSortedColumn); + iToolsPageSortedColumn = iSortingColumn; return TRUE; } diff --git a/base/applications/msconfig_new/xmldomparser.hpp b/base/applications/msconfig_new/xmldomparser.hpp index 73528dfb93..8a6df70006 100644 --- a/base/applications/msconfig_new/xmldomparser.hpp +++ b/base/applications/msconfig_new/xmldomparser.hpp @@ -6,6 +6,8 @@ * COPYRIGHT: Copyright 2011-2012 Hermes BELUSCA - MAITO <hermes.belusca(a)sfr.fr> */ +#pragma once + /* * * MSXML Version Header File Name Library File Name DLL File Name
6 years, 12 months
1
0
0
0
[reactos] 01/01: [FTP] lostpeer() is declared and defined with a void return type. #179
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=018ba0f72ee3828a5a573…
commit 018ba0f72ee3828a5a573bad9cfbc3381219841f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Mon Dec 25 20:25:38 2017 +0100 [FTP] lostpeer() is declared and defined with a void return type. #179 --- base/applications/network/ftp/ftp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/applications/network/ftp/ftp.c b/base/applications/network/ftp/ftp.c index 910506827c..7550ecd30b 100644 --- a/base/applications/network/ftp/ftp.c +++ b/base/applications/network/ftp/ftp.c @@ -73,7 +73,11 @@ int ptflag = 0; int allbinary; struct sockaddr_in myctladdr; uid_t getuid(); +#ifdef __REACTOS__ +void lostpeer(void); +#else sig_t lostpeer(); +#endif off_t restart_point = 0; SOCKET cin, cout;
6 years, 12 months
1
0
0
0
[reactos] 01/01: [NTOS] Deduplicate MiSynchronizeSystemPde(). #179
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4d4e4bb68a74fec7a38e0…
commit 4d4e4bb68a74fec7a38e0abd6bacb140cde1211f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Mon Dec 25 20:13:50 2017 +0100 [NTOS] Deduplicate MiSynchronizeSystemPde(). #179 --- ntoskrnl/mm/ARM3/miarm.h | 23 +++++++++++++++++++++++ ntoskrnl/mm/ARM3/pagfault.c | 21 --------------------- ntoskrnl/mm/i386/page.c | 22 ---------------------- 3 files changed, 23 insertions(+), 43 deletions(-) diff --git a/ntoskrnl/mm/ARM3/miarm.h b/ntoskrnl/mm/ARM3/miarm.h index c1d81807f6..b68d680210 100644 --- a/ntoskrnl/mm/ARM3/miarm.h +++ b/ntoskrnl/mm/ARM3/miarm.h @@ -2260,4 +2260,27 @@ MiRemoveZeroPageSafe(IN ULONG Color) return 0; } +#if (_MI_PAGING_LEVELS == 2) +FORCEINLINE +BOOLEAN +MiSynchronizeSystemPde(PMMPDE PointerPde) +{ + MMPDE SystemPde; + ULONG Index; + + /* Get the Index from the PDE */ + Index = ((ULONG_PTR)PointerPde & (SYSTEM_PD_SIZE - 1)) / sizeof(MMPTE); + + /* Copy the PDE from the double-mapped system page directory */ + SystemPde = MmSystemPagePtes[Index]; + *PointerPde = SystemPde; + + /* Make sure we re-read the PDE and PTE */ + KeMemoryBarrierWithoutFence(); + + /* Return, if we had success */ + return SystemPde.u.Hard.Valid != 0; +} +#endif + /* EOF */ diff --git a/ntoskrnl/mm/ARM3/pagfault.c b/ntoskrnl/mm/ARM3/pagfault.c index 2e962edd92..1e70cc07b9 100644 --- a/ntoskrnl/mm/ARM3/pagfault.c +++ b/ntoskrnl/mm/ARM3/pagfault.c @@ -310,27 +310,6 @@ MiCheckVirtualAddress(IN PVOID VirtualAddress, } #if (_MI_PAGING_LEVELS == 2) -FORCEINLINE -BOOLEAN -MiSynchronizeSystemPde(PMMPDE PointerPde) -{ - MMPDE SystemPde; - ULONG Index; - - /* Get the Index from the PDE */ - Index = ((ULONG_PTR)PointerPde & (SYSTEM_PD_SIZE - 1)) / sizeof(MMPTE); - - /* Copy the PDE from the double-mapped system page directory */ - SystemPde = MmSystemPagePtes[Index]; - *PointerPde = SystemPde; - - /* Make sure we re-read the PDE and PTE */ - KeMemoryBarrierWithoutFence(); - - /* Return, if we had success */ - return (BOOLEAN)SystemPde.u.Hard.Valid; -} - NTSTATUS FASTCALL MiCheckPdeForSessionSpace(IN PVOID Address) diff --git a/ntoskrnl/mm/i386/page.c b/ntoskrnl/mm/i386/page.c index b371c12200..4ed0ebc29f 100644 --- a/ntoskrnl/mm/i386/page.c +++ b/ntoskrnl/mm/i386/page.c @@ -189,28 +189,6 @@ ProtectToPTE(ULONG flProtect) return(Attributes); } -/* Taken from ARM3/pagfault.c */ -FORCEINLINE -BOOLEAN -MiSynchronizeSystemPde(PMMPDE PointerPde) -{ - MMPDE SystemPde; - ULONG Index; - - /* Get the Index from the PDE */ - Index = ((ULONG_PTR)PointerPde & (SYSTEM_PD_SIZE - 1)) / sizeof(MMPTE); - - /* Copy the PDE from the double-mapped system page directory */ - SystemPde = MmSystemPagePtes[Index]; - *PointerPde = SystemPde; - - /* Make sure we re-read the PDE and PTE */ - KeMemoryBarrierWithoutFence(); - - /* Return, if we had success */ - return SystemPde.u.Hard.Valid != 0; -} - NTSTATUS NTAPI MiDispatchFault(IN BOOLEAN StoreInstruction,
6 years, 12 months
1
0
0
0
[reactos] 01/01: [USER32] Fix RealUserDrawCaption() return type. Rename {HFONT, UISTATE}_GWL_OFFSET and pfPaint. #179
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2367206744dc728b05456…
commit 2367206744dc728b054560e81a1461f035edf699 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Mon Dec 25 14:36:16 2017 +0100 [USER32] Fix RealUserDrawCaption() return type. Rename {HFONT,UISTATE}_GWL_OFFSET and pfPaint. #179 --- win32ss/user/user32/controls/button.c | 20 ++++++++++---------- win32ss/user/user32/windows/nonclient.c | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/win32ss/user/user32/controls/button.c b/win32ss/user/user32/controls/button.c index c6f01c8f2c..2538a9847b 100644 --- a/win32ss/user/user32/controls/button.c +++ b/win32ss/user/user32/controls/button.c @@ -69,10 +69,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(button); /* GetWindowLong offsets for window extra information */ #define STATE_GWL_OFFSET 0 -#define HFONT_GWL_OFFSET (sizeof(LONG)) -#define HIMAGE_GWL_OFFSET (HFONT_GWL_OFFSET+sizeof(HFONT)) -#define UISTATE_GWL_OFFSET (HIMAGE_GWL_OFFSET+sizeof(HFONT)) -#define NB_EXTRA_BYTES (UISTATE_GWL_OFFSET+sizeof(LONG)) +#define BUTTON_HFONT_GWL_OFFSET (sizeof(LONG)) +#define HIMAGE_GWL_OFFSET (BUTTON_HFONT_GWL_OFFSET+sizeof(HFONT)) +#define BUTTON_UISTATE_GWL_OFFSET (HIMAGE_GWL_OFFSET+sizeof(HFONT)) +#define NB_EXTRA_BYTES (BUTTON_UISTATE_GWL_OFFSET+sizeof(LONG)) /* undocumented flags */ #define BUTTON_NSTATES 0x0F @@ -117,9 +117,9 @@ static const WORD maxCheckState[MAX_BTN_TYPE] = BST_UNCHECKED /* BS_OWNERDRAW */ }; -typedef void (*pfPaint)( HWND hwnd, HDC hdc, UINT action ); +typedef void (*pfButtonPaint)( HWND hwnd, HDC hdc, UINT action ); -static const pfPaint btnPaintFunc[MAX_BTN_TYPE] = +static const pfButtonPaint btnPaintFunc[MAX_BTN_TYPE] = { PB_Paint, /* BS_PUSHBUTTON */ PB_Paint, /* BS_DEFPUSHBUTTON */ @@ -169,24 +169,24 @@ static inline void set_button_state( HWND hwnd, LONG state ) static __inline void set_ui_state( HWND hwnd, LONG flags ) { - SetWindowLongPtrW( hwnd, UISTATE_GWL_OFFSET, flags ); + SetWindowLongPtrW( hwnd, BUTTON_UISTATE_GWL_OFFSET, flags ); } static __inline LONG get_ui_state( HWND hwnd ) { - return GetWindowLongPtrW( hwnd, UISTATE_GWL_OFFSET ); + return GetWindowLongPtrW( hwnd, BUTTON_UISTATE_GWL_OFFSET ); } #endif /* __REACTOS__ */ static inline HFONT get_button_font( HWND hwnd ) { - return (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET ); + return (HFONT)GetWindowLongPtrW( hwnd, BUTTON_HFONT_GWL_OFFSET ); } static inline void set_button_font( HWND hwnd, HFONT font ) { - SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, (LONG_PTR)font ); + SetWindowLongPtrW( hwnd, BUTTON_HFONT_GWL_OFFSET, (LONG_PTR)font ); } static inline UINT get_button_type( LONG window_style ) diff --git a/win32ss/user/user32/windows/nonclient.c b/win32ss/user/user32/windows/nonclient.c index ba2440aacc..370f72fbe1 100644 --- a/win32ss/user/user32/windows/nonclient.c +++ b/win32ss/user/user32/windows/nonclient.c @@ -76,7 +76,7 @@ UserGetWindowBorders(DWORD Style, DWORD ExStyle, SIZE *Size, BOOL WithClient) RealUserDrawCaption: This function is passed through RegisterUserApiHook to uxtheme to call it when the classic caption is needed to be drawn. */ -LRESULT WINAPI +BOOL WINAPI RealUserDrawCaption(HWND hWnd, HDC hDC, LPCRECT lpRc, UINT uFlags) { ERR("Real DC flags %08x\n",uFlags);
6 years, 12 months
1
0
0
0
[reactos] 01/01: [LOCALSPL] Fix parameter handling in LocalSetJob and add tests for the few ways we can easily test this function.
by Colin Finck
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3b93ba0f318f053b9aeff…
commit 3b93ba0f318f053b9aeff36a7c06334d8c0d0183 Author: Colin Finck <colin(a)reactos.org> AuthorDate: Mon Dec 25 14:30:47 2017 +0100 [LOCALSPL] Fix parameter handling in LocalSetJob and add tests for the few ways we can easily test this function. Yes, it checks the input handle and doesn't fail if an invalid level is given, because someone may still send a Command. This also fixes CORE-12794. Thanks for reporting! --- .../rostests/apitests/localspl/dll/CMakeLists.txt | 3 +- modules/rostests/apitests/localspl/dll/fpSetJob.c | 64 +++++++++++++++++++ modules/rostests/apitests/localspl/dll/main.c | 73 +++++++++++++++++++++- modules/rostests/apitests/localspl/testlist.c | 4 +- modules/rostests/apitests/localspl/tests.c | 5 ++ win32ss/printing/providers/localspl/jobs.c | 21 +++---- 6 files changed, 153 insertions(+), 17 deletions(-) diff --git a/modules/rostests/apitests/localspl/dll/CMakeLists.txt b/modules/rostests/apitests/localspl/dll/CMakeLists.txt index 2ce4287611..4c518ee1b5 100644 --- a/modules/rostests/apitests/localspl/dll/CMakeLists.txt +++ b/modules/rostests/apitests/localspl/dll/CMakeLists.txt @@ -4,11 +4,12 @@ include_directories(${REACTOS_SOURCE_DIR}/win32ss/printing/include) list(APPEND SOURCE fpEnumPrinters.c fpGetPrintProcessorDirectory.c + fpSetJob.c main.c) add_library(localspl_apitest.dll SHARED ${SOURCE}) target_link_libraries(localspl_apitest.dll wine ${PSEH_LIB}) set_module_type(localspl_apitest.dll win32dll) -add_importlibs(localspl_apitest.dll spoolss msvcrt kernel32 ntdll) +add_importlibs(localspl_apitest.dll spoolss advapi32 msvcrt kernel32 ntdll) set_target_properties(localspl_apitest.dll PROPERTIES SUFFIX "") add_rostests_file(TARGET localspl_apitest.dll) diff --git a/modules/rostests/apitests/localspl/dll/fpSetJob.c b/modules/rostests/apitests/localspl/dll/fpSetJob.c new file mode 100644 index 0000000000..810dc1aee6 --- /dev/null +++ b/modules/rostests/apitests/localspl/dll/fpSetJob.c @@ -0,0 +1,64 @@ +/* + * PROJECT: ReactOS Local Spooler API Tests Injected DLL + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Tests for fpSetJob + * COPYRIGHT: Copyright 2017 Colin Finck (colin(a)reactos.org) + */ + +#include <apitest.h> + +#define WIN32_NO_STATUS +#include <windef.h> +#include <winbase.h> +#include <wingdi.h> +#include <winreg.h> +#include <winspool.h> +#include <winsplp.h> + +#include "../localspl_apitest.h" +#include <spoolss.h> + +extern PWSTR GetDefaultPrinterFromRegistry(VOID); +extern BOOL GetLocalsplFuncs(LPPRINTPROVIDOR pp); + +/* From printing/include/spoolss.h */ +#define MAX_PRINTER_NAME 220 + +START_TEST(fpSetJob) +{ + HANDLE hPrinter = NULL; + PRINTPROVIDOR pp; + PWSTR pwszDefaultPrinter = NULL; + + if (!GetLocalsplFuncs(&pp)) + goto Cleanup; + + // Verify that fpSetJob returns ERROR_INVALID_HANDLE when nothing is provided. + ok(!pp.fpSetJob(NULL, 0, 0, NULL, 0), "fpSetJob returns TRUE\n"); + ok(GetLastError() == ERROR_INVALID_HANDLE, "fpSetJob returns error %lu!\n", GetLastError()); + + // Get the default printer. + pwszDefaultPrinter = GetDefaultPrinterFromRegistry(); + if (!pwszDefaultPrinter) + { + skip("Could not determine the default printer!\n"); + goto Cleanup; + } + + if (!pp.fpOpenPrinter(pwszDefaultPrinter, &hPrinter, NULL)) + { + skip("Could not open a handle to the default printer, last error is %lu!\n", GetLastError()); + goto Cleanup; + } + + // Verify that fpSetJob returns ERROR_INVALID_PARAMETER if only a printer handle is provided. + ok(!pp.fpSetJob(hPrinter, 0, 0, NULL, 0), "fpSetJob returns TRUE\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "fpSetJob returns error %lu!\n", GetLastError()); + +Cleanup: + if (pwszDefaultPrinter) + HeapFree(GetProcessHeap(), 0, pwszDefaultPrinter); + + if (hPrinter) + pp.fpClosePrinter(hPrinter); +} diff --git a/modules/rostests/apitests/localspl/dll/main.c b/modules/rostests/apitests/localspl/dll/main.c index 6914dc0c1e..260baa3639 100644 --- a/modules/rostests/apitests/localspl/dll/main.c +++ b/modules/rostests/apitests/localspl/dll/main.c @@ -2,7 +2,7 @@ * PROJECT: ReactOS Local Spooler API Tests Injected DLL * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) * PURPOSE: Main functions - * COPYRIGHT: Copyright 2015-2016 Colin Finck (colin(a)reactos.org) + * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin(a)reactos.org) */ #define __ROS_LONG64__ @@ -27,14 +27,85 @@ // Test list extern void func_fpEnumPrinters(void); extern void func_fpGetPrintProcessorDirectory(void); +extern void func_fpSetJob(void); const struct test winetest_testlist[] = { { "fpEnumPrinters", func_fpEnumPrinters }, { "fpGetPrintProcessorDirectory", func_fpGetPrintProcessorDirectory }, + { "fpSetJob", func_fpSetJob }, { 0, 0 } }; +/** + * We don't link against winspool, so we don't have GetDefaultPrinterW. + * We can easily implement a similar function ourselves though. + */ +PWSTR +GetDefaultPrinterFromRegistry(VOID) +{ + static const WCHAR wszWindowsKey[] = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows"; + static const WCHAR wszDeviceValue[] = L"Device"; + + DWORD cbNeeded; + DWORD dwErrorCode; + HKEY hWindowsKey = NULL; + PWSTR pwszDevice; + PWSTR pwszComma; + PWSTR pwszReturnValue = NULL; + + // Open the registry key where the default printer for the current user is stored. + dwErrorCode = (DWORD)RegOpenKeyExW(HKEY_CURRENT_USER, wszWindowsKey, 0, KEY_READ, &hWindowsKey); + if (dwErrorCode != ERROR_SUCCESS) + { + skip("RegOpenKeyExW failed with status %u!\n", dwErrorCode); + goto Cleanup; + } + + // Determine the size of the required buffer. + dwErrorCode = (DWORD)RegQueryValueExW(hWindowsKey, wszDeviceValue, NULL, NULL, NULL, &cbNeeded); + if (dwErrorCode != ERROR_SUCCESS) + { + skip("RegQueryValueExW failed with status %u!\n", dwErrorCode); + goto Cleanup; + } + + // Allocate it. + pwszDevice = HeapAlloc(GetProcessHeap(), 0, cbNeeded); + if (!pwszDevice) + { + skip("HeapAlloc failed!\n"); + goto Cleanup; + } + + // Now get the actual value. + dwErrorCode = RegQueryValueExW(hWindowsKey, wszDeviceValue, NULL, NULL, (PBYTE)pwszDevice, &cbNeeded); + if (dwErrorCode != ERROR_SUCCESS) + { + skip("RegQueryValueExW failed with status %u!\n", dwErrorCode); + goto Cleanup; + } + + // We get a string "<Printer Name>,winspool,<Port>:". + // Extract the printer name from it. + pwszComma = wcschr(pwszDevice, L','); + if (!pwszComma) + { + skip("Found no or invalid default printer: %S!\n", pwszDevice); + goto Cleanup; + } + + // Return the default printer. + *pwszComma = 0; + pwszReturnValue = pwszDevice; + +Cleanup: + if (hWindowsKey) + RegCloseKey(hWindowsKey); + + return pwszReturnValue; +} + BOOL GetLocalsplFuncs(LPPRINTPROVIDOR pp) { diff --git a/modules/rostests/apitests/localspl/testlist.c b/modules/rostests/apitests/localspl/testlist.c index efd9f7314b..b1a5d9e35e 100644 --- a/modules/rostests/apitests/localspl/testlist.c +++ b/modules/rostests/apitests/localspl/testlist.c @@ -2,7 +2,7 @@ * PROJECT: ReactOS Local Spooler API Tests * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) * PURPOSE: Test list - * COPYRIGHT: Copyright 2015-2016 Colin Finck (colin(a)reactos.org) + * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin(a)reactos.org) */ #define __ROS_LONG64__ @@ -12,12 +12,14 @@ extern void func_fpEnumPrinters(void); extern void func_fpGetPrintProcessorDirectory(void); +extern void func_fpSetJob(void); extern void func_service(void); const struct test winetest_testlist[] = { { "fpEnumPrinters", func_fpEnumPrinters }, { "fpGetPrintProcessorDirectory", func_fpGetPrintProcessorDirectory }, + { "fpSetJob", func_fpSetJob }, { "service", func_service }, { 0, 0 } diff --git a/modules/rostests/apitests/localspl/tests.c b/modules/rostests/apitests/localspl/tests.c index 85d8023384..e5c1cc0e38 100644 --- a/modules/rostests/apitests/localspl/tests.c +++ b/modules/rostests/apitests/localspl/tests.c @@ -217,3 +217,8 @@ START_TEST(fpGetPrintProcessorDirectory) { _RunRemoteTest("fpGetPrintProcessorDirectory"); } + +START_TEST(fpSetJob) +{ + _RunRemoteTest("fpSetJob"); +} diff --git a/win32ss/printing/providers/localspl/jobs.c b/win32ss/printing/providers/localspl/jobs.c index 0c9e040fc2..b52b25eb8f 100644 --- a/win32ss/printing/providers/localspl/jobs.c +++ b/win32ss/printing/providers/localspl/jobs.c @@ -963,7 +963,7 @@ Cleanup: BOOL WINAPI LocalSetJob(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo, DWORD Command) { - DWORD dwErrorCode; + DWORD dwErrorCode = ERROR_SUCCESS; PLOCAL_HANDLE pHandle; PLOCAL_JOB pJob; PLOCAL_PRINTER_HANDLE pPrinterHandle; @@ -973,7 +973,7 @@ LocalSetJob(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo, DWORD Com // Check if this is a printer handle. pHandle = (PLOCAL_HANDLE)hPrinter; - if (pHandle->HandleType != HandleType_Printer) + if (!pHandle || pHandle->HandleType != HandleType_Printer) { dwErrorCode = ERROR_INVALID_HANDLE; goto Cleanup; @@ -989,16 +989,11 @@ LocalSetJob(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo, DWORD Com goto Cleanup; } - // Setting job information is handled differently for each level. - if (Level) - { - if (Level == 1) - dwErrorCode = _LocalSetJobLevel1(pPrinterHandle, pJob, (PJOB_INFO_1W)pJobInfo); - else if (Level == 2) - dwErrorCode = _LocalSetJobLevel2(pPrinterHandle, pJob, (PJOB_INFO_2W)pJobInfo); - else - dwErrorCode = ERROR_INVALID_LEVEL; - } + // Set new job information if a valid level was given. + if (Level == 1) + dwErrorCode = _LocalSetJobLevel1(pPrinterHandle, pJob, (PJOB_INFO_1W)pJobInfo); + else if (Level == 2) + dwErrorCode = _LocalSetJobLevel2(pPrinterHandle, pJob, (PJOB_INFO_2W)pJobInfo); if (dwErrorCode != ERROR_SUCCESS) goto Cleanup; @@ -1033,8 +1028,6 @@ LocalSetJob(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo, DWORD Com } } - dwErrorCode = ERROR_SUCCESS; - Cleanup: SetLastError(dwErrorCode); return (dwErrorCode == ERROR_SUCCESS);
6 years, 12 months
1
0
0
0
[reactos] 01/01: [UNIATA] Update to v0.46e5. CORE-14117
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a76fdbd8cb5ea6a28b1e1…
commit a76fdbd8cb5ea6a28b1e18213544988d767887e2 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Mon Dec 25 14:17:53 2017 +0100 [UNIATA] Update to v0.46e5. CORE-14117 --- drivers/storage/ide/uniata/bm_devs.h | 2 +- drivers/storage/ide/uniata/bm_devs_decl.h | 1 + drivers/storage/ide/uniata/id_ata.cpp | 9 +++++---- drivers/storage/ide/uniata/id_dma.cpp | 4 ++++ drivers/storage/ide/uniata/uniata_ver.h | 10 +++++----- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/drivers/storage/ide/uniata/bm_devs.h b/drivers/storage/ide/uniata/bm_devs.h index ccf471fff7..89da4f1550 100644 --- a/drivers/storage/ide/uniata/bm_devs.h +++ b/drivers/storage/ide/uniata/bm_devs.h @@ -288,7 +288,7 @@ BUSMASTER_CONTROLLER_INFORMATION_BASE const BusMasterAdapters[] = { PCI_DEV_HW_SPEC_BM( 037f, 10de, 0x00, ATA_SA300, "nVidia nForce MCP55 S2",NV4OFF | NVQ | UNIATA_SATA ), PCI_DEV_HW_SPEC_BM( 03ec, 10de, 0x00, ATA_UDMA6, "nVidia nForce MCP61", 0 ), PCI_DEV_HW_SPEC_BM( 03e7, 10de, 0x00, ATA_SA300, "nVidia nForce MCP61 S1",NV4OFF | NVQ | UNIATA_SATA ), - PCI_DEV_HW_SPEC_BM( 03f6, 10de, 0x00, ATA_SA300, "nVidia nForce MCP61 S2",NV4OFF | NVQ | UNIATA_SATA ), + PCI_DEV_HW_SPEC_BM( 03f6, 10de, 0x00, ATA_SA300, "nVidia nForce MCP61 S2",NVGEN | UNIATA_SATA ), PCI_DEV_HW_SPEC_BM( 03f7, 10de, 0x00, ATA_SA300, "nVidia nForce MCP61 S3",NV4OFF | NVQ | UNIATA_SATA ), PCI_DEV_HW_SPEC_BM( 0448, 10de, 0x00, ATA_UDMA6, "nVidia nForce MCP65", 0 ), PCI_DEV_HW_SPEC_BM( 044c, 10de, 0x00, ATA_SA300, "nVidia nForce MCP65 A0", UNIATA_SATA | UNIATA_AHCI ), diff --git a/drivers/storage/ide/uniata/bm_devs_decl.h b/drivers/storage/ide/uniata/bm_devs_decl.h index 61f8c9598f..16070cd530 100644 --- a/drivers/storage/ide/uniata/bm_devs_decl.h +++ b/drivers/storage/ide/uniata/bm_devs_decl.h @@ -696,6 +696,7 @@ typedef struct _BUSMASTER_CONTROLLER_INFORMATION { #define NV4OFF 0x0100 #define NVQ 0x0200 +#define NVGEN 0x0400 #define VIANEW 5 #define VIA33 4 diff --git a/drivers/storage/ide/uniata/id_ata.cpp b/drivers/storage/ide/uniata/id_ata.cpp index f823e4f636..6f0f1da94a 100644 --- a/drivers/storage/ide/uniata/id_ata.cpp +++ b/drivers/storage/ide/uniata/id_ata.cpp @@ -4616,7 +4616,7 @@ AtapiCheckInterrupt__( } break; } case ATA_NVIDIA_ID: { - if(!(ChipFlags & UNIATA_SATA)) + if(!(ChipFlags & UNIATA_SATA) || (ChipFlags & NVGEN)) break; KdPrint2((PRINT_PREFIX "NVIDIA\n")); @@ -7987,6 +7987,7 @@ make_reset: // must be already selected, experimental for ROS BUG-9119 //AtapiWritePort1(chan, IDX_IO1_o_DriveSelect, IDE_USE_LBA | (DeviceNumber ? IDE_DRIVE_2 : IDE_DRIVE_1) ); + AtapiWritePort1(chan, IDX_IO2_o_Control , 0); AtapiWritePort1(chan, IDX_ATAPI_IO1_o_Feature /*IDX_IO1_o_Feature*/, FeatureReg); //AtapiWritePort1(chan, IDX_ATAPI_IO1_o_Unused0, 0); // experimental for ROS BUG-9119 //AtapiWritePort1(chan, IDX_ATAPI_IO1_o_Unused1, 0); // experimental for ROS BUG-9119 @@ -8712,7 +8713,7 @@ invalid_cdb: statusByte = WaitOnBaseBusy(chan); //SelectDrive(chan, DeviceNumber); - if (cdb->MEDIA_REMOVAL.Prevent != FALSE) { + if (cdb->MEDIA_REMOVAL.Prevent == TRUE) { //AtapiWritePort1(chan, IDX_IO1_o_Command,IDE_COMMAND_DOOR_LOCK); statusByte = AtaCommand(deviceExtension, DeviceNumber, lChannel, IDE_COMMAND_DOOR_LOCK, 0, 0, 0, 0, 0, ATA_IMMEDIATE); } else { @@ -9002,7 +9003,7 @@ IdeMediaStatus( chan = &(deviceExtension->chan[lChannel]); SelectDrive(chan, DeviceNumber); - if (EnableMSN != FALSE){ + if (EnableMSN == TRUE){ // If supported enable Media Status Notification support if ((chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_REMOVABLE_DRIVE)) { @@ -9028,7 +9029,7 @@ IdeMediaStatus( } } - } else { // end if EnableMSN != FALSE + } else { // end if EnableMSN == TRUE // disable if previously enabled if ((chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED)) { diff --git a/drivers/storage/ide/uniata/id_dma.cpp b/drivers/storage/ide/uniata/id_dma.cpp index d789616ae1..eef324aa7a 100644 --- a/drivers/storage/ide/uniata/id_dma.cpp +++ b/drivers/storage/ide/uniata/id_dma.cpp @@ -152,6 +152,10 @@ AtapiDmaAlloc( if(!deviceExtension->Host64 && (WinVer_Id() > WinVer_NT)) { KdPrint2((PRINT_PREFIX "AtapiDmaAlloc: allocate tmp buffers below 4Gb\n")); + if(chan->DB_PRD) { + KdPrint2((PRINT_PREFIX " already initialized %x\n", chan->DB_PRD)); + return; + } chan->DB_PRD = MmAllocateContiguousMemory(sizeof(((PATA_REQ)NULL)->dma_tab), ph4gb); if(chan->DB_PRD) { chan->DB_PRD_PhAddr = AtapiVirtToPhysAddr(HwDeviceExtension, NULL, (PUCHAR)(chan->DB_PRD), &i, &ph_addru); diff --git a/drivers/storage/ide/uniata/uniata_ver.h b/drivers/storage/ide/uniata/uniata_ver.h index 3a00321dfc..2a6ad98c70 100644 --- a/drivers/storage/ide/uniata/uniata_ver.h +++ b/drivers/storage/ide/uniata/uniata_ver.h @@ -1,10 +1,10 @@ -#define UNIATA_VER_STR "46e3" -#define UNIATA_VER_DOT 0.46.5.3 +#define UNIATA_VER_STR "46e5" +#define UNIATA_VER_DOT 0.46.5.5 #define UNIATA_VER_MJ 0 #define UNIATA_VER_MN 46 #define UNIATA_VER_SUB_MJ 5 -#define UNIATA_VER_SUB_MN 3 -#define UNIATA_VER_DOT_COMMA 0,46,5,3 -#define UNIATA_VER_DOT_STR "0.46.5.3" +#define UNIATA_VER_SUB_MN 5 +#define UNIATA_VER_DOT_COMMA 0,46,5,5 +#define UNIATA_VER_DOT_STR "0.46.5.5" #define UNIATA_VER_YEAR 2017 #define UNIATA_VER_YEAR_STR "2017"
6 years, 12 months
1
0
0
0
[reactos] 04/04: [ATL] Add CString.AllocSysString
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fa3e1735152a12a9111c2…
commit fa3e1735152a12a9111c20c16e9a72ba1a913250 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Dec 24 01:28:16 2017 +0100 [ATL] Add CString.AllocSysString --- sdk/lib/atl/cstringt.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/sdk/lib/atl/cstringt.h b/sdk/lib/atl/cstringt.h index b758514ba4..5d278c5a0a 100644 --- a/sdk/lib/atl/cstringt.h +++ b/sdk/lib/atl/cstringt.h @@ -143,6 +143,12 @@ public: return ::vswprintf(pszDest, pszFormat, args); } + static BSTR __cdecl AllocSysString( + _In_z_ LPCWSTR pszSource, + _In_ int nLength) + { + return ::SysAllocStringLen(pszSource, nLength); + } }; @@ -269,6 +275,19 @@ public: return ::vsprintf(pszDest, pszFormat, args); } + static BSTR __cdecl AllocSysString( + _In_z_ LPCSTR pszSource, + _In_ int nLength) + { + int nLen = ChTraitsCRT<wchar_t>::GetBaseTypeLength(pszSource, nLength); + BSTR bstr = ::SysAllocStringLen(NULL, nLen); + if (bstr) + { + ChTraitsCRT<wchar_t>::ConvertToBaseType(bstr, nLen, pszSource, nLength); + } + return bstr; + } + }; @@ -797,8 +816,14 @@ public: } + BSTR AllocSysString() const + { + return StringTraits::AllocSysString(CThisSimpleString::GetString(), CThisSimpleString::GetLength()); + } + + }; } //namespace ATL -#endif \ No newline at end of file +#endif
6 years, 12 months
1
0
0
0
[reactos] 03/04: [ATL] Add CComBSTR.Attach
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6c92d5c14a6a7eda627f7…
commit 6c92d5c14a6a7eda627f755453b69ac4ec4b8863 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Dec 24 01:27:06 2017 +0100 [ATL] Add CComBSTR.Attach --- sdk/lib/atl/atlcomcli.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/lib/atl/atlcomcli.h b/sdk/lib/atl/atlcomcli.h index 9c19e3371c..20151dba9f 100644 --- a/sdk/lib/atl/atlcomcli.h +++ b/sdk/lib/atl/atlcomcli.h @@ -301,6 +301,12 @@ public: return *this; } + void Attach(BSTR bstr) + { + ::SysFreeString(m_str); + m_str = bstr; + } + BSTR Detach() { BSTR str = m_str;
6 years, 12 months
1
0
0
0
[reactos] 02/04: [ATL_APITEST] Add a test for CComBSTR.Attach/Detach
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9187a81538f126dea4e15…
commit 9187a81538f126dea4e15e557d20d92553d074c7 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Dec 24 01:26:29 2017 +0100 [ATL_APITEST] Add a test for CComBSTR.Attach/Detach --- modules/rostests/apitests/atl/CComBSTR.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/rostests/apitests/atl/CComBSTR.cpp b/modules/rostests/apitests/atl/CComBSTR.cpp index 0a10292c38..e62e76a49c 100644 --- a/modules/rostests/apitests/atl/CComBSTR.cpp +++ b/modules/rostests/apitests/atl/CComBSTR.cpp @@ -1,8 +1,8 @@ /* - * PROJECT: ReactOS api tests - * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory - * PURPOSE: Test for CComBSTR - * PROGRAMMER: Mark Jansen + * PROJECT: ReactOS api tests + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Test for CComBSTR + * COPYRIGHT: Copyright 2015-2017 Mark Jansen (mark.jansen(a)reactos.org) */ #include <apitest.h> @@ -105,6 +105,15 @@ void test_copyassignment() hr = happy.CopyTo((BSTR*)NULL); ok(hr == E_POINTER, "Expected hr to be E_POINTER, was: %u\n"); #endif + + BSTR RawPtr = ::SysAllocString(L"TEST--"); + happy.Attach(RawPtr); + ok_ptr(happy.m_str, RawPtr); + verify_str(happy, L"TEST--"); + happyCopy1.Attach(happy.Detach()); + ok_ptr(happyCopy1.m_str, RawPtr); + verify_str(happyCopy1, L"TEST--"); + ok_ptr(happy.m_str, NULL); } void test_fromguid()
6 years, 12 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
36
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Results per page:
10
25
50
100
200