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
November 2014
----- 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
373 discussions
Start a n
N
ew thread
[gadamopoulos] 65185: [SHELL32] - Remove lots of typecasts in CDefView - Use strict typed itemids
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sun Nov 2 17:49:28 2014 New Revision: 65185 URL:
http://svn.reactos.org/svn/reactos?rev=65185&view=rev
Log: [SHELL32] - Remove lots of typecasts in CDefView - Use strict typed itemids Modified: branches/shell-experiments/dll/win32/shell32/shlview.cpp Modified: branches/shell-experiments/dll/win32/shell32/shlview.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
============================================================================== --- branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] Sun Nov 2 17:49:28 2014 @@ -92,7 +92,7 @@ BOOL m_menusLoaded; UINT m_uState; UINT m_cidl; - LPITEMIDLIST *m_apidl; + PCUITEMID_CHILD_ARRAY m_apidl; LISTVIEW_SORT_INFO m_sortInfo; ULONG m_hNotify; /* change notification handle */ HACCEL m_hAccel; @@ -120,7 +120,7 @@ CDefView(); ~CDefView(); HRESULT WINAPI Initialize(IShellFolder *shellFolder); - HRESULT IncludeObject(LPCITEMIDLIST pidl); + HRESULT IncludeObject(PCUITEMID_CHILD pidl); HRESULT OnDefaultCommand(); HRESULT OnStateChange(UINT uFlags); void CheckToolbar(); @@ -130,10 +130,13 @@ BOOL InitList(); static INT CALLBACK CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData); static INT CALLBACK ListViewCompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData); - int LV_FindItemByPidl(LPCITEMIDLIST pidl); - BOOLEAN LV_AddItem(LPCITEMIDLIST pidl); - BOOLEAN LV_DeleteItem(LPCITEMIDLIST pidl); - BOOLEAN LV_RenameItem(LPCITEMIDLIST pidlOld, LPCITEMIDLIST pidlNew); + + PCUITEMID_CHILD _PidlByItem(int i); + PCUITEMID_CHILD _PidlByItem(LVITEM& lvItem); + int LV_FindItemByPidl(PCUITEMID_CHILD pidl); + BOOLEAN LV_AddItem(PCUITEMID_CHILD pidl); + BOOLEAN LV_DeleteItem(PCUITEMID_CHILD pidl); + BOOLEAN LV_RenameItem(PCUITEMID_CHILD pidlOld, PCUITEMID_CHILD pidlNew); static INT CALLBACK fill_list(LPVOID ptr, LPVOID arg); HRESULT FillList(); HMENU BuildFileMenu(); @@ -160,19 +163,19 @@ virtual HRESULT STDMETHODCALLTYPE GetCurrentInfo(LPFOLDERSETTINGS pfs); virtual HRESULT STDMETHODCALLTYPE AddPropertySheetPages(DWORD dwReserved, LPFNSVADDPROPSHEETPAGE pfn, LPARAM lparam); virtual HRESULT STDMETHODCALLTYPE SaveViewState(); - virtual HRESULT STDMETHODCALLTYPE SelectItem(LPCITEMIDLIST pidlItem, SVSIF uFlags); + virtual HRESULT STDMETHODCALLTYPE SelectItem(PCUITEMID_CHILD pidlItem, SVSIF uFlags); virtual HRESULT STDMETHODCALLTYPE GetItemObject(UINT uItem, REFIID riid, void **ppv); // *** IFolderView methods *** virtual HRESULT STDMETHODCALLTYPE GetCurrentViewMode(UINT *pViewMode); virtual HRESULT STDMETHODCALLTYPE SetCurrentViewMode(UINT ViewMode); virtual HRESULT STDMETHODCALLTYPE GetFolder(REFIID riid, void **ppv); - virtual HRESULT STDMETHODCALLTYPE Item(int iItemIndex, LPITEMIDLIST *ppidl); + virtual HRESULT STDMETHODCALLTYPE Item(int iItemIndex, PITEMID_CHILD *ppidl); virtual HRESULT STDMETHODCALLTYPE ItemCount(UINT uFlags, int *pcItems); virtual HRESULT STDMETHODCALLTYPE Items(UINT uFlags, REFIID riid, void **ppv); virtual HRESULT STDMETHODCALLTYPE GetSelectionMarkedItem(int *piItem); virtual HRESULT STDMETHODCALLTYPE GetFocusedItem(int *piItem); - virtual HRESULT STDMETHODCALLTYPE GetItemPosition(LPCITEMIDLIST pidl, POINT *ppt); + virtual HRESULT STDMETHODCALLTYPE GetItemPosition(PCUITEMID_CHILD pidl, POINT *ppt); virtual HRESULT STDMETHODCALLTYPE GetSpacing(POINT *ppt); virtual HRESULT STDMETHODCALLTYPE GetDefaultSpacing(POINT *ppt); virtual HRESULT STDMETHODCALLTYPE GetAutoArrange(); @@ -390,14 +393,14 @@ * * ##### helperfunctions for communication with ICommDlgBrowser ##### */ -HRESULT CDefView::IncludeObject(LPCITEMIDLIST pidl) +HRESULT CDefView::IncludeObject(PCUITEMID_CHILD pidl) { HRESULT ret = S_OK; if (m_pCommDlgBrowser.p != NULL) { TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl); - ret = m_pCommDlgBrowser->IncludeObject((IShellView *)this, pidl); + ret = m_pCommDlgBrowser->IncludeObject(this, pidl); TRACE("--0x%08x\n", ret); } @@ -411,7 +414,7 @@ if (m_pCommDlgBrowser.p != NULL) { TRACE("ICommDlgBrowser::OnDefaultCommand\n"); - ret = m_pCommDlgBrowser->OnDefaultCommand((IShellView *)this); + ret = m_pCommDlgBrowser->OnDefaultCommand(this); TRACE("-- returns %08x\n", ret); } @@ -425,7 +428,7 @@ if (m_pCommDlgBrowser.p != NULL) { TRACE("ICommDlgBrowser::OnStateChange flags=%x\n", uFlags); - ret = m_pCommDlgBrowser->OnStateChange((IShellView *)this, uFlags); + ret = m_pCommDlgBrowser->OnStateChange(this, uFlags); TRACE("--\n"); } @@ -625,7 +628,11 @@ if (!lpData) return 0; - ret = (SHORT)SCODE_CODE(((IShellFolder *)lpData)->CompareIDs(0, (LPITEMIDLIST)lParam1, (LPITEMIDLIST)lParam2)); + IShellFolder* psf = reinterpret_cast<IShellFolder*>(lpData); + PCUIDLIST_RELATIVE pidl1 = reinterpret_cast<PCUIDLIST_RELATIVE>(lParam1); + PCUIDLIST_RELATIVE pidl2 = reinterpret_cast<PCUIDLIST_RELATIVE>(lParam2); + + ret = (SHORT)SCODE_CODE(psf->CompareIDs(0, pidl1, pidl2)); TRACE("ret=%i\n", ret); return ret; @@ -661,13 +668,13 @@ FILETIME fd1, fd2; char strName1[MAX_PATH], strName2[MAX_PATH]; BOOL bIsFolder1, bIsFolder2, bIsBothFolder; - LPITEMIDLIST pItemIdList1 = (LPITEMIDLIST) lParam1; - LPITEMIDLIST pItemIdList2 = (LPITEMIDLIST) lParam2; - LISTVIEW_SORT_INFO *pSortInfo = (LPLISTVIEW_SORT_INFO) lpData; - - - bIsFolder1 = _ILIsFolder(pItemIdList1); - bIsFolder2 = _ILIsFolder(pItemIdList2); + PCUIDLIST_RELATIVE pidl1 = reinterpret_cast<PCUIDLIST_RELATIVE>(lParam1); + PCUIDLIST_RELATIVE pidl2 = reinterpret_cast<PCUIDLIST_RELATIVE>(lParam2); + LISTVIEW_SORT_INFO *pSortInfo = reinterpret_cast<LPLISTVIEW_SORT_INFO>(lpData); + + + bIsFolder1 = _ILIsFolder(pidl1); + bIsFolder2 = _ILIsFolder(pidl2); bIsBothFolder = bIsFolder1 && bIsFolder2; /* When sorting between a File and a Folder, the Folder gets sorted first */ @@ -681,36 +688,36 @@ if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_TIME) { - _ILGetFileDateTime(pItemIdList1, &fd1); - _ILGetFileDateTime(pItemIdList2, &fd2); + _ILGetFileDateTime(pidl1, &fd1); + _ILGetFileDateTime(pidl2, &fd2); nDiff = CompareFileTime(&fd2, &fd1); } /* Sort by Attribute: Folder or Files can be sorted */ else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_ATTRIB) { - _ILGetFileAttributes(pItemIdList1, strName1, MAX_PATH); - _ILGetFileAttributes(pItemIdList2, strName2, MAX_PATH); + _ILGetFileAttributes(pidl1, strName1, MAX_PATH); + _ILGetFileAttributes(pidl2, strName2, MAX_PATH); nDiff = lstrcmpiA(strName1, strName2); } /* Sort by FileName: Folder or Files can be sorted */ else if (pSortInfo->nHeaderID == LISTVIEW_COLUMN_NAME || bIsBothFolder) { /* Sort by Text */ - _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH); - _ILSimpleGetText(pItemIdList2, strName2, MAX_PATH); + _ILSimpleGetText(pidl1, strName1, MAX_PATH); + _ILSimpleGetText(pidl2, strName2, MAX_PATH); nDiff = lstrcmpiA(strName1, strName2); } /* Sort by File Size, Only valid for Files */ else if (pSortInfo->nHeaderID == LISTVIEW_COLUMN_SIZE) { - nDiff = (INT)(_ILGetFileSize(pItemIdList1, NULL, 0) - _ILGetFileSize(pItemIdList2, NULL, 0)); + nDiff = (INT)(_ILGetFileSize(pidl1, NULL, 0) - _ILGetFileSize(pidl2, NULL, 0)); } /* Sort by File Type, Only valid for Files */ else if (pSortInfo->nHeaderID == LISTVIEW_COLUMN_TYPE) { /* Sort by Type */ - _ILGetFileType(pItemIdList1, strName1, MAX_PATH); - _ILGetFileType(pItemIdList2, strName2, MAX_PATH); + _ILGetFileType(pidl1, strName1, MAX_PATH); + _ILGetFileType(pidl2, strName2, MAX_PATH); nDiff = lstrcmpiA(strName1, strName2); } } @@ -718,8 +725,8 @@ if (nDiff == 0) { - _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH); - _ILSimpleGetText(pItemIdList2, strName2, MAX_PATH); + _ILSimpleGetText(pidl1, strName1, MAX_PATH); + _ILSimpleGetText(pidl2, strName2, MAX_PATH); nDiff = lstrcmpiA(strName1, strName2); } @@ -729,18 +736,28 @@ } return nDiff; +} + +PCUITEMID_CHILD CDefView::_PidlByItem(int i) +{ + return reinterpret_cast<PCUITEMID_CHILD>(m_ListView.GetItemData(i)); +} + +PCUITEMID_CHILD CDefView::_PidlByItem(LVITEM& lvItem) +{ + return reinterpret_cast<PCUITEMID_CHILD>(lvItem.lParam); } /********************************************************** * LV_FindItemByPidl() */ -int CDefView::LV_FindItemByPidl(LPCITEMIDLIST pidl) +int CDefView::LV_FindItemByPidl(PCUITEMID_CHILD pidl) { int cItems = m_ListView.GetItemCount(); for (int i = 0; i<cItems; i++) { - LPITEMIDLIST currentpidl = reinterpret_cast<LPITEMIDLIST>(m_ListView.GetItemData(i)); + PCUITEMID_CHILD currentpidl = _PidlByItem(i); HRESULT hr = m_pSFParent->CompareIDs(0, pidl, currentpidl); if (SUCCEEDED(hr) && !HRESULT_CODE(hr)) @@ -754,7 +771,7 @@ /********************************************************** * LV_AddItem() */ -BOOLEAN CDefView::LV_AddItem(LPCITEMIDLIST pidl) +BOOLEAN CDefView::LV_AddItem(PCUITEMID_CHILD pidl) { LVITEMW lvItem; @@ -763,7 +780,7 @@ lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/ lvItem.iItem = m_ListView.GetItemCount(); /*add the item to the end of the list*/ lvItem.iSubItem = 0; - lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/ + lvItem.lParam = reinterpret_cast<LPARAM>(ILClone(pidl)); /*set the item's data*/ lvItem.pszText = LPSTR_TEXTCALLBACKW; /*get text on a callback basis*/ lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ @@ -776,13 +793,13 @@ /********************************************************** * LV_DeleteItem() */ -BOOLEAN CDefView::LV_DeleteItem(LPCITEMIDLIST pidl) +BOOLEAN CDefView::LV_DeleteItem(PCUITEMID_CHILD pidl) { int nIndex; TRACE("(%p)(pidl=%p)\n", this, pidl); - nIndex = LV_FindItemByPidl(ILFindLastID(pidl)); + nIndex = LV_FindItemByPidl(pidl); return (-1 == m_ListView.DeleteItem(nIndex)) ? FALSE : TRUE; } @@ -790,14 +807,14 @@ /********************************************************** * LV_RenameItem() */ -BOOLEAN CDefView::LV_RenameItem(LPCITEMIDLIST pidlOld, LPCITEMIDLIST pidlNew) +BOOLEAN CDefView::LV_RenameItem(PCUITEMID_CHILD pidlOld, PCUITEMID_CHILD pidlNew) { int nItem; LVITEMW lvItem; TRACE("(%p)(pidlold=%p pidlnew=%p)\n", this, pidlOld, pidlNew); - nItem = LV_FindItemByPidl(ILFindLastID(pidlOld)); + nItem = LV_FindItemByPidl(pidlOld); if ( -1 != nItem ) { @@ -805,10 +822,10 @@ lvItem.iItem = nItem; m_ListView.GetItem(&lvItem); - SHFree((LPITEMIDLIST)lvItem.lParam); + SHFree(reinterpret_cast<LPVOID>(lvItem.lParam)); lvItem.mask = LVIF_PARAM|LVIF_IMAGE; lvItem.iItem = nItem; - lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidlNew)); /* set the item's data */ + lvItem.lParam = reinterpret_cast<LPARAM>(ILClone(pidlNew)); /* set the item's data */ lvItem.iImage = SHMapPIDLToSystemImageListIndex(m_pSFParent, pidlNew, 0); m_ListView.SetItem(&lvItem); m_ListView.Update(nItem); @@ -827,8 +844,9 @@ */ INT CALLBACK CDefView::fill_list( LPVOID ptr, LPVOID arg ) { - LPITEMIDLIST pidl = (LPITEMIDLIST)ptr; + PITEMID_CHILD pidl = static_cast<PITEMID_CHILD>(ptr); CDefView *pThis = static_cast<CDefView *>(arg); + /* in a commdlg This works as a filemask*/ if (pThis->IncludeObject(pidl) == S_OK) pThis->LV_AddItem(pidl); @@ -839,8 +857,8 @@ HRESULT CDefView::FillList() { - LPENUMIDLIST pEnumIDList; - LPITEMIDLIST pidl; + CComPtr<IEnumIDList> pEnumIDList; + PITEMID_CHILD pidl; DWORD dwFetched; HRESULT hRes; HDPA hdpa; @@ -873,17 +891,15 @@ } /* sort the array */ - DPA_Sort(hdpa, CompareItems, (LPARAM)m_pSFParent.p); + DPA_Sort(hdpa, CompareItems, reinterpret_cast<LPARAM>(m_pSFParent.p)); /*turn the listview's redrawing off*/ m_ListView.SetRedraw(FALSE); - DPA_DestroyCallback( hdpa, fill_list, (void *)this); + DPA_DestroyCallback( hdpa, fill_list, this); /*turn the listview's redrawing back on and force it to draw*/ m_ListView.SetRedraw(TRUE); - - pEnumIDList->Release(); /* destroy the list*/ return S_OK; } @@ -912,8 +928,9 @@ LRESULT CDefView::OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { + /* redirect to parent */ if (m_FolderSettings.fFlags & (FWF_DESKTOP | FWF_TRANSPARENT)) - return SendMessageW(GetParent(), WM_ERASEBKGND, wParam, lParam); /* redirect to parent */ + return SendMessageW(GetParent(), WM_ERASEBKGND, wParam, lParam); bHandled = FALSE; return 0; @@ -930,7 +947,7 @@ LRESULT CDefView::OnGetShellBrowser(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { - return (LRESULT)m_pShellBrowser.p; + return reinterpret_cast<LRESULT>(m_pShellBrowser.p); } /********************************************************** @@ -962,10 +979,12 @@ m_pSFParent->QueryInterface(IID_PPV_ARG(IPersistFolder2, &ppf2)); if (ppf2) { - ppf2->GetCurFolder((LPITEMIDLIST*)&ntreg.pidl); + PIDLIST_ABSOLUTE pidlParent; + ppf2->GetCurFolder(&pidlParent); ntreg.fRecursive = TRUE; + ntreg.pidl = pidlParent; m_hNotify = SHChangeNotifyRegister(m_hWnd, SHCNF_IDLIST, SHCNE_ALLEVENTS, SHV_CHANGE_NOTIFY, 1, &ntreg); - SHFree((LPITEMIDLIST)ntreg.pidl); + SHFree(pidlParent); } m_hAccel = LoadAcceleratorsW(shell32_hInstance, MAKEINTRESOURCEW(IDA_SHELLVIEW)); @@ -984,9 +1003,7 @@ GetSelections(); - LPCITEMIDLIST * apidl = (LPCITEMIDLIST *)m_apidl; - - hr = m_pSFParent->GetUIObjectOf(m_hWnd, m_cidl, apidl, IID_NULL_PPV_ARG(IContextMenu, &cm)); + hr = m_pSFParent->GetUIObjectOf(m_hWnd, m_cidl, m_apidl, IID_NULL_PPV_ARG(IContextMenu, &cm)); if (FAILED(hr)) return NULL; @@ -1097,7 +1114,7 @@ SHFree(m_apidl); m_cidl = m_ListView.GetSelectedCount(); - m_apidl = (LPITEMIDLIST*)SHAlloc(m_cidl * sizeof(LPITEMIDLIST)); + m_apidl = reinterpret_cast<PCUITEMID_CHILD_ARRAY>(SHAlloc(m_cidl * sizeof(PCUITEMID_CHILD))); if (!m_apidl) { m_cidl = 0; @@ -1110,7 +1127,7 @@ int lvIndex = -1; while ((lvIndex = m_ListView.GetNextItem(lvIndex, LVNI_SELECTED)) > -1) { - m_apidl[i] = (LPITEMIDLIST)m_ListView.GetItemData(lvIndex); + m_apidl[i] = _PidlByItem(lvIndex); i++; if (i == m_cidl) break; @@ -1142,7 +1159,7 @@ if (!hMenu) return E_FAIL; - hResult = GetItemObject( SVGIO_SELECTION, IID_PPV_ARG(IContextMenu, &m_pCM)); + hResult = GetItemObject(SVGIO_SELECTION, IID_PPV_ARG(IContextMenu, &m_pCM)); if (FAILED(hResult)) goto cleanup; @@ -1235,7 +1252,7 @@ ZeroMemory(&cmi, sizeof(cmi)); cmi.cbSize = sizeof(cmi); - cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand); + cmi.lpVerb = MAKEINTRESOURCEA(uCommand); cmi.hwnd = m_hWnd; m_pCM->InvokeCommand(&cmi); @@ -1277,7 +1294,7 @@ ZeroMemory(&cmi, sizeof(cmi)); cmi.cbSize = sizeof(cmi); - cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand); + cmi.lpVerb = MAKEINTRESOURCEA(uCommand); cmi.hwnd = m_hWnd; m_pCM->InvokeCommand(&cmi); @@ -1469,7 +1486,7 @@ should always be done before merging menus (OnActivate merges the menus) if one of our windows has the focus.*/ - m_pShellBrowser->OnViewWindowActive((IShellView *)this); + m_pShellBrowser->OnViewWindowActive(this); DoActivate(SVUIA_ACTIVATE_FOCUS); /* Set the focus to the listview */ @@ -1544,7 +1561,7 @@ case 0x31: case 0x32: case 0x33: - m_sortInfo.nHeaderID = (LPARAM) (dwCmdID - 0x30); + m_sortInfo.nHeaderID = dwCmdID - 0x30; m_sortInfo.bIsAscending = TRUE; m_sortInfo.nLastHeaderID = m_sortInfo.nHeaderID; m_ListView.SortItems(ListViewCompareItems, &m_sortInfo); @@ -1582,7 +1599,7 @@ LPNMHDR lpnmh; LPNMLISTVIEW lpnmlv; NMLVDISPINFOW *lpdi; - LPITEMIDLIST pidl; + PCUITEMID_CHILD pidl; BOOL unused; CtlID = wParam; @@ -1640,7 +1657,10 @@ case LVN_DELETEITEM: TRACE("-- LVN_DELETEITEM %p\n", this); - SHFree((LPITEMIDLIST)lpnmlv->lParam); /*delete the pidl because we made a copy of it*/ + + /*delete the pidl because we made a copy of it*/ + SHFree(reinterpret_cast<LPVOID>(lpnmlv->lParam)); + break; case LVN_DELETEALLITEMS: @@ -1670,7 +1690,7 @@ case LVN_GETDISPINFOA: case LVN_GETDISPINFOW: TRACE("-- LVN_GETDISPINFO %p\n", this); - pidl = (LPITEMIDLIST)lpdi->item.lParam; + pidl = _PidlByItem(lpdi->item); if (lpdi->item.mask & LVIF_TEXT) /* text requested */ { @@ -1723,11 +1743,9 @@ DWORD dwAttributes = SFGAO_CANLINK; DWORD dwEffect = DROPEFFECT_COPY | DROPEFFECT_MOVE; - if (SUCCEEDED(m_pSFParent->GetUIObjectOf(m_hWnd, m_cidl, (LPCITEMIDLIST*)m_apidl, IID_NULL_PPV_ARG(IDataObject, &pda)))) + if (SUCCEEDED(m_pSFParent->GetUIObjectOf(m_hWnd, m_cidl, m_apidl, IID_NULL_PPV_ARG(IDataObject, &pda)))) { - CComPtr<IDropSource> pds = static_cast<IDropSource *>(this); /* own DropSource interface */ - - if (SUCCEEDED(m_pSFParent->GetAttributesOf(m_cidl, (LPCITEMIDLIST*)m_apidl, &dwAttributes))) + if (SUCCEEDED(m_pSFParent->GetAttributesOf(m_cidl, m_apidl, &dwAttributes))) { if (dwAttributes & SFGAO_CANLINK) { @@ -1741,10 +1759,8 @@ piaso->SetAsyncMode(TRUE); } - if (pds) - { DWORD dwEffect2; - DoDragDrop(pda, pds, dwEffect, &dwEffect2); - } + DWORD dwEffect2; + DoDragDrop(pda, this, dwEffect, &dwEffect2); } } break; @@ -1752,11 +1768,11 @@ case LVN_BEGINLABELEDITW: { DWORD dwAttr = SFGAO_CANRENAME; - pidl = (LPITEMIDLIST)lpdi->item.lParam; + pidl = _PidlByItem(lpdi->item); TRACE("-- LVN_BEGINLABELEDITW %p\n", this); - m_pSFParent->GetAttributesOf(1, (LPCITEMIDLIST*)&pidl, &dwAttr); + m_pSFParent->GetAttributesOf(1, &pidl, &dwAttr); if (SFGAO_CANRENAME & dwAttr) { m_isEditing = TRUE; @@ -1776,15 +1792,16 @@ HRESULT hr; LVITEMW lvItem; - pidl = (LPITEMIDLIST)lpdi->item.lParam; - hr = m_pSFParent->SetNameOf(0, pidl, lpdi->item.pszText, SHGDN_INFOLDER, &pidl); - - if (SUCCEEDED(hr) && pidl) + pidl = _PidlByItem(lpdi->item); + PITEMID_CHILD pidlNew; + hr = m_pSFParent->SetNameOf(0, pidl, lpdi->item.pszText, SHGDN_INFOLDER, &pidlNew); + + if (SUCCEEDED(hr) && pidlNew) { lvItem.mask = LVIF_PARAM|LVIF_IMAGE; lvItem.iItem = lpdi->item.iItem; - lvItem.lParam = (LPARAM)pidl; - lvItem.iImage = SHMapPIDLToSystemImageListIndex(m_pSFParent, pidl, 0); + lvItem.lParam = reinterpret_cast<LPARAM>(pidlNew); + lvItem.iImage = SHMapPIDLToSystemImageListIndex(m_pSFParent, pidlNew, 0); m_ListView.SetItem(&lvItem); m_ListView.Update(lpdi->item.iItem); return TRUE; @@ -1807,9 +1824,7 @@ */ LRESULT CDefView::OnChangeNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { - LPITEMIDLIST *Pidls; - - Pidls = (LPITEMIDLIST *)wParam; + PCIDLIST_ABSOLUTE *Pidls = reinterpret_cast<PCIDLIST_ABSOLUTE*>(wParam); TRACE("(%p)(%p,%p,0x%08x)\n", this, Pidls[0], Pidls[1], lParam); @@ -1817,21 +1832,21 @@ { case SHCNE_MKDIR: case SHCNE_CREATE: - LV_AddItem(Pidls[0]); + LV_AddItem(ILFindLastID(Pidls[0])); break; case SHCNE_RMDIR: case SHCNE_DELETE: - LV_DeleteItem(Pidls[0]); + LV_DeleteItem(ILFindLastID(Pidls[0])); break; case SHCNE_RENAMEFOLDER: case SHCNE_RENAMEITEM: - LV_RenameItem(Pidls[0], Pidls[1]); + LV_RenameItem(ILFindLastID(Pidls[0]), ILFindLastID(Pidls[1])); break; case SHCNE_UPDATEITEM: - LV_RenameItem(Pidls[0], Pidls[0]); + LV_RenameItem(ILFindLastID(Pidls[0]), ILFindLastID(Pidls[0])); break; case SHCNE_UPDATEDIR: @@ -2148,7 +2163,7 @@ return S_OK; } -HRESULT WINAPI CDefView::SelectItem(LPCITEMIDLIST pidl, UINT uFlags) +HRESULT WINAPI CDefView::SelectItem(PCUITEMID_CHILD pidl, UINT uFlags) { int i; @@ -2207,17 +2222,20 @@ if (IsEqualIID(riid, IID_IContextMenu)) { //*ppvOut = ISvBgCm_Constructor(m_pSFParent, FALSE); - CDefFolderMenu_Create2(NULL, NULL, 0, NULL, m_pSFParent, NULL, 0, NULL, (IContextMenu**)ppvOut); if (!ppvOut) hr = E_OUTOFMEMORY; - else - hr = S_OK; + + IContextMenu* pcm; + hr = CDefFolderMenu_Create2(NULL, NULL, 0, NULL, m_pSFParent, NULL, 0, NULL, &pcm); + if (FAILED(hr)) + return hr; + *ppvOut = pcm; } break; case SVGIO_SELECTION: GetSelections(); - hr = m_pSFParent->GetUIObjectOf(m_hWnd, m_cidl, (LPCITEMIDLIST*)m_apidl, riid, 0, ppvOut); + hr = m_pSFParent->GetUIObjectOf(m_hWnd, m_cidl, m_apidl, riid, 0, ppvOut); break; } @@ -2243,7 +2261,7 @@ TRACE("(%p)->(%u), stub\n", this, ViewMode); /* It's not redundant to check FVM_AUTO because it's a (UINT)-1 */ - if ((ViewMode < FVM_FIRST || ViewMode > FVM_LAST) && (ViewMode != (UINT)FVM_AUTO)) + if ((ViewMode < FVM_FIRST || ViewMode > FVM_LAST) && (ViewMode != FVM_AUTO)) return E_INVALIDARG; /* Windows before Vista uses LVM_SETVIEW and possibly @@ -2289,9 +2307,9 @@ return m_pSFParent->QueryInterface(riid, ppv); } -HRESULT STDMETHODCALLTYPE CDefView::Item(int iItemIndex, LPITEMIDLIST *ppidl) -{ - PITEMID_CHILD pidl = reinterpret_cast<PITEMID_CHILD>(m_ListView.GetItemData(iItemIndex)); +HRESULT STDMETHODCALLTYPE CDefView::Item(int iItemIndex, PITEMID_CHILD *ppidl) +{ + PCUITEMID_CHILD pidl = _PidlByItem(iItemIndex); if (pidl) { *ppidl = ILClone(pidl); @@ -2337,7 +2355,7 @@ return S_OK; } -HRESULT STDMETHODCALLTYPE CDefView::GetItemPosition(LPCITEMIDLIST pidl, POINT *ppt) +HRESULT STDMETHODCALLTYPE CDefView::GetItemPosition(PCUITEMID_CHILD pidl, POINT *ppt) { return E_NOTIMPL; } @@ -2468,7 +2486,8 @@ HRESULT STDMETHODCALLTYPE CDefView::GetObjectCount(UINT *count) { TRACE("(%p)->(%p)\n", this, count); - return ItemCount(SVGIO_ALLVIEW, reinterpret_cast<INT*>(count)); + *count = m_ListView.GetItemCount(); + return S_OK; } HRESULT STDMETHODCALLTYPE CDefView::SetObjectCount(UINT count, UINT flags) @@ -2510,14 +2529,14 @@ if (*items) { - *pidl = static_cast<PCUITEMID_CHILD *>(LocalAlloc(0, *items * sizeof(LPITEMIDLIST))); + *pidl = static_cast<PCUITEMID_CHILD *>(LocalAlloc(0, *items * sizeof(PCUITEMID_CHILD))); if (!*pidl) { return E_OUTOFMEMORY; } /* it's documented that caller shouldn't PIDLs, only array itself */ - memcpy(static_cast<PCUITEMID_CHILD *>(*pidl), m_apidl, *items * sizeof(LPITEMIDLIST)); + memcpy(*pidl, m_apidl, *items * sizeof(PCUITEMID_CHILD)); } return S_OK; @@ -2761,7 +2780,7 @@ { /* Query the relative PIDL of the shellfolder object represented by the currently * dragged over listview-item ... */ - LPCITEMIDLIST pidl = reinterpret_cast<LPCITEMIDLIST>(m_ListView.GetItemData(lResult)); + PCUITEMID_CHILD pidl = _PidlByItem(lResult); /* ... and bind m_pCurDropTarget to the IDropTarget interface of an UIObject of this object */ hr = m_pSFParent->GetUIObjectOf(m_ListView, 1, &pidl, IID_NULL_PPV_ARG(IDropTarget, &m_pCurDropTarget));
10 years, 1 month
1
0
0
0
[akhaldi] 65184: * Sync up to trunk head (r65183).
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 2 16:12:38 2014 New Revision: 65184 URL:
http://svn.reactos.org/svn/reactos?rev=65184&view=rev
Log: * Sync up to trunk head (r65183). Modified: branches/shell-experiments/ (props changed) branches/shell-experiments/base/applications/network/net/cmdUser.c branches/shell-experiments/base/applications/rapps/winmain.c branches/shell-experiments/base/services/eventlog/rpc.c branches/shell-experiments/base/services/umpnpmgr/umpnpmgr.c branches/shell-experiments/base/setup/usetup/interface/usetup.c branches/shell-experiments/base/setup/usetup/partlist.c branches/shell-experiments/dll/win32/kernel32/client/console/alias.c branches/shell-experiments/dll/win32/kernel32/client/console/console.c branches/shell-experiments/dll/win32/kernel32/client/console/history.c branches/shell-experiments/dll/win32/kernel32/client/console/readwrite.c branches/shell-experiments/dll/win32/kernel32/client/console/vista.c branches/shell-experiments/dll/win32/kernel32/client/version.c branches/shell-experiments/dll/win32/kernel32/kernel32.rc branches/shell-experiments/dll/win32/kernel32/winnls/lang/cs-CZ.rc branches/shell-experiments/dll/win32/kernel32/winnls/lang/de-DE.rc branches/shell-experiments/dll/win32/kernel32/winnls/lang/en-US.rc branches/shell-experiments/dll/win32/kernel32/winnls/lang/es-ES.rc branches/shell-experiments/dll/win32/kernel32/winnls/lang/fr-FR.rc branches/shell-experiments/dll/win32/kernel32/winnls/lang/ro-RO.rc branches/shell-experiments/dll/win32/kernel32/winnls/lang/ru-RU.rc branches/shell-experiments/dll/win32/kernel32/winnls/lang/sq-AL.rc branches/shell-experiments/dll/win32/kernel32/winnls/lang/tr-TR.rc branches/shell-experiments/dll/win32/kernel32/winnls/lang/uk-UA.rc branches/shell-experiments/dll/win32/kernel32/winnls/string/lang.c branches/shell-experiments/dll/win32/kernel32/winnls/string/nls.c branches/shell-experiments/dll/win32/msgina/msgina.c branches/shell-experiments/dll/win32/newdev/wizard.c branches/shell-experiments/dll/win32/shell32/openwithmenu.cpp branches/shell-experiments/dll/win32/shell32/shlfileop.cpp branches/shell-experiments/dll/win32/syssetup/security.c branches/shell-experiments/drivers/bus/acpi/busmgr/bus.c branches/shell-experiments/drivers/bus/acpi/main.c branches/shell-experiments/drivers/bus/pci/pdo.c branches/shell-experiments/drivers/filesystems/fastfat/close.c branches/shell-experiments/drivers/filesystems/fastfat/create.c branches/shell-experiments/drivers/filesystems/fastfat/fcb.c branches/shell-experiments/drivers/filesystems/fastfat/fsctl.c branches/shell-experiments/drivers/filesystems/ntfs/fsctl.c branches/shell-experiments/drivers/network/ndis/ndis/miniport.c branches/shell-experiments/drivers/network/ndis/ndis/protocol.c branches/shell-experiments/drivers/sac/driver/concmd.c branches/shell-experiments/drivers/sac/driver/conmgr.c branches/shell-experiments/drivers/sac/driver/data.c branches/shell-experiments/drivers/sac/driver/util.c branches/shell-experiments/drivers/usb/usbhub/ (props changed) branches/shell-experiments/drivers/usb/usbhub/fdo.c branches/shell-experiments/drivers/usb/usbohci/ (props changed) branches/shell-experiments/drivers/usb/usbohci/hardware.cpp branches/shell-experiments/hal/halx86/acpi/halpnpdd.c branches/shell-experiments/hal/halx86/legacy/halpnpdd.c branches/shell-experiments/include/psdk/winioctl.h branches/shell-experiments/include/reactos/undocshell.h branches/shell-experiments/lib/cmlib/hivewrt.c branches/shell-experiments/lib/drivers/libusb/hub_controller.cpp (contents, props changed) branches/shell-experiments/lib/drivers/libusb/libusb.cpp (contents, props changed) branches/shell-experiments/lib/fslib/ext2lib/Mke2fs.c branches/shell-experiments/lib/lsalib/lsa.c branches/shell-experiments/ntoskrnl/ex/init.c branches/shell-experiments/ntoskrnl/ex/shutdown.c branches/shell-experiments/ntoskrnl/io/iomgr/arcname.c branches/shell-experiments/ntoskrnl/io/pnpmgr/pnpmgr.c branches/shell-experiments/ntoskrnl/io/pnpmgr/pnpreport.c branches/shell-experiments/ntoskrnl/io/pnpmgr/pnpres.c branches/shell-experiments/ntoskrnl/mm/ARM3/zeropage.c branches/shell-experiments/ntoskrnl/po/poshtdwn.c branches/shell-experiments/ntoskrnl/po/povolume.c branches/shell-experiments/ntoskrnl/po/power.c branches/shell-experiments/ntoskrnl/se/sd.c branches/shell-experiments/subsystems/win/basesrv/proc.c branches/shell-experiments/subsystems/win/basesrv/vdm.c branches/shell-experiments/subsystems/win32/csrsrv/init.c branches/shell-experiments/win32ss/drivers/videoprt/registry.c branches/shell-experiments/win32ss/gdi/ntgdi/freetype.c branches/shell-experiments/win32ss/user/ntuser/desktop.c branches/shell-experiments/win32ss/user/ntuser/display.c branches/shell-experiments/win32ss/user/ntuser/focus.c branches/shell-experiments/win32ss/user/ntuser/hotkey.c branches/shell-experiments/win32ss/user/ntuser/keyboard.c branches/shell-experiments/win32ss/user/ntuser/msgqueue.c branches/shell-experiments/win32ss/user/ntuser/ntuser.c branches/shell-experiments/win32ss/user/user32/misc/dllmain.c branches/shell-experiments/win32ss/user/user32/windows/window.c branches/shell-experiments/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/shell-experiments/base/applications/network/net/cmdUser.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/applicat…
Modified: branches/shell-experiments/base/applications/rapps/winmain.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/applicat…
Modified: branches/shell-experiments/base/services/eventlog/rpc.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/services…
Modified: branches/shell-experiments/base/services/umpnpmgr/umpnpmgr.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/services…
Modified: branches/shell-experiments/base/setup/usetup/interface/usetup.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/setup/us…
Modified: branches/shell-experiments/base/setup/usetup/partlist.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/setup/us…
Modified: branches/shell-experiments/dll/win32/kernel32/client/console/alias.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/client/console/console.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/client/console/history.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/client/console/readwrite.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/client/console/vista.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/client/version.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/kernel32.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/lang/sq-AL.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/string/lang.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/kernel32/winnls/string/nls.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/ker…
Modified: branches/shell-experiments/dll/win32/msgina/msgina.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/msg…
Modified: branches/shell-experiments/dll/win32/newdev/wizard.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/new…
Modified: branches/shell-experiments/dll/win32/shell32/openwithmenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
Modified: branches/shell-experiments/dll/win32/shell32/shlfileop.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
Modified: branches/shell-experiments/dll/win32/syssetup/security.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/sys…
Modified: branches/shell-experiments/drivers/bus/acpi/busmgr/bus.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/bus/a…
Modified: branches/shell-experiments/drivers/bus/acpi/main.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/bus/a…
Modified: branches/shell-experiments/drivers/bus/pci/pdo.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/bus/p…
Modified: branches/shell-experiments/drivers/filesystems/fastfat/close.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/files…
Modified: branches/shell-experiments/drivers/filesystems/fastfat/create.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/files…
Modified: branches/shell-experiments/drivers/filesystems/fastfat/fcb.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/files…
Modified: branches/shell-experiments/drivers/filesystems/fastfat/fsctl.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/files…
Modified: branches/shell-experiments/drivers/filesystems/ntfs/fsctl.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/files…
Modified: branches/shell-experiments/drivers/network/ndis/ndis/miniport.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/netwo…
Modified: branches/shell-experiments/drivers/network/ndis/ndis/protocol.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/netwo…
Modified: branches/shell-experiments/drivers/sac/driver/concmd.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/sac/d…
Modified: branches/shell-experiments/drivers/sac/driver/conmgr.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/sac/d…
Modified: branches/shell-experiments/drivers/sac/driver/data.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/sac/d…
Modified: branches/shell-experiments/drivers/sac/driver/util.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/sac/d…
Modified: branches/shell-experiments/drivers/usb/usbhub/fdo.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/usb/u…
Modified: branches/shell-experiments/drivers/usb/usbohci/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/drivers/usb/u…
Modified: branches/shell-experiments/hal/halx86/acpi/halpnpdd.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/hal/halx86/ac…
Modified: branches/shell-experiments/hal/halx86/legacy/halpnpdd.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/hal/halx86/le…
Modified: branches/shell-experiments/include/psdk/winioctl.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/include/psdk/…
Modified: branches/shell-experiments/include/reactos/undocshell.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/include/react…
Modified: branches/shell-experiments/lib/cmlib/hivewrt.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/lib/cmlib/hiv…
Modified: branches/shell-experiments/lib/drivers/libusb/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/lib/drivers/l…
Modified: branches/shell-experiments/lib/drivers/libusb/libusb.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/lib/drivers/l…
Modified: branches/shell-experiments/lib/fslib/ext2lib/Mke2fs.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/lib/fslib/ext…
Modified: branches/shell-experiments/lib/lsalib/lsa.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/lib/lsalib/ls…
Modified: branches/shell-experiments/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/ex/i…
Modified: branches/shell-experiments/ntoskrnl/ex/shutdown.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/ex/s…
Modified: branches/shell-experiments/ntoskrnl/io/iomgr/arcname.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/io/i…
Modified: branches/shell-experiments/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/io/p…
Modified: branches/shell-experiments/ntoskrnl/io/pnpmgr/pnpreport.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/io/p…
Modified: branches/shell-experiments/ntoskrnl/io/pnpmgr/pnpres.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/io/p…
Modified: branches/shell-experiments/ntoskrnl/mm/ARM3/zeropage.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/mm/A…
Modified: branches/shell-experiments/ntoskrnl/po/poshtdwn.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/po/p…
Modified: branches/shell-experiments/ntoskrnl/po/povolume.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/po/p…
Modified: branches/shell-experiments/ntoskrnl/po/power.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/po/p…
Modified: branches/shell-experiments/ntoskrnl/se/sd.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/ntoskrnl/se/s…
Modified: branches/shell-experiments/subsystems/win/basesrv/proc.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/subsystems/wi…
Modified: branches/shell-experiments/subsystems/win/basesrv/vdm.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/subsystems/wi…
Modified: branches/shell-experiments/subsystems/win32/csrsrv/init.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/subsystems/wi…
Modified: branches/shell-experiments/win32ss/drivers/videoprt/registry.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/drive…
Modified: branches/shell-experiments/win32ss/gdi/ntgdi/freetype.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/gdi/n…
Modified: branches/shell-experiments/win32ss/user/ntuser/desktop.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
Modified: branches/shell-experiments/win32ss/user/ntuser/display.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
Modified: branches/shell-experiments/win32ss/user/ntuser/focus.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
Modified: branches/shell-experiments/win32ss/user/ntuser/hotkey.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
Modified: branches/shell-experiments/win32ss/user/ntuser/keyboard.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
Modified: branches/shell-experiments/win32ss/user/ntuser/msgqueue.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
Modified: branches/shell-experiments/win32ss/user/ntuser/ntuser.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
Modified: branches/shell-experiments/win32ss/user/user32/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
Modified: branches/shell-experiments/win32ss/user/user32/windows/window.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
Modified: branches/shell-experiments/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/win32ss/user/…
10 years, 1 month
1
0
0
0
[tfaber] 65183: [NTOS:SE] - Call SeAssignSecurityEx from SeAssignSecurity - Fix a FIXME
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Nov 2 15:41:20 2014 New Revision: 65183 URL:
http://svn.reactos.org/svn/reactos?rev=65183&view=rev
Log: [NTOS:SE] - Call SeAssignSecurityEx from SeAssignSecurity - Fix a FIXME Modified: trunk/reactos/ntoskrnl/se/sd.c Modified: trunk/reactos/ntoskrnl/se/sd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sd.c?rev=65183…
============================================================================== --- trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] Sun Nov 2 15:41:20 2014 @@ -1134,8 +1134,11 @@ /* * @implemented */ -NTSTATUS NTAPI -SeDeassignSecurity(PSECURITY_DESCRIPTOR *SecurityDescriptor) +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +NTAPI +SeDeassignSecurity( + _Inout_ PSECURITY_DESCRIPTOR *SecurityDescriptor) { PAGED_CODE(); @@ -1148,37 +1151,23 @@ return STATUS_SUCCESS; } - - -/* - * @unimplemented - */ -NTSTATUS NTAPI -SeAssignSecurityEx(IN PSECURITY_DESCRIPTOR ParentDescriptor OPTIONAL, - IN PSECURITY_DESCRIPTOR ExplicitDescriptor OPTIONAL, - OUT PSECURITY_DESCRIPTOR *NewDescriptor, - IN GUID *ObjectType OPTIONAL, - IN BOOLEAN IsDirectoryObject, - IN ULONG AutoInheritFlags, - IN PSECURITY_SUBJECT_CONTEXT SubjectContext, - IN PGENERIC_MAPPING GenericMapping, - IN POOL_TYPE PoolType) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -} /* * @implemented */ -NTSTATUS NTAPI -SeAssignSecurity(PSECURITY_DESCRIPTOR _ParentDescriptor OPTIONAL, - PSECURITY_DESCRIPTOR _ExplicitDescriptor OPTIONAL, - PSECURITY_DESCRIPTOR *NewDescriptor, - BOOLEAN IsDirectoryObject, - PSECURITY_SUBJECT_CONTEXT SubjectContext, - PGENERIC_MAPPING GenericMapping, - POOL_TYPE PoolType) +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +NTAPI +SeAssignSecurityEx( + _In_opt_ PSECURITY_DESCRIPTOR _ParentDescriptor, + _In_opt_ PSECURITY_DESCRIPTOR _ExplicitDescriptor, + _Out_ PSECURITY_DESCRIPTOR *NewDescriptor, + _In_opt_ GUID *ObjectType, + _In_ BOOLEAN IsDirectoryObject, + _In_ ULONG AutoInheritFlags, + _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext, + _In_ PGENERIC_MAPPING GenericMapping, + _In_ POOL_TYPE PoolType) { PISECURITY_DESCRIPTOR ParentDescriptor = _ParentDescriptor; PISECURITY_DESCRIPTOR ExplicitDescriptor = _ExplicitDescriptor; @@ -1196,6 +1185,11 @@ PACL Dacl = NULL; PACL Sacl = NULL; + DBG_UNREFERENCED_PARAMETER(ObjectType); + DBG_UNREFERENCED_PARAMETER(AutoInheritFlags); + DBG_UNREFERENCED_PARAMETER(GenericMapping); + UNREFERENCED_PARAMETER(PoolType); + PAGED_CODE(); /* Lock subject context */ @@ -1327,7 +1321,7 @@ if (Descriptor == NULL) { DPRINT1("ExAlloctePool() failed\n"); - /* FIXME: Unlock subject context */ + SeUnlockSubjectContext(SubjectContext); return STATUS_INSUFFICIENT_RESOURCES; } @@ -1375,10 +1369,38 @@ *NewDescriptor = Descriptor; - DPRINT("Descrptor %p\n", Descriptor); + DPRINT("Descriptor %p\n", Descriptor); ASSERT(RtlLengthSecurityDescriptor(Descriptor)); return STATUS_SUCCESS; } +/* + * @implemented + */ +_IRQL_requires_max_(PASSIVE_LEVEL) +NTSTATUS +NTAPI +SeAssignSecurity( + _In_opt_ PSECURITY_DESCRIPTOR ParentDescriptor, + _In_opt_ PSECURITY_DESCRIPTOR ExplicitDescriptor, + _Out_ PSECURITY_DESCRIPTOR *NewDescriptor, + _In_ BOOLEAN IsDirectoryObject, + _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext, + _In_ PGENERIC_MAPPING GenericMapping, + _In_ POOL_TYPE PoolType) +{ + PAGED_CODE(); + + return SeAssignSecurityEx(ParentDescriptor, + ExplicitDescriptor, + NewDescriptor, + NULL, + IsDirectoryObject, + 0, + SubjectContext, + GenericMapping, + PoolType); +} + /* EOF */
10 years, 1 month
1
0
0
0
[gadamopoulos] 65182: [ATL] - Add a couple of macros needed for the time we will be able to support aggregation with ATL
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sun Nov 2 13:35:03 2014 New Revision: 65182 URL:
http://svn.reactos.org/svn/reactos?rev=65182&view=rev
Log: [ATL] - Add a couple of macros needed for the time we will be able to support aggregation with ATL Modified: branches/shell-experiments/lib/atl/atlcom.h Modified: branches/shell-experiments/lib/atl/atlcom.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/lib/atl/atlco…
============================================================================== --- branches/shell-experiments/lib/atl/atlcom.h [iso-8859-1] (original) +++ branches/shell-experiments/lib/atl/atlcom.h [iso-8859-1] Sun Nov 2 13:35:03 2014 @@ -521,6 +521,11 @@ #define COM_INTERFACE_ENTRY_IID(iid, x) \ {&iid, offsetofclass(x, _ComMapClass), _ATL_SIMPLEMAPENTRY}, +#define COM_INTERFACE_ENTRY(x) \ + {&_ATL_IIDOF(x), \ + offsetofclass(x, _ComMapClass), \ + _ATL_SIMPLEMAPENTRY}, + #define COM_INTERFACE_ENTRY2_IID(iid, x, x2) \ {&iid, \ reinterpret_cast<DWORD_PTR>(static_cast<x *>(static_cast<x2 *>(reinterpret_cast<_ComMapClass *>(_ATL_PACKING)))) - _ATL_PACKING, \ @@ -578,6 +583,11 @@ #define DECLARE_POLY_AGGREGATABLE(x) \ public: \ typedef ATL::CComCreator<ATL::CComPolyObject<x> > _CreatorClass; + +#define COM_INTERFACE_ENTRY_AGGREGATE(iid, punk) \ + {&iid, \ + (DWORD_PTR)offsetof(_ComMapClass, punk), \ + _Delegate}, #define DECLARE_GET_CONTROLLING_UNKNOWN() \ public: \
10 years, 1 month
1
0
0
0
[tkreuzer] 65181: [HAMMERTIMESTFU] Silence "a few" DPRINTs
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Nov 2 11:30:14 2014 New Revision: 65181 URL:
http://svn.reactos.org/svn/reactos?rev=65181&view=rev
Log: [HAMMERTIMESTFU] Silence "a few" DPRINTs Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c trunk/reactos/base/setup/usetup/partlist.c trunk/reactos/dll/win32/syssetup/security.c trunk/reactos/drivers/bus/acpi/busmgr/bus.c trunk/reactos/drivers/bus/acpi/main.c trunk/reactos/drivers/bus/pci/pdo.c trunk/reactos/drivers/filesystems/fastfat/close.c trunk/reactos/drivers/filesystems/fastfat/create.c trunk/reactos/drivers/filesystems/fastfat/fsctl.c trunk/reactos/drivers/network/ndis/ndis/miniport.c trunk/reactos/drivers/network/ndis/ndis/protocol.c trunk/reactos/drivers/usb/usbhub/fdo.c trunk/reactos/drivers/usb/usbohci/hardware.cpp trunk/reactos/hal/halx86/acpi/halpnpdd.c trunk/reactos/hal/halx86/legacy/halpnpdd.c trunk/reactos/lib/cmlib/hivewrt.c trunk/reactos/lib/drivers/libusb/hub_controller.cpp trunk/reactos/lib/drivers/libusb/libusb.cpp trunk/reactos/lib/lsalib/lsa.c trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/ex/shutdown.c trunk/reactos/ntoskrnl/io/iomgr/arcname.c trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c trunk/reactos/ntoskrnl/po/poshtdwn.c trunk/reactos/ntoskrnl/po/povolume.c trunk/reactos/ntoskrnl/po/power.c trunk/reactos/subsystems/win32/csrsrv/init.c trunk/reactos/win32ss/drivers/videoprt/registry.c trunk/reactos/win32ss/user/ntuser/desktop.c trunk/reactos/win32ss/user/ntuser/display.c trunk/reactos/win32ss/user/ntuser/focus.c trunk/reactos/win32ss/user/ntuser/hotkey.c trunk/reactos/win32ss/user/ntuser/keyboard.c trunk/reactos/win32ss/user/ntuser/msgqueue.c trunk/reactos/win32ss/user/ntuser/ntuser.c trunk/reactos/win32ss/user/user32/misc/dllmain.c trunk/reactos/win32ss/user/user32/windows/window.c trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/umpnpmgr/ump…
============================================================================== --- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] (original) +++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -1683,7 +1683,7 @@ dwInstanceNumber++; } while (ret == CR_ALREADY_SUCH_DEVINST); - + if (ret == CR_SUCCESS) { /* pszDeviceID is an out parameter too for generated IDs */ @@ -3106,7 +3106,10 @@ if(ProcessInfo.hThread) CloseHandle(ProcessInfo.hThread); - DPRINT1("Success? %d\n", DeviceInstalled); + if (!DeviceInstalled) + { + DPRINT1("InstallDevice failed for DeviceInstance '%ws'\n", DeviceInstance); + } return DeviceInstalled; } Modified: trunk/reactos/base/setup/usetup/partlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
============================================================================== --- trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -47,7 +47,7 @@ for (i = 0; i < DiskEntry->LayoutBuffer->PartitionCount; i++) { PartitionInfo = &DiskEntry->LayoutBuffer->PartitionEntry[i]; - DbgPrint("%lu: %12I64u %12I64u %10lu %2lu %2x %c %c\n", + DPRINT("\n%lu: %12I64u %12I64u %10lu %2lu %2x %c %c\n", i, PartitionInfo->StartingOffset.QuadPart, PartitionInfo->PartitionLength.QuadPart, @@ -638,7 +638,7 @@ PPARTENTRY NewPartEntry; PLIST_ENTRY Entry; - DPRINT1("ScanForUnpartitionedDiskSpace()\n"); + DPRINT("ScanForUnpartitionedDiskSpace()\n"); if (IsListEmpty(&DiskEntry->PrimaryPartListHead)) { @@ -741,9 +741,9 @@ NewPartEntry->StartSector.QuadPart = LastStartSector + LastSectorCount; NewPartEntry->SectorCount.QuadPart = Align(NewPartEntry->StartSector.QuadPart + LastUnusedSectorCount, DiskEntry->SectorAlignment) - NewPartEntry->StartSector.QuadPart; -DPRINT1("First Sector: %I64u\n", NewPartEntry->StartSector.QuadPart); -DPRINT1("Last Sector: %I64u\n", NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart - 1); -DPRINT1("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart); + DPRINT("First Sector: %I64u\n", NewPartEntry->StartSector.QuadPart); + DPRINT("Last Sector: %I64u\n", NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart - 1); + DPRINT("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart); NewPartEntry->FormatState = Unformatted; @@ -819,9 +819,9 @@ NewPartEntry->StartSector.QuadPart = LastStartSector + LastSectorCount; NewPartEntry->SectorCount.QuadPart = Align(NewPartEntry->StartSector.QuadPart + LastUnusedSectorCount, DiskEntry->SectorAlignment) - NewPartEntry->StartSector.QuadPart; -DPRINT1("First Sector: %I64u\n", NewPartEntry->StartSector.QuadPart); -DPRINT1("Last Sector: %I64u\n", NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart - 1); -DPRINT1("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart); + DPRINT("First Sector: %I64u\n", NewPartEntry->StartSector.QuadPart); + DPRINT("Last Sector: %I64u\n", NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart - 1); + DPRINT("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart); NewPartEntry->FormatState = Unformatted; @@ -859,9 +859,9 @@ NewPartEntry->StartSector.QuadPart = LastStartSector + LastSectorCount; NewPartEntry->SectorCount.QuadPart = Align(NewPartEntry->StartSector.QuadPart + LastUnusedSectorCount, DiskEntry->SectorAlignment) - NewPartEntry->StartSector.QuadPart; -DPRINT1("First Sector: %I64u\n", NewPartEntry->StartSector.QuadPart); -DPRINT1("Last Sector: %I64u\n", NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart - 1); -DPRINT1("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart); + DPRINT("First Sector: %I64u\n", NewPartEntry->StartSector.QuadPart); + DPRINT("Last Sector: %I64u\n", NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart - 1); + DPRINT("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart); NewPartEntry->FormatState = Unformatted; @@ -872,7 +872,7 @@ } } - DPRINT1("ScanForUnpartitionedDiskSpace() done\n"); + DPRINT("ScanForUnpartitionedDiskSpace() done\n"); } @@ -1132,8 +1132,8 @@ DiskEntry->SectorAlignment = DiskGeometry.SectorsPerTrack; - DPRINT1("SectorCount %I64u\n", DiskEntry->SectorCount); - DPRINT1("SectorAlignment %lu\n", DiskEntry->SectorAlignment); + DPRINT("SectorCount %I64u\n", DiskEntry->SectorCount); + DPRINT("SectorAlignment %lu\n", DiskEntry->SectorAlignment); DiskEntry->DiskNumber = DiskNumber; DiskEntry->Port = ScsiAddress.PortNumber; @@ -1145,7 +1145,7 @@ InsertAscendingList(&List->DiskListHead, DiskEntry, DISKENTRY, ListEntry, DiskNumber); /* - * Allocate a buffer for 26 logical drives (2 entries each == 52) + * Allocate a buffer for 26 logical drives (2 entries each == 52) * plus the main partiton table (4 entries). Total 56 entries. */ LayoutBufferSize = sizeof(DRIVE_LAYOUT_INFORMATION) + @@ -1180,7 +1180,7 @@ { if ((DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart / DiskEntry->BytesPerSector) % DiskEntry->SectorsPerTrack == 0) { - DPRINT1("Use %lu Sector alignment!\n", DiskEntry->SectorsPerTrack); + DPRINT("Use %lu Sector alignment!\n", DiskEntry->SectorsPerTrack); } else if (DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart % 1048756 == 0) { Modified: trunk/reactos/dll/win32/syssetup/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/securit…
============================================================================== --- trunk/reactos/dll/win32/syssetup/security.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/syssetup/security.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -35,7 +35,7 @@ NTSTATUS Status; - DPRINT1("SYSSETUP: SetAccountDomain\n"); + DPRINT("SYSSETUP: SetAccountDomain\n"); memset(&ObjectAttributes, 0, sizeof(LSA_OBJECT_ATTRIBUTES)); ObjectAttributes.Length = sizeof(LSA_OBJECT_ATTRIBUTES); Modified: trunk/reactos/drivers/bus/acpi/busmgr/bus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/busmgr/bu…
============================================================================== --- trunk/reactos/drivers/bus/acpi/busmgr/bus.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/busmgr/bus.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -24,7 +24,7 @@ /* * Modified for ReactOS and latest ACPICA - * Copyright (C)2009 Samuel Serapion + * Copyright (C)2009 Samuel Serapion */ #include <precomp.h> @@ -219,11 +219,11 @@ } else { /* - * Get the device's power state either directly (via _PSC) or + * Get the device's power state either directly (via _PSC) or * indirectly (via power resources). */ if (device->power.flags.explicit_get) { - status = acpi_evaluate_integer(device->handle, "_PSC", + status = acpi_evaluate_integer(device->handle, "_PSC", NULL, &psc); if (ACPI_FAILURE(status)) return_VALUE(AE_NOT_FOUND); @@ -305,7 +305,7 @@ * On transitions to a high-powered state we first apply power (via * power resources) then evalute _PSx. Conversly for transitions to * a lower-powered state. - */ + */ if (state < device->power.state) { if (device->power.flags.power_resources) { result = acpi_power_transition(device, state); @@ -313,7 +313,7 @@ goto end; } if (device->power.states[state].flags.explicit_set) { - status = AcpiEvaluateObject(device->handle, + status = AcpiEvaluateObject(device->handle, object_name, NULL, NULL); if (ACPI_FAILURE(status)) { result = AE_NOT_FOUND; @@ -323,7 +323,7 @@ } else { if (device->power.states[state].flags.explicit_set) { - status = AcpiEvaluateObject(device->handle, + status = AcpiEvaluateObject(device->handle, object_name, NULL, NULL); if (ACPI_FAILURE(status)) { result = AE_NOT_FOUND; @@ -464,11 +464,11 @@ struct acpi_device *device = SystemArgument1; ULONG_PTR TypeData = (ULONG_PTR)SystemArgument2; KIRQL OldIrql; - + event = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_bus_event), 'IPCA'); if (!event) return; - + sprintf(event->device_class, "%s", device->pnp.device_class); sprintf(event->bus_id, "%s", device->pnp.bus_id); event->type = (TypeData & 0xFF000000) >> 24; @@ -497,10 +497,10 @@ /* drop event on the floor if no one's listening */ if (!event_is_open) return_VALUE(0); - + /* Data shouldn't even get near 24 bits */ ASSERT(!(data & 0xFF000000)); - + TypeData = data; TypeData |= type << 24; @@ -573,9 +573,9 @@ */ static int acpi_bus_walk ( - struct acpi_device *start, - acpi_bus_walk_callback callback, - int direction, + struct acpi_device *start, + acpi_bus_walk_callback callback, + int direction, void *data) { int result = 0; @@ -707,7 +707,7 @@ * --------------- * Callback for all 'system-level' device notifications (values 0x00-0x7F). */ -static void +static void acpi_bus_notify ( ACPI_HANDLE handle, UINT32 type, @@ -724,27 +724,27 @@ switch (type) { case ACPI_NOTIFY_BUS_CHECK: - DPRINT("Received BUS CHECK notification for device [%s]\n", + DPRINT("Received BUS CHECK notification for device [%s]\n", device->pnp.bus_id); acpi_bus_check_scope(handle); - /* + /* * TBD: We'll need to outsource certain events to non-ACPI * drivers via the device manager (device.c). */ break; case ACPI_NOTIFY_DEVICE_CHECK: - DPRINT("Received DEVICE CHECK notification for device [%s]\n", + DPRINT("Received DEVICE CHECK notification for device [%s]\n", device->pnp.bus_id); acpi_bus_check_device(handle); - /* + /* * TBD: We'll need to outsource certain events to non-ACPI * drivers via the device manager (device.c). */ break; case ACPI_NOTIFY_DEVICE_WAKE: - DPRINT("Received DEVICE WAKE notification for device [%s]\n", + DPRINT("Received DEVICE WAKE notification for device [%s]\n", device->pnp.bus_id); acpi_bus_check_device(handle); /* @@ -754,37 +754,37 @@ break; case ACPI_NOTIFY_EJECT_REQUEST: - DPRINT1("Received EJECT REQUEST notification for device [%s]\n", + DPRINT1("Received EJECT REQUEST notification for device [%s]\n", device->pnp.bus_id); /* TBD */ break; case ACPI_NOTIFY_DEVICE_CHECK_LIGHT: - DPRINT1("Received DEVICE CHECK LIGHT notification for device [%s]\n", + DPRINT1("Received DEVICE CHECK LIGHT notification for device [%s]\n", device->pnp.bus_id); /* TBD: Exactly what does 'light' mean? */ break; case ACPI_NOTIFY_FREQUENCY_MISMATCH: - DPRINT1("Received FREQUENCY MISMATCH notification for device [%s]\n", + DPRINT1("Received FREQUENCY MISMATCH notification for device [%s]\n", device->pnp.bus_id); /* TBD */ break; case ACPI_NOTIFY_BUS_MODE_MISMATCH: - DPRINT1("Received BUS MODE MISMATCH notification for device [%s]\n", + DPRINT1("Received BUS MODE MISMATCH notification for device [%s]\n", device->pnp.bus_id); /* TBD */ break; case ACPI_NOTIFY_POWER_FAULT: - DPRINT1("Received POWER FAULT notification for device [%s]\n", + DPRINT1("Received POWER FAULT notification for device [%s]\n", device->pnp.bus_id); /* TBD */ break; default: - DPRINT1("Received unknown/unsupported notification [%08x]\n", + DPRINT1("Received unknown/unsupported notification [%08x]\n", type); break; } @@ -810,7 +810,7 @@ /** - * acpi_bus_match + * acpi_bus_match * -------------- * Checks the device's hardware (_HID) or compatible (_CID) ids to see if it * matches the specified driver's criteria. @@ -840,20 +840,20 @@ error = -2; Done: - + return error; } /** - * acpi_bus_driver_init + * acpi_bus_driver_init * -------------------- - * Used to initialize a device via its device driver. Called whenever a + * Used to initialize a device via its device driver. Called whenever a * driver is bound to a device. Invokes the driver's add() and start() ops. */ static int acpi_bus_driver_init ( - struct acpi_device *device, + struct acpi_device *device, struct acpi_driver *driver) { int result = 0; @@ -896,15 +896,15 @@ /** - * acpi_bus_attach + * acpi_bus_attach * ------------- - * Callback for acpi_bus_walk() used to find devices that match a specific + * Callback for acpi_bus_walk() used to find devices that match a specific * driver's criteria and then attach the driver. */ static int acpi_bus_attach ( - struct acpi_device *device, - int level, + struct acpi_device *device, + int level, void *data) { int result = 0; @@ -927,7 +927,7 @@ DPRINT("Found driver [%s] for device [%s]\n", driver->name, device->pnp.bus_id); - + result = acpi_bus_driver_init(device, driver); if (result) return_VALUE(result); @@ -941,15 +941,15 @@ /** - * acpi_bus_unattach + * acpi_bus_unattach * ----------------- - * Callback for acpi_bus_walk() used to find devices that match a specific + * Callback for acpi_bus_walk() used to find devices that match a specific * driver's criteria and unattach the driver. */ static int acpi_bus_unattach ( - struct acpi_device *device, - int level, + struct acpi_device *device, + int level, void *data) { int result = 0; @@ -980,7 +980,7 @@ /** - * acpi_bus_find_driver + * acpi_bus_find_driver * -------------------- * Parses the list of registered drivers looking for a driver applicable for * the specified device. @@ -1019,8 +1019,8 @@ /** - * acpi_bus_register_driver - * ------------------------ + * acpi_bus_register_driver + * ------------------------ * Registers a driver with the ACPI bus. Searches the namespace for all * devices that match the driver's criteria and binds. */ @@ -1038,7 +1038,7 @@ list_add_tail(&driver->node, &acpi_bus_drivers); up(&acpi_bus_drivers_lock); - acpi_bus_walk(acpi_root, acpi_bus_attach, + acpi_bus_walk(acpi_root, acpi_bus_attach, WALK_DOWN, driver); return_VALUE(driver->references); @@ -1046,7 +1046,7 @@ /** - * acpi_bus_unregister_driver + * acpi_bus_unregister_driver * -------------------------- * Unregisters a driver with the ACPI bus. Searches the namespace for all * devices that match the driver's criteria and unbinds. @@ -1075,7 +1075,7 @@ Device Enumeration -------------------------------------------------------------------------- */ -static int +static int acpi_bus_get_flags ( struct acpi_device *device) { @@ -1125,7 +1125,7 @@ } -int +int acpi_bus_add ( struct acpi_device **child, struct acpi_device *parent, @@ -1180,7 +1180,7 @@ buffer.Pointer = bus_id; AcpiGetName(handle, ACPI_SINGLE_NAME, &buffer); - + /* Clean up trailing underscores (if any) */ for (i = 3; i > 1; i--) { if (bus_id[i] == '_') @@ -1194,7 +1194,7 @@ /* HACK: Skip HPET */ if (strstr(device->pnp.bus_id, "HPET")) { - DPRINT1("Using HPET hack\n"); + DPRINT("Using HPET hack\n"); result = -1; goto end; } @@ -1314,7 +1314,7 @@ break; } - /* + /* * \_SB * ---- * Fix for the system root bus device -- the only root-level device. @@ -1411,7 +1411,7 @@ /* * Bind _ADR-Based Devices * ----------------------- - * If there's a a bus address (_ADR) then we utilize the parent's + * If there's a a bus address (_ADR) then we utilize the parent's * 'bind' function (if exists) to bind the ACPI- and natively- * enumerated device representations. */ @@ -1451,7 +1451,7 @@ static int acpi_bus_remove ( - struct acpi_device *device, + struct acpi_device *device, int type) { @@ -1490,7 +1490,7 @@ parent = start; phandle = start->handle; - + /* * Parse through the ACPI namespace, identify all 'devices', and * create a new 'struct acpi_device' for each. @@ -1591,7 +1591,7 @@ * power button is present. */ if (AcpiGbl_FADT.Flags & ACPI_FADT_POWER_BUTTON) - result = acpi_bus_add(&device, acpi_root, + result = acpi_bus_add(&device, acpi_root, NULL, ACPI_BUS_TYPE_POWER_BUTTON); else { @@ -1610,7 +1610,7 @@ * the we have a control method button just like above. */ if (AcpiGbl_FADT.Flags & ACPI_FADT_SLEEP_BUTTON) - result = acpi_bus_add(&device, acpi_root, + result = acpi_bus_add(&device, acpi_root, NULL, ACPI_BUS_TYPE_SLEEP_BUTTON); else { @@ -1635,7 +1635,7 @@ int result = 0; ACPI_STATUS status = AE_OK; - DPRINT1("acpi_bus_init\n"); + DPRINT("acpi_bus_init\n"); KeInitializeDpc(&event_dpc, acpi_bus_generate_event_dpc, NULL); @@ -1682,7 +1682,7 @@ /* * Create the root device in the bus's device tree */ - result = acpi_bus_add(&acpi_root, NULL, ACPI_ROOT_OBJECT, + result = acpi_bus_add(&acpi_root, NULL, ACPI_ROOT_OBJECT, ACPI_BUS_TYPE_SYSTEM); if (result) goto error2; Modified: trunk/reactos/drivers/bus/acpi/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/main.c?re…
============================================================================== --- trunk/reactos/drivers/bus/acpi/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/main.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -270,23 +270,23 @@ */ if (power_button) { - DPRINT1("Fixed power button reported to power manager\n"); + DPRINT("Fixed power button reported to power manager\n"); Caps |= SYS_BUTTON_POWER; } if (sleep_button) { - DPRINT1("Fixed sleep button reported to power manager\n"); + DPRINT("Fixed sleep button reported to power manager\n"); Caps |= SYS_BUTTON_SLEEP; } } else if (wcsstr(((PPDO_DEVICE_DATA)commonData)->HardwareIDs, L"PNP0C0C")) { - DPRINT1("Control method power button reported to power manager\n"); + DPRINT("Control method power button reported to power manager\n"); Caps |= SYS_BUTTON_POWER; } else if (wcsstr(((PPDO_DEVICE_DATA)commonData)->HardwareIDs, L"PNP0C0E")) { - DPRINT1("Control method sleep reported to power manager\n"); + DPRINT("Control method sleep reported to power manager\n"); Caps |= SYS_BUTTON_SLEEP; } else Modified: trunk/reactos/drivers/bus/pci/pdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pci/pdo.c?rev=…
============================================================================== --- trunk/reactos/drivers/bus/pci/pdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pci/pdo.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -14,6 +14,12 @@ #define NDEBUG #include <debug.h> + +#if 0 +#define DBGPRINT(...) DbgPrint(__VA_ARGS__) +#else +#define DBGPRINT(...) +#endif /*** PRIVATE *****************************************************************/ @@ -1266,7 +1272,7 @@ if (RawPartialDesc->Type == CmResourceTypeInterrupt) { - DPRINT1("Assigning IRQ %u to PCI device 0x%x on bus 0x%x\n", + DPRINT("Assigning IRQ %u to PCI device 0x%x on bus 0x%x\n", RawPartialDesc->u.Interrupt.Vector, DeviceExtension->PciDevice->SlotNumber.u.AsULONG, DeviceExtension->PciDevice->BusNumber); @@ -1284,30 +1290,30 @@ Command = 0; - DPRINT1("Enabling command flags for PCI device 0x%x on bus 0x%x: ", + DBGPRINT("pci!PdoStartDevice: Enabling command flags for PCI device 0x%x on bus 0x%x: ", DeviceExtension->PciDevice->SlotNumber.u.AsULONG, DeviceExtension->PciDevice->BusNumber); if (DeviceExtension->PciDevice->EnableBusMaster) { Command |= PCI_ENABLE_BUS_MASTER; - DbgPrint("[Bus master] "); + DBGPRINT("[Bus master] "); } if (DeviceExtension->PciDevice->EnableMemorySpace) { Command |= PCI_ENABLE_MEMORY_SPACE; - DbgPrint("[Memory space enable] "); + DBGPRINT("[Memory space enable] "); } if (DeviceExtension->PciDevice->EnableIoSpace) { Command |= PCI_ENABLE_IO_SPACE; - DbgPrint("[I/O space enable] "); + DBGPRINT("[I/O space enable] "); } if (Command != 0) { - DbgPrint("\n"); + DBGPRINT("\n"); /* OR with the previous value */ Command |= DeviceExtension->PciDevice->PciConfig.Command; Modified: trunk/reactos/drivers/filesystems/fastfat/close.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/close.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/close.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -41,7 +41,7 @@ if (pFcb->Flags & FCB_IS_VOLUME) { - DPRINT1("Volume\n"); + DPRINT("Volume\n"); FileObject->FsContext2 = NULL; } else Modified: trunk/reactos/drivers/filesystems/fastfat/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/create.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -482,7 +482,7 @@ if (FileObject->FileName.Length == 0 && (FileObject->RelatedFileObject == NULL || FileObject->RelatedFileObject->FsContext2 != NULL)) { - DPRINT1("Volume opening\n"); + DPRINT("Volume opening\n"); if (RequestedDisposition != FILE_OPEN && RequestedDisposition != FILE_OPEN_IF) Modified: trunk/reactos/drivers/filesystems/fastfat/fsctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -612,7 +612,7 @@ FsRtlNotifyInitializeSync(&DeviceExt->NotifySync); InitializeListHead(&DeviceExt->NotifyList); - DPRINT1("Mount success\n"); + DPRINT("Mount success\n"); Status = STATUS_SUCCESS; @@ -866,7 +866,7 @@ PFILE_OBJECT FileObject; PDEVICE_EXTENSION DeviceExt; - DPRINT1("VfatLockOrUnlockVolume(%p, %d)\n", IrpContext, Lock); + DPRINT("VfatLockOrUnlockVolume(%p, %d)\n", IrpContext, Lock); DeviceExt = IrpContext->DeviceExt; FileObject = IrpContext->FileObject; @@ -912,7 +912,7 @@ PLIST_ENTRY NextEntry; PVFATFCB Fcb; - DPRINT1("VfatDismountVolume(%p)\n", IrpContext); + DPRINT("VfatDismountVolume(%p)\n", IrpContext); DeviceExt = IrpContext->DeviceExt; Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -160,7 +160,7 @@ { Busy = TRUE; } - else if (Type == NdisWorkItemResetRequested && + else if (Type == NdisWorkItemResetRequested && Adapter->NdisMiniportBlock.ResetStatus == NDIS_STATUS_PENDING) { Busy = TRUE; @@ -340,7 +340,7 @@ &NdisBufferVA, &FirstBufferLength, &TotalBufferLength); - + HeaderSize = NDIS_GET_PACKET_HEADER_SIZE(PacketArray[i]); LookAheadSize = TotalBufferLength - HeaderSize; @@ -352,12 +352,12 @@ KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql); return; } - + CopyBufferChainToBuffer(LookAheadBuffer, NdisBuffer, HeaderSize, LookAheadSize); - + NDIS_DbgPrint(MID_TRACE, ("Indicating packet to protocol's legacy Receive handler\n")); (*AdapterBinding->ProtocolBinding->Chars.ReceiveHandler)( AdapterBinding->NdisOpenBlock.ProtocolBindingContext, @@ -367,7 +367,7 @@ LookAheadBuffer, LookAheadSize, TotalBufferLength - HeaderSize); - + ExFreePool(LookAheadBuffer); } } @@ -506,7 +506,7 @@ Adapter->NdisMiniportBlock.PendingRequest = NULL; KeReleaseSpinLockFromDpcLevel(&Adapter->NdisMiniportBlock.Lock); KeLowerIrql(OldIrql); - + MiniWorkItemComplete(Adapter, NdisWorkItemRequest); } @@ -558,7 +558,7 @@ Status); KeLowerIrql(OldIrql); - + MiniWorkItemComplete(Adapter, NdisWorkItemSend); } @@ -702,7 +702,7 @@ KeAcquireSpinLock(&AdapterListLock, &OldIrql); { CurrentEntry = AdapterListHead.Flink; - + while (CurrentEntry != &AdapterListHead) { Adapter = CONTAINING_RECORD(CurrentEntry, LOGICAL_ADAPTER, ListEntry); @@ -902,7 +902,7 @@ NdisMIndicateStatus(Adapter, NDIS_STATUS_RESET_END, NULL, 0); NdisMIndicateStatusComplete(Adapter); - + MiniWorkItemComplete(Adapter, NdisWorkItemResetRequested); } @@ -2608,11 +2608,11 @@ case 0x00: MinSize = sizeof(NDIS50_MINIPORT_CHARACTERISTICS); break; - + case 0x01: MinSize = sizeof(NDIS51_MINIPORT_CHARACTERISTICS); break; - + default: NDIS_DbgPrint(MIN_TRACE, ("Bad 5.x minor characteristics version.\n")); return NDIS_STATUS_BAD_VERSION; @@ -2624,7 +2624,7 @@ return NDIS_STATUS_BAD_VERSION; } - NDIS_DbgPrint(MIN_TRACE, ("Initializing an NDIS %u.%u miniport\n", + NDIS_DbgPrint(MID_TRACE, ("Initializing an NDIS %u.%u miniport\n", MiniportCharacteristics->MajorNdisVersion, MiniportCharacteristics->MinorNdisVersion)); @@ -2845,7 +2845,7 @@ if (AttributeFlags & NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER) NDIS_DbgPrint(MIN_TRACE, ("Intermediate drivers not supported yet.\n")); - NDIS_DbgPrint(MIN_TRACE, ("Miniport attribute flags: 0x%x\n", AttributeFlags)); + NDIS_DbgPrint(MID_TRACE, ("Miniport attribute flags: 0x%x\n", AttributeFlags)); if (Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.AdapterShutdownHandler) { @@ -3141,7 +3141,7 @@ NDIS_DbgPrint(MIN_TRACE, ("IoCreateDevice failed (%x)\n", Status)); return Status; } - + Status = IoCreateSymbolicLink(SymbolicName, DeviceName); if (!NT_SUCCESS(Status)) Modified: trunk/reactos/drivers/network/ndis/ndis/protocol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/protocol.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/protocol.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -424,7 +424,7 @@ NdisStatus = NDIS_STATUS_PENDING; } } - + if (NdisStatus != NDIS_STATUS_PENDING) { MiniWorkItemComplete(Adapter, NdisWorkItemSend); } @@ -451,7 +451,7 @@ NdisStatus = NDIS_STATUS_PENDING; } } - + if (NdisStatus != NDIS_STATUS_PENDING) { MiniWorkItemComplete(Adapter, NdisWorkItemSend); } @@ -602,7 +602,7 @@ else { if(Adapter->NdisMiniportBlock.Flags & NDIS_ATTRIBUTE_DESERIALIZE) - { + { for (i = 0; i < NumberOfPackets; i++) { NdisStatus = (*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.SendHandler)( @@ -978,14 +978,14 @@ if (!NT_SUCCESS(NtStatus)) { - NDIS_DbgPrint(MIN_TRACE, ("Performing global bind for protocol '%wZ'\n", &ProtocolCharacteristics->Name)); + NDIS_DbgPrint(MID_TRACE, ("Performing global bind for protocol '%wZ'\n", &ProtocolCharacteristics->Name)); KeyInformation = NULL; CurrentEntry = AdapterListHead.Flink; } else { - NDIS_DbgPrint(MIN_TRACE, ("Performing standard bind for protocol '%wZ'\n", &ProtocolCharacteristics->Name)); + NDIS_DbgPrint(MID_TRACE, ("Performing standard bind for protocol '%wZ'\n", &ProtocolCharacteristics->Name)); DataPtr = (WCHAR*)KeyInformation->Data; } @@ -1028,7 +1028,7 @@ /* It wasn't in the global miniport list, so skip the bind entry */ goto next; } - + /* Make sure this device isn't already bound to this protocol */ if (LocateAdapterBindingByName(Protocol, &DeviceName)) { @@ -1074,10 +1074,10 @@ if(BindHandler) { BindHandler(Status, BindContext, &DeviceName, &RegistryPath, 0); - NDIS_DbgPrint(MIN_TRACE, ("%wZ's BindAdapter handler returned 0x%x for %wZ\n", &ProtocolCharacteristics->Name, *Status, &DeviceName)); + NDIS_DbgPrint(MID_TRACE, ("%wZ's BindAdapter handler returned 0x%x for %wZ\n", &ProtocolCharacteristics->Name, *Status, &DeviceName)); } else - NDIS_DbgPrint(MIN_TRACE, ("No protocol bind handler specified\n")); + NDIS_DbgPrint(MID_TRACE, ("No protocol bind handler specified\n")); } next: @@ -1190,7 +1190,7 @@ InitializeListHead(&Protocol->AdapterListHead); - /* We must set this before the call to ndisBindMiniportsToProtocol because the protocol's + /* We must set this before the call to ndisBindMiniportsToProtocol because the protocol's * BindAdapter handler might need it */ *NdisProtocolHandle = Protocol; Modified: trunk/reactos/drivers/usb/usbhub/fdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/fdo.c?r…
============================================================================== --- trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -245,7 +245,7 @@ if (PortStatus.Change & USB_PORT_STATUS_CONNECT) { // - // Clear Port Connect + // Clear Port Connect // Status = ClearPortFeature(RootHubDeviceObject, PortId, C_PORT_CONNECTION); if (!NT_SUCCESS(Status)) @@ -794,7 +794,7 @@ return TRUE; } - if (DeviceDescriptor->bDeviceClass == 0xEF && + if (DeviceDescriptor->bDeviceClass == 0xEF && DeviceDescriptor->bDeviceSubClass == 0x02 && DeviceDescriptor->bDeviceProtocol == 0x01) { @@ -888,7 +888,7 @@ if (DeviceDescriptor->bDeviceClass == 0) { - Index += swprintf(&Buffer[Index], + Index += swprintf(&Buffer[Index], L"USB\\Class_%02x&SubClass_%02x&Prot_%02x", InterfaceDescriptor->bInterfaceClass, InterfaceDescriptor->bInterfaceSubClass, InterfaceDescriptor->bInterfaceProtocol) + 1; Index += swprintf(&Buffer[Index], @@ -900,7 +900,7 @@ } else { - Index += swprintf(&Buffer[Index], + Index += swprintf(&Buffer[Index], L"USB\\Class_%02x&SubClass_%02x&Prot_%02x", DeviceDescriptor->bDeviceClass, DeviceDescriptor->bDeviceSubClass, DeviceDescriptor->bDeviceProtocol) + 1; Index += swprintf(&Buffer[Index], @@ -964,7 +964,7 @@ // Construct HardwareIds // Index = 0; - Index += swprintf(&Buffer[Index], + Index += swprintf(&Buffer[Index], L"USB\\Vid_%04x&Pid_%04x&Rev_%04x", UsbChildExtension->DeviceDesc.idVendor, UsbChildExtension->DeviceDesc.idProduct, UsbChildExtension->DeviceDesc.bcdDevice) + 1; Index += swprintf(&Buffer[Index], @@ -1146,7 +1146,7 @@ RootHubDeviceObject = HubDeviceExtension->RootHubPhysicalDeviceObject; HubInterfaceBusContext = HubDeviceExtension->UsbDInterface.BusContext; // - // Find an empty slot in the child device array + // Find an empty slot in the child device array // for (ChildDeviceCount = 0; ChildDeviceCount < USB_MAXCHILDREN; ChildDeviceCount++) { @@ -1318,7 +1318,7 @@ } // query device details - Status = HubInterface->QueryDeviceInformation(HubInterfaceBusContext, + Status = HubInterface->QueryDeviceInformation(HubInterfaceBusContext, UsbChildExtension->UsbDeviceHandle, &UsbChildExtension->DeviceInformation, sizeof(USB_DEVICE_INFORMATION_0), @@ -1638,13 +1638,13 @@ sizeof(USB_DEVICE_INFORMATION_0), &Result); - DPRINT1("Status %x, Result 0x%08lx\n", Status, Result); - DPRINT1("InformationLevel %x\n", HubDeviceExtension->DeviceInformation.InformationLevel); - DPRINT1("ActualLength %x\n", HubDeviceExtension->DeviceInformation.ActualLength); - DPRINT1("PortNumber %x\n", HubDeviceExtension->DeviceInformation.PortNumber); - DPRINT1("DeviceDescriptor %x\n", HubDeviceExtension->DeviceInformation.DeviceDescriptor); - DPRINT1("HubAddress %x\n", HubDeviceExtension->DeviceInformation.HubAddress); - DPRINT1("NumberofPipes %x\n", HubDeviceExtension->DeviceInformation.NumberOfOpenPipes); + DPRINT("Status %x, Result 0x%08lx\n", Status, Result); + DPRINT("InformationLevel %x\n", HubDeviceExtension->DeviceInformation.InformationLevel); + DPRINT("ActualLength %x\n", HubDeviceExtension->DeviceInformation.ActualLength); + DPRINT("PortNumber %x\n", HubDeviceExtension->DeviceInformation.PortNumber); + DPRINT("DeviceDescriptor %x\n", HubDeviceExtension->DeviceInformation.DeviceDescriptor); + DPRINT("HubAddress %x\n", HubDeviceExtension->DeviceInformation.HubAddress); + DPRINT("NumberofPipes %x\n", HubDeviceExtension->DeviceInformation.NumberOfOpenPipes); // Get Root Hubs Device Descriptor UsbBuildGetDescriptorRequest(Urb, @@ -1737,7 +1737,7 @@ return STATUS_UNSUCCESSFUL; } - DPRINT1("HubDeviceExtension->UsbExtHubInfo.NumberOfPorts %x\n", HubDeviceExtension->UsbExtHubInfo.NumberOfPorts); + DPRINT("HubDeviceExtension->UsbExtHubInfo.NumberOfPorts %x\n", HubDeviceExtension->UsbExtHubInfo.NumberOfPorts); // Build hub descriptor request UsbBuildVendorRequest(Urb, @@ -2222,7 +2222,7 @@ } else { - DPRINT1("UNIMPLEMENTED FdoHandleDeviceControl IoCtl %x InputBufferLength %x OutputBufferLength %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, + DPRINT1("UNIMPLEMENTED FdoHandleDeviceControl IoCtl %x InputBufferLength %x OutputBufferLength %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength, IoStack->Parameters.DeviceIoControl.OutputBufferLength); } Modified: trunk/reactos/drivers/usb/usbohci/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbohci/hardwa…
============================================================================== --- trunk/reactos/drivers/usb/usbohci/hardware.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbohci/hardware.cpp [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -178,7 +178,7 @@ // // store device objects - // + // m_DriverObject = DriverObject; m_FunctionalDeviceObject = FunctionalDeviceObject; m_PhysicalDeviceObject = PhysicalDeviceObject; @@ -289,7 +289,7 @@ } // - // Get controllers capabilities + // Get controllers capabilities // Version = READ_REGISTER_ULONG((PULONG)((ULONG_PTR)ResourceBase + OHCI_REVISION_OFFSET)); @@ -380,7 +380,7 @@ // // Start the controller // - DPRINT1("Starting Controller\n"); + DPRINT("Starting Controller\n"); Status = StartController(); // @@ -503,7 +503,7 @@ // break; } - } + } // // if the ownership is still not changed, perform reset @@ -521,17 +521,17 @@ // // read contents of control register // - + Control = (READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_CONTROL_OFFSET)) & OHCI_HC_FUNCTIONAL_STATE_MASK); - DPRINT1("Controller State %x\n", Control); - + DPRINT("Controller State %x\n", Control); + switch (Control) { case OHCI_HC_FUNCTIONAL_STATE_RESET: NewControl |= OHCI_HC_FUNCTIONAL_STATE_RESET; WaitInMs = 50; break; - + case OHCI_HC_FUNCTIONAL_STATE_SUSPEND: case OHCI_HC_FUNCTIONAL_STATE_RESUME: NewControl |= OHCI_HC_FUNCTIONAL_STATE_RESUME; @@ -555,13 +555,13 @@ // delay is 100 ms // Timeout.QuadPart = WaitInMs; - DPRINT1("Waiting %lu milliseconds for controller to transition state\n", Timeout.LowPart); - + DPRINT("Waiting %lu milliseconds for controller to transition state\n", Timeout.LowPart); + // // convert to 100 ns units (absolute) // Timeout.QuadPart *= -10000; - + // // perform the wait // @@ -617,9 +617,9 @@ FrameInterval = ((FrameInterval & OHCI_FRAME_INTERVAL_TOGGLE) ^ OHCI_FRAME_INTERVAL_TOGGLE); - DPRINT1("FrameInterval %x IntervalValue %x\n", FrameInterval, m_IntervalValue); + DPRINT("FrameInterval %x IntervalValue %x\n", FrameInterval, m_IntervalValue); FrameInterval |= OHCI_FSMPS(m_IntervalValue) | m_IntervalValue; - DPRINT1("Computed FrameInterval %x\n", FrameInterval); + DPRINT("Computed FrameInterval %x\n", FrameInterval); // // write frame interval @@ -627,17 +627,17 @@ WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_FRAME_INTERVAL_OFFSET), FrameInterval); FrameInterval = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_FRAME_INTERVAL_OFFSET)); - DPRINT1("Read FrameInterval %x\n", FrameInterval); + DPRINT("Read FrameInterval %x\n", FrameInterval); // // 90 % periodic // Periodic = OHCI_PERIODIC(m_IntervalValue); WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_PERIODIC_START_OFFSET), Periodic); - DPRINT1("Computed Periodic Start %x\n", Periodic); + DPRINT("Computed Periodic Start %x\n", Periodic); Periodic = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_PERIODIC_START_OFFSET)); - DPRINT1("Read Periodic Start %x\n", Periodic); + DPRINT("Read Periodic Start %x\n", Periodic); // Linux does this hack for some bad controllers if (!(FrameInterval & 0x3FFF0000) || @@ -680,7 +680,7 @@ m_NumberOfPorts = OHCI_RH_GET_PORT_COUNT(Descriptor); } while (m_NumberOfPorts == 0); - DPRINT1("NumberOfPorts %lu\n", m_NumberOfPorts); + DPRINT("NumberOfPorts %lu\n", m_NumberOfPorts); ASSERT(m_NumberOfPorts < OHCI_MAX_PORT_COUNT); // @@ -701,7 +701,7 @@ // // write the configuration back // - DPRINT1("Descriptor A: %x\n", Descriptor); + DPRINT("Descriptor A: %x\n", Descriptor); WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_DESCRIPTOR_A_OFFSET), Descriptor); // @@ -720,7 +720,7 @@ // // write the configuration back // - DPRINT1("Descriptor B: %x\n", Descriptor); + DPRINT("Descriptor B: %x\n", Descriptor); WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_DESCRIPTOR_B_OFFSET), Descriptor); // @@ -730,7 +730,7 @@ KeStallExecutionProcessor(10); Control = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_HCCA_OFFSET)); ASSERT((m_HCCAPhysicalAddress.LowPart & Control) == m_HCCAPhysicalAddress.LowPart); - DPRINT1("HCCA: %x Alignment mask: %x\n", m_HCCAPhysicalAddress.LowPart, Control); + DPRINT("HCCA: %x Alignment mask: %x\n", m_HCCAPhysicalAddress.LowPart, Control); // // write address of HCCA @@ -770,12 +770,12 @@ // ASSERT((Control & OHCI_HC_FUNCTIONAL_STATE_MASK) == OHCI_HC_FUNCTIONAL_STATE_OPERATIONAL); ASSERT((Control & OHCI_ENABLE_LIST) == OHCI_ENABLE_LIST); - DPRINT1("Control %x\n", Control); + DPRINT("Control %x\n", Control); // // done // - DPRINT1("OHCI controller is operational\n"); + DPRINT("OHCI controller is operational\n"); return STATUS_SUCCESS; } @@ -1152,7 +1152,7 @@ // // re-enable root hub change // - DPRINT1("Enabling status change\n"); + DPRINT("Enabling status change\n"); WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_INTERRUPT_ENABLE_OFFSET), OHCI_ROOT_HUB_STATUS_CHANGE); return STATUS_SUCCESS; @@ -1206,7 +1206,7 @@ // delay is multiplied by 2 ms // Timeout.QuadPart *= 2; - DPRINT1("Waiting %lu milliseconds for port power up\n", Timeout.LowPart); + DPRINT("Waiting %lu milliseconds for port power up\n", Timeout.LowPart); // // convert to 100 ns units (absolute) @@ -1322,9 +1322,9 @@ // the interrupt was not caused by DoneHead update // check if something important happened // - DPRINT("InterruptStatus %x InterruptEnable %x\n", READ_REGISTER_ULONG((PULONG)((PUCHAR)This->m_Base + OHCI_INTERRUPT_STATUS_OFFSET)), + DPRINT("InterruptStatus %x InterruptEnable %x\n", READ_REGISTER_ULONG((PULONG)((PUCHAR)This->m_Base + OHCI_INTERRUPT_STATUS_OFFSET)), READ_REGISTER_ULONG((PULONG)((PUCHAR)This->m_Base + OHCI_INTERRUPT_ENABLE_OFFSET))); - Status = READ_REGISTER_ULONG((PULONG)((PUCHAR)This->m_Base + OHCI_INTERRUPT_STATUS_OFFSET)) & READ_REGISTER_ULONG((PULONG)((PUCHAR)This->m_Base + OHCI_INTERRUPT_ENABLE_OFFSET)) & (~OHCI_WRITEBACK_DONE_HEAD); + Status = READ_REGISTER_ULONG((PULONG)((PUCHAR)This->m_Base + OHCI_INTERRUPT_STATUS_OFFSET)) & READ_REGISTER_ULONG((PULONG)((PUCHAR)This->m_Base + OHCI_INTERRUPT_ENABLE_OFFSET)) & (~OHCI_WRITEBACK_DONE_HEAD); if (Status == 0) { // @@ -1387,7 +1387,7 @@ WRITE_REGISTER_ULONG((PULONG)((PUCHAR)This->m_Base + OHCI_CONTROL_OFFSET), OHCI_HC_FUNCTIONAL_STATE_RESET); } - if (Status & OHCI_ROOT_HUB_STATUS_CHANGE) + if (Status & OHCI_ROOT_HUB_STATUS_CHANGE) { // // disable interrupt as it will fire untill the port has been reset Modified: trunk/reactos/hal/halx86/acpi/halpnpdd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/acpi/halpnpdd.c…
============================================================================== --- trunk/reactos/hal/halx86/acpi/halpnpdd.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/acpi/halpnpdd.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -822,7 +822,7 @@ HalpDispatchPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - DPRINT1("HAL: PnP Driver Power!\n"); + DPRINT("HAL: PnP Driver Power!\n"); return STATUS_SUCCESS; } Modified: trunk/reactos/hal/halx86/legacy/halpnpdd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/halpnpdd…
============================================================================== --- trunk/reactos/hal/halx86/legacy/halpnpdd.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/legacy/halpnpdd.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -713,14 +713,14 @@ case IRP_MN_START_DEVICE: /* We only care about a PCI PDO */ - DPRINT1("Start device received\n"); + DPRINT("Start device received\n"); /* Complete the IRP normally */ break; case IRP_MN_REMOVE_DEVICE: /* Check if this is a PCI device */ - DPRINT1("Remove device received\n"); + DPRINT("Remove device received\n"); /* We're done */ Status = STATUS_SUCCESS; @@ -729,7 +729,7 @@ case IRP_MN_SURPRISE_REMOVAL: /* Inherit whatever status we had */ - DPRINT1("Surprise removal IRP\n"); + DPRINT("Surprise removal IRP\n"); Status = Irp->IoStatus.Status; break; @@ -790,7 +790,7 @@ default: /* We don't handle anything else, so inherit the old state */ - DPRINT("Illegal IRP: %lx\n", Minor); + DPRINT1("Illegal IRP: %lx\n", Minor); Status = Irp->IoStatus.Status; break; } Modified: trunk/reactos/lib/cmlib/hivewrt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivewrt.c?rev=65…
============================================================================== --- trunk/reactos/lib/cmlib/hivewrt.c [iso-8859-1] (original) +++ trunk/reactos/lib/cmlib/hivewrt.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -22,8 +22,12 @@ ULONG LastIndex; PVOID BlockPtr; BOOLEAN Success; - - UNIMPLEMENTED; + static ULONG PrintCount = 0; + + if (PrintCount++ == 0) + { + UNIMPLEMENTED; + } return TRUE; ASSERT(RegistryHive->ReadOnly == FALSE); Modified: trunk/reactos/lib/drivers/libusb/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/libusb/hub_con…
============================================================================== --- trunk/reactos/lib/drivers/libusb/hub_controller.cpp [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/libusb/hub_controller.cpp [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -312,7 +312,7 @@ // Get the number of ports and check each one for device connected // m_Hardware->GetDeviceDetails(NULL, NULL, &PortCount, NULL); - DPRINT1("[%s] SCE Request %p TransferBufferLength %lu Flags %x MDL %p\n", m_USBType, Urb->UrbBulkOrInterruptTransfer.TransferBuffer, Urb->UrbBulkOrInterruptTransfer.TransferBufferLength, Urb->UrbBulkOrInterruptTransfer.TransferFlags, Urb->UrbBulkOrInterruptTransfer.TransferBufferMDL); + DPRINT("[%s] SCE Request %p TransferBufferLength %lu Flags %x MDL %p\n", m_USBType, Urb->UrbBulkOrInterruptTransfer.TransferBuffer, Urb->UrbBulkOrInterruptTransfer.TransferBufferLength, Urb->UrbBulkOrInterruptTransfer.TransferFlags, Urb->UrbBulkOrInterruptTransfer.TransferBufferMDL); TransferBuffer = (PUCHAR)Urb->UrbBulkOrInterruptTransfer.TransferBuffer; @@ -323,7 +323,7 @@ { m_Hardware->GetPortStatus(PortId, &PortStatus, &PortChange); - DPRINT1("[%s] Port %d: Status %x, Change %x\n", m_USBType, PortId, PortStatus, PortChange); + DPRINT("[%s] Port %d: Status %x, Change %x\n", m_USBType, PortId, PortStatus, PortChange); // @@ -3935,7 +3935,7 @@ } } - DPRINT1("CHubController::CreatePDO: DeviceName %wZ\n", &DeviceName); + DPRINT("CHubController::CreatePDO: DeviceName %wZ\n", &DeviceName); // // fixup device stack voodoo part #1 Modified: trunk/reactos/lib/drivers/libusb/libusb.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/libusb/libusb.…
============================================================================== --- trunk/reactos/lib/drivers/libusb/libusb.cpp [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/libusb/libusb.cpp [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -30,7 +30,7 @@ NTSTATUS Status; PHCDCONTROLLER HcdController; - DPRINT1("USBLIB_AddDevice\n"); + DPRINT("USBLIB_AddDevice\n"); /* first create the controller object */ Status = CreateHCDController(&HcdController); @@ -67,7 +67,7 @@ NTSTATUS NTAPI USBLIB_Dispatch( - PDEVICE_OBJECT DeviceObject, + PDEVICE_OBJECT DeviceObject, PIRP Irp) { PCOMMON_DEVICE_EXTENSION DeviceExtension; @@ -137,4 +137,4 @@ return Status; } -} +} Modified: trunk/reactos/lib/lsalib/lsa.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/lsalib/lsa.c?rev=65181…
============================================================================== --- trunk/reactos/lib/lsalib/lsa.c [iso-8859-1] (original) +++ trunk/reactos/lib/lsalib/lsa.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -36,7 +36,7 @@ LSA_API_MSG ApiMessage; NTSTATUS Status; - DPRINT1("LsaDeregisterLogonProcess()\n"); + DPRINT("LsaDeregisterLogonProcess()\n"); ApiMessage.ApiNumber = LSASS_REQUEST_DEREGISTER_LOGON_PROCESS; ApiMessage.h.u1.s1.DataLength = LSA_PORT_DATA_SIZE(ApiMessage.DeregisterLogonProcess); @@ -60,7 +60,7 @@ NtClose(LsaHandle); - DPRINT1("LsaDeregisterLogonProcess() done (Status 0x%08lx)\n", Status); + DPRINT("LsaDeregisterLogonProcess() done (Status 0x%08lx)\n", Status); return Status; } @@ -79,7 +79,7 @@ ULONG ConnectInfoLength = sizeof(ConnectInfo); NTSTATUS Status; - DPRINT1("LsaConnectUntrusted(%p)\n", LsaHandle); + DPRINT("LsaConnectUntrusted(%p)\n", LsaHandle); RtlInitUnicodeString(&PortName, L"\\LsaAuthenticationPort"); @@ -311,7 +311,7 @@ ULONG ConnectInfoLength = sizeof(ConnectInfo); NTSTATUS Status; - DPRINT1("LsaRegisterLogonProcess()\n"); + DPRINT("LsaRegisterLogonProcess()\n"); /* Check the logon process name length */ if (LsaLogonProcessName->Length > LSASS_MAX_LOGON_PROCESS_NAME_LENGTH) Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=651…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -668,52 +668,52 @@ DPRINT1("Executive: Event Pair initialization failed\n"); return FALSE; } - + /* Initialize mutants */ if (ExpInitializeMutantImplementation() == FALSE) { DPRINT1("Executive: Mutant initialization failed\n"); return FALSE; } - + /* Initialize callbacks */ if (ExpInitializeCallbacks() == FALSE) { DPRINT1("Executive: Callback initialization failed\n"); return FALSE; } - + /* Initialize semaphores */ if (ExpInitializeSemaphoreImplementation() == FALSE) { DPRINT1("Executive: Semaphore initialization failed\n"); return FALSE; } - + /* Initialize timers */ if (ExpInitializeTimerImplementation() == FALSE) { DPRINT1("Executive: Timer initialization failed\n"); return FALSE; } - + /* Initialize profiling */ if (ExpInitializeProfileImplementation() == FALSE) { DPRINT1("Executive: Profile initialization failed\n"); return FALSE; } - + /* Initialize UUIDs */ ExpInitUuids(); - + /* Initialize keyed events */ if (ExpInitializeKeyedEventImplementation() == FALSE) { DPRINT1("Executive: Keyed event initialization failed\n"); return FALSE; } - + /* Initialize Win32K */ if (ExpWin32kInit() == FALSE) { @@ -1956,7 +1956,7 @@ InbvEnableDisplayString(TRUE); /* Launch initial process */ - DPRINT1("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); + DPRINT("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); ProcessInfo = &InitBuffer->ProcessInfo; ExpLoadInitialProcess(InitBuffer, &ProcessParameters, &Environment); @@ -1998,7 +1998,7 @@ /* Free the boot buffer */ ExFreePoolWithTag(InitBuffer, TAG_INIT); - DPRINT1("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); + DPRINT("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); } VOID Modified: trunk/reactos/ntoskrnl/ex/shutdown.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/shutdown.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/shutdown.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/shutdown.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -10,6 +10,8 @@ /* INCLUDES *****************************************************************/ #include <ntoskrnl.h> + +#define NDEBUG #include <debug.h> /* FUNCTIONS *****************************************************************/ @@ -22,7 +24,7 @@ NtShutdownSystem(IN SHUTDOWN_ACTION Action) { POWER_ACTION PowerAction; - + /* Convert to power action */ if (Action == ShutdownNoReboot) { @@ -40,9 +42,9 @@ { return STATUS_INVALID_PARAMETER; } - + /* Now call the power manager */ - DPRINT1("Setting state to: %lx\n", PowerAction); + DPRINT("Setting state to: %lx\n", PowerAction); return NtSetSystemPowerState(PowerAction, PowerSystemSleeping3, POWER_ACTION_OVERRIDE_APPS | Modified: trunk/reactos/ntoskrnl/io/iomgr/arcname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/arcname.…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/arcname.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/arcname.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -383,7 +383,7 @@ /* Create symbolic link */ IoAssignArcName(&ArcNameStringW, &DeviceStringW); RtlFreeUnicodeString(&ArcNameStringW); - DPRINT1("Boot device found\n"); + DPRINT("Boot device found\n"); } /* And quit, whatever happens */ Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -390,7 +390,7 @@ continue; } - DPRINT1("Installed service '%S' for critical device '%wZ'\n", PartialInfo->Data, &ChildIdNameU); + DPRINT("Installed service '%S' for critical device '%wZ'\n", PartialInfo->Data, &ChildIdNameU); } else { @@ -3212,7 +3212,7 @@ DPRINT1("ZwOpenKey(%wZ) failed with status 0x%08lx\n", &KeyPathU, Status); } - DPRINT1("Firmware mapper is %s\n", KeyValue != 0 ? "disabled" : "enabled"); + DPRINT("Firmware mapper is %s\n", KeyValue != 0 ? "disabled" : "enabled"); return (KeyValue != 0) ? TRUE : FALSE; } Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnprepo…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -350,7 +350,7 @@ IopQueueTargetDeviceEvent(&GUID_DEVICE_ARRIVAL, &DeviceNode->InstancePath); - DPRINT1("Reported device: %S (%wZ)\n", HardwareId, &DeviceNode->InstancePath); + DPRINT("Reported device: %S (%wZ)\n", HardwareId, &DeviceNode->InstancePath); /* Return the PDO */ if (DeviceObject) *DeviceObject = Pdo; Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpres.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -132,11 +132,12 @@ } else { - DPRINT1("Satisfying port requirement with 0x%I64x (length: 0x%x)\n", Start, CmDesc->u.Port.Length); + DPRINT("Satisfying port requirement with 0x%I64x (length: 0x%x)\n", Start, CmDesc->u.Port.Length); return TRUE; } } + DPRINT1("IopFindPortResource failed!\n"); return FALSE; } Modified: trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/zeropage.…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/zeropage.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -47,7 +47,7 @@ /* Get the discardable sections to free them */ MiFindInitializationCode(&StartAddress, &EndAddress); if (StartAddress) MiFreeInitializationCode(StartAddress, EndAddress); - DPRINT1("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); + DPRINT("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); /* Set our priority to 0 */ Thread->BasePriority = 0; Modified: trunk/reactos/ntoskrnl/po/poshtdwn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/po/poshtdwn.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/po/poshtdwn.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/po/poshtdwn.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -191,7 +191,7 @@ /* Note should notify caller of NtPowerInformation(PowerShutdownNotification) */ /* Unload symbols */ - DPRINT1("It's the final countdown...%lx\n", SystemAction); + DPRINT("It's the final countdown...%lx\n", SystemAction); DbgUnLoadImageSymbols(NULL, (PVOID)-1, 0); /* Run the thread on the boot processor */ @@ -264,15 +264,15 @@ } /* First, the HAL handles any "end of boot" special functionality */ - DPRINT1("HAL shutting down\n"); + DPRINT("HAL shutting down\n"); HalEndOfBoot(); /* In this step, the I/O manager does first-chance shutdown notification */ - DPRINT1("I/O manager shutting down in phase 0\n"); + DPRINT("I/O manager shutting down in phase 0\n"); IoShutdownSystem(0); /* In this step, all workers are killed and hives are flushed */ - DPRINT1("Configuration Manager shutting down\n"); + DPRINT("Configuration Manager shutting down\n"); CmShutdownSystem(); /* Note that modified pages should be written here (MiShutdownSystem) */ @@ -283,18 +283,18 @@ #endif /* In this step, the I/O manager does last-chance shutdown notification */ - DPRINT1("I/O manager shutting down in phase 1\n"); + DPRINT("I/O manager shutting down in phase 1\n"); IoShutdownSystem(1); CcWaitForCurrentLazyWriterActivity(); /* Note that here, we should broadcast the power IRP to devices */ /* In this step, the HAL disables any wake timers */ - DPRINT1("Disabling wake timers\n"); + DPRINT("Disabling wake timers\n"); HalSetWakeEnable(FALSE); /* And finally the power request is sent */ - DPRINT1("Taking the system down\n"); + DPRINT("Taking the system down\n"); PopShutdownSystem(PopAction.Action); } Modified: trunk/reactos/ntoskrnl/po/povolume.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/po/povolume.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/po/povolume.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/po/povolume.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -20,7 +20,7 @@ LONG Count; KEVENT Wait; } POP_FLUSH_VOLUME, *PPOP_FLUSH_VOLUME; - + ULONG PopFlushPolicy = 0; KGUARDED_MUTEX PopVolumeLock; @@ -56,7 +56,7 @@ /* Make sure only one caller can assign dope to a device */ KeAcquireSpinLock(&PopDopeGlobalLock, &OldIrql); - + /* Make sure the device still has no dope */ if (!DeviceExtension->Dope) { @@ -67,7 +67,7 @@ /* Allow other dope transactions now */ KeReleaseSpinLock(&PopDopeGlobalLock, OldIrql); - + /* Check if someone other than us already assigned the dope, so free ours */ if (Dope) ExFreePoolWithTag(Dope, 'Dope'); @@ -92,7 +92,7 @@ /* Add this volume into the list of power-manager volumes */ if (!Dope->Volume.Flink) InsertTailList(&PopVolumeDevices, &Dope->Volume); - + /* Allow flushes to go through */ KeReleaseGuardedMutex(&PopVolumeLock); } @@ -167,10 +167,10 @@ /* Grab the next (ie: current) entry and remove it */ NextEntry = FlushContext->List.Flink; RemoveEntryList(NextEntry); - + /* Add it back on the volume list */ InsertTailList(&PopVolumeDevices, NextEntry); - + /* Done touching the volume list */ KeReleaseGuardedMutex(&PopVolumeLock); @@ -185,7 +185,7 @@ if ((NT_SUCCESS(Status)) && (NameInfo->Name.Buffer)) { /* Open the volume */ - DPRINT1("Opening: %wZ\n", &NameInfo->Name); + DPRINT("Opening: %wZ\n", &NameInfo->Name); InitializeObjectAttributes(&ObjectAttributes, &NameInfo->Name, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, @@ -205,7 +205,7 @@ if (NT_SUCCESS(Status)) { /* Flush it and close it */ - DPRINT1("Sending flush to: %p\n", VolumeHandle); + DPRINT("Sending flush to: %p\n", VolumeHandle); ZwFlushBuffersFile(VolumeHandle, &IoStatusBlock); ZwClose(VolumeHandle); } @@ -232,7 +232,7 @@ OBJECT_ATTRIBUTES ObjectAttributes; HANDLE RegistryHandle; PLIST_ENTRY NextEntry; - PDEVICE_OBJECT_POWER_EXTENSION Dope; + PDEVICE_OBJECT_POWER_EXTENSION Dope; ULONG VolumeCount = 0; NTSTATUS Status; HANDLE ThreadHandle; @@ -247,7 +247,7 @@ if ((FlushPolicy & 1)) { /* Registry flush requested, so open it */ - DPRINT1("Opening registry\n"); + DPRINT("Opening registry\n"); InitializeObjectAttributes(&ObjectAttributes, &RegistryName, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, @@ -257,7 +257,7 @@ if (NT_SUCCESS(Status)) { /* Flush the registry */ - DPRINT1("Flushing registry\n"); + DPRINT("Flushing registry\n"); ZwFlushKey(RegistryHandle); ZwClose(RegistryHandle); } @@ -265,14 +265,14 @@ /* Serialize with other flushes */ KeAcquireGuardedMutex(&PopVolumeLock); - + /* Scan the volume list */ NextEntry = PopVolumeDevices.Flink; while (NextEntry != &PopVolumeDevices) { /* Get the dope from the link */ Dope = CONTAINING_RECORD(NextEntry, DEVICE_OBJECT_POWER_EXTENSION, Volume); - + /* Grab the next entry now, since we'll be modifying the list */ NextEntry = NextEntry->Flink; @@ -290,7 +290,7 @@ /* Remove it from the dope and add it to the flush context list */ RemoveEntryList(&Dope->Volume); InsertTailList(&FlushContext.List, &Dope->Volume); - + /* Next */ VolumeCount++; } @@ -321,13 +321,13 @@ /* We will ourselves become a flusher thread */ FlushContext.Count = 1; ThreadCount--; - + /* Look for any extra ones we might need */ while (ThreadCount > 0) { /* Create a new one */ ThreadCount--; - DPRINT1("Creating flush thread\n"); + DPRINT("Creating flush thread\n"); Status = PsCreateSystemThread(&ThreadHandle, THREAD_ALL_ACCESS, &ObjectAttributes, @@ -347,13 +347,13 @@ KeReleaseGuardedMutex(&PopVolumeLock); /* Enter the flush work */ - DPRINT1("Local flush\n"); + DPRINT("Local flush\n"); PopFlushVolumeWorker(&FlushContext); - + /* Wait for all flushes to be over */ - DPRINT1("Waiting for flushes\n"); + DPRINT("Waiting for flushes\n"); KeWaitForSingleObject(&FlushContext.Wait, Executive, KernelMode, FALSE, NULL); - DPRINT1("Flushes have completed\n"); + DPRINT("Flushes have completed\n"); } VOID Modified: trunk/reactos/ntoskrnl/po/power.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/po/power.c?rev=65…
============================================================================== --- trunk/reactos/ntoskrnl/po/power.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/po/power.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -46,10 +46,10 @@ { PIO_STACK_LOCATION Stack; PREQUEST_POWER_ITEM RequestPowerItem; - + Stack = IoGetNextIrpStackLocation(Irp); RequestPowerItem = (PREQUEST_POWER_ITEM)Context; - + RequestPowerItem->CompletionRoutine(DeviceObject, Stack->MinorFunction, RequestPowerItem->PowerState, @@ -161,12 +161,12 @@ { PPOWER_STATE_TRAVERSE_CONTEXT PowerStateContext = Context; NTSTATUS Status; - + DPRINT("PopQuerySystemPowerStateTraverse(%p, %p)\n", DeviceNode, Context); - + if (DeviceNode == IopRootDeviceNode) return STATUS_SUCCESS; - + if (DeviceNode->Flags & DNF_LEGACY_DRIVER) return STATUS_SUCCESS; @@ -177,7 +177,7 @@ { DPRINT1("Device '%wZ' failed IRP_MN_QUERY_POWER\n", &DeviceNode->InstancePath); } - + #if 0 return Status; #else @@ -191,15 +191,15 @@ { PPOWER_STATE_TRAVERSE_CONTEXT PowerStateContext = Context; NTSTATUS Status; - + DPRINT("PopSetSystemPowerStateTraverse(%p, %p)\n", DeviceNode, Context); - + if (DeviceNode == IopRootDeviceNode) return STATUS_SUCCESS; - + if (DeviceNode->PhysicalDeviceObject == PowerStateContext->PowerDevice) return STATUS_SUCCESS; - + if (DeviceNode->Flags & DNF_LEGACY_DRIVER) return STATUS_SUCCESS; @@ -210,7 +210,7 @@ { DPRINT1("Device '%wZ' failed IRP_MN_SET_POWER\n", &DeviceNode->InstancePath); } - + #if 0 return Status; #else @@ -227,7 +227,7 @@ NTSTATUS Status; DEVICETREE_TRAVERSE_CONTEXT Context; POWER_STATE_TRAVERSE_CONTEXT PowerContext; - + Status = IopGetSystemPowerDeviceObject(&DeviceObject); if (!NT_SUCCESS(Status)) { @@ -243,34 +243,34 @@ return STATUS_UNSUCCESSFUL; } } - + /* Set up context */ PowerContext.PowerAction = PowerAction; PowerContext.SystemPowerState = PowerState; PowerContext.PowerDevice = Fdo; - + /* Query for system power change */ IopInitDeviceTreeTraverseContext(&Context, IopRootDeviceNode, PopQuerySystemPowerStateTraverse, &PowerContext); - + Status = IopTraverseDeviceTree(&Context); if (!NT_SUCCESS(Status)) { DPRINT1("Query system power state failed; changing state anyway\n"); } - + /* Set system power change */ IopInitDeviceTreeTraverseContext(&Context, IopRootDeviceNode, PopSetSystemPowerStateTraverse, &PowerContext); - + IopTraverseDeviceTree(&Context); if (!PopAcpiPresent) return STATUS_NOT_IMPLEMENTED; - + if (Fdo != NULL) { if (PowerAction != PowerActionShutdownReset) @@ -303,7 +303,7 @@ PopAddRemoveSysCapsCallback, NULL, &NotificationEntry); - + /* Register lid notification */ IoRegisterPlugPlayNotification(EventCategoryDeviceInterfaceChange, PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES, @@ -336,11 +336,11 @@ PopAcpiPresent = KeLoaderBlock->Extension->AcpiTable != NULL ? TRUE : FALSE; } - + /* Initialize volume support */ InitializeListHead(&PopVolumeDevices); KeInitializeGuardedMutex(&PopVolumeLock); - + /* Initialize support for dope */ KeInitializeSpinLock(&PopDopeGlobalLock); @@ -522,19 +522,19 @@ PIO_STACK_LOCATION Stack; PIRP Irp; PREQUEST_POWER_ITEM RequestPowerItem; - + if (MinorFunction != IRP_MN_QUERY_POWER && MinorFunction != IRP_MN_SET_POWER && MinorFunction != IRP_MN_WAIT_WAKE) return STATUS_INVALID_PARAMETER_2; - + RequestPowerItem = ExAllocatePool(NonPagedPool, sizeof(REQUEST_POWER_ITEM)); if (!RequestPowerItem) return STATUS_INSUFFICIENT_RESOURCES; - + /* Always call the top of the device stack */ TopDeviceObject = IoGetAttachedDeviceReference(DeviceObject); - + Irp = IoBuildAsynchronousFsdRequest(IRP_MJ_POWER, TopDeviceObject, NULL, @@ -547,12 +547,12 @@ ExFreePool(RequestPowerItem); return STATUS_INSUFFICIENT_RESOURCES; } - + /* POWER IRPs are always initialized with a status code of STATUS_NOT_IMPLEMENTED */ Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; Irp->IoStatus.Information = 0; - + Stack = IoGetNextIrpStackLocation(Irp); Stack->MinorFunction = MinorFunction; if (MinorFunction == IRP_MN_WAIT_WAKE) @@ -562,18 +562,18 @@ Stack->Parameters.Power.Type = DevicePowerState; Stack->Parameters.Power.State = PowerState; } - + RequestPowerItem->CompletionRoutine = CompletionFunction; RequestPowerItem->PowerState = PowerState; RequestPowerItem->Context = Context; RequestPowerItem->TopDeviceObject = TopDeviceObject; - + if (pIrp != NULL) *pIrp = Irp; - + IoSetCompletionRoutine(Irp, PopRequestPowerIrpCompletion, RequestPowerItem, TRUE, TRUE, TRUE); PoCallDriver(TopDeviceObject, Irp); - + /* Always return STATUS_PENDING. The completion routine * will call CompletionFunction and complete the Irp. */ @@ -663,7 +663,7 @@ PowerInformationLevel, InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength); - + switch (PowerInformationLevel) { case SystemBatteryState: @@ -841,7 +841,7 @@ if (SystemAction == PowerActionShutdown) PopReadShutdownPolicy(); /* Disable lazy flushing of registry */ - DPRINT1("Stopping lazy flush\n"); + DPRINT("Stopping lazy flush\n"); CmSetLazyFlushState(FALSE); /* Setup the power action */ @@ -849,13 +849,13 @@ Action.Flags = Flags; /* Notify callbacks */ - DPRINT1("Notifying callbacks\n"); + DPRINT("Notifying callbacks\n"); ExNotifyCallback(PowerStateCallback, (PVOID)3, NULL); - + /* Swap in any worker thread stacks */ - DPRINT1("Swapping worker threads\n"); + DPRINT("Swapping worker threads\n"); ExSwapinWorkerThreads(FALSE); - + /* Make our action global */ PopAction = Action; @@ -884,7 +884,7 @@ /* Check if we're still in an invalid status */ if (!NT_SUCCESS(Status)) break; - + #ifndef NEWCC /* Flush dirty cache pages */ CcRosFlushDirtyPages(-1, &Dummy, FALSE); //HACK: We really should wait here! @@ -893,14 +893,14 @@ #endif /* Flush all volumes and the registry */ - DPRINT1("Flushing volumes, cache flushed %lu pages\n", Dummy); + DPRINT("Flushing volumes, cache flushed %lu pages\n", Dummy); PopFlushVolumes(PopAction.Shutdown); /* Set IRP for drivers */ PopAction.IrpMinor = IRP_MN_SET_POWER; if (PopAction.Shutdown) { - DPRINT1("Queueing shutdown thread\n"); + DPRINT("Queueing shutdown thread\n"); /* Check if we are running in the system context */ if (PsGetCurrentProcess() != PsInitialSystemProcess) { @@ -910,7 +910,7 @@ NULL); ExQueueWorkItem(&PopShutdownWorkItem, CriticalWorkQueue); - + /* Spend us -- when we wake up, the system is good to go down */ KeSuspendThread(KeGetCurrentThread()); Status = STATUS_SYSTEM_SHUTDOWN; @@ -923,7 +923,7 @@ PopGracefulShutdown(NULL); } } - + /* You should not have made it this far */ ASSERTMSG("System is still up and running?!", FALSE); break; Modified: trunk/reactos/subsystems/win32/csrsrv/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrsrv/in…
============================================================================== --- trunk/reactos/subsystems/win32/csrsrv/init.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/csrsrv/init.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -576,7 +576,7 @@ ParameterValue = NULL; ParameterValue = strchr(ParameterName, '='); if (ParameterValue) *ParameterValue++ = ANSI_NULL; - DPRINT1("Name=%s, Value=%s\n", ParameterName, ParameterValue); + DPRINT("Name=%s, Value=%s\n", ParameterName, ParameterValue); /* Check for Object Directory */ if (_stricmp(ParameterName, "ObjectDirectory") == 0) Modified: trunk/reactos/win32ss/drivers/videoprt/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/r…
============================================================================== --- trunk/reactos/win32ss/drivers/videoprt/registry.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/drivers/videoprt/registry.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -633,8 +633,8 @@ RtlAppendUnicodeToString(DeviceRegistryPath, Insert2); } - DbgPrint("Formatted registry key '%wZ' -> '%wZ'\n", - DriverRegistryPath, DeviceRegistryPath); + DPRINT("Formatted registry key '%wZ' -> '%wZ'\n", + DriverRegistryPath, DeviceRegistryPath); return STATUS_SUCCESS; } Modified: trunk/reactos/win32ss/user/ntuser/desktop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/deskto…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -473,7 +473,7 @@ } else { - ERR("Got handle: %p\n", Ret); + TRACE("Got handle: %p\n", Ret); } return Ret; Modified: trunk/reactos/win32ss/user/ntuser/display.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/displa…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/display.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/display.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -75,8 +75,8 @@ DEVMODEW dmDefault; DWORD dwVga; - ERR("InitDisplayDriver(%S, %S);\n", - pwszDeviceName, pwszRegKey); + TRACE("InitDisplayDriver(%S, %S);\n", + pwszDeviceName, pwszRegKey); /* Open the driver's registry key */ Status = RegOpenKey(pwszRegKey, &hkey); Modified: trunk/reactos/win32ss/user/ntuser/focus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/focus.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -575,7 +575,7 @@ } return FALSE; } - ERR("Mouse Active\n"); + TRACE("Mouse Active\n"); co_IntSetForegroundAndFocusWindow(Wnd, TRUE); return TRUE; } @@ -763,7 +763,7 @@ } /* Yes your eye are not deceiving you~! - + First part of wines Win.c test_SetActiveWindow: flush_events( TRUE ); Modified: trunk/reactos/win32ss/user/ntuser/hotkey.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/hotkey…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/hotkey.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/hotkey.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -52,7 +52,7 @@ } UserRegisterHotKey(PWND_BOTTOM, IDHK_SHIFTF12, MOD_SHIFT, vk); UserRegisterHotKey(PWND_BOTTOM, IDHK_F12, 0, vk); - ERR("Start up the debugger hotkeys!! Should see this once!\n"); + TRACE("Start up the debugger hotkeys!! If you see this you eneabled debugprints. Congrats!\n"); } /* @@ -248,8 +248,8 @@ if (pHotKey->pWnd == PWND_BOTTOM) { if (gpqForeground != NULL) - { - pWnd = gpqForeground->spwndFocus; + { + pWnd = gpqForeground->spwndFocus; } else return FALSE; @@ -354,7 +354,7 @@ pHotKey = pHotKey->pNext; } } - + pHotKey = gphkFirst; pLink = &gphkFirst; while (pHotKey) Modified: trunk/reactos/win32ss/user/ntuser/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/keyboa…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/keyboard.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/keyboard.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -197,7 +197,7 @@ { ERR("NtDeviceIoControlFile() failed, ignored\n"); } - ERR("Keyboard type %d, subtype %d and number of func keys %d\n", + TRACE("Keyboard type %d, subtype %d and number of func keys %d\n", gKeyboardInfo.KeyboardIdentifier.Type, gKeyboardInfo.KeyboardIdentifier.Subtype, gKeyboardInfo.NumberOfFunctionKeys); @@ -820,7 +820,7 @@ TRACE("HotKey Processed\n"); bPostMsg = FALSE; } - + wFixedVk = IntFixVk(wSimpleVk, bExt); /* LSHIFT + EXT = RSHIFT */ if (wSimpleVk == VK_SHIFT) /* shift can't be extended */ bExt = FALSE; Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -2068,7 +2068,7 @@ IntGetSysCursorInfo()->CurrentCursorObject = NULL; } - ERR("DereferenceObject pCursor\n"); + TRACE("DereferenceObject pCursor\n"); UserDereferenceObject(pCursor); } @@ -2200,7 +2200,7 @@ { HWND Prev; PUSER_MESSAGE_QUEUE MessageQueue; - + MessageQueue = pti->MessageQueue; switch(Type) Modified: trunk/reactos/win32ss/user/ntuser/ntuser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/ntuser…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/ntuser.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/ntuser.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -164,8 +164,8 @@ { NTSTATUS Status; - ERR("Enter NtUserInitialize(%lx, %p, %p)\n", - dwWinVersion, hPowerRequestEvent, hMediaRequestEvent); + TRACE("Enter NtUserInitialize(%lx, %p, %p)\n", + dwWinVersion, hPowerRequestEvent, hMediaRequestEvent); /* Check the Windows version */ if (dwWinVersion != 0) Modified: trunk/reactos/win32ss/user/user32/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/d…
============================================================================== --- trunk/reactos/win32ss/user/user32/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/misc/dllmain.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -250,7 +250,7 @@ // CsrConnectToUser, we'll pretend we "did something" here. Then the rest will // continue as normal. // - UNIMPLEMENTED; + //UNIMPLEMENTED; return TRUE; } @@ -258,7 +258,7 @@ Init(VOID) { USERCONNECT UserCon; - + /* Set PEB data */ NtCurrentPeb()->KernelCallbackTable = apfnDispatch; NtCurrentPeb()->PostProcessInitRoutine = NULL; @@ -379,7 +379,7 @@ g_ulSharedDelta = UserCon.siClient.ulSharedDelta; gpsi = SharedPtrToUser(UserCon.siClient.psi); gHandleTable = SharedPtrToUser(UserCon.siClient.aheList); - gHandleEntries = SharedPtrToUser(gHandleTable->handles); + gHandleEntries = SharedPtrToUser(gHandleTable->handles); } @@ -387,9 +387,9 @@ WINAPI User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength) { - ERR("ClientThreadSetup\n"); + TRACE("ClientThreadSetup\n"); ClientThreadSetup(); - return ZwCallbackReturn(NULL, 0, STATUS_SUCCESS); + return ZwCallbackReturn(NULL, 0, STATUS_SUCCESS); } NTSTATUS @@ -403,7 +403,7 @@ Ret = TranslateCharsetInfo((DWORD *)pgci->Locale, &pgci->Cs, TCI_SRCLOCALE); - return ZwCallbackReturn(Arguments, ArgumentLength, Ret ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL); + return ZwCallbackReturn(Arguments, ArgumentLength, Ret ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL); } NTSTATUS Modified: trunk/reactos/win32ss/user/user32/windows/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/window.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/window.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -202,7 +202,7 @@ return (HWND)0; } } - + /* Copy it to a LARGE_STRING */ lstrClassName.Buffer = ClassName.Buffer; lstrClassName.Length = ClassName.Length; @@ -219,7 +219,7 @@ NTSTATUS Status; PSTR AnsiBuffer = WindowName.Buffer; ULONG AnsiLength = WindowName.Length; - + WindowName.Length = 0; WindowName.MaximumLength = AnsiLength * sizeof(WCHAR); WindowName.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), @@ -311,7 +311,7 @@ { RtlFreeUnicodeString(&ClassName); } - + RtlFreeLargeString(&WindowName); } @@ -343,7 +343,7 @@ if (!RegisterDefaultClasses) { - ERR("CreateWindowExA RegisterSystemControls\n"); + TRACE("CreateWindowExA RegisterSystemControls\n"); RegisterSystemControls(); } @@ -488,7 +488,7 @@ WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", hWndParent); return NULL; } - + /* lpParams of WM_[NC]CREATE is different for MDI children. * MDICREATESTRUCT members have the originally passed values. */ @@ -680,7 +680,7 @@ if (!dwCount) { if (!dwThreadId) - return FALSE; + return FALSE; else return TRUE; } @@ -692,7 +692,7 @@ /* FIXME I'm only getting NULLs from Thread Enumeration, and it's * probably because I'm not doing it right in NtUserBuildHwndList. * Once that's fixed, we shouldn't have to check for a NULL HWND - * here + * here * This is now fixed in revision 50205. (jt) */ if (!pHwnd[i]) /* don't enumerate a NULL HWND */ @@ -907,7 +907,7 @@ { HWND Ret = NULL; PWND Ancestor, Wnd; - + Wnd = ValidateHwnd(hwnd); if (!Wnd) return NULL; @@ -960,7 +960,7 @@ lpRect->bottom = GetSystemMetrics(SM_CYMINIMIZED); return TRUE; } - if ( hWnd != GetDesktopWindow()) // Wnd->fnid != FNID_DESKTOP ) + if ( hWnd != GetDesktopWindow()) // Wnd->fnid != FNID_DESKTOP ) { /* lpRect->left = lpRect->top = 0; lpRect->right = Wnd->rcClient.right - Wnd->rcClient.left; @@ -977,7 +977,7 @@ /* Do this until Init bug is fixed. This sets 640x480, see InitMetrics. lpRect->right = GetSystemMetrics(SM_CXSCREEN); lpRect->bottom = GetSystemMetrics(SM_CYSCREEN); -*/ } +*/ } return TRUE; } @@ -1103,7 +1103,7 @@ if (Wnd->spwndPrev != NULL) FoundWnd = DesktopPtrToUser(Wnd->spwndPrev); break; - + case GW_CHILD: if (Wnd->spwndChild != NULL) FoundWnd = DesktopPtrToUser(Wnd->spwndChild); @@ -1370,7 +1370,7 @@ if (!pWnd) return Ret; ti = pWnd->head.pti; - + if (ti) { if (ti == GetW32ThreadInfo()) Modified: trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv…
============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1] Sun Nov 2 11:30:14 2014 @@ -261,7 +261,7 @@ if (hMenu != NULL) { mii.cbSize = sizeof(mii); - mii.fMask = MIIM_STRING; + mii.fMask = MIIM_STRING; mii.dwTypeData = szMenuStringBack; mii.cch = sizeof(szMenuStringBack)/sizeof(WCHAR); @@ -711,7 +711,7 @@ { WORD ActivationState = LOWORD(wParam); - DPRINT1("WM_ACTIVATE - ActivationState = %d\n"); + DPRINT("WM_ACTIVATE - ActivationState = %d\n"); if ( ActivationState == WA_ACTIVE || ActivationState == WA_CLICKACTIVE )
10 years, 1 month
1
0
0
0
[akhaldi] 65180: [SHELL32] * Fix GCC build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Nov 2 11:16:37 2014 New Revision: 65180 URL:
http://svn.reactos.org/svn/reactos?rev=65180&view=rev
Log: [SHELL32] * Fix GCC build. Modified: branches/shell-experiments/dll/win32/shell32/shlview.cpp Modified: branches/shell-experiments/dll/win32/shell32/shlview.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
============================================================================== --- branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] Sun Nov 2 11:16:37 2014 @@ -1106,7 +1106,7 @@ TRACE("-- Items selected =%u\n", m_cidl); - int i = 0; + UINT i = 0; int lvIndex = -1; while ((lvIndex = m_ListView.GetNextItem(lvIndex, LVNI_SELECTED)) > -1) {
10 years, 1 month
1
0
0
0
[ekohl] 65179: [NET] Net user command: - Fix typos in the /ACTIVE option. - Implement the /COUNTRYCODE, /PASSWORDCHG and /PASSWORDREQ options.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Nov 2 09:56:18 2014 New Revision: 65179 URL:
http://svn.reactos.org/svn/reactos?rev=65179&view=rev
Log: [NET] Net user command: - Fix typos in the /ACTIVE option. - Implement the /COUNTRYCODE, /PASSWORDCHG and /PASSWORDREQ options. Modified: trunk/reactos/base/applications/network/net/cmdUser.c Modified: trunk/reactos/base/applications/network/net/cmdUser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/net/cmdUser.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/net/cmdUser.c [iso-8859-1] Sun Nov 2 09:56:18 2014 @@ -284,6 +284,8 @@ PUSER_INFO_4 pUserInfo = NULL; USER_INFO_4 UserInfo; LPWSTR p; + LPWSTR endptr; + DWORD value; NET_API_STATUS Status; if (argc == 2) @@ -377,11 +379,11 @@ p = &argv[i][8]; if (_wcsicmp(p, L"yes") == 0) { - UserInfo.usri4_flags &= ~UF_ACCOUNTDISABLE; + pUserInfo->usri4_flags &= ~UF_ACCOUNTDISABLE; } else if (_wcsicmp(p, L"no") == 0) { - UserInfo.usri4_flags |= UF_ACCOUNTDISABLE; + pUserInfo->usri4_flags |= UF_ACCOUNTDISABLE; } else { @@ -396,6 +398,18 @@ } else if (_wcsnicmp(argv[j], L"/countrycode:", 13) == 0) { + p = &argv[i][13]; + value = wcstoul(p, &endptr, 10); + if (*endptr != 0) + { + PrintToConsole(L"You entered an invalid value for the /COUNTRYCODE option.\n"); + result = 1; + goto done; + } + + /* FIXME: verify the country code */ + + pUserInfo->usri4_country_code = value; } else if (_wcsnicmp(argv[j], L"/expires:", 9) == 0) { @@ -410,9 +424,39 @@ } else if (_wcsnicmp(argv[j], L"/passwordchg:", 13) == 0) { + p = &argv[i][13]; + if (_wcsicmp(p, L"yes") == 0) + { + pUserInfo->usri4_flags &= ~UF_PASSWD_CANT_CHANGE; + } + else if (_wcsicmp(p, L"no") == 0) + { + pUserInfo->usri4_flags |= UF_PASSWD_CANT_CHANGE; + } + else + { + PrintToConsole(L"You entered an invalid value for the /PASSWORDCHG option.\n"); + result = 1; + goto done; + } } else if (_wcsnicmp(argv[j], L"/passwordreq:", 13) == 0) { + p = &argv[i][13]; + if (_wcsicmp(p, L"yes") == 0) + { + pUserInfo->usri4_flags &= ~UF_PASSWD_NOTREQD; + } + else if (_wcsicmp(p, L"no") == 0) + { + pUserInfo->usri4_flags |= UF_PASSWD_NOTREQD; + } + else + { + PrintToConsole(L"You entered an invalid value for the /PASSWORDREQ option.\n"); + result = 1; + goto done; + } } else if (_wcsnicmp(argv[j], L"/profilepath:", 13) == 0) {
10 years, 1 month
1
0
0
0
[tfaber] 65178: [SACDRV] - Silence debug prints - Avoid magic numbers
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Nov 2 07:17:39 2014 New Revision: 65178 URL:
http://svn.reactos.org/svn/reactos?rev=65178&view=rev
Log: [SACDRV] - Silence debug prints - Avoid magic numbers Modified: trunk/reactos/drivers/sac/driver/concmd.c trunk/reactos/drivers/sac/driver/conmgr.c trunk/reactos/drivers/sac/driver/data.c trunk/reactos/drivers/sac/driver/util.c Modified: trunk/reactos/drivers/sac/driver/concmd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/concmd.…
============================================================================== --- trunk/reactos/drivers/sac/driver/concmd.c [iso-8859-1] (original) +++ trunk/reactos/drivers/sac/driver/concmd.c [iso-8859-1] Sun Nov 2 07:17:39 2014 @@ -311,7 +311,7 @@ NTAPI PrintTListInfo(IN PSAC_SYSTEM_INFORMATION SacInfo) { - SAC_DBG(1, "Testing: %d %d %I64d\n", + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Testing: %d %d %I64d\n", SacInfo->BasicInfo.NumberOfPhysicalPages, SacInfo->PerfInfo.AvailablePages, SacInfo->TimeInfo.BootTime); @@ -357,7 +357,7 @@ LARGE_INTEGER Timeout, TickCount; NTSTATUS Status; KEVENT Event; - SAC_DBG(1, "SAC DoRebootCommand: Entering.\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoRebootCommand: Entering.\n"); /* Get the current time now, and setup a timeout in 1 second */ KeQueryTickCount(&TickCount); @@ -430,42 +430,42 @@ NTAPI DoSetTimeCommand(IN PCHAR InputTime) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } VOID NTAPI DoKillCommand(IN PCHAR KillString) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } VOID NTAPI DoLowerPriorityCommand(IN PCHAR PrioString) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } VOID NTAPI DoRaisePriorityCommand(IN PCHAR PrioString) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } VOID NTAPI DoLimitMemoryCommand(IN PCHAR LimitString) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } VOID NTAPI DoCrashCommand(VOID) { - SAC_DBG(1, "SAC DoCrashCommand: Entering.\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoCrashCommand: Entering.\n"); /* Crash the machine */ KeBugCheckEx(MANUALLY_INITIATED_CRASH, 0, 0, 0, 0); @@ -476,28 +476,28 @@ NTAPI DoMachineInformationCommand(VOID) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } VOID NTAPI DoChannelCommand(IN PCHAR ChannelString) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } VOID NTAPI DoCmdCommand(IN PCHAR InputString) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } VOID NTAPI DoLockCommand(VOID) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } FORCEINLINE @@ -556,14 +556,14 @@ NTAPI DoGetNetInfo(IN BOOLEAN DoPrint) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } VOID NTAPI DoSetIpAddressCommand(IN PCHAR IpString) { - SAC_DBG(1, "Entering\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n"); } VOID @@ -589,7 +589,7 @@ { /* Out of memory, bail out */ SacPutSimpleMessage(11); - SAC_DBG(1, "SAC DoTlistCommand: Exiting.\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Exiting.\n"); return; } } @@ -613,7 +613,7 @@ { /* Out of memory, bail out */ SacPutSimpleMessage(11); - SAC_DBG(1, "SAC DoTlistCommand: Exiting.\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Exiting.\n"); return; } @@ -637,5 +637,5 @@ PrintTListInfo(GlobalBuffer); } - SAC_DBG(1, "SAC DoTlistCommand: Exiting.\n"); -} + SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Exiting.\n"); +} Modified: trunk/reactos/drivers/sac/driver/conmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/conmgr.…
============================================================================== --- trunk/reactos/drivers/sac/driver/conmgr.c [iso-8859-1] (original) +++ trunk/reactos/drivers/sac/driver/conmgr.c [iso-8859-1] Sun Nov 2 07:17:39 2014 @@ -458,7 +458,7 @@ BOOLEAN EnablePaging; NTSTATUS Status; - SAC_DBG(4, "SAC Input Test: %s\n", InputBuffer); + SAC_DBG(SAC_DBG_INIT, "SAC Input Test: %s\n", InputBuffer); if (!strncmp(InputBuffer, "t", 1)) { @@ -508,7 +508,7 @@ sizeof(EnablePaging), NULL, 0); - if (!NT_SUCCESS(Status)) SAC_DBG(4, "SAC Display Log failed.\n"); + if (!NT_SUCCESS(Status)) SAC_DBG(SAC_DBG_INIT, "SAC Display Log failed.\n"); } else if (!strncmp(InputBuffer, "cmd", 3)) { Modified: trunk/reactos/drivers/sac/driver/data.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/data.c?…
============================================================================== --- trunk/reactos/drivers/sac/driver/data.c [iso-8859-1] (original) +++ trunk/reactos/drivers/sac/driver/data.c [iso-8859-1] Sun Nov 2 07:17:39 2014 @@ -12,7 +12,7 @@ /* GLOBALS ********************************************************************/ -ULONG SACDebug = 0xFFFFFFFF; +ULONG SACDebug = 0; BOOLEAN CommandConsoleLaunchingEnabled; BOOLEAN GlobalDataInitialized; KMUTEX SACCMDEventInfoMutex; @@ -100,7 +100,7 @@ FreeGlobalData(VOID) { UNICODE_STRING SymbolicLink; - SAC_DBG(1, "SAC FreeGlobalData: Entering.\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC FreeGlobalData: Entering.\n"); /* Only free if we allocated */ if (GlobalDataInitialized) @@ -139,7 +139,7 @@ } /* All done */ - SAC_DBG(1, "SAC FreeGlobalData: Exiting.\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC FreeGlobalData: Exiting.\n"); } VOID @@ -313,7 +313,7 @@ if (!NT_SUCCESS(Status)) { /* For debugging, write down why we failed */ - SAC_DBG(1, "Exiting (6) with status FALSE\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting (6) with status FALSE\n"); DeviceExtension->PriorityFail = TRUE; /* Initialize rundown and wait for the thread to do it */ Modified: trunk/reactos/drivers/sac/driver/util.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/sac/driver/util.c?…
============================================================================== --- trunk/reactos/drivers/sac/driver/util.c [iso-8859-1] (original) +++ trunk/reactos/drivers/sac/driver/util.c [iso-8859-1] Sun Nov 2 07:17:39 2014 @@ -434,7 +434,7 @@ *Buffer = SacAllocatePool(ResultLength, GLOBAL_BLOCK_TAG); if (!*Buffer) { - SAC_DBG(1, "SAC GetRegistryValueBuffer: failed allocation\n"); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC GetRegistryValueBuffer: failed allocation\n"); return Status; } @@ -497,7 +497,7 @@ if (!NT_SUCCESS(Status)) { /* Print error on failure */ - SAC_DBG(1, "SAC SetRegistryValue: failed ZwSetValueKey: %X.\n", Status); + SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC SetRegistryValue: failed ZwSetValueKey: %X.\n", Status); } /* Close the handle and exit */
10 years, 1 month
1
0
0
0
[tfaber] 65177: [0.3.17] - Addendum to r65049: update start menu banner.
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Nov 2 06:45:04 2014 New Revision: 65177 URL:
http://svn.reactos.org/svn/reactos?rev=65177&view=rev
Log: [0.3.17] - Addendum to r65049: update start menu banner. Modified: branches/0.3.17/reactos/base/shell/explorer-new/res/logov.bmp branches/0.3.17/reactos/base/shell/explorer/res/logov.bmp Modified: branches/0.3.17/reactos/base/shell/explorer-new/res/logov.bmp URL:
http://svn.reactos.org/svn/reactos/branches/0.3.17/reactos/base/shell/explo…
============================================================================== Binary files - no diff available. Modified: branches/0.3.17/reactos/base/shell/explorer/res/logov.bmp URL:
http://svn.reactos.org/svn/reactos/branches/0.3.17/reactos/base/shell/explo…
============================================================================== Binary files - no diff available.
10 years, 1 month
1
0
0
0
[gadamopoulos] 65176: [SHELL32] - Add an evil header that is going to simplify our C++ code in the shell a lot - Use the new CListView in the implementation of CDefView to make it more readable and...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sun Nov 2 00:26:22 2014 New Revision: 65176 URL:
http://svn.reactos.org/svn/reactos?rev=65176&view=rev
Log: [SHELL32] - Add an evil header that is going to simplify our C++ code in the shell a lot - Use the new CListView in the implementation of CDefView to make it more readable and maintainable Added: branches/shell-experiments/include/reactos/rosctrls.h (with props) Modified: branches/shell-experiments/dll/win32/shell32/shlview.cpp Modified: branches/shell-experiments/dll/win32/shell32/shlview.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
============================================================================== --- branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] Sun Nov 2 00:26:22 2014 @@ -51,6 +51,7 @@ #include "precomp.h" #include <atlwin.h> +#include <rosctrls.h> WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -84,7 +85,7 @@ CComPtr<IShellFolder2> m_pSF2Parent; CComPtr<IShellBrowser> m_pShellBrowser; CComPtr<ICommDlgBrowser> m_pCommDlgBrowser; - HWND m_hWndList; /* ListView control */ + CListView m_ListView; HWND m_hWndParent; FOLDERSETTINGS m_FolderSettings; HMENU m_hMenu; @@ -128,7 +129,7 @@ void UpdateListColors(); BOOL InitList(); static INT CALLBACK CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData); - static INT CALLBACK ListViewCompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData); + static INT CALLBACK ListViewCompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData); int LV_FindItemByPidl(LPCITEMIDLIST pidl); BOOLEAN LV_AddItem(LPCITEMIDLIST pidl); BOOLEAN LV_DeleteItem(LPCITEMIDLIST pidl); @@ -343,7 +344,7 @@ typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask); CDefView::CDefView() : - m_hWndList(NULL), + m_ListView(), m_hWndParent(NULL), m_hMenu(NULL), m_menusLoaded(FALSE), @@ -468,8 +469,8 @@ TRACE("(%p)\n", this); - tmpstyle = ::GetWindowLongPtrW(m_hWndList, GWL_STYLE); - ::SetWindowLongPtrW(m_hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove)); + tmpstyle = ::GetWindowLongPtrW(m_ListView, GWL_STYLE); + ::SetWindowLongPtrW(m_ListView, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove)); } /********************************************************** @@ -526,17 +527,10 @@ if (m_FolderSettings.fFlags & FWF_NOCLIENTEDGE) dwExStyle &= ~WS_EX_CLIENTEDGE; - m_hWndList = CreateWindowExW( dwExStyle, - WC_LISTVIEWW, - NULL, - dwStyle, - 0, 0, 0, 0, - m_hWnd, - (HMENU)ID_LISTVIEW, - shell32_hInstance, - NULL); - - if (!m_hWndList) + RECT rcListView = {0,0,0,0}; + m_ListView.Create(m_hWnd, rcListView, NULL,dwStyle, dwExStyle, ID_LISTVIEW); + + if (!m_ListView) return FALSE; m_sortInfo.bIsAscending = TRUE; @@ -562,21 +556,21 @@ L"ListviewShadow", RRF_RT_DWORD, NULL, &bDropShadow, &cbDropShadow); if (bDropShadow && SystemParametersInfoW(SPI_GETDESKWALLPAPER, _countof(wszBuf), wszBuf, 0) && wszBuf[0]) { - SendMessageW(m_hWndList, LVM_SETTEXTBKCOLOR, 0, CLR_NONE); - SendMessageW(m_hWndList, LVM_SETBKCOLOR, 0, CLR_NONE); - SendMessageW(m_hWndList, LVM_SETTEXTCOLOR, 0, RGB(255, 255, 255)); - SendMessageW(m_hWndList, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_TRANSPARENTSHADOWTEXT, LVS_EX_TRANSPARENTSHADOWTEXT); + m_ListView.SetTextBkColor(CLR_NONE); + m_ListView.SetBkColor(CLR_NONE); + m_ListView.SetTextColor(RGB(255, 255, 255)); + m_ListView.SetExtendedListViewStyle(LVS_EX_TRANSPARENTSHADOWTEXT, LVS_EX_TRANSPARENTSHADOWTEXT); } else { COLORREF crDesktop = GetSysColor(COLOR_DESKTOP); - SendMessageW(m_hWndList, LVM_SETTEXTBKCOLOR, 0, crDesktop); - SendMessageW(m_hWndList, LVM_SETBKCOLOR, 0, crDesktop); + m_ListView.SetTextBkColor(crDesktop); + m_ListView.SetBkColor(crDesktop); if (GetRValue(crDesktop) + GetGValue(crDesktop) + GetBValue(crDesktop) > 128 * 3) - SendMessageW(m_hWndList, LVM_SETTEXTCOLOR, 0, RGB(0, 0, 0)); + m_ListView.SetTextColor(RGB(0, 0, 0)); else - SendMessageW(m_hWndList, LVM_SETTEXTCOLOR, 0, RGB(255, 255, 255)); - SendMessageW(m_hWndList, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_TRANSPARENTSHADOWTEXT, 0); + m_ListView.SetTextColor(RGB(255, 255, 255)); + m_ListView.SetExtendedListViewStyle(LVS_EX_TRANSPARENTSHADOWTEXT); } } } @@ -588,16 +582,12 @@ */ BOOL CDefView::InitList() { - LVCOLUMNW lvColumn; SHELLDETAILS sd; WCHAR szTemp[50]; TRACE("%p\n", this); - SendMessageW(m_hWndList, LVM_DELETEALLITEMS, 0, 0); - - lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT; - lvColumn.pszText = szTemp; + m_ListView.DeleteAllItems(); if (m_pSF2Parent) { @@ -605,11 +595,9 @@ { if (FAILED(m_pSF2Parent->GetDetailsOf(NULL, i, &sd))) break; - - lvColumn.fmt = sd.fmt; - lvColumn.cx = sd.cxChar * 8; /* chars->pixel */ StrRetToStrNW( szTemp, 50, &sd.str, NULL); - SendMessageW(m_hWndList, LVM_INSERTCOLUMNW, i, (LPARAM) &lvColumn); + m_ListView.InsertColumn(i, szTemp, sd.fmt, sd.cxChar * 8); + } } else @@ -617,8 +605,8 @@ FIXME("no SF2\n"); } - SendMessageW(m_hWndList, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)ShellSmallIconList); - SendMessageW(m_hWndList, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)ShellBigIconList); + m_ListView.SetImageList(ShellBigIconList, LVSIL_NORMAL); + m_ListView.SetImageList(ShellSmallIconList, LVSIL_SMALL); return TRUE; } @@ -667,7 +655,7 @@ * the way this function works is only usable if we had only * filesystemfolders (25/10/99 jsch) */ -INT CALLBACK CDefView::ListViewCompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData) +INT CALLBACK CDefView::ListViewCompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData) { INT nDiff = 0; FILETIME fd1, fd2; @@ -748,20 +736,16 @@ */ int CDefView::LV_FindItemByPidl(LPCITEMIDLIST pidl) { - LVITEMW lvItem; - lvItem.iSubItem = 0; - lvItem.mask = LVIF_PARAM; - - for (lvItem.iItem = 0; - SendMessageW(m_hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); - lvItem.iItem++) - { - LPITEMIDLIST currentpidl = (LPITEMIDLIST) lvItem.lParam; + int cItems = m_ListView.GetItemCount(); + + for (int i = 0; i<cItems; i++) + { + LPITEMIDLIST currentpidl = reinterpret_cast<LPITEMIDLIST>(m_ListView.GetItemData(i)); HRESULT hr = m_pSFParent->CompareIDs(0, pidl, currentpidl); if (SUCCEEDED(hr) && !HRESULT_CODE(hr)) { - return lvItem.iItem; + return i; } } return -1; @@ -777,13 +761,13 @@ TRACE("(%p)(pidl=%p)\n", this, pidl); lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/ - lvItem.iItem = ListView_GetItemCount(m_hWndList); /*add the item to the end of the list*/ + lvItem.iItem = m_ListView.GetItemCount(); /*add the item to the end of the list*/ lvItem.iSubItem = 0; - lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/ - lvItem.pszText = LPSTR_TEXTCALLBACKW; /*get text on a callback basis*/ - lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ - - if (SendMessageW(m_hWndList, LVM_INSERTITEMW, 0, (LPARAM)&lvItem) == -1) + lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/ + lvItem.pszText = LPSTR_TEXTCALLBACKW; /*get text on a callback basis*/ + lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ + + if (m_ListView.InsertItem(&lvItem) == -1) return FALSE; else return TRUE; @@ -800,7 +784,7 @@ nIndex = LV_FindItemByPidl(ILFindLastID(pidl)); - return (-1 == ListView_DeleteItem(m_hWndList, nIndex)) ? FALSE : TRUE; + return (-1 == m_ListView.DeleteItem(nIndex)) ? FALSE : TRUE; } /********************************************************** @@ -819,15 +803,15 @@ { lvItem.mask = LVIF_PARAM; /* only the pidl */ lvItem.iItem = nItem; - SendMessageW(m_hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); + m_ListView.GetItem(&lvItem); SHFree((LPITEMIDLIST)lvItem.lParam); lvItem.mask = LVIF_PARAM|LVIF_IMAGE; lvItem.iItem = nItem; lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidlNew)); /* set the item's data */ lvItem.iImage = SHMapPIDLToSystemImageListIndex(m_pSFParent, pidlNew, 0); - SendMessageW(m_hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem); - SendMessageW(m_hWndList, LVM_UPDATE, nItem, 0); + m_ListView.SetItem(&lvItem); + m_ListView.Update(nItem); return TRUE; /* FIXME: better handling */ } @@ -892,12 +876,12 @@ DPA_Sort(hdpa, CompareItems, (LPARAM)m_pSFParent.p); /*turn the listview's redrawing off*/ - SendMessageA(m_hWndList, WM_SETREDRAW, FALSE, 0); + m_ListView.SetRedraw(FALSE); DPA_DestroyCallback( hdpa, fill_list, (void *)this); /*turn the listview's redrawing back on and force it to draw*/ - SendMessageA(m_hWndList, WM_SETREDRAW, TRUE, 0); + m_ListView.SetRedraw(TRUE); pEnumIDList->Release(); /* destroy the list*/ @@ -906,14 +890,14 @@ LRESULT CDefView::OnShowWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { - ::UpdateWindow(m_hWndList); + m_ListView.UpdateWindow(); bHandled = FALSE; return 0; } LRESULT CDefView::OnGetDlgCode(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { - return SendMessageW(m_hWndList, uMsg, 0, 0); + return m_ListView.SendMessageW(uMsg, 0, 0); } LRESULT CDefView::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) @@ -941,7 +925,7 @@ UpdateListColors(); /* Forward WM_SYSCOLORCHANGE to common controls */ - return SendMessageW(m_hWndList, uMsg, 0, 0); + return m_ListView.SendMessageW(uMsg, 0, 0); } LRESULT CDefView::OnGetShellBrowser(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) @@ -1110,38 +1094,27 @@ */ UINT CDefView::GetSelections() { - LVITEMW lvItem; - UINT i = 0; - SHFree(m_apidl); - m_cidl = ListView_GetSelectedCount(m_hWndList); + m_cidl = m_ListView.GetSelectedCount(); m_apidl = (LPITEMIDLIST*)SHAlloc(m_cidl * sizeof(LPITEMIDLIST)); - - TRACE("selected=%i\n", m_cidl); - - if (m_apidl) - { - TRACE("-- Items selected =%u\n", m_cidl); - - lvItem.mask = LVIF_STATE | LVIF_PARAM; - lvItem.stateMask = LVIS_SELECTED; - lvItem.iItem = 0; - lvItem.iSubItem = 0; - lvItem.state = 0; - - while(SendMessageW(m_hWndList, LVM_GETITEMW, 0, (LPARAM)&lvItem) && (i < m_cidl)) - { - if(lvItem.state & LVIS_SELECTED) - { - m_apidl[i] = (LPITEMIDLIST)lvItem.lParam; - i++; - if (i == m_cidl) - break; - TRACE("-- selected Item found\n"); - } - lvItem.iItem++; - } + if (!m_apidl) + { + m_cidl = 0; + return 0; + } + + TRACE("-- Items selected =%u\n", m_cidl); + + int i = 0; + int lvIndex = -1; + while ((lvIndex = m_ListView.GetNextItem(lvIndex, LVNI_SELECTED)) > -1) + { + m_apidl[i] = (LPITEMIDLIST)m_ListView.GetItemData(lvIndex); + i++; + if (i == m_cidl) + break; + TRACE("-- selected Item found\n"); } return m_cidl; @@ -1157,7 +1130,7 @@ UINT uCommand; HRESULT hResult; - m_cidl = ListView_GetSelectedCount(m_hWndList); + m_cidl = m_ListView.GetSelectedCount(); if (m_cidl == 0) return S_OK; @@ -1234,7 +1207,7 @@ if (!hMenu) return E_FAIL; - m_cidl = ListView_GetSelectedCount(m_hWndList); + m_cidl = m_ListView.GetSelectedCount(); hResult = GetItemObject( m_cidl ? SVGIO_SELECTION : SVGIO_BACKGROUND, IID_PPV_ARG(IContextMenu, &m_pCM)); if (FAILED( hResult)) @@ -1340,9 +1313,9 @@ TRACE("%p width=%u height=%u\n", this, wWidth, wHeight); /*resize the ListView to fit our window*/ - if (m_hWndList) - { - ::MoveWindow(m_hWndList, 0, 0, wWidth, wHeight, TRUE); + if (m_ListView) + { + ::MoveWindow(m_ListView, 0, 0, wWidth, wHeight, TRUE); } return 0; @@ -1467,7 +1440,7 @@ if (SVUIA_ACTIVATE_FOCUS == uState) { - ::SetFocus(m_hWndList); + m_ListView.SetFocus(); } } @@ -1500,7 +1473,7 @@ DoActivate(SVUIA_ACTIVATE_FOCUS); /* Set the focus to the listview */ - ::SetFocus(m_hWndList); + m_ListView.SetFocus(); /* Notify the ICommDlgBrowser interface */ OnStateChange(CDBOSC_SETFOCUS); @@ -1574,7 +1547,7 @@ m_sortInfo.nHeaderID = (LPARAM) (dwCmdID - 0x30); m_sortInfo.bIsAscending = TRUE; m_sortInfo.nLastHeaderID = m_sortInfo.nHeaderID; - SendMessageA(m_hWndList, LVM_SORTITEMS, (WPARAM) &m_sortInfo, (LPARAM)ListViewCompareItems); + m_ListView.SortItems(ListViewCompareItems, &m_sortInfo); break; case FCIDM_SHVIEW_REFRESH: @@ -1661,8 +1634,8 @@ case HDN_ENDTRACKW: TRACE("-- HDN_ENDTRACKW %p\n", this); - /*nColumn1 = ListView_GetColumnWidth(m_hWndList, 0); - nColumn2 = ListView_GetColumnWidth(m_hWndList, 1);*/ + /*nColumn1 = m_ListView.GetColumnWidth(0); + nColumn2 = m_ListView.GetColumnWidth(1);*/ break; case LVN_DELETEITEM: @@ -1686,16 +1659,12 @@ case LVN_COLUMNCLICK: m_sortInfo.nHeaderID = lpnmlv->iSubItem; if (m_sortInfo.nLastHeaderID == m_sortInfo.nHeaderID) - { m_sortInfo.bIsAscending = !m_sortInfo.bIsAscending; - } else - { m_sortInfo.bIsAscending = TRUE; - } m_sortInfo.nLastHeaderID = m_sortInfo.nHeaderID; - SendMessageW(lpnmlv->hdr.hwndFrom, LVM_SORTITEMS, (WPARAM) &m_sortInfo, (LPARAM)ListViewCompareItems); + m_ListView.SortItems(ListViewCompareItems, &m_sortInfo); break; case LVN_GETDISPINFOA: @@ -1807,22 +1776,17 @@ HRESULT hr; LVITEMW lvItem; - lvItem.iItem = lpdi->item.iItem; - lvItem.iSubItem = 0; - lvItem.mask = LVIF_PARAM; - SendMessageW(m_hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); - pidl = (LPITEMIDLIST)lpdi->item.lParam; hr = m_pSFParent->SetNameOf(0, pidl, lpdi->item.pszText, SHGDN_INFOLDER, &pidl); if (SUCCEEDED(hr) && pidl) { lvItem.mask = LVIF_PARAM|LVIF_IMAGE; + lvItem.iItem = lpdi->item.iItem; lvItem.lParam = (LPARAM)pidl; lvItem.iImage = SHMapPIDLToSystemImageListIndex(m_pSFParent, pidl, 0); - SendMessageW(m_hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem); - SendMessageW(m_hWndList, LVM_UPDATE, lpdi->item.iItem, 0); - + m_ListView.SetItem(&lvItem); + m_ListView.Update(lpdi->item.iItem); return TRUE; } } @@ -2054,7 +2018,7 @@ { TRACE("(%p)\n", this); - SendMessageW(m_hWndList, LVM_DELETEALLITEMS, 0, 0); + m_ListView.DeleteAllItems(); FillList(); return S_OK; @@ -2142,10 +2106,9 @@ m_hView = NULL; } - if (m_hWndList) - { - ::DestroyWindow(m_hWndList); - m_hWndList = NULL; + if (m_ListView) + { + m_ListView.DestroyWindow(); } if (m_hWnd) @@ -2192,45 +2155,40 @@ TRACE("(%p)->(pidl=%p, 0x%08x) stub\n", this, pidl, uFlags); i = LV_FindItemByPidl(pidl); - - if (i != -1) - { - LVITEMW lvItem; - - if(uFlags & SVSI_ENSUREVISIBLE) - SendMessageW(m_hWndList, LVM_ENSUREVISIBLE, i, 0); - - lvItem.mask = LVIF_STATE; - lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED; - lvItem.iItem = 0; - lvItem.iSubItem = 0; - - while (SendMessageW(m_hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem)) + if (i == -1) + return S_OK; + + if(uFlags & SVSI_ENSUREVISIBLE) + m_ListView.EnsureVisible(i, FALSE); + + LVITEMW lvItem = {0}; + lvItem.mask = LVIF_STATE; + lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED; + + while (m_ListView.GetItem(&lvItem)) + { + if (lvItem.iItem == i) { - if (lvItem.iItem == i) - { - if (uFlags & SVSI_SELECT) - lvItem.state |= LVIS_SELECTED; - else - lvItem.state &= ~LVIS_SELECTED; - - if (uFlags & SVSI_FOCUSED) - lvItem.state &= ~LVIS_FOCUSED; - } + if (uFlags & SVSI_SELECT) + lvItem.state |= LVIS_SELECTED; else - { - if (uFlags & SVSI_DESELECTOTHERS) - lvItem.state &= ~LVIS_SELECTED; - } - - SendMessageW(m_hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem); - lvItem.iItem++; + lvItem.state &= ~LVIS_SELECTED; + + if (uFlags & SVSI_FOCUSED) + lvItem.state &= ~LVIS_FOCUSED; } - - - if(uFlags & SVSI_EDIT) - SendMessageW(m_hWndList, LVM_EDITLABELW, i, 0); - } + else + { + if (uFlags & SVSI_DESELECTOTHERS) + lvItem.state &= ~LVIS_SELECTED; + } + + m_ListView.SetItem(&lvItem); + lvItem.iItem++; + } + + if(uFlags & SVSI_EDIT) + m_ListView.EditLabel(i); return S_OK; } @@ -2333,21 +2291,14 @@ HRESULT STDMETHODCALLTYPE CDefView::Item(int iItemIndex, LPITEMIDLIST *ppidl) { - LVITEMW item; - - TRACE("(%p)->(%d %p)\n", this, iItemIndex, ppidl); - - item.mask = LVIF_PARAM; - item.iItem = iItemIndex; - - if (SendMessageW(m_hWndList, LVM_GETITEMW, 0, (LPARAM)&item)) - { - *ppidl = ILClone((PITEMID_CHILD)item.lParam); + PITEMID_CHILD pidl = reinterpret_cast<PITEMID_CHILD>(m_ListView.GetItemData(iItemIndex)); + if (pidl) + { + *ppidl = ILClone(pidl); return S_OK; } *ppidl = 0; - return E_INVALIDARG; } @@ -2358,7 +2309,7 @@ if (uFlags != SVGIO_ALLVIEW) FIXME("some flags unsupported, %x\n", uFlags & ~SVGIO_ALLVIEW); - *pcItems = SendMessageW(m_hWndList, LVM_GETITEMCOUNT, 0, 0); + *pcItems = m_ListView.GetItemCount(); return S_OK; } @@ -2372,7 +2323,7 @@ { TRACE("(%p)->(%p)\n", this, piItem); - *piItem = SendMessageW(m_hWndList, LVM_GETSELECTIONMARK, 0, 0); + *piItem = m_ListView.GetSelectionMark(); return S_OK; } @@ -2381,7 +2332,7 @@ { TRACE("(%p)->(%p)\n", this, piItem); - *piItem = SendMessageW(m_hWndList, LVM_GETNEXTITEM, -1, LVNI_FOCUSED); + *piItem = m_ListView.GetNextItem(-1, LVNI_FOCUSED); return S_OK; } @@ -2395,14 +2346,16 @@ { TRACE("(%p)->(%p)\n", this, ppt); - if (NULL == m_hWndList) return S_FALSE; + if (!m_ListView) + return S_FALSE; if (ppt) { - const DWORD ret = SendMessageW(m_hWndList, LVM_GETITEMSPACING, 0, 0); - - ppt->x = LOWORD(ret); - ppt->y = HIWORD(ret); + SIZE spacing; + m_ListView.GetItemSpacing(spacing); + + ppt->x = spacing.cx; + ppt->y = spacing.cy; } return S_OK; @@ -2428,11 +2381,11 @@ lvItem.stateMask = LVIS_SELECTED; if (dwFlags & SVSI_ENSUREVISIBLE) - SendMessageW(m_hWndList, LVM_ENSUREVISIBLE, iItem, 0); + m_ListView.EnsureVisible(iItem, 0); /* all items */ if (dwFlags & SVSI_DESELECTOTHERS) - SendMessageW(m_hWndList, LVM_SETITEMSTATE, -1, (LPARAM)&lvItem); + m_ListView.SetItemState(-1, 0, LVIS_SELECTED); /* this item */ if (dwFlags & SVSI_SELECT) @@ -2441,10 +2394,10 @@ if (dwFlags & SVSI_FOCUSED) lvItem.stateMask |= LVIS_FOCUSED; - SendMessageW(m_hWndList, LVM_SETITEMSTATE, iItem, (LPARAM)&lvItem); + m_ListView.SetItemState(iItem, lvItem.state, lvItem.stateMask); if (dwFlags & SVSI_EDIT) - SendMessageW(m_hWndList, LVM_EDITLABELW, iItem, 0); + m_ListView.EditLabel(iItem); return S_OK; } @@ -2501,12 +2454,12 @@ if (pidl) { *item = LV_FindItemByPidl(ILFindLastID(pidl)); - SendMessageW(m_hWndList, LVM_DELETEITEM, *item, 0); + m_ListView.DeleteItem(*item); } else { *item = 0; - SendMessageW(m_hWndList, LVM_DELETEALLITEMS, 0, 0); + m_ListView.DeleteAllItems(); } return S_OK; @@ -2539,7 +2492,7 @@ HRESULT STDMETHODCALLTYPE CDefView::SetRedraw(BOOL redraw) { TRACE("(%p)->(%d)\n", this, redraw); - SendMessageW(m_hWndList, WM_SETREDRAW, redraw, 0); + m_ListView.SetRedraw(redraw); return S_OK; } @@ -2744,7 +2697,6 @@ HRESULT CDefView::drag_notify_subitem(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) { LVHITTESTINFO htinfo; - LVITEMW lvItem; LONG lResult; HRESULT hr; RECT clientRect; @@ -2754,11 +2706,11 @@ htinfo.pt.x = pt.x; htinfo.pt.y = pt.y; htinfo.flags = LVHT_ONITEM; - ::ScreenToClient(m_hWndList, &htinfo.pt); - lResult = SendMessageW(m_hWndList, LVM_HITTEST, 0, (LPARAM)&htinfo); + ::ScreenToClient(m_ListView, &htinfo.pt); + lResult = m_ListView.HitTest(&htinfo); /* Send WM_*SCROLL messages every 250 ms during drag-scrolling */ - ::GetClientRect(m_hWndList, &clientRect); + ::GetClientRect(m_ListView, &clientRect); if (htinfo.pt.x == m_ptLastMousePos.x && htinfo.pt.y == m_ptLastMousePos.y && (htinfo.pt.x < SCROLLAREAWIDTH || htinfo.pt.x > clientRect.right - SCROLLAREAWIDTH || htinfo.pt.y < SCROLLAREAWIDTH || htinfo.pt.y > clientRect.bottom - SCROLLAREAWIDTH )) @@ -2768,16 +2720,16 @@ { /* Mouse did hover another 250 ms over the scroll-area */ if (htinfo.pt.x < SCROLLAREAWIDTH) - SendMessageW(m_hWndList, WM_HSCROLL, SB_LINEUP, 0); + m_ListView.SendMessageW(WM_HSCROLL, SB_LINEUP, 0); if (htinfo.pt.x > clientRect.right - SCROLLAREAWIDTH) - SendMessageW(m_hWndList, WM_HSCROLL, SB_LINEDOWN, 0); + m_ListView.SendMessageW(WM_HSCROLL, SB_LINEDOWN, 0); if (htinfo.pt.y < SCROLLAREAWIDTH) - SendMessageW(m_hWndList, WM_VSCROLL, SB_LINEUP, 0); + m_ListView.SendMessageW(WM_VSCROLL, SB_LINEUP, 0); if (htinfo.pt.y > clientRect.bottom - SCROLLAREAWIDTH) - SendMessageW(m_hWndList, WM_VSCROLL, SB_LINEDOWN, 0); + m_ListView.SendMessageW(WM_VSCROLL, SB_LINEDOWN, 0); } } else @@ -2809,13 +2761,10 @@ { /* Query the relative PIDL of the shellfolder object represented by the currently * dragged over listview-item ... */ - lvItem.mask = LVIF_PARAM; - lvItem.iItem = lResult; - lvItem.iSubItem = 0; - SendMessageW(m_hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem); + LPCITEMIDLIST pidl = reinterpret_cast<LPCITEMIDLIST>(m_ListView.GetItemData(lResult)); /* ... and bind m_pCurDropTarget to the IDropTarget interface of an UIObject of this object */ - hr = m_pSFParent->GetUIObjectOf(m_hWndList, 1, (LPCITEMIDLIST*)&lvItem.lParam, IID_NULL_PPV_ARG(IDropTarget, &m_pCurDropTarget)); + hr = m_pSFParent->GetUIObjectOf(m_ListView, 1, &pidl, IID_NULL_PPV_ARG(IDropTarget, &m_pCurDropTarget)); } /* If anything failed, m_pCurDropTarget should be NULL now, which ought to be a save state. */ Added: branches/shell-experiments/include/reactos/rosctrls.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/include/react…
============================================================================== --- branches/shell-experiments/include/reactos/rosctrls.h (added) +++ branches/shell-experiments/include/reactos/rosctrls.h [iso-8859-1] Sun Nov 2 00:26:22 2014 @@ -0,0 +1,198 @@ + +#pragma once + +class CListView: public CWindow +{ +public: + + HWND Create(HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName = NULL, DWORD dwStyle = 0, + DWORD dwExStyle = 0, _U_MENUorID MenuOrID = 0U, LPVOID lpCreateParam = NULL) + { + m_hWnd = ::CreateWindowEx(dwExStyle, + WC_LISTVIEW, + szWindowName, + dwStyle, + rect.m_lpRect->left, + rect.m_lpRect->top, + rect.m_lpRect->right - rect.m_lpRect->left, + rect.m_lpRect->bottom - rect.m_lpRect->top, + hWndParent, + MenuOrID.m_hMenu, + _AtlBaseModule.GetModuleInstance(), + lpCreateParam); + + return m_hWnd; + } + + void SetRedraw(BOOL redraw) + { + SendMessage(WM_SETREDRAW, redraw); + } + + BOOL SetTextBkColor(COLORREF cr) + { + return (BOOL)SendMessage(LVM_SETTEXTBKCOLOR, 0, cr); + } + + BOOL SetBkColor(COLORREF cr) + { + return (BOOL)SendMessage(LVM_SETBKCOLOR, 0, cr); + } + + BOOL SetTextColor(COLORREF cr) + { + return (BOOL)SendMessage(LVM_SETTEXTCOLOR, 0, cr); + } + + DWORD SetExtendedListViewStyle(DWORD dw, DWORD dwMask = 0) + { + return (DWORD)SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, dwMask, dw); + } + + int InsertColumn(int iCol, LV_COLUMN* pcol) + { + return (int)SendMessage(LVM_INSERTCOLUMN, iCol, reinterpret_cast<LPARAM>(pcol)); + } + + int InsertColumn(int iCol, LPWSTR pszText, int fmt, int width = -1, int iSubItem = -1, int iImage = -1, int iOrder = -1) + { + LV_COLUMN column = {0}; + column.mask = LVCF_TEXT|LVCF_FMT; + column.pszText = pszText; + column.fmt = fmt; + if(width != -1) + { + column.mask |= LVCF_WIDTH; + column.cx = width; + } + if(iSubItem != -1) + { + column.mask |= LVCF_SUBITEM; + column.iSubItem = iSubItem; + } + if(iImage != -1) + { + column.mask |= LVCF_IMAGE; + column.iImage = iImage; + } + if(iOrder != -1) + { + column.mask |= LVCF_ORDER; + column.iOrder = iOrder; + } + return InsertColumn(iCol, &column); + } + + int GetColumnWidth(int iCol) + { + return (int)SendMessage(LVM_GETCOLUMNWIDTH, iCol); + } + + HIMAGELIST SetImageList(HIMAGELIST himl, int iImageList) + { + return (HIMAGELIST)SendMessage(LVM_SETIMAGELIST, iImageList, reinterpret_cast<LPARAM>(himl)); + } + + int InsertItem(const LV_ITEM * pitem) + { + return (int)SendMessage(LVM_INSERTITEM, 0, reinterpret_cast<LPARAM>(pitem)); + } + + BOOL DeleteItem(int i) + { + return (BOOL)SendMessage(LVM_DELETEITEM, i, 0); + } + + BOOL GetItem(LV_ITEM* pitem) + { + return (BOOL)SendMessage(LVM_GETITEM, 0, reinterpret_cast<LPARAM>(pitem)); + } + + BOOL SetItem(const LV_ITEM * pitem) + { + return (BOOL)SendMessage(LVM_SETITEM, 0, reinterpret_cast<LPARAM>(pitem)); + } + + int GetItemCount() + { + return SendMessage(LVM_GETITEMCOUNT); + } + + BOOL DeleteAllItems() + { + return (BOOL)SendMessage(LVM_DELETEALLITEMS); + } + + BOOL Update(int i) + { + return (BOOL)SendMessage(LVM_UPDATE, i, 0); + } + + UINT GetSelectedCount() + { + return (UINT)SendMessage(LVM_GETSELECTEDCOUNT); + } + + BOOL SortItems(PFNLVCOMPARE pfnCompare, PVOID lParam) + { + return (BOOL)SendMessage(LVM_SORTITEMS, (WPARAM)lParam, (LPARAM) pfnCompare); + } + + BOOL EnsureVisible(int i, BOOL fPartialOK) + { + return (BOOL)SendMessage(LVM_ENSUREVISIBLE, i, MAKELPARAM((fPartialOK),0)); + } + + HWND EditLabel(int i) + { + return (HWND)SendMessage(LVM_EDITLABEL, i, 0); + } + + int GetSelectionMark() + { + return (int)SendMessage(LVM_GETSELECTIONMARK); + } + + int GetNextItem(int i, WORD flags) + { + return (int)SendMessage(LVM_GETNEXTITEM, i, MAKELPARAM((flags),0)); + } + + void GetItemSpacing(SIZE& spacing, BOOL bSmallIconView = FALSE) + { + DWORD ret = SendMessage(LVM_GETITEMSPACING, bSmallIconView); + spacing.cx = LOWORD(ret); + spacing.cy = HIWORD(ret); + } + + void SetItemState(int i, UINT state, UINT mask) + { + LV_ITEM item; + item.stateMask = mask; + item.state = state; + SendMessage(LVM_SETITEMSTATE, i, reinterpret_cast<LPARAM>(&item)); + } + + int HitTest(LV_HITTESTINFO * phtInfo) + { + return (int)SendMessage(LVM_HITTEST, 0, reinterpret_cast<LPARAM>(&phtInfo)); + } + + DWORD_PTR GetItemData(int i) + { + LVITEMW lvItem; + lvItem.iItem = i; + lvItem.mask = LVIF_PARAM; + BOOL ret = GetItem(&lvItem); + return (DWORD_PTR)(ret ? lvItem.lParam : NULL); + } + + BOOL GetSelectedItem(LV_ITEM* pItem) + { + pItem->iItem = GetNextItem(-1, LVNI_ALL | LVNI_SELECTED); + if (pItem->iItem == -1) + return FALSE; + return GetItem(pItem); + } + +}; Propchange: branches/shell-experiments/include/reactos/rosctrls.h ------------------------------------------------------------------------------ svn:eol-style = native
10 years, 1 month
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
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
37
38
Results per page:
10
25
50
100
200