ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2024
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
17 participants
106 discussions
Start a n
N
ew thread
[reactos] 01/01: [SHELL32] CM::InvokeCommand case-insensitive compare verb string (#7582)
by Whindmar Saksit
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1faa571f3f0445f46554e…
commit 1faa571f3f0445f46554ebe33bf105a87baeea2e Author: Whindmar Saksit <whindsaks(a)proton.me> AuthorDate: Fri Dec 27 14:47:11 2024 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Dec 27 14:47:11 2024 +0100 [SHELL32] CM::InvokeCommand case-insensitive compare verb string (#7582) CORE-18733 --- dll/win32/shell32/CDefaultContextMenu.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/CDefaultContextMenu.cpp b/dll/win32/shell32/CDefaultContextMenu.cpp index 90954dd87c9..b076980e7b6 100644 --- a/dll/win32/shell32/CDefaultContextMenu.cpp +++ b/dll/win32/shell32/CDefaultContextMenu.cpp @@ -1214,7 +1214,7 @@ CDefaultContextMenu::MapVerbToCmdId(PVOID Verb, PUINT idCmd, BOOL IsUnicode) { /* The static verbs are ANSI, get a unicode version before doing the compare */ SHAnsiToUnicode(g_StaticInvokeCmdMap[i].szStringVerb, UnicodeStr, MAX_VERB); - if (!wcscmp(UnicodeStr, (LPWSTR)Verb)) + if (!_wcsicmp(UnicodeStr, (LPWSTR)Verb)) { /* Return the Corresponding Id */ *idCmd = g_StaticInvokeCmdMap[i].IntVerb; @@ -1223,7 +1223,7 @@ CDefaultContextMenu::MapVerbToCmdId(PVOID Verb, PUINT idCmd, BOOL IsUnicode) } else { - if (!strcmp(g_StaticInvokeCmdMap[i].szStringVerb, (LPSTR)Verb)) + if (!_stricmp(g_StaticInvokeCmdMap[i].szStringVerb, (LPSTR)Verb)) { *idCmd = g_StaticInvokeCmdMap[i].IntVerb; return TRUE; @@ -1527,6 +1527,8 @@ CDefaultContextMenu::InvokeCommand( /* Get the ID which corresponds to this verb, and update our local copy */ if (MapVerbToCmdId((LPVOID)LocalInvokeInfo.lpVerb, &CmdId, FALSE)) LocalInvokeInfo.lpVerb = MAKEINTRESOURCEA(CmdId); + else + return E_INVALIDARG; } CmdId = LOWORD(LocalInvokeInfo.lpVerb);
3 months, 1 week
1
0
0
0
[reactos] 01/01: [SHDOCVW][BROWSEUI][SHELL32] Correctly refcount CNSCBand and Explorer File menu (#7569)
by Whindmar Saksit
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1fec01561d06ae6a4cfce…
commit 1fec01561d06ae6a4cfce38daa474631ed6a9fbe Author: Whindmar Saksit <whindsaks(a)proton.me> AuthorDate: Fri Dec 27 14:46:30 2024 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Dec 27 14:46:30 2024 +0100 [SHDOCVW][BROWSEUI][SHELL32] Correctly refcount CNSCBand and Explorer File menu (#7569) CORE-19879 CORE-19780 --- dll/win32/browseui/basebarsite.cpp | 49 ++++++++++++------------------- dll/win32/browseui/shellbrowser.cpp | 15 ++++------ dll/win32/shdocvw/CNSCBand.cpp | 3 +- dll/win32/shell32/CDefView.cpp | 13 +++++--- dll/win32/shell32/shellmenu/CMenuSite.cpp | 3 ++ dll/win32/shell32/shellmenu/CMenuSite.h | 1 + 6 files changed, 38 insertions(+), 46 deletions(-) diff --git a/dll/win32/browseui/basebarsite.cpp b/dll/win32/browseui/basebarsite.cpp index e67e9b7e9bd..dc40977de4d 100644 --- a/dll/win32/browseui/basebarsite.cpp +++ b/dll/win32/browseui/basebarsite.cpp @@ -380,15 +380,13 @@ HRESULT STDMETHODCALLTYPE CBaseBarSite::SetDeskBarSite(IUnknown *punkSite) if (punkSite == NULL) { - - TRACE("Destroying site \n"); + TRACE("Destroying site\n"); /* Cleanup our bands */ - while(SUCCEEDED(EnumBands(-1, &dwBandID)) && dwBandID) + for (UINT i = EnumBands(-1, NULL); i;) { - hResult = EnumBands(0, &dwBandID); - if(FAILED_UNEXPECTEDLY(hResult)) - continue; - RemoveBand(dwBandID); + hResult = EnumBands(--i, &dwBandID); + if (!FAILED_UNEXPECTEDLY(hResult)) + RemoveBand(dwBandID); } fDeskBarSite = NULL; } @@ -535,13 +533,11 @@ HRESULT STDMETHODCALLTYPE CBaseBarSite::EnumBands(UINT uBand, DWORD *pdwBandID) { REBARBANDINFO bandInfo; + if (uBand == -1ul) + return (HRESULT)SendMessage(RB_GETBANDCOUNT, 0, 0); if (pdwBandID == NULL) return E_INVALIDARG; - if (uBand == 0xffffffff) - { - *pdwBandID = (DWORD)SendMessage(RB_GETBANDCOUNT, 0, 0); - return S_OK; - } + if (!SUCCEEDED(GetInternalBandInfo(uBand, &bandInfo))) return E_INVALIDARG; *pdwBandID = bandInfo.wID; @@ -565,7 +561,7 @@ HRESULT STDMETHODCALLTYPE CBaseBarSite::RemoveBand(DWORD dwBandID) HRESULT hr; CBarInfo *pInfo; CComPtr<IObjectWithSite> pSite; - CComPtr<IDeskBand> pDockWnd; + CComPtr<IDockingWindow> pDockWnd; DWORD index; // Retrieve the right index of the coolbar knowing the id @@ -580,19 +576,14 @@ HRESULT STDMETHODCALLTYPE CBaseBarSite::RemoveBand(DWORD dwBandID) if (!pInfo) return E_INVALIDARG; - hr = pInfo->fTheBar->QueryInterface(IID_PPV_ARG(IDeskBand, &pDockWnd)); - if (FAILED_UNEXPECTEDLY(hr)) - { - return E_NOINTERFACE; - } - hr = pInfo->fTheBar->QueryInterface(IID_PPV_ARG(IObjectWithSite, &pSite)); - if (FAILED_UNEXPECTEDLY(hr)) - { - return E_NOINTERFACE; - } /* Windows sends a CloseDW before setting site to NULL */ - pDockWnd->CloseDW(0); - pSite->SetSite(NULL); + hr = pInfo->fTheBar->QueryInterface(IID_PPV_ARG(IDockingWindow, &pDockWnd)); + if (SUCCEEDED(hr)) + pDockWnd->CloseDW(0); + + hr = pInfo->fTheBar->QueryInterface(IID_PPV_ARG(IObjectWithSite, &pSite)); + if (SUCCEEDED(hr)) + pSite->SetSite(NULL); // Delete the band from rebar if (!SendMessage(RB_DELETEBAND, index, 0)) @@ -773,15 +764,11 @@ HRESULT CBaseBarSite::FindBandByGUID(REFGUID pGuid, DWORD *pdwBandID) { DWORD numBands; DWORD i; - HRESULT hr; REBARBANDINFO bandInfo; CBarInfo *realInfo; - hr = EnumBands(-1, &numBands); - if (FAILED_UNEXPECTEDLY(hr)) - return E_FAIL; - - for(i = 0; i < numBands; i++) + numBands = EnumBands(-1, NULL); + for (i = 0; i < numBands; i++) { if (FAILED_UNEXPECTEDLY(GetInternalBandInfo(i, &bandInfo))) return E_FAIL; diff --git a/dll/win32/browseui/shellbrowser.cpp b/dll/win32/browseui/shellbrowser.cpp index eb67209a674..cd729c02998 100644 --- a/dll/win32/browseui/shellbrowser.cpp +++ b/dll/win32/browseui/shellbrowser.cpp @@ -1276,11 +1276,8 @@ BOOL CShellBrowser::IsBandLoaded(const CLSID clsidBand, bool vertical, DWORD *pd if (FAILED_UNEXPECTEDLY(hResult)) return FALSE; - hResult = bandSite->EnumBands(-1, &numBands); - if (FAILED_UNEXPECTEDLY(hResult)) - return FALSE; - - for(i = 0; i < numBands; i++) + numBands = bandSite->EnumBands(-1, NULL); + for (i = 0; i < numBands; i++) { CComPtr<IPersist> bandPersist; @@ -1504,7 +1501,6 @@ LRESULT CALLBACK CShellBrowser::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, wParam = msg.wParam; lParam = msg.lParam; } - menuBand.Release(); } handled = pThis->ProcessWindowMessage(hWnd, uMsg, wParam, lParam, lResult, 0); @@ -3658,16 +3654,15 @@ LRESULT CShellBrowser::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & // TODO: rip down everything { m_Destroyed = true; // Ignore browse requests from Explorer band TreeView during destruction + fCurrentShellView->UIActivate(SVUIA_DEACTIVATE); fToolbarProxy.Destroy(); fCurrentShellView->DestroyViewWindow(); - fCurrentShellView->UIActivate(SVUIA_DEACTIVATE); for (int i = 0; i < 3; i++) { CComPtr<IDockingWindow> pdw; CComPtr<IDeskBar> bar; CComPtr<IUnknown> pBarSite; - CComPtr<IDeskBarClient> pClient; if (fClientBars[i].clientBar == NULL) continue; @@ -3683,6 +3678,7 @@ LRESULT CShellBrowser::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & hr = bar->GetClient(&pBarSite); if (SUCCEEDED(hr) && pBarSite) { + CComPtr<IDeskBarClient> pClient; hr = pBarSite->QueryInterface(IID_PPV_ARG(IDeskBarClient, &pClient)); if (SUCCEEDED(hr)) pClient->SetDeskBarSite(NULL); @@ -3690,7 +3686,6 @@ LRESULT CShellBrowser::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & } pdw->CloseDW(0); - pClient = NULL; pBarSite = NULL; pdw = NULL; bar = NULL; @@ -3720,7 +3715,7 @@ LRESULT CShellBrowser::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHa GetEffectiveClientRect(m_hWnd, &availableBounds, excludeItems); for (INT x = 0; x < 3; x++) { - if (fClientBars[x].clientBar != NULL) + if (fClientBars[x].clientBar) { hResult = fClientBars[x].clientBar->QueryInterface( IID_PPV_ARG(IDockingWindow, &dockingWindow)); diff --git a/dll/win32/shdocvw/CNSCBand.cpp b/dll/win32/shdocvw/CNSCBand.cpp index d40a4c8ca37..f653a1a043c 100644 --- a/dll/win32/shdocvw/CNSCBand.cpp +++ b/dll/win32/shdocvw/CNSCBand.cpp @@ -93,7 +93,8 @@ CNSCBand::~CNSCBand() VOID CNSCBand::OnFinalMessage(HWND) { // The message loop is finished, now we can safely destruct! - static_cast<IDeskBand *>(this)->Release(); + // HACKFIX: Who did this AddRef? Commenting out Release... + //static_cast<IDeskBand *>(this)->Release(); } // *** helper methods *** diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp index 0505c8e7b69..21e7c1bcc4f 100644 --- a/dll/win32/shell32/CDefView.cpp +++ b/dll/win32/shell32/CDefView.cpp @@ -1593,13 +1593,18 @@ LRESULT CDefView::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHand if (!m_Destroyed) { m_Destroyed = TRUE; + RevokeDragDrop(m_hWnd); + SHChangeNotifyDeregister(m_hNotify); + if (m_pFileMenu) + { + IUnknown_SetSite(m_pFileMenu, NULL); + m_pFileMenu = NULL; + } if (m_hMenu) { DestroyMenu(m_hMenu); m_hMenu = NULL; } - RevokeDragDrop(m_hWnd); - SHChangeNotifyDeregister(m_hNotify); m_hNotify = NULL; SHFree(m_pidlParent); m_pidlParent = NULL; @@ -3055,7 +3060,7 @@ HRESULT WINAPI CDefView::TranslateAccelerator(LPMSG lpmsg) TRACE("-- key=0x%04lx\n", lpmsg->wParam); } - return m_pShellBrowser->TranslateAcceleratorSB(lpmsg, 0); + return m_pShellBrowser ? m_pShellBrowser->TranslateAcceleratorSB(lpmsg, 0) : S_FALSE; } HRESULT WINAPI CDefView::EnableModeless(BOOL fEnable) @@ -3290,7 +3295,7 @@ HRESULT CDefView::SaveViewState(IStream *pStream) lvc.mask = LVCF_WIDTH | LVCF_SUBITEM; for (UINT i = 0, j = 0; i < PERSISTCOLUMNS::MAXCOUNT && ListView_GetColumn(m_ListView, j, &lvc); ++j) { - HRESULT hr = MapListColumnToFolderColumn(lvc.iSubItem); + HRESULT hr = MapListColumnToFolderColumn(j); if (SUCCEEDED(hr)) { cols.Columns[i] = MAKELONG(hr, lvc.cx); diff --git a/dll/win32/shell32/shellmenu/CMenuSite.cpp b/dll/win32/shell32/shellmenu/CMenuSite.cpp index 6faf0fabb0c..7596237b596 100644 --- a/dll/win32/shell32/shellmenu/CMenuSite.cpp +++ b/dll/win32/shell32/shellmenu/CMenuSite.cpp @@ -85,6 +85,9 @@ HRESULT STDMETHODCALLTYPE CMenuSite::AddBand(IUnknown * punk) HRESULT STDMETHODCALLTYPE CMenuSite::EnumBands(UINT uBand, DWORD* pdwBandID) { + if (uBand == -1ul) + return GetBandCount(); + if (uBand != 0) return E_FAIL; diff --git a/dll/win32/shell32/shellmenu/CMenuSite.h b/dll/win32/shell32/shellmenu/CMenuSite.h index 3421e1be307..713791390f0 100644 --- a/dll/win32/shell32/shellmenu/CMenuSite.h +++ b/dll/win32/shell32/shellmenu/CMenuSite.h @@ -104,4 +104,5 @@ public: private: IUnknown * ToIUnknown() { return static_cast<IDeskBarClient*>(this); } + UINT GetBandCount() { return m_BandObject ? 1 : 0; } };
3 months, 1 week
1
0
0
0
[reactos] 01/01: [NTOS:KE] Fix freeze in KeBugCheckWithTf
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e7354f244ca12abfd37c6…
commit e7354f244ca12abfd37c67bfacfffea586751749 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Thu Nov 30 11:02:31 2023 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Dec 26 11:27:39 2024 +0200 [NTOS:KE] Fix freeze in KeBugCheckWithTf --- ntoskrnl/ke/bug.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ntoskrnl/ke/bug.c b/ntoskrnl/ke/bug.c index 7cb9c1c2e67..bf0843ed23e 100644 --- a/ntoskrnl/ke/bug.c +++ b/ntoskrnl/ke/bug.c @@ -1092,17 +1092,7 @@ KeBugCheckWithTf(IN ULONG BugCheckCode, KeBugCheckOwner = Prcb->Number; /* Freeze the other CPUs */ - for (ULONG i = 0; i < KeNumberProcessors; i++) - { - if (i != Prcb->Number) - { - /* Send the IPI */ - KiIpiSend(AFFINITY_MASK(i), IPI_FREEZE); - } - } - - /* Give the other CPUs one second to catch up */ - KeStallExecutionProcessor(1000000); + KxFreezeExecution(); #endif /* Display the BSOD */
3 months, 1 week
1
0
0
0
[reactos] 01/01: [NDK] Remove amd64/asm.h
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aee59404cea67b45aa35b…
commit aee59404cea67b45aa35b4bc452d6c393c0633b6 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Mon Dec 23 17:13:13 2024 +0100 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Dec 26 11:08:15 2024 +0200 [NDK] Remove amd64/asm.h Most definitions were either duplicated or unused. Move the remaining ones to amd64/ketypes.h. Actual asm definitions are autogenerated. --- sdk/include/ndk/amd64/asm.h | 427 ---------------------------------------- sdk/include/ndk/amd64/ketypes.h | 20 ++ sdk/include/ndk/asm.h | 6 +- 3 files changed, 22 insertions(+), 431 deletions(-) diff --git a/sdk/include/ndk/amd64/asm.h b/sdk/include/ndk/amd64/asm.h deleted file mode 100644 index 9adcc3842d1..00000000000 --- a/sdk/include/ndk/amd64/asm.h +++ /dev/null @@ -1,427 +0,0 @@ -/*++ NDK Version: 0095 - -Copyright (c) Alex Ionescu. All rights reserved. - -Header Name: - - amd64/asm.h - -Abstract: - - ASM Offsets for dealing with de-referencing structures in registers. - -Author: - - Timo Kreuzer (timo.kreuzer(a)reactos.org) 06-Sep-2008 - ---*/ -#ifndef _ASM_AMD64_H -#define _ASM_AMD64_H - -#ifndef HEX - #ifdef _USE_ML - #define HEX(x) x##h - #else - #define HEX(val) 0x0##val - #endif -#endif - -#define SIZEOF_FX_SAVE_AREA 528 // HACK - -// -// CPU Modes -// -#define KernelMode HEX(0) -#define UserMode HEX(1) - -// -// KTSS Offsets -// -#define KTSS64_RSP0 HEX(04) -#define KTSS64_RSP1 HEX(0c) -#define KTSS64_RSP2 HEX(14) -#define KTSS64_IST HEX(1c) -#define KTSS64_IO_MAP_BASE HEX(66) - -// -// KTHREAD Offsets -// -#define KTHREAD_DEBUG_ACTIVE HEX(03) -#define KTHREAD_INITIAL_STACK HEX(28) -#define KTHREAD_STACK_LIMIT HEX(30) -#define KTHREAD_WAIT_IRQL HEX(156) - -// -// KPRCB Offsets -// -#define KPRCB_CurrentThread HEX(08) - - -// -// KPCR Offsets -// -#define KPCR_TSS_BASE HEX(08) -#define KPCR_SELF HEX(18) -#define KPCR_STALL_SCALE_FACTOR HEX(64) -#define KPCR_PRCB HEX(180 - -// -// KTRAP_FRAME Offsets -// -#define KTRAP_FRAME_P1Home HEX(00) -#define KTRAP_FRAME_P2Home HEX(08) -#define KTRAP_FRAME_P3Home HEX(10) -#define KTRAP_FRAME_P4Home HEX(18) -#define KTRAP_FRAME_P5 HEX(20) -#define KTRAP_FRAME_PreviousMode HEX(28) -#define KTRAP_FRAME_PreviousIrql HEX(29) -#define KTRAP_FRAME_FaultIndicator HEX(2A) -#define KTRAP_FRAME_ExceptionActive HEX(2B) -#define KTRAP_FRAME_MxCsr HEX(2C) -#define KTRAP_FRAME_Rax HEX(30) -#define KTRAP_FRAME_Rcx HEX(38) -#define KTRAP_FRAME_Rdx HEX(40) -#define KTRAP_FRAME_R8 HEX(48) -#define KTRAP_FRAME_R9 HEX(50) -#define KTRAP_FRAME_R10 HEX(58) -#define KTRAP_FRAME_R11 HEX(60) -#define KTRAP_FRAME_GsBase HEX(68) -#define KTRAP_FRAME_Xmm0 HEX(70) -#define KTRAP_FRAME_Xmm1 HEX(80) -#define KTRAP_FRAME_Xmm2 HEX(90) -#define KTRAP_FRAME_Xmm3 HEX(A0) -#define KTRAP_FRAME_Xmm4 HEX(B0) -#define KTRAP_FRAME_Xmm5 HEX(C0) -#define KTRAP_FRAME_FaultAddress HEX(D0) -#define KTRAP_FRAME_Dr0 HEX(D8) -#define KTRAP_FRAME_Dr1 HEX(E0) -#define KTRAP_FRAME_Dr2 HEX(E8) -#define KTRAP_FRAME_Dr3 HEX(F0) -#define KTRAP_FRAME_Dr6 HEX(F8) -#define KTRAP_FRAME_Dr7 HEX(100) -#define KTRAP_FRAME_DebugControl HEX(108) -#define KTRAP_FRAME_LastBranchToRip HEX(110) -#define KTRAP_FRAME_LastBranchFromRip HEX(118) -#define KTRAP_FRAME_LastExceptionToRip HEX(120) -#define KTRAP_FRAME_LastExceptionFromRip HEX(128) -#define KTRAP_FRAME_SegDs HEX(130) -#define KTRAP_FRAME_SegEs HEX(132) -#define KTRAP_FRAME_SegFs HEX(134) -#define KTRAP_FRAME_SegGs HEX(136) -#define KTRAP_FRAME_TrapFrame HEX(138) -#define KTRAP_FRAME_Rbx HEX(140) -#define KTRAP_FRAME_Rdi HEX(148) -#define KTRAP_FRAME_Rsi HEX(150) -#define KTRAP_FRAME_Rbp HEX(158) -#define KTRAP_FRAME_ErrorCode HEX(160) -#define KTRAP_FRAME_Rip HEX(168) -#define KTRAP_FRAME_SegCs HEX(170) -#define KTRAP_FRAME_Logging HEX(173) -#define KTRAP_FRAME_EFlags HEX(178) -#define KTRAP_FRAME_Rsp HEX(180) -#define KTRAP_FRAME_SegSs HEX(188) -#define KTRAP_FRAME_CodePatchCycle HEX(18c) -#define SIZE_KTRAP_FRAME HEX(190) -#define KTRAP_FRAME_ALIGN HEX(10) -#define KTRAP_FRAME_LENGTH HEX(190) - -// -// CONTEXT Offsets -// -#define CONTEXT_P1Home 0 -#define CONTEXT_P2Home HEX(08) -#define CONTEXT_P3Home HEX(10) -#define CONTEXT_P4Home HEX(18) -#define CONTEXT_P5Home HEX(20) -#define CONTEXT_P6Home HEX(28) -#define CONTEXT_ContextFlags HEX(30) -#define CONTEXT_MxCsr HEX(34) -#define CONTEXT_SegCs HEX(38) -#define CONTEXT_SegDs HEX(3a) -#define CONTEXT_SegEs HEX(3c) -#define CONTEXT_SegFs HEX(3e) -#define CONTEXT_SegGs HEX(40) -#define CONTEXT_SegSs HEX(42) -#define CONTEXT_EFlags HEX(44) -#define CONTEXT_Dr0 HEX(48) -#define CONTEXT_Dr1 HEX(50) -#define CONTEXT_Dr2 HEX(58) -#define CONTEXT_Dr3 HEX(60) -#define CONTEXT_Dr6 HEX(68) -#define CONTEXT_Dr7 HEX(70) -#define CONTEXT_Rax HEX(78) -#define CONTEXT_Rcx HEX(80) -#define CONTEXT_Rdx HEX(88) -#define CONTEXT_Rbx HEX(90) -#define CONTEXT_Rsp HEX(98) -#define CONTEXT_Rbp HEX(a0) -#define CONTEXT_Rsi HEX(a8) -#define CONTEXT_Rdi HEX(b0) -#define CONTEXT_R8 HEX(b8) -#define CONTEXT_R9 HEX(c0) -#define CONTEXT_R10 HEX(c8) -#define CONTEXT_R11 HEX(d0) -#define CONTEXT_R12 HEX(d8) -#define CONTEXT_R13 HEX(e0) -#define CONTEXT_R14 HEX(e8) -#define CONTEXT_R15 HEX(f0) -#define CONTEXT_Rip HEX(f8) -#define CONTEXT_Header HEX(100) -#define CONTEXT_Legacy HEX(120) -#define CONTEXT_Xmm0 HEX(1a0) -#define CONTEXT_Xmm1 HEX(1b0) -#define CONTEXT_Xmm2 HEX(1c0) -#define CONTEXT_Xmm3 HEX(1d0) -#define CONTEXT_Xmm4 HEX(1e0) -#define CONTEXT_Xmm5 HEX(1f0) -#define CONTEXT_Xmm6 HEX(200) -#define CONTEXT_Xmm7 HEX(210) -#define CONTEXT_Xmm8 HEX(220) -#define CONTEXT_Xmm9 HEX(230) -#define CONTEXT_Xmm10 HEX(240) -#define CONTEXT_Xmm11 HEX(250) -#define CONTEXT_Xmm12 HEX(260) -#define CONTEXT_Xmm13 HEX(270) -#define CONTEXT_Xmm14 HEX(280) -#define CONTEXT_Xmm15 HEX(290) -#define CONTEXT_VectorRegister HEX(300) -#define CONTEXT_VectorControl HEX(4a0) -#define CONTEXT_DebugControl HEX(4a8) -#define CONTEXT_LastBranchToRip HEX(4b0) -#define CONTEXT_LastBranchFromRip HEX(4b8) -#define CONTEXT_LastExceptionToRip HEX(4c0) -#define CONTEXT_LastExceptionFromRip HEX(4c8) - -// -// KEXCEPTION_FRAME offsets -// -#define KEXCEPTION_FRAME_P1Home HEX(000) -#define KEXCEPTION_FRAME_P2Home HEX(008) -#define KEXCEPTION_FRAME_P3Home HEX(010) -#define KEXCEPTION_FRAME_P4Home HEX(018) -#define KEXCEPTION_FRAME_P5 HEX(020) -#define KEXCEPTION_FRAME_InitialStack HEX(028) -#define KEXCEPTION_FRAME_Xmm6 HEX(030) -#define KEXCEPTION_FRAME_Xmm7 HEX(040) -#define KEXCEPTION_FRAME_Xmm8 HEX(050) -#define KEXCEPTION_FRAME_Xmm9 HEX(060) -#define KEXCEPTION_FRAME_Xmm10 HEX(070) -#define KEXCEPTION_FRAME_Xmm11 HEX(080) -#define KEXCEPTION_FRAME_Xmm12 HEX(090) -#define KEXCEPTION_FRAME_Xmm13 HEX(0A0) -#define KEXCEPTION_FRAME_Xmm14 HEX(0B0) -#define KEXCEPTION_FRAME_Xmm15 HEX(0C0) -#define KEXCEPTION_FRAME_TrapFrame HEX(0D0) -#define KEXCEPTION_FRAME_CallbackStack HEX(0D8) -#define KEXCEPTION_FRAME_OutputBuffer HEX(0E0) -#define KEXCEPTION_FRAME_OutputLength HEX(0E8) -#define KEXCEPTION_FRAME_MxCsr HEX(0F0) -#define KEXCEPTION_FRAME_Rbp HEX(0F8) -#define KEXCEPTION_FRAME_Rbx HEX(100) -#define KEXCEPTION_FRAME_Rdi HEX(108) -#define KEXCEPTION_FRAME_Rsi HEX(110) -#define KEXCEPTION_FRAME_R12 HEX(118) -#define KEXCEPTION_FRAME_R13 HEX(120) -#define KEXCEPTION_FRAME_R14 HEX(128) -#define KEXCEPTION_FRAME_R15 HEX(130) -#define KEXCEPTION_FRAME_Return HEX(138) -#define SIZE_KEXCEPTION_FRAME HEX(140) - - -// -// EXCEPTION_RECORD Offsets -// -#define EXCEPTION_RECORD_ExceptionCode HEX(00) -#define EXCEPTION_RECORD_ExceptionFlags HEX(04) -#define EXCEPTION_RECORD_ExceptionRecord HEX(08) -#define EXCEPTION_RECORD_ExceptionAddress HEX(10) -#define EXCEPTION_RECORD_NumberParameters HEX(18) -#define EXCEPTION_RECORD_ExceptionInformation HEX(20) -#define SIZE_EXCEPTION_RECORD HEX(98) - -// -// CR0 -// -#define CR0_PE HEX(1) -#define CR0_MP HEX(2) -#define CR0_EM HEX(4) -#define CR0_TS HEX(8) -#define CR0_ET HEX(10) -#define CR0_NE HEX(20) -#define CR0_WP HEX(10000) -#define CR0_AM HEX(40000) -#define CR0_NW HEX(20000000) -#define CR0_CD HEX(40000000) -#define CR0_PG HEX(80000000) - -/* Number of bytes reserved for syscall parameters */ -#define MAX_SYSCALL_PARAM_SIZE (16 * 8) - -#ifdef _ASM_ -// -// CR4 -// -#define CR4_VME HEX(1) -#define CR4_PVI HEX(2) -#define CR4_TSD HEX(4) -#define CR4_DE HEX(8) -#define CR4_PSE HEX(10) -#define CR4_PAE HEX(20) -#define CR4_MCE HEX(40) -#define CR4_PGE HEX(80) -#define CR4_FXSR HEX(200) -#define CR4_XMMEXCPT HEX(400) -#endif - -// -// Generic Definitions -// -#define PRIMARY_VECTOR_BASE HEX(30) -#define MAXIMUM_IDTVECTOR HEX(FF) - -// -// Usermode callout frame definitions -// -#define CBSTACK_STACK HEX(0) -#define CBSTACK_TRAP_FRAME HEX(8) -#define CBSTACK_CALLBACK_STACK HEX(10) -#define CBSTACK_RBP HEX(18) -#define CBSTACK_RESULT HEX(20) -#define CBSTACK_RESULT_LENGTH HEX(28) - - -/* Following ones are ASM only! ***********************************************/ - -#ifdef __ASM__ - -// -// PCR Access -// -#define PCR gs: - -// -// EFLAGS -// -#define EFLAGS_TF HEX(100) -#define EFLAGS_INTERRUPT_MASK HEX(200) -#define EFLAGS_NESTED_TASK HEX(4000) -#define EFLAGS_V86_MASK HEX(20000) -#define EFLAGS_ALIGN_CHECK HEX(40000) -#define EFLAGS_VIF HEX(80000) -#define EFLAGS_VIP HEX(100000) -#define EFLAG_SIGN HEX(8000) -#define EFLAG_ZERO HEX(4000) -#define EFLAG_SELECT (EFLAG_SIGN + EFLAG_ZERO) -#define EFLAGS_USER_SANITIZE HEX(3F4DD7) - -// -// Exception codes -// -#define EXCEPTION_DIVIDED_BY_ZERO HEX(00000) -#define EXCEPTION_DEBUG HEX(00001) -#define EXCEPTION_NMI HEX(00002) -#define EXCEPTION_INT3 HEX(00003) -#define EXCEPTION_BOUND_CHECK HEX(00005) -#define EXCEPTION_INVALID_OPCODE HEX(00006) -#define EXCEPTION_NPX_NOT_AVAILABLE HEX(00007) -#define EXCEPTION_DOUBLE_FAULT HEX(00008) -#define EXCEPTION_NPX_OVERRUN HEX(00009) -#define EXCEPTION_INVALID_TSS HEX(0000A) -#define EXCEPTION_SEGMENT_NOT_PRESENT HEX(0000B) -#define EXCEPTION_STACK_FAULT HEX(0000C) -#define EXCEPTION_GP_FAULT HEX(0000D) -#define EXCEPTION_RESERVED_TRAP HEX(0000F) -#define EXCEPTION_NPX_ERROR HEX(00010) -#define EXCEPTION_ALIGNMENT_CHECK HEX(00011) - -// -// NTSTATUS values -// -#define STATUS_ACCESS_VIOLATION HEX(C0000005) -#define STATUS_IN_PAGE_ERROR HEX(C0000006) -#define STATUS_GUARD_PAGE_VIOLATION HEX(80000001) -#define STATUS_PRIVILEGED_INSTRUCTION HEX(C0000096) -#define STATUS_STACK_OVERFLOW HEX(C00000FD) -#define KI_EXCEPTION_ACCESS_VIOLATION HEX(10000004) -#define STATUS_INVALID_SYSTEM_SERVICE HEX(C000001C) -#define STATUS_NO_CALLBACK_ACTIVE HEX(C0000258) -#define STATUS_CALLBACK_POP_STACK HEX(C0000423) -#define STATUS_ARRAY_BOUNDS_EXCEEDED HEX(C000008C) -#define STATUS_ILLEGAL_INSTRUCTION HEX(C000001D) -#define STATUS_INVALID_LOCK_SEQUENCE HEX(C000001E) -#define STATUS_BREAKPOINT HEX(80000003) -#define STATUS_SINGLE_STEP HEX(80000004) -#define STATUS_INTEGER_DIVIDE_BY_ZERO HEX(C0000094) -#define STATUS_INTEGER_OVERFLOW HEX(C0000095) -#define STATUS_FLOAT_DENORMAL_OPERAND HEX(C000008D) -#define STATUS_FLOAT_DIVIDE_BY_ZERO HEX(C000008E) -#define STATUS_FLOAT_INEXACT_RESULT HEX(C000008F) -#define STATUS_FLOAT_INVALID_OPERATION HEX(C0000090) -#define STATUS_FLOAT_OVERFLOW HEX(C0000091) -#define STATUS_FLOAT_STACK_CHECK HEX(C0000092) -#define STATUS_FLOAT_UNDERFLOW HEX(C0000093) -#define STATUS_FLOAT_MULTIPLE_FAULTS HEX(C00002B4) -#define STATUS_FLOAT_MULTIPLE_TRAPS HEX(C00002B5) -#define STATUS_ASSERTION_FAILURE HEX(C0000420) - -// -// Bugcheck Codes -// -#define APC_INDEX_MISMATCH HEX(01) -#define IRQL_NOT_GREATER_OR_EQUAL HEX(09) -#define IRQL_NOT_LESS_OR_EQUAL HEX(0A) -#define TRAP_CAUSE_UNKNOWN HEX(12) -#define KMODE_EXCEPTION_NOT_HANDLED HEX(13) -#define IRQL_GT_ZERO_AT_SYSTEM_SERVICE HEX(4A) -#define UNEXPECTED_KERNEL_MODE_TRAP HEX(7F) -#define ATTEMPTED_SWITCH_FROM_DPC HEX(B8) -#define HARDWARE_INTERRUPT_STORM HEX(F2) - -// -// IRQL Levels -// -#define PASSIVE_LEVEL 0 -#define LOW_LEVEL 0 -#define APC_LEVEL 1 -#define DISPATCH_LEVEL 2 -#define CLOCK_LEVEL 13 -#define IPI_LEVEL 14 -#define POWER_LEVEL 14 -#define PROFILE_LEVEL 15 -#define HIGH_LEVEL 15 - -// -// Synchronization-level IRQL -// -#ifndef CONFIG_SMP -#define SYNCH_LEVEL DISPATCH_LEVEL -#else -#define SYNCH_LEVEL (IPI_LEVEL - 2) -#endif - -// -// Quantum Decrements -// -#define CLOCK_QUANTUM_DECREMENT HEX(3) - -// -// Machine types -// -#define MACHINE_TYPE_ISA HEX(0000) -#define MACHINE_TYPE_EISA HEX(0001) -#define MACHINE_TYPE_MCA HEX(0002) - -// -// Kernel Feature Bits -// -#define KF_RDTSC HEX(00000002) - -// -// Kernel Stack Size -// -#define KERNEL_STACK_SIZE HEX(6000) - -#endif // __ASM__ - -#endif // !_ASM_AMD64_H - diff --git a/sdk/include/ndk/amd64/ketypes.h b/sdk/include/ndk/amd64/ketypes.h index ea9031df667..08c94196db3 100644 --- a/sdk/include/ndk/amd64/ketypes.h +++ b/sdk/include/ndk/amd64/ketypes.h @@ -128,6 +128,21 @@ typedef enum #define KGDT64_R3_CMTEB 0x0050 #define KGDT64_R0_LDT 0x0060 +// +// CR0 +// +#define CR0_PE 0x00000001 +#define CR0_MP 0x00000002 +#define CR0_EM 0x00000004 +#define CR0_TS 0x00000008 +#define CR0_ET 0x00000010 +#define CR0_NE 0x00000020 +#define CR0_WP 0x00010000 +#define CR0_AM 0x00040000 +#define CR0_NW 0x20000000 +#define CR0_CD 0x40000000 +#define CR0_PG 0x80000000 + // // CR4 // @@ -322,6 +337,8 @@ typedef enum // // HAL Variables // +#define PRIMARY_VECTOR_BASE 0x30 +#define MAXIMUM_IDTVECTOR 0xFF #define INITIAL_STALL_COUNT 100 #define MM_HAL_VA_START 0xFFFFFFFFFFC00000ULL /* This is Vista+ */ #define MM_HAL_VA_END 0xFFFFFFFFFFFFFFFFULL @@ -345,6 +362,9 @@ typedef enum #define NMI_STACK_SIZE 0x2000 #define ISR_STACK_SIZE 0x6000 +/* Number of bytes reserved for syscall parameters */ +#define MAX_SYSCALL_PARAM_SIZE (16 * 8) + // // Synchronization-level IRQL // diff --git a/sdk/include/ndk/asm.h b/sdk/include/ndk/asm.h index ce2ada8cd1f..71c01b3fa72 100644 --- a/sdk/include/ndk/asm.h +++ b/sdk/include/ndk/asm.h @@ -18,11 +18,9 @@ Author: #if defined(_M_IX86) #include <i386/asm.h> -#elif defined(_M_AMD64) -#include <amd64/asm.h> -#elif defined(_M_ARM) || defined(_M_PPC) || defined(_M_ARM64) +#elif defined(_M_AMD64) || defined(_M_ARM) || defined(_M_PPC) || defined(_M_ARM64) // -// ARM and PPC ports don't use asm.h +// AMD64, ARM and PPC ports don't use asm.h // #else #error Unsupported Architecture
3 months, 1 week
1
0
0
0
[reactos] 01/01: [SHELL32] ILLoadFromStream must allow loading unknown pidl formats (#7570)
by Whindmar Saksit
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7d75bfb449286204c4376…
commit 7d75bfb449286204c43766eea43e872f51065568 Author: Whindmar Saksit <whindsaks(a)proton.me> AuthorDate: Wed Dec 25 20:32:08 2024 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Wed Dec 25 20:32:08 2024 +0100 [SHELL32] ILLoadFromStream must allow loading unknown pidl formats (#7570) --- dll/win32/shell32/debughlp.cpp | 21 ++++++++++++++++----- dll/win32/shell32/wine/pidl.c | 6 +++--- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/dll/win32/shell32/debughlp.cpp b/dll/win32/shell32/debughlp.cpp index 6778418c7a8..f57d399789b 100644 --- a/dll/win32/shell32/debughlp.cpp +++ b/dll/win32/shell32/debughlp.cpp @@ -22,6 +22,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(pidl); +static inline BYTE _dbg_ILGetType(LPCITEMIDLIST pidl) +{ + return pidl && pidl->mkid.cb >= 3 ? pidl->mkid.abID[0] : 0; +} + +static inline BYTE _dbg_ILGetFSType(LPCITEMIDLIST pidl) +{ + const BYTE type = _dbg_ILGetType(pidl); + return (type & PT_FOLDERTYPEMASK) == PT_FS ? type : 0; +} + static LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl) { @@ -97,6 +108,9 @@ LPWSTR _dbg_ILGetTextPointerW(LPCITEMIDLIST pidl) if (pdata) { + if (_dbg_ILGetFSType(pidl) & PT_FS_UNICODE_FLAG) + return (LPWSTR)&(pdata->u.file.szNames); + switch (pdata->type) { case PT_GUID: @@ -126,9 +140,6 @@ LPWSTR _dbg_ILGetTextPointerW(LPCITEMIDLIST pidl) case PT_SHARE: /* return (LPSTR)&(pdata->u.network.szNames); */ return NULL; - - case PT_VALUEW: - return (LPWSTR)&(pdata->u.file.szNames); } } return NULL; @@ -271,7 +282,7 @@ static void pdump_impl (LPCITEMIDLIST pidl) char szName[MAX_PATH]; _dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH); - if ( pData && (PT_FOLDER == type || PT_VALUE == type) ) + if (_dbg_ILGetFSType(pidltemp)) dwAttrib = pData->u.file.uFileAttribs; MESSAGE ("[%p] size=%04u type=%x attr=0x%08x name=%s (%s,%s)\n", @@ -288,7 +299,7 @@ static void pdump_impl (LPCITEMIDLIST pidl) char szName[MAX_PATH]; _dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH); - if ( pData && (PT_FOLDER == type || PT_VALUE == type) ) + if (_dbg_ILGetFSType(pidltemp)) dwAttrib = pData->u.file.uFileAttribs; MESSAGE ("[%p] size=%04u type=%x attr=0x%08x name=%s (%s,%s)\n", diff --git a/dll/win32/shell32/wine/pidl.c b/dll/win32/shell32/wine/pidl.c index 2bca7cdd436..94d9a22387a 100644 --- a/dll/win32/shell32/wine/pidl.c +++ b/dll/win32/shell32/wine/pidl.c @@ -333,8 +333,10 @@ HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl) if (*ppPidl && !pcheck(*ppPidl)) { WARN("Check failed\n"); +#ifndef __REACTOS__ /* We don't know all pidl formats, must allow loading unknown */ SHFree(*ppPidl); *ppPidl = NULL; +#endif } IStream_Release (pStream); @@ -2030,11 +2032,9 @@ DWORD _ILGetDrive(LPCITEMIDLIST pidl, LPWSTR pOut, UINT uSize) */ BOOL _ILIsUnicode(LPCITEMIDLIST pidl) { - LPPIDLDATA lpPData = _ILGetDataPointer(pidl); - TRACE("(%p)\n",pidl); - return (pidl && lpPData && PT_VALUEW == lpPData->type); + return (_ILGetFSType(pidl) & PT_FS_UNICODE_FLAG) != 0; } BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
3 months, 1 week
1
0
0
0
[reactos] 01/01: [INCLUDE][WKSSVC][MSV1_0] Rename msv1_0p.h to ntmsv1_0.h and move it to the ddk directory
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3dd6e3103fd7d587cb42a…
commit 3dd6e3103fd7d587cb42adb14f868776cb795de7 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Wed Dec 25 12:52:55 2024 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Wed Dec 25 12:52:55 2024 +0100 [INCLUDE][WKSSVC][MSV1_0] Rename msv1_0p.h to ntmsv1_0.h and move it to the ddk directory --- base/services/wkssvc/precomp.h | 1 + dll/win32/msv1_0/precomp.h | 2 +- sdk/include/ddk/ntmsv1_0.h | 47 ++++++++++++++++++++++++++++++++++++++++++ sdk/include/reactos/msv1_0p.h | 17 --------------- 4 files changed, 49 insertions(+), 18 deletions(-) diff --git a/base/services/wkssvc/precomp.h b/base/services/wkssvc/precomp.h index b6d575316ab..f2fbde4e433 100644 --- a/base/services/wkssvc/precomp.h +++ b/base/services/wkssvc/precomp.h @@ -15,6 +15,7 @@ #include <lmjoin.h> #include <lmserver.h> #include <ntsecapi.h> +#include <ntmsv1_0.h> //#include <ntstatus.h> #include <ndk/rtlfuncs.h> diff --git a/dll/win32/msv1_0/precomp.h b/dll/win32/msv1_0/precomp.h index a034c3e6100..a56611e4ff2 100644 --- a/dll/win32/msv1_0/precomp.h +++ b/dll/win32/msv1_0/precomp.h @@ -27,10 +27,10 @@ #include <ntsecpkg.h> #include <ntsam.h> #include <ntlsa.h> +#include <ntmsv1_0.h> #include <samsrv/samsrv.h> //#include <lsass/lsasrv.h> -#include <msv1_0p.h> #include "ntlm/global.h" #include "ntlm/protocol.h" diff --git a/sdk/include/ddk/ntmsv1_0.h b/sdk/include/ddk/ntmsv1_0.h new file mode 100644 index 00000000000..7db82d1feb1 --- /dev/null +++ b/sdk/include/ddk/ntmsv1_0.h @@ -0,0 +1,47 @@ +#ifndef _NTMSV1_0_ +#define _NTMSV1_0_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _MSV1_0_ENUMUSERS_REQUEST +{ + MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType; +} MSV1_0_ENUMUSERS_REQUEST, *PMSV1_0_ENUMUSERS_REQUEST; + +typedef struct _MSV1_0_ENUMUSERS_RESPONSE +{ + MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType; + ULONG NumberOfLoggedOnUsers; + PLUID LogonIds; + PULONG EnumHandles; +} MSV1_0_ENUMUSERS_RESPONSE, *PMSV1_0_ENUMUSERS_RESPONSE; + +typedef struct _MSV1_0_GETUSERINFO_REQUEST +{ + MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType; + LUID LogonId; +} MSV1_0_GETUSERINFO_REQUEST, *PMSV1_0_GETUSERINFO_REQUEST; + +typedef struct _MSV1_0_GETUSERINFO_RESPONSE +{ + MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType; + PSID UserSid; + UNICODE_STRING UserName; + UNICODE_STRING LogonDomainName; + UNICODE_STRING LogonServer; + SECURITY_LOGON_TYPE LogonType; +} MSV1_0_GETUSERINFO_RESPONSE, *PMSV1_0_GETUSERINFO_RESPONSE; + +typedef struct _MSV1_0_RELOGON_REQUEST +{ + MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType; + UNICODE_STRING LogonServer; +} MSV1_0_RELOGON_REQUEST, *PMSV1_0_RELOGON_REQUEST; + +#ifdef __cplusplus +} +#endif + +#endif /* _NTMSV1_0_ */ diff --git a/sdk/include/reactos/msv1_0p.h b/sdk/include/reactos/msv1_0p.h deleted file mode 100644 index 674d5f1f5a2..00000000000 --- a/sdk/include/reactos/msv1_0p.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _MSV1_0P_ -#define _MSV1_0P_ - -typedef struct _MSV1_0_ENUMUSERS_REQUEST -{ - MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType; -} MSV1_0_ENUMUSERS_REQUEST, *PMSV1_0_ENUMUSERS_REQUEST; - -typedef struct _MSV1_0_ENUMUSERS_RESPONSE -{ - MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType; - ULONG NumberOfLoggedOnUsers; - PLUID LogonIds; - PULONG EnumHandles; -} MSV1_0_ENUMUSERS_RESPONSE, *PMSV1_0_ENUMUSERS_RESPONSE; - -#endif /* _MSV1_0P_ */
3 months, 1 week
1
0
0
0
[reactos] 01/01: [USER32_APTEST][USER32] CopyImage improve regression test and function. (#7524)
by Doug Lyons
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1c55924045facde76d9f7…
commit 1c55924045facde76d9f7c855f0760e16365b778 Author: Doug Lyons <douglyons(a)douglyons.com> AuthorDate: Tue Dec 24 17:51:31 2024 -0600 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Dec 24 17:51:31 2024 -0600 [USER32_APTEST][USER32] CopyImage improve regression test and function. (#7524) CORE-19806 and CORE-17902. * Follow-up of PR #6886 and commit d3ec7cd to remove hack. --- modules/rostests/apitests/user32/CopyImage.c | 53 ++++++++++++++++++++++++++++ win32ss/user/user32/windows/cursoricon.c | 46 ++++++++++++++++++++---- 2 files changed, 93 insertions(+), 6 deletions(-) diff --git a/modules/rostests/apitests/user32/CopyImage.c b/modules/rostests/apitests/user32/CopyImage.c index bad7c472f4f..2280b20a6ba 100644 --- a/modules/rostests/apitests/user32/CopyImage.c +++ b/modules/rostests/apitests/user32/CopyImage.c @@ -3,6 +3,7 @@ * LICENSE: LGPL-2.1+ (
https://spdx.org/licenses/LGPL-2.1+
) * PURPOSE: Test for SetFocus/GetFocus/GetGUIThreadInfo * COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> +* Copyright 2024 Doug Lyons <douglyons(a)douglyons.com> */ #include "precomp.h" @@ -76,9 +77,61 @@ Test_CopyImage_Flags(UINT uType) DeleteObject(hImage); } +static VOID +Test_CopyImage_hImage_NULL(void) +{ + HANDLE hImg; + DWORD LastError; + + /* Test NULL HANDLE return and GetLastError return. */ + SetLastError(0xdeadbeef); + hImg = CopyImage(NULL, IMAGE_ICON, 16, 16, LR_COPYFROMRESOURCE); + LastError = GetLastError(); + ok(LastError == ERROR_INVALID_CURSOR_HANDLE, "Wrong error 0x%08lx returned\n", LastError); + ok(!hImg, "Image returned should have been NULL, hImg was %p\n", hImg); + + SetLastError(0xdeadbeef); + hImg = CopyImage(NULL, IMAGE_BITMAP, 16, 16, LR_COPYFROMRESOURCE); + LastError = GetLastError(); + ok(LastError == ERROR_INVALID_HANDLE, "Wrong error 0x%08lx returned\n", LastError); + ok(!hImg, "Image returned should have been NULL, hImg was %p\n", hImg); + + + SetLastError(0xdeadbeef); + hImg = CopyImage(NULL, IMAGE_CURSOR, 16, 16, LR_COPYFROMRESOURCE); + LastError = GetLastError(); + ok(LastError == ERROR_INVALID_CURSOR_HANDLE, "Wrong error 0x%08lx returned\n", LastError); + ok(!hImg, "Image returned should have been NULL, hImg was %p\n", hImg); + + /* Test bad Flags for Invalid Parameter return */ + SetLastError(0xdeadbeef); + /* 0x80000000 is an invalid flag value */ + hImg = CopyImage(NULL, IMAGE_BITMAP, 16, 16, 0x80000000); + LastError = GetLastError(); + ok(LastError == ERROR_INVALID_PARAMETER, "Wrong error 0x%08lx returned\n", LastError); + ok(!hImg, "Image returned should have been NULL, hImg was %p\n", hImg); + + /* Test bad Type (5) GetLastError return value. Not Icon, Cursor, or Bitmap. */ + SetLastError(0xdeadbeef); + hImg = CopyImage(NULL, 5, 16, 16, LR_COPYFROMRESOURCE); + LastError = GetLastError(); + ok(LastError == ERROR_INVALID_PARAMETER, "Wrong error 0x%08lx returned\n", LastError); + ok(!hImg, "Image returned should have been NULL, hImg was %p\n", hImg); + + /* Test bad type (5) GetLastError return value with good HANDLE */ + hImg = CreateTestImage(IMAGE_ICON); + SetLastError(0xdeadbeef); + hImg = CopyImage(hImg, 5, 16, 16, LR_COPYFROMRESOURCE); + LastError = GetLastError(); + ok(LastError == ERROR_INVALID_PARAMETER, "Wrong error 0x%08lx returned\n", LastError); + ok(!hImg, "Image returned should have been NULL, hImg was %p\n", hImg); + DeleteObject(hImg); +} + START_TEST(CopyImage) { Test_CopyImage_Flags(IMAGE_BITMAP); Test_CopyImage_Flags(IMAGE_CURSOR); Test_CopyImage_Flags(IMAGE_ICON); + Test_CopyImage_hImage_NULL(); } diff --git a/win32ss/user/user32/windows/cursoricon.c b/win32ss/user/user32/windows/cursoricon.c index 53c98456e81..b1d8bc7e69a 100644 --- a/win32ss/user/user32/windows/cursoricon.c +++ b/win32ss/user/user32/windows/cursoricon.c @@ -2041,16 +2041,50 @@ HANDLE WINAPI CopyImage( switch(uType) { case IMAGE_BITMAP: + if (!hImage) + { + SetLastError(ERROR_INVALID_HANDLE); + break; + } return BITMAP_CopyImage(hImage, cxDesired, cyDesired, fuFlags); case IMAGE_CURSOR: case IMAGE_ICON: - /* HACK: Copying bitmaps with LR_COPYFROMRESOURCE flag fails. CORE-17902. - * This is a way to return the original bit map if we need - * the icons to show up. We need a simpler test. */ { - HANDLE handle = CURSORICON_CopyImage(hImage, uType == IMAGE_ICON, cxDesired, cyDesired, fuFlags); - if (!handle && (fuFlags & (LR_COPYFROMRESOURCE|LR_COPYRETURNORG))) - handle = CURSORICON_CopyImage(hImage, uType == IMAGE_ICON, cxDesired, cyDesired, (fuFlags & ~LR_COPYFROMRESOURCE)); + HANDLE handle; + if (!hImage) + { + SetLastError(ERROR_INVALID_CURSOR_HANDLE); + break; + } + handle = CURSORICON_CopyImage(hImage, uType == IMAGE_ICON, cxDesired, cyDesired, fuFlags); + if (!handle && (fuFlags & LR_COPYFROMRESOURCE)) + { + /* Test if the hImage is the same size as what we want by getting + * its BITMAP and comparing its dimensions to the desired size. */ + BITMAP bm; + + ICONINFO iconinfo = { 0 }; + if (!GetIconInfo(hImage, &iconinfo)) + { + ERR("GetIconInfo Failed. hImage %p\n", hImage); + return NULL; + } + if (!GetObject(iconinfo.hbmColor, sizeof(bm), &bm)) + { + ERR("GetObject Failed. iconinfo %p\n", iconinfo); + return NULL; + } + + DeleteObject(iconinfo.hbmMask); + DeleteObject(iconinfo.hbmColor); + + /* If the images are the same size remove LF_COPYFROMRESOURCE and try again */ + if (cxDesired == bm.bmWidth && cyDesired == bm.bmHeight) + { + handle = CURSORICON_CopyImage(hImage, uType == IMAGE_ICON, cxDesired, + cyDesired, (fuFlags & ~LR_COPYFROMRESOURCE)); + } + } return handle; } default:
3 months, 1 week
1
0
0
0
[reactos] 01/01: [SDK] Fix naming of a CPUID structure
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1ea3af8959da6fcf34d3e…
commit 1ea3af8959da6fcf34d3eb92885fe01ce18de83c Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Tue Nov 14 16:35:10 2023 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Tue Dec 24 17:27:32 2024 +0200 [SDK] Fix naming of a CPUID structure --- ntoskrnl/ke/amd64/cpu.c | 2 +- sdk/include/reactos/x86x64/Cpuid.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/ke/amd64/cpu.c b/ntoskrnl/ke/amd64/cpu.c index d1e9567c1b8..24a17d24458 100644 --- a/ntoskrnl/ke/amd64/cpu.c +++ b/ntoskrnl/ke/amd64/cpu.c @@ -255,7 +255,7 @@ KiGetFeatureBits(VOID) if (signature.MaxLeaf >= CPUID_EXTENDED_STATE) { /* Read CPUID_EXTENDED_STATE */ - CPUID_EXTENDED_STATE_SUB_LEAF_EAX_REGS ExtStateSub; + CPUID_EXTENDED_STATE_SUB_LEAF_REGS ExtStateSub; __cpuidex(ExtStateSub.AsInt32, CPUID_EXTENDED_STATE, CPUID_EXTENDED_STATE_SUB_LEAF); diff --git a/sdk/include/reactos/x86x64/Cpuid.h b/sdk/include/reactos/x86x64/Cpuid.h index 39ece442c99..3c317ccea62 100644 --- a/sdk/include/reactos/x86x64/Cpuid.h +++ b/sdk/include/reactos/x86x64/Cpuid.h @@ -112,7 +112,7 @@ typedef union CPUID_EXTENDED_STATE_SUB_LEAF_ECX Ecx; UINT32 Edx; // Reports the supported bits of the upper 32 bits of the IA32_XSS MSR. IA32_XSS[n + 32] can be set to 1 only if EDX[n] is 1. }; -} CPUID_EXTENDED_STATE_SUB_LEAF_EAX_REGS; +} CPUID_EXTENDED_STATE_SUB_LEAF_REGS; // CPUID_EXTENDED_CPU_SIG (0x80000001) typedef union
3 months, 1 week
1
0
0
0
[reactos] 01/01: [SETUP:REACTOS][SYSSETUP] Fix Shift-F10 cmd.exe invocation.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3b800165b0da7895756a8…
commit 3b800165b0da7895756a8b88b726a9473f101b87 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Oct 30 12:46:17 2024 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Tue Dec 24 12:22:42 2024 +0100 [SETUP:REACTOS][SYSSETUP] Fix Shift-F10 cmd.exe invocation. Pressing Shift-F10 to open cmd.exe when the setup program runs from a different current directory than System32, now works correctly. Use the 2nd CreateProcessW() `lpCommandLine` parameter, instead of the 1st parameter `lpApplicationName`, so as to use default path search. The command-line buffer given to the 2nd-parameter can be temporarily modified by CreateProcessW(), thus use an on-stack buffer.
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-pr…
--- base/setup/reactos/reactos.c | 6 +++--- dll/win32/syssetup/install.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/base/setup/reactos/reactos.c b/base/setup/reactos/reactos.c index fe169bd3ee9..8bdb3df629c 100644 --- a/base/setup/reactos/reactos.c +++ b/base/setup/reactos/reactos.c @@ -2762,7 +2762,6 @@ HotkeyThread(LPVOID Parameter) DPRINT("HotkeyThread start\n"); hotkey = GlobalAddAtomW(L"Setup Shift+F10 Hotkey"); - if (!RegisterHotKey(NULL, hotkey, MOD_SHIFT, VK_F10)) DPRINT1("RegisterHotKey failed with %lu\n", GetLastError()); @@ -2770,11 +2769,12 @@ HotkeyThread(LPVOID Parameter) { if (msg.hwnd == NULL && msg.message == WM_HOTKEY && msg.wParam == hotkey) { + WCHAR CmdLine[] = L"cmd.exe"; // CreateProcess can modify this buffer. STARTUPINFOW si = { sizeof(si) }; PROCESS_INFORMATION pi; - if (CreateProcessW(L"cmd.exe", - NULL, + if (CreateProcessW(NULL, + CmdLine, NULL, NULL, FALSE, diff --git a/dll/win32/syssetup/install.c b/dll/win32/syssetup/install.c index e7ba620479a..0f6a150da4e 100644 --- a/dll/win32/syssetup/install.c +++ b/dll/win32/syssetup/install.c @@ -1049,19 +1049,19 @@ HotkeyThread(LPVOID Parameter) DPRINT("HotkeyThread start\n"); hotkey = GlobalAddAtomW(L"Setup Shift+F10 Hotkey"); - if (!RegisterHotKey(NULL, hotkey, MOD_SHIFT, VK_F10)) DPRINT1("RegisterHotKey failed with %lu\n", GetLastError()); - while (GetMessage(&msg, NULL, 0, 0)) + while (GetMessageW(&msg, NULL, 0, 0)) { if (msg.hwnd == NULL && msg.message == WM_HOTKEY && msg.wParam == hotkey) { + WCHAR CmdLine[] = L"cmd.exe"; // CreateProcess can modify this buffer. STARTUPINFOW si = { sizeof(si) }; PROCESS_INFORMATION pi; - if (CreateProcessW(L"cmd.exe", - NULL, + if (CreateProcessW(NULL, + CmdLine, NULL, NULL, FALSE,
3 months, 1 week
1
0
0
0
[reactos] 01/01: [SHLWAPI] Use an explicit "int*" type for the 3rd parameter of StrToIntExA/W
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d7f1a784a86570863804d…
commit d7f1a784a86570863804daaf6479ffba2863422f Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Dec 23 21:56:17 2024 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Dec 23 22:44:54 2024 +0100 [SHLWAPI] Use an explicit "int*" type for the 3rd parameter of StrToIntExA/W As this is already present in our PSDK shlwapi.h header, MS PSDK one, and MSDN. --- dll/win32/shlwapi/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/shlwapi/string.c b/dll/win32/shlwapi/string.c index dec137a9d67..7c792d66564 100644 --- a/dll/win32/shlwapi/string.c +++ b/dll/win32/shlwapi/string.c @@ -883,7 +883,7 @@ int WINAPI StrToIntW(LPCWSTR lpszStr) * the string is treated as a decimal string. A leading '-' is ignored for * hexadecimal numbers. */ -BOOL WINAPI StrToIntExA(LPCSTR lpszStr, DWORD dwFlags, LPINT lpiRet) +BOOL WINAPI StrToIntExA(LPCSTR lpszStr, DWORD dwFlags, int *lpiRet) { LONGLONG li; BOOL bRes; @@ -967,7 +967,7 @@ BOOL WINAPI StrToInt64ExA(LPCSTR lpszStr, DWORD dwFlags, LONGLONG *lpiRet) * * See StrToIntExA. */ -BOOL WINAPI StrToIntExW(LPCWSTR lpszStr, DWORD dwFlags, LPINT lpiRet) +BOOL WINAPI StrToIntExW(LPCWSTR lpszStr, DWORD dwFlags, int *lpiRet) { LONGLONG li; BOOL bRes;
3 months, 1 week
1
0
0
0
← Newer
1
2
3
4
5
...
11
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
Results per page:
10
25
50
100
200