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
July 2016
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
18 participants
358 discussions
Start a n
N
ew thread
[hbelusca] 72006: [INF]: Use the correct icon for audio controller devices in the device manager. By Jared Smudde. CORE-11679 #resolve #comment Committed, thanks!
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Jul 26 19:09:18 2016 New Revision: 72006 URL:
http://svn.reactos.org/svn/reactos?rev=72006&view=rev
Log: [INF]: Use the correct icon for audio controller devices in the device manager. By Jared Smudde. CORE-11679 #resolve #comment Committed, thanks! Modified: trunk/reactos/media/inf/audio.inf Modified: trunk/reactos/media/inf/audio.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/inf/audio.inf?rev=72…
============================================================================== --- trunk/reactos/media/inf/audio.inf [iso-8859-1] (original) +++ trunk/reactos/media/inf/audio.inf [iso-8859-1] Tue Jul 26 19:09:18 2016 @@ -21,8 +21,8 @@ [AUDIOClass.NT.AddReg] HKR, , , 0, %AUDIOClassName% HKR, , EnumPropPages32,0, "MmSys.Cpl,MediaPropPageProvider" -HKR, , Icon, 0, "-51" -HKR, , Installer32, 0, "MmSys.Cpl,MediaClassInstaller" +HKR, , Icon, 0, "3004" +HKR, , Installer32, 0, "MmSys.Cpl,MediaClassInstaller" ;-------------------------------- Audio installation ----------------------------------------
8 years, 5 months
1
0
0
0
[apriyadarshi] 72005: Fixed write crashes, write support working. Tested on win2k3 sp2 vmware sata
by apriyadarshi@svn.reactos.org
Author: apriyadarshi Date: Tue Jul 26 15:38:14 2016 New Revision: 72005 URL:
http://svn.reactos.org/svn/reactos?rev=72005&view=rev
Log: Fixed write crashes, write support working. Tested on win2k3 sp2 vmware sata Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/AHCI/drivers/storage/…
============================================================================== --- branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] (original) +++ branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] Tue Jul 26 15:38:14 2016 @@ -1800,7 +1800,6 @@ { SrbExtension->Flags |= ATA_FLAGS_DATA_OUT; SrbExtension->CommandReg = IDE_COMMAND_WRITE_DMA; - //NT_ASSERT(FALSE); } SrbExtension->FeaturesLow = 0; @@ -1813,7 +1812,15 @@ if (PortExtension->DeviceParams.Lba48BitMode) { SrbExtension->Flags |= ATA_FLAGS_48BIT_COMMAND; - SrbExtension->CommandReg = IDE_COMMAND_READ_DMA_EXT; + + if (IsReading) + { + SrbExtension->CommandReg = IDE_COMMAND_READ_DMA_EXT; + } + else + { + SrbExtension->CommandReg = IDE_COMMAND_WRITE_DMA_EXT; + } SrbExtension->LBA3 = (StartOffset >> 24) & 0xFF; SrbExtension->LBA4 = (StartOffset >> 32) & 0xFF;
8 years, 5 months
1
0
0
0
[gadamopoulos] 72004: [BROWSEUI] - CExplorerBand: Implement showing the context menu on right click. - Part of the work submitted by Sylvain Deverre. CORE-10838
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Tue Jul 26 15:09:04 2016 New Revision: 72004 URL:
http://svn.reactos.org/svn/reactos?rev=72004&view=rev
Log: [BROWSEUI] - CExplorerBand: Implement showing the context menu on right click. - Part of the work submitted by Sylvain Deverre. CORE-10838 Modified: trunk/reactos/dll/win32/browseui/explorerband.cpp trunk/reactos/dll/win32/browseui/explorerband.h Modified: trunk/reactos/dll/win32/browseui/explorerband.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/explore…
============================================================================== --- trunk/reactos/dll/win32/browseui/explorerband.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/explorerband.cpp [iso-8859-1] Tue Jul 26 15:09:04 2016 @@ -142,6 +142,33 @@ return reinterpret_cast<NodeInfo*>(tvItem.lParam); } +HRESULT CExplorerBand::ExecuteCommand(CComPtr<IContextMenu>& menu, UINT nCmd) +{ + CComPtr<IOleWindow> pBrowserOleWnd; + CMINVOKECOMMANDINFO cmi; + HWND browserWnd; + HRESULT hr; + + hr = IUnknown_QueryService(pSite, SID_SShellBrowser, IID_PPV_ARG(IOleWindow, &pBrowserOleWnd)); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = pBrowserOleWnd->GetWindow(&browserWnd); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + ZeroMemory(&cmi, sizeof(cmi)); + cmi.cbSize = sizeof(cmi); + cmi.lpVerb = MAKEINTRESOURCEA(nCmd); + cmi.hwnd = browserWnd; + if (GetKeyState(VK_SHIFT) & 0x8000) + cmi.fMask |= CMIC_MASK_SHIFT_DOWN; + if (GetKeyState(VK_CONTROL) & 0x8000) + cmi.fMask |= CMIC_MASK_CONTROL_DOWN; + + return menu->InvokeCommand(&cmi); +} + HRESULT CExplorerBand::UpdateBrowser(LPITEMIDLIST pidlGoto) { CComPtr<IShellBrowser> pBrowserService; @@ -197,17 +224,111 @@ { NodeInfo* pNodeInfo = GetNodeInfo(pnmtv->itemNew.hItem); - UpdateBrowser(pNodeInfo->absolutePidl); - /* Prevents navigation if selection is initiated inside the band */ if (bNavigating) return; + UpdateBrowser(pNodeInfo->absolutePidl); + SetFocus(); // Expand the node //TreeView_Expand(m_hWnd, pnmtv->itemNew.hItem, TVE_EXPAND); } + +// *** ATL event handlers *** +LRESULT CExplorerBand::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + HTREEITEM item; + NodeInfo *info; + HMENU treeMenu; + WORD x; + WORD y; + CComPtr<IShellFolder> pFolder; + CComPtr<IContextMenu> contextMenu; + HRESULT hr; + UINT uCommand; + LPITEMIDLIST pidlChild; + + treeMenu = NULL; + item = TreeView_GetSelection(m_hWnd); + bHandled = TRUE; + if (!item) + { + goto Cleanup; + } + + x = LOWORD(lParam); + y = HIWORD(lParam); + if (x == -1 && y == -1) + { + // TODO: grab position of tree item and position it correctly + } + + info = GetNodeInfo(item); + if (!info) + { + ERR("No node data, something has gone wrong !\n"); + goto Cleanup; + } + hr = SHBindToParent(info->absolutePidl, IID_PPV_ARG(IShellFolder, &pFolder), + (LPCITEMIDLIST*)&pidlChild); + if (!SUCCEEDED(hr)) + { + ERR("Can't bind to folder!\n"); + goto Cleanup; + } + hr = pFolder->GetUIObjectOf(m_hWnd, 1, (LPCITEMIDLIST*)&pidlChild, IID_IContextMenu, + NULL, reinterpret_cast<void**>(&contextMenu)); + if (!SUCCEEDED(hr)) + { + ERR("Can't get IContextMenu interface\n"); + goto Cleanup; + } + treeMenu = CreatePopupMenu(); + hr = contextMenu->QueryContextMenu(treeMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, + CMF_EXPLORE); + if (!SUCCEEDED(hr)) + { + WARN("Can't get context menu for item\n"); + DestroyMenu(treeMenu); + goto Cleanup; + } + uCommand = TrackPopupMenu(treeMenu, TPM_LEFTALIGN | TPM_RETURNCMD | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, + x, y, 0, m_hWnd, NULL); + + ExecuteCommand(contextMenu, uCommand); +Cleanup: + if (treeMenu) + DestroyMenu(treeMenu); + bNavigating = TRUE; + TreeView_SelectItem(m_hWnd, oldSelected); + bNavigating = FALSE; + return TRUE; +} + +LRESULT CExplorerBand::ContextMenuHack(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) +{ + bHandled = FALSE; + if (uMsg == WM_RBUTTONDOWN) + { + TVHITTESTINFO info; + info.pt.x = LOWORD(lParam); + info.pt.y = HIWORD(lParam); + info.flags = TVHT_ONITEM; + info.hItem = NULL; + + // Save the current location + oldSelected = TreeView_GetSelection(m_hWnd); + + // Move to the item selected by the treeview (don't change right pane) + TreeView_HitTest(m_hWnd, &info); + bNavigating = TRUE; + TreeView_SelectItem(m_hWnd, info.hItem); + bNavigating = FALSE; + } + return FALSE; /* let the wndproc process the message */ +} // *** Helper functions *** HTREEITEM CExplorerBand::InsertItem(HTREEITEM hParent, IShellFolder *psfParent, LPITEMIDLIST pElt, LPITEMIDLIST pEltRelative, BOOL bSort) { @@ -723,6 +844,7 @@ // *** IWinEventHandler methods *** HRESULT STDMETHODCALLTYPE CExplorerBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) { + BOOL bHandled; if (uMsg == WM_NOTIFY) { NMHDR *pNotifyHeader = (NMHDR*)lParam; @@ -734,6 +856,74 @@ case TVN_SELCHANGED: OnSelectionChanged((LPNMTREEVIEW)lParam); break; + case NM_RCLICK: + OnContextMenu(WM_CONTEXTMENU, (WPARAM)m_hWnd, GetMessagePos(), bHandled); + *theResult = 1; + break; + case TVN_BEGINLABELEDITW: + { + // TODO: put this in a function ? (mostly copypasta from CDefView) + DWORD dwAttr = SFGAO_CANRENAME; + LPNMTVDISPINFO dispInfo = (LPNMTVDISPINFO)lParam; + CComPtr<IShellFolder> pParent; + LPCITEMIDLIST pChild; + HRESULT hr; + + *theResult = 1; + NodeInfo *info = GetNodeInfo(dispInfo->item.hItem); + if (!info) + return E_FAIL; + hr = SHBindToParent(info->absolutePidl, IID_PPV_ARG(IShellFolder, &pParent), &pChild); + if (!SUCCEEDED(hr) || !pParent.p) + return E_FAIL; + + hr = pParent->GetAttributesOf(1, &pChild, &dwAttr); + if (SUCCEEDED(hr) && (dwAttr & SFGAO_CANRENAME)) + *theResult = 0; + return S_OK; + } + case TVN_ENDLABELEDITW: + { + LPNMTVDISPINFO dispInfo = (LPNMTVDISPINFO)lParam; + NodeInfo *info = GetNodeInfo(dispInfo->item.hItem); + HRESULT hr; + + *theResult = 0; + if (dispInfo->item.pszText) + { + LPITEMIDLIST pidlNew; + CComPtr<IShellFolder> pParent; + LPCITEMIDLIST pidlChild; + + hr = SHBindToParent(info->absolutePidl, IID_PPV_ARG(IShellFolder, &pParent), &pidlChild); + if (!SUCCEEDED(hr) || !pParent.p) + return E_FAIL; + + hr = pParent->SetNameOf(0, pidlChild, dispInfo->item.pszText, SHGDN_INFOLDER, &pidlNew); + if(SUCCEEDED(hr) && pidlNew) + { + CComPtr<IPersistFolder2> pPersist; + LPITEMIDLIST pidlParent, pidlNewAbs; + + hr = pParent->QueryInterface(IID_PPV_ARG(IPersistFolder2, &pPersist)); + if(!SUCCEEDED(hr)) + return E_FAIL; + + hr = pPersist->GetCurFolder(&pidlParent); + if(!SUCCEEDED(hr)) + return E_FAIL; + pidlNewAbs = ILCombine(pidlParent, pidlNew); + + // Navigate to our new location + UpdateBrowser(pidlNewAbs); + + ILFree(pidlNewAbs); + ILFree(pidlNew); + *theResult = 1; + } + return S_OK; + } + } default: break; } Modified: trunk/reactos/dll/win32/browseui/explorerband.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/explore…
============================================================================== --- trunk/reactos/dll/win32/browseui/explorerband.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/explorerband.h [iso-8859-1] Tue Jul 26 15:09:04 2016 @@ -61,6 +61,7 @@ DWORD dwBandID; HIMAGELIST hImageList; HTREEITEM hRoot; + HTREEITEM oldSelected; // *** notification cookies *** DWORD adviseCookie; @@ -68,9 +69,14 @@ void InitializeExplorerBand(); void DestroyExplorerBand(); + HRESULT ExecuteCommand(CComPtr<IContextMenu>& menu, UINT nCmd); BOOL OnTreeItemExpanding(LPNMTREEVIEW pnmtv); void OnSelectionChanged(LPNMTREEVIEW pnmtv); + + // *** ATL event handlers *** + LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); + LRESULT ContextMenuHack(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); // *** Helper functions *** NodeInfo* GetNodeInfo(HTREEITEM hItem); @@ -141,7 +147,7 @@ virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); - + // *** IDropTarget methods *** virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pObj, DWORD glfKeyState, POINTL pt, DWORD *pdwEffect); virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD glfKeyState, POINTL pt, DWORD *pdwEffect); @@ -174,6 +180,8 @@ END_COM_MAP() BEGIN_MSG_MAP(CExplorerBand) + MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu) + MESSAGE_HANDLER(WM_RBUTTONDOWN, ContextMenuHack) END_MSG_MAP() };
8 years, 5 months
1
0
0
0
[gadamopoulos] 72003: [BROWSEUI] - CExplorerBand: Expand the tree view to the current folder when a new folder is browser (either with the addressbar or by double clicking a folder). - Part of the ...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Tue Jul 26 14:31:38 2016 New Revision: 72003 URL:
http://svn.reactos.org/svn/reactos?rev=72003&view=rev
Log: [BROWSEUI] - CExplorerBand: Expand the tree view to the current folder when a new folder is browser (either with the addressbar or by double clicking a folder). - Part of the work submitted by Sylvain Deverre. CORE-10838 Modified: trunk/reactos/dll/win32/browseui/explorerband.cpp trunk/reactos/dll/win32/browseui/explorerband.h Modified: trunk/reactos/dll/win32/browseui/explorerband.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/explore…
============================================================================== --- trunk/reactos/dll/win32/browseui/explorerband.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/explorerband.cpp [iso-8859-1] Tue Jul 26 14:31:38 2016 @@ -35,7 +35,7 @@ } CExplorerBand::CExplorerBand() : - pSite(NULL), fVisible(FALSE), dwBandID(0) + pSite(NULL), fVisible(FALSE), bNavigating(FALSE), dwBandID(0) { } @@ -67,21 +67,21 @@ TreeView_SetImageList(m_hWnd, (HIMAGELIST)piml, TVSIL_NORMAL); // Insert the root node - HTREEITEM hItem = InsertItem(0, pDesktop, pidl, pidl, FALSE); - if (!hItem) + hRoot = InsertItem(0, pDesktop, pidl, pidl, FALSE); + if (!hRoot) { ERR("Failed to create root item\n"); return; } - NodeInfo* pNodeInfo = GetNodeInfo(hItem); + NodeInfo* pNodeInfo = GetNodeInfo(hRoot); // Insert child nodes - InsertSubitems(hItem, pNodeInfo); - TreeView_Expand(m_hWnd, hItem, TVE_EXPAND); + InsertSubitems(hRoot, pNodeInfo); + TreeView_Expand(m_hWnd, hRoot, TVE_EXPAND); // Navigate to current folder position - //NavigateToCurrentFolder(); + NavigateToCurrentFolder(); // Register shell notification shcne.pidl = pidl; @@ -198,6 +198,11 @@ NodeInfo* pNodeInfo = GetNodeInfo(pnmtv->itemNew.hItem); UpdateBrowser(pNodeInfo->absolutePidl); + + /* Prevents navigation if selection is initiated inside the band */ + if (bNavigating) + return; + SetFocus(); // Expand the node //TreeView_Expand(m_hWnd, pnmtv->itemNew.hItem, TVE_EXPAND); @@ -260,6 +265,17 @@ return htiCreated; } +/* This is the slow version of the above method */ +HTREEITEM CExplorerBand::InsertItem(HTREEITEM hParent, LPITEMIDLIST pElt, LPITEMIDLIST pEltRelative, BOOL bSort) +{ + CComPtr<IShellFolder> psfFolder; + HRESULT hr = SHBindToParent(pElt, IID_PPV_ARG(IShellFolder, &psfFolder), NULL); + if (FAILED_UNEXPECTEDLY(hr)) + return NULL; + + return InsertItem(hParent, psfFolder, pElt, pEltRelative, bSort); +} + BOOL CExplorerBand::InsertSubitems(HTREEITEM hItem, NodeInfo *pNodeInfo) { CComPtr<IEnumIDList> pEnumIDList; @@ -332,6 +348,137 @@ SendMessage(WM_SETREDRAW, TRUE, 0); return (uItemCount > 0) ? TRUE : FALSE; +} + +/** + * Navigate to a given PIDL in the treeview, and return matching tree item handle + * - dest: The absolute PIDL we should navigate in the treeview + * - item: Handle of the tree item matching the PIDL + * - bExpand: expand collapsed nodes in order to find the right element + * - bInsert: insert the element at the right place if we don't find it + * - bSelect: select the item after we found it + */ +BOOL CExplorerBand::NavigateToPIDL(LPITEMIDLIST dest, HTREEITEM *item, BOOL bExpand, BOOL bInsert, + BOOL bSelect) +{ + HTREEITEM current; + HTREEITEM tmp; + HTREEITEM parent; + BOOL found; + NodeInfo *nodeData; + LPITEMIDLIST relativeChild; + TVITEM tvItem; + + if (!item) + return FALSE; + + found = FALSE; + current = hRoot; + parent = NULL; + while(!found) + { + nodeData = GetNodeInfo(current); + if (!nodeData) + { + ERR("Something has gone wrong, no data associated to node !\n"); + *item = NULL; + return FALSE; + } + // If we found our node, give it back + if (!pDesktop->CompareIDs(0, nodeData->absolutePidl, dest)) + { + if (bSelect) + TreeView_SelectItem(m_hWnd, current); + *item = current; + return TRUE; + } + + // Check if we are a parent of the requested item + relativeChild = ILFindChild(nodeData->absolutePidl, dest); + if (relativeChild != 0) + { + // Notify treeview we have children + tvItem.mask = TVIF_CHILDREN; + tvItem.hItem = current; + tvItem.cChildren = 1; + TreeView_SetItem(m_hWnd, &tvItem); + + // If we can expand and the node isn't expanded yet, do it + if (bExpand) + { + if (!nodeData->expanded) + InsertSubitems(current, nodeData); + TreeView_Expand(m_hWnd, current, TVE_EXPAND); + } + + // Try to get a child + tmp = TreeView_GetChild(m_hWnd, current); + if (tmp) + { + // We have a child, let's continue with it + parent = current; + current = tmp; + continue; + } + + if (bInsert && nodeData->expanded) + { + // Happens when we have to create a subchild inside a child + current = InsertItem(current, dest, relativeChild, TRUE); + } + // We end up here, without any children, so we found nothing + // Tell the parent node it has children + ZeroMemory(&tvItem, sizeof(tvItem)); + *item = NULL; + return FALSE; + } + + // Find sibling + tmp = TreeView_GetNextSibling(m_hWnd, current); + if (tmp) + { + current = tmp; + continue; + } + if (bInsert) + { + current = InsertItem(parent, dest, ILFindLastID(dest), TRUE); + *item = current; + return TRUE; + } + *item = NULL; + return FALSE; + } + return FALSE; +} + +BOOL CExplorerBand::NavigateToCurrentFolder() +{ + LPITEMIDLIST explorerPidl; + CComPtr<IBrowserService> pBrowserService; + HRESULT hr; + HTREEITEM dummy; + BOOL result; + explorerPidl = NULL; + + hr = IUnknown_QueryService(pSite, SID_STopLevelBrowser, IID_PPV_ARG(IBrowserService, &pBrowserService)); + if (!SUCCEEDED(hr)) + { + ERR("Can't get IBrowserService !\n"); + return FALSE; + } + + hr = pBrowserService->GetPidl(&explorerPidl); + if (!SUCCEEDED(hr) || !explorerPidl) + { + ERR("Unable to get browser PIDL !\n"); + return FALSE; + } + bNavigating = TRUE; + /* find PIDL into our explorer */ + result = NavigateToPIDL(explorerPidl, &dummy, TRUE, FALSE, TRUE); + bNavigating = FALSE; + return result; } // *** IOleWindow methods *** @@ -658,8 +805,16 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { - UNIMPLEMENTED; - return E_NOTIMPL; + switch (dispIdMember) + { + case DISPID_DOWNLOADCOMPLETE: + case DISPID_NAVIGATECOMPLETE2: + TRACE("DISPID_NAVIGATECOMPLETE2 received\n"); + NavigateToCurrentFolder(); + return S_OK; + } + TRACE("Unknown dispid requested: %08x\n", dispIdMember); + return E_INVALIDARG; } // *** IDropTarget methods *** Modified: trunk/reactos/dll/win32/browseui/explorerband.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/explore…
============================================================================== --- trunk/reactos/dll/win32/browseui/explorerband.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/explorerband.h [iso-8859-1] Tue Jul 26 14:31:38 2016 @@ -56,6 +56,7 @@ // *** tree explorer band stuff *** BOOL fVisible; + BOOL bNavigating; BOOL bFocused; DWORD dwBandID; HIMAGELIST hImageList; @@ -75,7 +76,10 @@ NodeInfo* GetNodeInfo(HTREEITEM hItem); HRESULT UpdateBrowser(LPITEMIDLIST pidlGoto); HTREEITEM InsertItem(HTREEITEM hParent, IShellFolder *psfParent, LPITEMIDLIST pElt, LPITEMIDLIST pEltRelative, BOOL bSort); + HTREEITEM InsertItem(HTREEITEM hParent, LPITEMIDLIST pElt, LPITEMIDLIST pEltRelative, BOOL bSort); BOOL InsertSubitems(HTREEITEM hItem, NodeInfo *pNodeInfo); + BOOL NavigateToPIDL(LPITEMIDLIST dest, HTREEITEM *item, BOOL bExpand, BOOL bInsert, BOOL bSelect); + BOOL NavigateToCurrentFolder(); public: CExplorerBand();
8 years, 5 months
1
0
0
0
[apriyadarshi] 72002: Added write support, next operation code 53 27.
by apriyadarshi@svn.reactos.org
Author: apriyadarshi Date: Tue Jul 26 14:15:15 2016 New Revision: 72002 URL:
http://svn.reactos.org/svn/reactos?rev=72002&view=rev
Log: Added write support, next operation code 53 27. Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/AHCI/drivers/storage/…
============================================================================== --- branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] (original) +++ branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] Tue Jul 26 14:15:15 2016 @@ -849,7 +849,7 @@ Srb->SrbStatus = DeviceRequestSense(AdapterExtension, Srb, cdb); break; case SCSIOP_READ: - //case SCSIOP_WRITE: + case SCSIOP_WRITE: Srb->SrbStatus = DeviceRequestReadWrite(AdapterExtension, Srb, cdb); break; default: @@ -1726,7 +1726,7 @@ ModeHeader->ModeDataLength = sizeof(MODE_PARAMETER_HEADER); ModeHeader->MediumType = 0; - ModeHeader->DeviceSpecificParameter = MODE_DSP_WRITE_PROTECT; + ModeHeader->DeviceSpecificParameter = 0; ModeHeader->BlockDescriptorLength = 0; if (Cdb->MODE_SENSE.PageCode == MODE_SENSE_CURRENT_VALUES) @@ -1776,9 +1776,12 @@ NT_ASSERT(BytesPerSector > 0); - ROUND_UP(DataTransferLength, BytesPerSector); + //ROUND_UP(DataTransferLength, BytesPerSector); SectorCount = DataTransferLength / BytesPerSector; + + Srb->DataTransferLength = SectorCount * BytesPerSector; + StartOffset = AhciGetLba(Cdb, Srb->CdbLength); IsReading = (Cdb->CDB10.OperationCode == SCSIOP_READ); @@ -1796,7 +1799,8 @@ else { SrbExtension->Flags |= ATA_FLAGS_DATA_OUT; - NT_ASSERT(FALSE); + SrbExtension->CommandReg = IDE_COMMAND_WRITE_DMA; + //NT_ASSERT(FALSE); } SrbExtension->FeaturesLow = 0;
8 years, 5 months
1
0
0
0
[pschweitzer] 72001: [NTOSKRNL_VISTA] Implement KeQueryActiveProcessorCount(). CORE-11674
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Jul 25 20:45:48 2016 New Revision: 72001 URL:
http://svn.reactos.org/svn/reactos?rev=72001&view=rev
Log: [NTOSKRNL_VISTA] Implement KeQueryActiveProcessorCount(). CORE-11674 Added: trunk/reactos/sdk/lib/drivers/ntoskrnl_vista/ke.c (with props) Modified: trunk/reactos/sdk/lib/drivers/ntoskrnl_vista/CMakeLists.txt Modified: trunk/reactos/sdk/lib/drivers/ntoskrnl_vista/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/ntoskrnl_v…
============================================================================== --- trunk/reactos/sdk/lib/drivers/ntoskrnl_vista/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/ntoskrnl_vista/CMakeLists.txt [iso-8859-1] Mon Jul 25 20:45:48 2016 @@ -5,6 +5,7 @@ list(APPEND SOURCE fsrtl.c + ke.c rtl.c) add_library(ntoskrnl_vista ${SOURCE}) Added: trunk/reactos/sdk/lib/drivers/ntoskrnl_vista/ke.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/ntoskrnl_v…
============================================================================== --- trunk/reactos/sdk/lib/drivers/ntoskrnl_vista/ke.c (added) +++ trunk/reactos/sdk/lib/drivers/ntoskrnl_vista/ke.c [iso-8859-1] Mon Jul 25 20:45:48 2016 @@ -0,0 +1,27 @@ +/* + * PROJECT: ReactOS Kernel - Vista+ APIs + * LICENSE: GPL v2 - See COPYING in the top level directory + * FILE: lib/drivers/ntoskrnl_vista/ke.c + * PURPOSE: Ke functions of Vista+ + * PROGRAMMERS: Pierre Schweitzer <pierre(a)reactos.org> + */ + +#include <ntdef.h> +#include <ntifs.h> + +NTKERNELAPI +ULONG +NTAPI +KeQueryActiveProcessorCount(OUT PKAFFINITY ActiveProcessors OPTIONAL) +{ + RTL_BITMAP Bitmap; + KAFFINITY ActiveMap = KeQueryActiveProcessors(); + + if (ActiveProcessors != NULL) + { + *ActiveProcessors = ActiveMap; + } + + RtlInitializeBitMap(&Bitmap, &ActiveMap, sizeof(ActiveMap) * 8); + return RtlNumberOfSetBits(&Bitmap); +} Propchange: trunk/reactos/sdk/lib/drivers/ntoskrnl_vista/ke.c ------------------------------------------------------------------------------ svn:eol-style = native
8 years, 5 months
1
0
0
0
[hbelusca] 72000: [MMSYS]: Improve AddSoundProfile, by Victor Martinez Calvo (with 1 minor modification by myself): ◾ Don't return TRUE when CB_SETITEMDATA fails. ◾ Avoid pScheme NULL dereference i...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Jul 25 20:24:30 2016 New Revision: 72000 URL:
http://svn.reactos.org/svn/reactos?rev=72000&view=rev
Log: [MMSYS]: Improve AddSoundProfile, by Victor Martinez Calvo (with 1 minor modification by myself): ◾ Don't return TRUE when CB_SETITEMDATA fails. ◾ Avoid pScheme NULL dereference if allocation fails. CID 1223154 ◾ Avoid overflowing the destiny buffer by using StringCchCopy() CID 510953 and: 1) Make it more readable by returning as soon as possible when an error happens. 2) Make it more readable by reducing the nested ifs-checks. 3) Remove the added string in the combobox if the sound scheme buffer mem allocation fails (pt.3 modified). CORE-11603 #resolve #comment Thanks! Modified: trunk/reactos/dll/cpl/mmsys/sounds.c Modified: trunk/reactos/dll/cpl/mmsys/sounds.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/mmsys/sounds.c?rev…
============================================================================== --- trunk/reactos/dll/cpl/mmsys/sounds.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/mmsys/sounds.c [iso-8859-1] Mon Jul 25 20:24:30 2016 @@ -5,11 +5,14 @@ * PROGRAMMER: Thomas Weidenmueller <w3seek(a)reactos.com> * Johannes Anderwald <janderwald(a)reactos.com> * Dmitry Chapyshev <dmitry(a)reactos.org> + * Victor Martinez Calvo <victor.martinez(a)reactos.org> */ #include "mmsys.h" #include <commdlg.h> +#include <strsafe.h> + #include <debug.h> struct __APP_MAP__; @@ -291,6 +294,8 @@ HKEY hSubKey; TCHAR szValue[MAX_PATH]; DWORD dwValue, dwResult; + LRESULT lResult; + PSOUND_SCHEME_CONTEXT pScheme; if (RegOpenKeyEx(hKey, szSubKey, @@ -309,27 +314,35 @@ (LPBYTE)szValue, &dwValue); RegCloseKey(hSubKey); - if (dwResult == ERROR_SUCCESS) - { - LRESULT lResult = SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_ADDSTRING, (WPARAM)0, (LPARAM)szValue); - if (lResult != CB_ERR) - { - PSOUND_SCHEME_CONTEXT pScheme = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SOUND_SCHEME_CONTEXT)); - if (pScheme != NULL) - { - _tcscpy(pScheme->szDesc, szValue); - _tcscpy(pScheme->szName, szSubKey); - } - - SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)pScheme); - if (SetDefault) - { - SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_SETCURSEL, (WPARAM)lResult, (LPARAM)0); - } - } - return TRUE; - } - return FALSE; + + if (dwResult != ERROR_SUCCESS) + return FALSE; + + /* Try to add the new profile */ + lResult = SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_ADDSTRING, (WPARAM)0, (LPARAM)szValue); + if (lResult == CB_ERR) + return FALSE; + + /* Allocate the profile scheme buffer */ + pScheme = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SOUND_SCHEME_CONTEXT)); + if (pScheme == NULL) + { + /* We failed to allocate the buffer, no need to keep a dangling string in the combobox */ + SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_DELETESTRING, (WPARAM)lResult, (LPARAM)0); + return FALSE; + } + + StringCchCopy(pScheme->szDesc, MAX_PATH, szValue); + StringCchCopy(pScheme->szName, MAX_PATH, szSubKey); + + /* Associate the value with the item in the combobox */ + SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)pScheme); + + /* Optionally, select the profile */ + if (SetDefault) + SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_SETCURSEL, (WPARAM)lResult, (LPARAM)0); + + return TRUE; }
8 years, 5 months
1
0
0
0
[apriyadarshi] 71999: Handled SCSIOP_MODE_SENSE, Fixes made to maxLba count. FileSystem detection is still not working :/
by apriyadarshi@svn.reactos.org
Author: apriyadarshi Date: Mon Jul 25 19:50:09 2016 New Revision: 71999 URL:
http://svn.reactos.org/svn/reactos?rev=71999&view=rev
Log: Handled SCSIOP_MODE_SENSE, Fixes made to maxLba count. FileSystem detection is still not working :/ Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.h Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/AHCI/drivers/storage/…
============================================================================== --- branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] (original) +++ branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] Mon Jul 25 19:50:09 2016 @@ -845,6 +845,9 @@ case SCSIOP_TEST_UNIT_READY: Srb->SrbStatus = DeviceRequestComplete(AdapterExtension, Srb, cdb); break; + case SCSIOP_MODE_SENSE: + Srb->SrbStatus = DeviceRequestSense(AdapterExtension, Srb, cdb); + break; case SCSIOP_READ: //case SCSIOP_WRITE: Srb->SrbStatus = DeviceRequestReadWrite(AdapterExtension, Srb, cdb); @@ -1688,6 +1691,54 @@ }// -- InquiryCompletion(); /** + * @name DeviceRequestSense + * @implemented + * + * Handle SCSIOP_MODE_SENSE OperationCode + * + * @param AdapterExtension + * @param Srb + * @param Cdb + * + * @return + * return STOR status for DeviceRequestSense + */ +UCHAR DeviceRequestSense ( + __in PAHCI_ADAPTER_EXTENSION AdapterExtension, + __in PSCSI_REQUEST_BLOCK Srb, + __in PCDB Cdb + ) +{ + PMODE_PARAMETER_HEADER ModeHeader; + + AhciDebugPrint("DeviceRequestSense()\n"); + + UNREFERENCED_PARAMETER(AdapterExtension); + + NT_ASSERT(IsPortValid(AdapterExtension, Srb->PathId)); + NT_ASSERT(Cdb->CDB10.OperationCode == SCSIOP_MODE_SENSE); + + ModeHeader = (PMODE_PARAMETER_HEADER)Srb->DataBuffer; + + NT_ASSERT(ModeHeader != NULL); + + AhciZeroMemory((PCHAR)ModeHeader, Srb->DataTransferLength); + + ModeHeader->ModeDataLength = sizeof(MODE_PARAMETER_HEADER); + ModeHeader->MediumType = 0; + ModeHeader->DeviceSpecificParameter = MODE_DSP_WRITE_PROTECT; + ModeHeader->BlockDescriptorLength = 0; + + if (Cdb->MODE_SENSE.PageCode == MODE_SENSE_CURRENT_VALUES) + { + ModeHeader->ModeDataLength = sizeof(MODE_PARAMETER_HEADER) + sizeof(MODE_PARAMETER_BLOCK); + ModeHeader->BlockDescriptorLength = sizeof(MODE_PARAMETER_BLOCK); + } + + return SRB_STATUS_SUCCESS; +}// -- DeviceRequestSense(); + +/** * @name DeviceRequestReadWrite * @implemented * @@ -1817,9 +1868,8 @@ { ReadCapacity = (PREAD_CAPACITY_DATA)Srb->DataBuffer; - BytesPerLogicalSector = PortExtension->DeviceParams.BytesPerLogicalSector; - MaxLba = (ULONG)PortExtension->DeviceParams.MaxLba.QuadPart; + MaxLba = (ULONG)PortExtension->DeviceParams.MaxLba.QuadPart - 1; // I trust you windows :D NT_ASSERT(Srb->DataTransferLength >= sizeof(READ_CAPACITY_DATA)); Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/AHCI/drivers/storage/…
============================================================================== --- branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.h [iso-8859-1] (original) +++ branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.h [iso-8859-1] Mon Jul 25 19:50:09 2016 @@ -591,6 +591,12 @@ __in ULONG pathId ); +UCHAR DeviceRequestSense ( + __in PAHCI_ADAPTER_EXTENSION AdapterExtension, + __in PSCSI_REQUEST_BLOCK Srb, + __in PCDB Cdb + ); + UCHAR DeviceRequestReadWrite ( __in PAHCI_ADAPTER_EXTENSION AdapterExtension, __in PSCSI_REQUEST_BLOCK Srb,
8 years, 5 months
1
0
0
0
[tfaber] 71998: [TOOLS] - Fix MSVC 2013+ build. Patch by Victor Matovykh. CORE-11575 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Mon Jul 25 19:28:40 2016 New Revision: 71998 URL:
http://svn.reactos.org/svn/reactos?rev=71998&view=rev
Log: [TOOLS] - Fix MSVC 2013+ build. Patch by Victor Matovykh. CORE-11575 #resolve Modified: trunk/reactos/sdk/include/host/typedefs.h Modified: trunk/reactos/sdk/include/host/typedefs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/host/typedefs.…
============================================================================== --- trunk/reactos/sdk/include/host/typedefs.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/host/typedefs.h [iso-8859-1] Mon Jul 25 19:28:40 2016 @@ -13,20 +13,7 @@ #include <assert.h> #include <stdlib.h> #include <limits.h> - -#ifndef _MSC_VER #include <stdint.h> -#else -typedef __int8 int8_t; -typedef __int16 int16_t; -typedef __int32 int32_t; -typedef __int64 int64_t; - -typedef unsigned __int8 uint8_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int32 uint32_t; -typedef unsigned __int64 uint64_t; -#endif /* Function attributes for GCC */ #if !defined(_MSC_VER) && !defined(__fastcall)
8 years, 5 months
1
0
0
0
[tfaber] 71997: [SHELL32] - Add missing dependency
by tfaber@svn.reactos.org
Author: tfaber Date: Mon Jul 25 19:25:46 2016 New Revision: 71997 URL:
http://svn.reactos.org/svn/reactos?rev=71997&view=rev
Log: [SHELL32] - Add missing dependency Modified: trunk/reactos/dll/win32/shell32/CMakeLists.txt Modified: trunk/reactos/dll/win32/shell32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/shell32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CMakeLists.txt [iso-8859-1] Mon Jul 25 19:25:46 2016 @@ -104,5 +104,6 @@ target_link_libraries(shell32 shellmenu shelldesktop atlnew wine uuid recyclebin) add_delay_importlibs(shell32 uxtheme ole32 oleaut32 userenv version fmifs) add_importlibs(shell32 advapi32 browseui gdi32 user32 powrprof comctl32 comdlg32 shdocvw shlwapi devmgr winspool winmm mpr msvcrt kernel32 ntdll) +add_dependencies(shell32 stdole2) # shell32_shldisp.tlb needs stdole2.tlb add_pch(shell32 precomp.h SOURCE) add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all)
8 years, 5 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