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 2011
----- 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
16 participants
274 discussions
Start a n
N
ew thread
[rharabien] 54384: [SYSSETUP] - Don't redefine constants from psdk in source files - Improve error message
by rharabien@svn.reactos.org
Author: rharabien Date: Tue Nov 15 08:59:50 2011 New Revision: 54384 URL:
http://svn.reactos.org/svn/reactos?rev=54384&view=rev
Log: [SYSSETUP] - Don't redefine constants from psdk in source files - Improve error message Modified: trunk/reactos/dll/win32/syssetup/install.c Modified: trunk/reactos/dll/win32/syssetup/install.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/install…
============================================================================== --- trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] Tue Nov 15 08:59:50 2011 @@ -737,7 +737,7 @@ cleanup: MessageBoxW( NULL, - L"You can shutdown your computer, or press ENTER to reboot", + L"Failed to load LiveCD! You can shutdown your computer, or press ENTER to reboot.", L"ReactOS LiveCD", MB_OK); return 0; @@ -958,7 +958,7 @@ PROFILEINFOW ProfileInfo; HANDLE hToken; BOOL ret; -#define LOGON32_LOGON_NETWORK 3 + ret = LogonUserW(L"Administrator", L"", L"", LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &hToken); if (!ret) {
13 years, 1 month
1
0
0
0
[rharabien] 54383: [SYSSETUP] - Formatting. No code changes.
by rharabien@svn.reactos.org
Author: rharabien Date: Tue Nov 15 08:44:37 2011 New Revision: 54383 URL:
http://svn.reactos.org/svn/reactos?rev=54383&view=rev
Log: [SYSSETUP] - Formatting. No code changes. Modified: trunk/reactos/dll/win32/syssetup/dllmain.c trunk/reactos/dll/win32/syssetup/globals.h trunk/reactos/dll/win32/syssetup/wizard.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/syssetup/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/dllmain…
Modified: trunk/reactos/dll/win32/syssetup/globals.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/globals…
Modified: trunk/reactos/dll/win32/syssetup/wizard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.…
13 years, 1 month
1
0
0
0
[cgutman] 54382: [HAL] - Remove broken map register "prefetcher" code - Check that we have enough space to grow our map registers - Fix a bad hint to RtlFindClearBitsAndSet - Queuing the grow work ...
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Nov 15 07:58:46 2011 New Revision: 54382 URL:
http://svn.reactos.org/svn/reactos?rev=54382&view=rev
Log: [HAL] - Remove broken map register "prefetcher" code - Check that we have enough space to grow our map registers - Fix a bad hint to RtlFindClearBitsAndSet - Queuing the grow work item is non-vital; treat it as such - Fixes BSOD with CM3738 and VIA1723 sound cards [bug 6657] Modified: trunk/reactos/hal/halx86/generic/dma.c Modified: trunk/reactos/hal/halx86/generic/dma.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/dma.c?r…
============================================================================== --- trunk/reactos/hal/halx86/generic/dma.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/dma.c [iso-8859-1] Tue Nov 15 07:58:46 2011 @@ -1,4 +1,4 @@ -/* $Id$ +/* * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -221,8 +221,16 @@ KIRQL OldIrql; ULONG MapRegisterCount; - /* FIXME: Check if enough map register slots are available. */ + /* Check if enough map register slots are available. */ MapRegisterCount = BYTES_TO_PAGES(SizeOfMapBuffers); + if (MapRegisterCount + AdapterObject->NumberOfMapRegisters > MAX_MAP_REGISTERS) + { + DPRINT("No more map register slots available! (Current: %d | Requested: %d | Limit: %d)\n", + AdapterObject->NumberOfMapRegisters, + MapRegisterCount, + MAX_MAP_REGISTERS); + return FALSE; + } /* * Allocate memory for the new map registers. For 32-bit adapters we use @@ -599,7 +607,6 @@ OUT PULONG NumberOfMapRegisters) { PADAPTER_OBJECT AdapterObject = NULL; - PADAPTER_OBJECT MasterAdapter; BOOLEAN EisaAdapter; ULONG MapRegisters; ULONG MaximumLength; @@ -711,21 +718,7 @@ if (MapRegisters > 0) { AdapterObject->NeedsMapRegisters = TRUE; - MasterAdapter = HalpMasterAdapter; AdapterObject->MapRegistersPerChannel = MapRegisters; - - /* - * FIXME: Verify that the following makes sense. Actually - * MasterAdapter->NumberOfMapRegisters contains even the number - * of gaps, so this will not work correctly all the time. It - * doesn't matter much since it's only optimization to avoid - * queuing work items in HalAllocateAdapterChannel. - */ - MasterAdapter->CommittedMapRegisters += MapRegisters; - if (MasterAdapter->CommittedMapRegisters > MasterAdapter->NumberOfMapRegisters) - { - HalpGrowMapBuffers(MasterAdapter, 0x10000); - } } else { @@ -1333,24 +1326,19 @@ if (Index == MAXULONG) { + InsertTailList(&MasterAdapter->AdapterQueue, &AdapterObject->AdapterQueue); + WorkItem = ExAllocatePoolWithTag(NonPagedPool, sizeof(GROW_WORK_ITEM), TAG_DMA); - if (!WorkItem) + if (WorkItem) { - KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql); - AdapterObject->NumberOfMapRegisters = 0; - IoFreeAdapterChannel(AdapterObject); - return STATUS_INSUFFICIENT_RESOURCES; + ExInitializeWorkItem(&WorkItem->WorkQueueItem, HalpGrowMapBufferWorker, WorkItem); + WorkItem->AdapterObject = AdapterObject; + WorkItem->NumberOfMapRegisters = NumberOfMapRegisters; + + ExQueueWorkItem(&WorkItem->WorkQueueItem, DelayedWorkQueue); } - - InsertTailList(&MasterAdapter->AdapterQueue, &AdapterObject->AdapterQueue); - - ExInitializeWorkItem(&WorkItem->WorkQueueItem, HalpGrowMapBufferWorker, WorkItem); - WorkItem->AdapterObject = AdapterObject; - WorkItem->NumberOfMapRegisters = NumberOfMapRegisters; - - ExQueueWorkItem(&WorkItem->WorkQueueItem, DelayedWorkQueue); KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql); @@ -1574,7 +1562,7 @@ Index = RtlFindClearBitsAndSet(MasterAdapter->MapRegisters, AdapterObject->NumberOfMapRegisters, - MasterAdapter->NumberOfMapRegisters); + 0); if (Index == MAXULONG) { InsertHeadList(&MasterAdapter->AdapterQueue, ListEntry);
13 years, 1 month
1
0
0
0
[cgutman] 54381: [SERVICES] - Always return ERROR_SUCCESS when ScmWaitForServiceConnect completes successfully instead of sometimes returning ERROR_PIPE_CONNECTED because the callers of this helper...
by cgutman@svn.reactos.org
Author: cgutman Date: Tue Nov 15 02:55:44 2011 New Revision: 54381 URL:
http://svn.reactos.org/svn/reactos?rev=54381&view=rev
Log: [SERVICES] - Always return ERROR_SUCCESS when ScmWaitForServiceConnect completes successfully instead of sometimes returning ERROR_PIPE_CONNECTED because the callers of this helper just look for ERROR_SUCCESS to indicate a successful call Modified: trunk/reactos/base/system/services/database.c Modified: trunk/reactos/base/system/services/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
============================================================================== --- trunk/reactos/base/system/services/database.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/database.c [iso-8859-1] Tue Nov 15 02:55:44 2011 @@ -1514,6 +1514,11 @@ dwError = GetLastError(); DPRINT1("Reading the service control pipe failed (Error %lu)\n", dwError); + } + else + { + dwError = ERROR_SUCCESS; + DPRINT("Read control pipe successfully\n"); } } else
13 years, 1 month
1
0
0
0
[rharabien] 54380: [SHELL32] - Rename CBitBucket to CRecycleBin
by rharabien@svn.reactos.org
Author: rharabien Date: Mon Nov 14 22:46:37 2011 New Revision: 54380 URL:
http://svn.reactos.org/svn/reactos?rev=54380&view=rev
Log: [SHELL32] - Rename CBitBucket to CRecycleBin Modified: trunk/reactos/dll/win32/shell32/shell32_main.cpp trunk/reactos/dll/win32/shell32/shfldr_recyclebin.cpp trunk/reactos/dll/win32/shell32/shfldr_recyclebin.h Modified: trunk/reactos/dll/win32/shell32/shell32_main.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
============================================================================== --- trunk/reactos/dll/win32/shell32/shell32_main.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32_main.cpp [iso-8859-1] Mon Nov 14 22:46:37 2011 @@ -1284,7 +1284,7 @@ OBJECT_ENTRY(CLSID_FontsFolderShortcut, CFontsFolder) OBJECT_ENTRY(CLSID_Printers, CPrinterFolder) OBJECT_ENTRY(CLSID_AdminFolderShortcut, CAdminToolsFolder) -OBJECT_ENTRY(CLSID_RecycleBin, CBitBucket) +OBJECT_ENTRY(CLSID_RecycleBin, CRecycleBin) OBJECT_ENTRY(CLSID_OpenWithMenu, COpenWithMenu) OBJECT_ENTRY(CLSID_NewMenu, CNewMenu) OBJECT_ENTRY(CLSID_StartMenu, CStartMenuCallback) Modified: trunk/reactos/dll/win32/shell32/shfldr_recyclebin.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_r…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_recyclebin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_recyclebin.cpp [iso-8859-1] Mon Nov 14 22:46:37 2011 @@ -23,7 +23,7 @@ #include <precomp.h> -WINE_DEFAULT_DEBUG_CHANNEL(CBitBucket); +WINE_DEFAULT_DEBUG_CHANNEL(CRecycleBin); typedef struct { @@ -35,7 +35,7 @@ int cxChars; } columninfo; -static const columninfo CBitBucketColumns[] = +static const columninfo RecycleBinColumns[] = { {IDS_SHV_COLUMN1, &FMTID_Storage, PID_STG_NAME, SHCOLSTATE_TYPE_STR|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30}, {IDS_SHV_COLUMN_DELFROM, &FMTID_Displaced, PID_DISPLACED_FROM, SHCOLSTATE_TYPE_STR|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30}, @@ -60,31 +60,31 @@ * Recycle Bin folder */ -class CBitBucketEnum : +class CRecycleBinEnum : public IEnumIDListImpl { private: public: - CBitBucketEnum(); - ~CBitBucketEnum(); + CRecycleBinEnum(); + ~CRecycleBinEnum(); HRESULT WINAPI Initialize(DWORD dwFlags); - static BOOL WINAPI CBEnumBitBucket(IN PVOID Context, IN HANDLE hDeletedFile); - BOOL WINAPI CBEnumBitBucket(IN HANDLE hDeletedFile); - -BEGIN_COM_MAP(CBitBucketEnum) + static BOOL WINAPI CBEnumRecycleBin(IN PVOID Context, IN HANDLE hDeletedFile); + BOOL WINAPI CBEnumRecycleBin(IN HANDLE hDeletedFile); + +BEGIN_COM_MAP(CRecycleBinEnum) COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) END_COM_MAP() }; -class CCBitBucketItemContextMenu : +class CRecycleBinItemContextMenu : public CComObjectRootEx<CComMultiThreadModelNoCS>, public IContextMenu2 { private: LPITEMIDLIST apidl; public: - CCBitBucketItemContextMenu(); - ~CCBitBucketItemContextMenu(); + CRecycleBinItemContextMenu(); + ~CRecycleBinItemContextMenu(); HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); // IContextMenu @@ -95,7 +95,7 @@ // IContextMenu2 virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); -BEGIN_COM_MAP(CCBitBucketItemContextMenu) +BEGIN_COM_MAP(CRecycleBinItemContextMenu) COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) END_COM_MAP() @@ -115,7 +115,7 @@ DWORD dwMaxCapacity; }DRIVE_ITEM_CONTEXT, *PDRIVE_ITEM_CONTEXT; -BOOL WINAPI CBSearchBitBucket(IN PVOID Context, IN HANDLE hDeletedFile) +BOOL WINAPI CBSearchRecycleBin(IN PVOID Context, IN HANDLE hDeletedFile) { PSEARCH_CONTEXT pContext = (PSEARCH_CONTEXT)Context; @@ -173,15 +173,15 @@ return NULL; } -CBitBucketEnum::CBitBucketEnum() -{ -} - -CBitBucketEnum::~CBitBucketEnum() -{ -} - -HRESULT WINAPI CBitBucketEnum::Initialize(DWORD dwFlags) +CRecycleBinEnum::CRecycleBinEnum() +{ +} + +CRecycleBinEnum::~CRecycleBinEnum() +{ +} + +HRESULT WINAPI CRecycleBinEnum::Initialize(DWORD dwFlags) { static LPCWSTR szDrive = L"C:\\"; @@ -189,9 +189,9 @@ { TRACE("Starting Enumeration\n"); - if (!EnumerateRecycleBinW(szDrive /* FIXME */ , CBEnumBitBucket, (PVOID)this)) + if (!EnumerateRecycleBinW(szDrive /* FIXME */ , CBEnumRecycleBin, (PVOID)this)) { - WARN("Error: EnumerateCBitBucketW failed\n"); + WARN("Error: EnumerateCRecycleBinW failed\n"); return E_FAIL; } } @@ -227,12 +227,12 @@ return pidl; } -BOOL WINAPI CBitBucketEnum::CBEnumBitBucket(IN PVOID Context, IN HANDLE hDeletedFile) -{ - return ((CBitBucketEnum *)Context)->CBEnumBitBucket(hDeletedFile); -} - -BOOL WINAPI CBitBucketEnum::CBEnumBitBucket(IN HANDLE hDeletedFile) +BOOL WINAPI CRecycleBinEnum::CBEnumRecycleBin(IN PVOID Context, IN HANDLE hDeletedFile) +{ + return ((CRecycleBinEnum *)Context)->CBEnumRecycleBin(hDeletedFile); +} + +BOOL WINAPI CRecycleBinEnum::CBEnumRecycleBin(IN HANDLE hDeletedFile) { PDELETED_FILE_DETAILS_W pFileDetails; DWORD dwSize; @@ -287,17 +287,17 @@ * IContextMenu2 Bitbucket Item Implementation */ -CCBitBucketItemContextMenu::CCBitBucketItemContextMenu() +CRecycleBinItemContextMenu::CRecycleBinItemContextMenu() { apidl = NULL; } -CCBitBucketItemContextMenu::~CCBitBucketItemContextMenu() +CRecycleBinItemContextMenu::~CRecycleBinItemContextMenu() { ILFree(apidl); } -HRESULT WINAPI CCBitBucketItemContextMenu::Initialize(LPCITEMIDLIST pidl) +HRESULT WINAPI CRecycleBinItemContextMenu::Initialize(LPCITEMIDLIST pidl) { apidl = ILClone(pidl); if (apidl == NULL) @@ -305,7 +305,7 @@ return S_OK; } -HRESULT WINAPI CCBitBucketItemContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) +HRESULT WINAPI CRecycleBinItemContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) { WCHAR szBuffer[30] = {0}; ULONG Count = 1; @@ -343,7 +343,7 @@ return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); } -HRESULT WINAPI CCBitBucketItemContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) +HRESULT WINAPI CRecycleBinItemContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) { SEARCH_CONTEXT Context; static LPCWSTR szDrive = L"C:\\"; @@ -355,7 +355,7 @@ Context.pFileDetails = _ILGetRecycleStruct(apidl); Context.bFound = FALSE; - EnumerateRecycleBinW(szDrive, CBSearchBitBucket, (PVOID)&Context); + EnumerateRecycleBinW(szDrive, CBSearchRecycleBin, (PVOID)&Context); if (!Context.bFound) return E_FAIL; @@ -387,23 +387,23 @@ return S_OK; } -HRESULT WINAPI CCBitBucketItemContextMenu::GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) +HRESULT WINAPI CRecycleBinItemContextMenu::GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) { TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); return E_FAIL; } -HRESULT WINAPI CCBitBucketItemContextMenu::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - TRACE("CBitBucket_IContextMenu2Item_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",this, uMsg, wParam, lParam); +HRESULT WINAPI CRecycleBinItemContextMenu::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + TRACE("CRecycleBin_IContextMenu2Item_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",this, uMsg, wParam, lParam); return E_NOTIMPL; } -static HRESULT WINAPI CBitBucketItemContextMenuConstructor(REFIID riid, LPCITEMIDLIST pidl, LPVOID *ppv) -{ - CComObject<CCBitBucketItemContextMenu> *theMenu; +static HRESULT WINAPI CRecycleBinItemContextMenuConstructor(REFIID riid, LPCITEMIDLIST pidl, LPVOID *ppv) +{ + CComObject<CRecycleBinItemContextMenu> *theMenu; CComPtr<IUnknown> result; HRESULT hResult; @@ -412,7 +412,7 @@ if (ppv == NULL) return E_POINTER; *ppv = NULL; - ATLTRY(theMenu = new CComObject<CCBitBucketItemContextMenu>); + ATLTRY(theMenu = new CComObject<CRecycleBinItemContextMenu>); if (theMenu == NULL) return E_OUTOFMEMORY; hResult = theMenu->QueryInterface(riid, (void **)&result); @@ -429,23 +429,23 @@ return S_OK; } -CBitBucket::CBitBucket() +CRecycleBin::CRecycleBin() { pidl = NULL; iIdEmpty = 0; } -CBitBucket::~CBitBucket() +CRecycleBin::~CRecycleBin() { /* InterlockedDecrement(&objCount);*/ SHFree(pidl); } /************************************************************************* - * BitBucket IPersistFolder2 interface + * RecycleBin IPersistFolder2 interface */ -HRESULT WINAPI CBitBucket::GetClassID(CLSID *pClassID) +HRESULT WINAPI CRecycleBin::GetClassID(CLSID *pClassID) { TRACE("(%p, %p)\n", this, pClassID); if (pClassID == NULL) @@ -454,7 +454,7 @@ return S_OK; } -HRESULT WINAPI CBitBucket::Initialize(LPCITEMIDLIST pidl) +HRESULT WINAPI CRecycleBin::Initialize(LPCITEMIDLIST pidl) { TRACE("(%p, %p)\n", this, pidl); @@ -465,7 +465,7 @@ return S_OK; } -HRESULT WINAPI CBitBucket::GetCurFolder(LPITEMIDLIST *ppidl) +HRESULT WINAPI CRecycleBin::GetCurFolder(LPITEMIDLIST *ppidl) { TRACE("\n"); *ppidl = ILClone(pidl); @@ -473,10 +473,10 @@ } /************************************************************************* - * BitBucket IShellFolder2 interface + * RecycleBin IShellFolder2 interface */ -HRESULT WINAPI CBitBucket::ParseDisplayName(HWND hwnd, LPBC pbc, +HRESULT WINAPI CRecycleBin::ParseDisplayName(HWND hwnd, LPBC pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, LPITEMIDLIST *ppidl, ULONG *pdwAttributes) { @@ -491,9 +491,9 @@ return (PDELETED_FILE_DETAILS_W)&pidl->mkid.abID; } -HRESULT WINAPI CBitBucket::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) -{ - CComObject<CBitBucketEnum> *theEnumerator; +HRESULT WINAPI CRecycleBin::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) +{ + CComObject<CRecycleBinEnum> *theEnumerator; CComPtr<IEnumIDList> result; HRESULT hResult; @@ -502,7 +502,7 @@ if (ppEnumIDList == NULL) return E_POINTER; *ppEnumIDList = NULL; - ATLTRY (theEnumerator = new CComObject<CBitBucketEnum>); + ATLTRY (theEnumerator = new CComObject<CRecycleBinEnum>); if (theEnumerator == NULL) return E_OUTOFMEMORY; hResult = theEnumerator->QueryInterface(IID_IEnumIDList, (void **)&result); @@ -521,19 +521,19 @@ return S_OK; } -HRESULT WINAPI CBitBucket::BindToObject(LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) +HRESULT WINAPI CRecycleBin::BindToObject(LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) { FIXME("(%p, %p, %p, %s, %p) - stub\n", this, pidl, pbc, debugstr_guid(&riid), ppv); return E_NOTIMPL; } -HRESULT WINAPI CBitBucket::BindToStorage(LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) +HRESULT WINAPI CRecycleBin::BindToStorage(LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) { FIXME("(%p, %p, %p, %s, %p) - stub\n", this, pidl, pbc, debugstr_guid(&riid), ppv); return E_NOTIMPL; } -HRESULT WINAPI CBitBucket::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +HRESULT WINAPI CRecycleBin::CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) { /* TODO */ TRACE("(%p, %p, %p, %p)\n", this, (void *)lParam, pidl1, pidl2); @@ -542,7 +542,7 @@ return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (unsigned short)memcmp(pidl1->mkid.abID, pidl2->mkid.abID, pidl1->mkid.cb)); } -HRESULT WINAPI CBitBucket::CreateViewObject(HWND hwndOwner, REFIID riid, void **ppv) +HRESULT WINAPI CRecycleBin::CreateViewObject(HWND hwndOwner, REFIID riid, void **ppv) { LPSHELLVIEW pShellView; HRESULT hr = E_NOINTERFACE; @@ -579,7 +579,7 @@ } -HRESULT WINAPI CBitBucket::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, +HRESULT WINAPI CRecycleBin::GetAttributesOf(UINT cidl, LPCITEMIDLIST *apidl, SFGAOF *rgfInOut) { TRACE("(%p, %d, {%p, ...}, {%x})\n", this, cidl, apidl ? apidl[0] : NULL, (unsigned int)*rgfInOut); @@ -587,7 +587,7 @@ return S_OK; } -HRESULT WINAPI CBitBucket::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, +HRESULT WINAPI CRecycleBin::GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, REFIID riid, UINT *prgfInOut, void **ppv) { IUnknown *pObj = NULL; @@ -603,7 +603,7 @@ if ((IsEqualIID (riid, IID_IContextMenu) || IsEqualIID(riid, IID_IContextMenu2)) && (cidl >= 1)) { - hr = CBitBucketItemContextMenuConstructor(riid, apidl[0], (void **)&pObj); + hr = CRecycleBinItemContextMenuConstructor(riid, apidl[0], (void **)&pObj); } else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1)) { @@ -620,7 +620,7 @@ return hr; } -HRESULT WINAPI CBitBucket::GetDisplayNameOf(LPCITEMIDLIST pidl, SHGDNF uFlags, STRRET *pName) +HRESULT WINAPI CRecycleBin::GetDisplayNameOf(LPCITEMIDLIST pidl, SHGDNF uFlags, STRRET *pName) { PIDLRecycleStruct *pFileDetails; LPWSTR pFileName; @@ -664,27 +664,27 @@ return S_OK; } -HRESULT WINAPI CBitBucket::SetNameOf(HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR pszName, +HRESULT WINAPI CRecycleBin::SetNameOf(HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR pszName, SHGDNF uFlags, LPITEMIDLIST *ppidlOut) { TRACE("\n"); return E_FAIL; /* not supported */ } -HRESULT WINAPI CBitBucket::GetDefaultSearchGUID(GUID *pguid) +HRESULT WINAPI CRecycleBin::GetDefaultSearchGUID(GUID *pguid) { FIXME("stub\n"); return E_NOTIMPL; } -HRESULT WINAPI CBitBucket::EnumSearches(IEnumExtraSearch **ppEnum) +HRESULT WINAPI CRecycleBin::EnumSearches(IEnumExtraSearch **ppEnum) { FIXME("stub\n"); *ppEnum = NULL; return E_NOTIMPL; } -HRESULT WINAPI CBitBucket::GetDefaultColumn(DWORD dwReserved, ULONG *pSort, ULONG *pDisplay) +HRESULT WINAPI CRecycleBin::GetDefaultColumn(DWORD dwReserved, ULONG *pSort, ULONG *pDisplay) { TRACE("(%p, %x, %p, %p)\n", this, (unsigned int)dwReserved, pSort, pDisplay); *pSort = 0; @@ -692,16 +692,16 @@ return S_OK; } -HRESULT WINAPI CBitBucket::GetDefaultColumnState(UINT iColumn, SHCOLSTATEF *pcsFlags) +HRESULT WINAPI CRecycleBin::GetDefaultColumnState(UINT iColumn, SHCOLSTATEF *pcsFlags) { TRACE("(%p, %d, %p)\n", this, iColumn, pcsFlags); if (iColumn >= COLUMNS_COUNT) return E_INVALIDARG; - *pcsFlags = CBitBucketColumns[iColumn].pcsFlags; - return S_OK; -} - -HRESULT WINAPI CBitBucket::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) + *pcsFlags = RecycleBinColumns[iColumn].pcsFlags; + return S_OK; +} + +HRESULT WINAPI CRecycleBin::GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) { FIXME("stub\n"); return E_NOTIMPL; @@ -727,7 +727,7 @@ return (ret!=0 ? E_FAIL : S_OK); } -HRESULT WINAPI CBitBucket::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, LPSHELLDETAILS pDetails) +HRESULT WINAPI CRecycleBin::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, LPSHELLDETAILS pDetails) { PIDLRecycleStruct * pFileDetails; WCHAR buffer[MAX_PATH]; @@ -738,12 +738,12 @@ TRACE("(%p, %p, %d, %p)\n", this, pidl, iColumn, pDetails); if (iColumn >= COLUMNS_COUNT) return E_FAIL; - pDetails->fmt = CBitBucketColumns[iColumn].fmt; - pDetails->cxChar = CBitBucketColumns[iColumn].cxChars; + pDetails->fmt = RecycleBinColumns[iColumn].fmt; + pDetails->cxChar = RecycleBinColumns[iColumn].cxChars; if (pidl == NULL) { pDetails->str.uType = STRRET_WSTR; - LoadStringW(shell32_hInstance, CBitBucketColumns[iColumn].column_name_id, buffer, MAX_PATH); + LoadStringW(shell32_hInstance, RecycleBinColumns[iColumn].column_name_id, buffer, MAX_PATH); return SHStrDupW(buffer, &pDetails->str.pOleStr); } @@ -791,21 +791,21 @@ return SHStrDupW(buffer, &pDetails->str.pOleStr); } -HRESULT WINAPI CBitBucket::MapColumnToSCID(UINT iColumn, SHCOLUMNID *pscid) +HRESULT WINAPI CRecycleBin::MapColumnToSCID(UINT iColumn, SHCOLUMNID *pscid) { TRACE("(%p, %d, %p)\n", this, iColumn, pscid); if (iColumn>=COLUMNS_COUNT) return E_INVALIDARG; - pscid->fmtid = *CBitBucketColumns[iColumn].fmtId; - pscid->pid = CBitBucketColumns[iColumn].pid; + pscid->fmtid = *RecycleBinColumns[iColumn].fmtId; + pscid->pid = RecycleBinColumns[iColumn].pid; return S_OK; } /************************************************************************* - * BitBucket IContextMenu interface + * RecycleBin IContextMenu interface */ -HRESULT WINAPI CBitBucket::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) +HRESULT WINAPI CRecycleBin::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) { WCHAR szBuffer[100]; MENUITEMINFOW mii; @@ -835,7 +835,7 @@ return MAKE_HRESULT(SEVERITY_SUCCESS, 0, id); } -HRESULT WINAPI CBitBucket::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) +HRESULT WINAPI CRecycleBin::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) { HRESULT hr; LPSHELLBROWSER lpSB; @@ -859,7 +859,7 @@ return S_OK; } -HRESULT WINAPI CBitBucket::GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) +HRESULT WINAPI CRecycleBin::GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) { FIXME("%p %lu %u %p %p %u\n", this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); @@ -867,17 +867,17 @@ } /************************************************************************* - * BitBucket IShellPropSheetExt interface + * RecycleBin IShellPropSheetExt interface */ -HRESULT WINAPI CBitBucket::AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) +HRESULT WINAPI CRecycleBin::AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) { FIXME("%p %p %lu\n", this, pfnAddPage, lParam); return E_NOTIMPL; } -HRESULT WINAPI CBitBucket::ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam) +HRESULT WINAPI CRecycleBin::ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam) { FIXME("%p %lu %p %lu\n", this, uPageID, pfnReplaceWith, lParam); @@ -885,10 +885,10 @@ } /************************************************************************* - * BitBucket IShellExtInit interface + * RecycleBin IShellExtInit interface */ -HRESULT WINAPI CBitBucket::Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) +HRESULT WINAPI CRecycleBin::Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) { TRACE("%p %p %p %p\n", this, pidlFolder, pdtobj, hkeyProgID ); return S_OK; @@ -912,7 +912,7 @@ void -InitializeBitBucketDlg(HWND hwndDlg, WCHAR DefaultDrive) +InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive) { WCHAR CurDrive = L'A'; WCHAR szDrive[] = L"A:\\"; @@ -1132,7 +1132,7 @@ INT_PTR CALLBACK -BitBucketDlg( +RecycleBinDlg( HWND hwndDlg, UINT uMsg, WPARAM wParam, @@ -1152,7 +1152,7 @@ { case WM_INITDIALOG: page = (PROPSHEETPAGE*)lParam; - InitializeBitBucketDlg(hwndDlg, (WCHAR)page->lParam); + InitializeRecycleBinDlg(hwndDlg, (WCHAR)page->lParam); dwStyle = (DWORD) SendDlgItemMessage(hwndDlg, 14000, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); dwStyle = dwStyle | LVS_EX_FULLROWSELECT; SendDlgItemMessage(hwndDlg, 14000, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle); @@ -1260,7 +1260,7 @@ psh.phpage = hpsp; psh.hInstance = shell32_hInstance; - hprop = SH_CreatePropertySheetPage("BITBUCKET_PROPERTIES_DLG", BitBucketDlg, (LPARAM)sDrive, NULL); + hprop = SH_CreatePropertySheetPage("BITBUCKET_PROPERTIES_DLG", RecycleBinDlg, (LPARAM)sDrive, NULL); if (!hprop) { ERR("Failed to create property sheet\n"); @@ -1362,7 +1362,7 @@ } /************************************************************************* - * SHUpdateCBitBucketIcon [SHELL32.@] + * SHUpdateCRecycleBinIcon [SHELL32.@] * * Undocumented */ Modified: trunk/reactos/dll/win32/shell32/shfldr_recyclebin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_r…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_recyclebin.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_recyclebin.h [iso-8859-1] Mon Nov 14 22:46:37 2011 @@ -22,8 +22,8 @@ #ifndef _SHFLDR_RECYCLEBIN_H_ #define _SHFLDR_RECYCLEBIN_H_ -class CBitBucket : - public CComCoClass<CBitBucket, &CLSID_RecycleBin>, +class CRecycleBin : + public CComCoClass<CRecycleBin, &CLSID_RecycleBin>, public CComObjectRootEx<CComMultiThreadModelNoCS>, public IShellFolder2, public IPersistFolder2, @@ -36,8 +36,8 @@ INT iIdEmpty; public: - CBitBucket(); - ~CBitBucket(); + CRecycleBin(); + ~CRecycleBin(); // IPersistFolder virtual HRESULT WINAPI GetClassID(CLSID *pClassID); @@ -80,11 +80,11 @@ virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); DECLARE_REGISTRY_RESOURCEID(IDR_RECYCLEBIN) -DECLARE_NOT_AGGREGATABLE(CBitBucket) +DECLARE_NOT_AGGREGATABLE(CRecycleBin) DECLARE_PROTECT_FINAL_CONSTRUCT() -BEGIN_COM_MAP(CBitBucket) +BEGIN_COM_MAP(CRecycleBin) COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder)
13 years, 1 month
1
0
0
0
[rharabien] 54379: [SHELL32] - Export IContextMenu interface in RecycleBin object. Fixes recycle bin context menu. - Export IShellPropSheetExt interface too and fix order. See issue #6543 for more ...
by rharabien@svn.reactos.org
Author: rharabien Date: Mon Nov 14 22:18:42 2011 New Revision: 54379 URL:
http://svn.reactos.org/svn/reactos?rev=54379&view=rev
Log: [SHELL32] - Export IContextMenu interface in RecycleBin object. Fixes recycle bin context menu. - Export IShellPropSheetExt interface too and fix order. See issue #6543 for more details. Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.h trunk/reactos/dll/win32/shell32/shfldr_recyclebin.cpp trunk/reactos/dll/win32/shell32/shfldr_recyclebin.h Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_d…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_desktop.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_desktop.h [iso-8859-1] Mon Nov 14 22:18:42 2011 @@ -54,7 +54,7 @@ virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); - // *** ShellFolder2 methods *** + // *** IShellFolder2 methods *** virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); Modified: trunk/reactos/dll/win32/shell32/shfldr_recyclebin.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_r…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_recyclebin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_recyclebin.cpp [iso-8859-1] Mon Nov 14 22:18:42 2011 @@ -76,30 +76,6 @@ END_COM_MAP() }; -class CCBitBucketBackgroundContextMenu : - public CComObjectRootEx<CComMultiThreadModelNoCS>, - public IContextMenu2 -{ -private: - INT iIdEmpty; -public: - CCBitBucketBackgroundContextMenu(); - ~CCBitBucketBackgroundContextMenu(); - - // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); - - // IContextMenu2 - virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); - -BEGIN_COM_MAP(CCBitBucketBackgroundContextMenu) - COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) - COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) -END_COM_MAP() -}; - class CCBitBucketItemContextMenu : public CComObjectRootEx<CComMultiThreadModelNoCS>, public IContextMenu2 @@ -305,113 +281,6 @@ TRACE("Returning %d\n", ret); CloseRecycleBinHandle(hDeletedFile); return ret; -} - -/************************************************************************* - * BitBucket context menu - * - */ - -CCBitBucketBackgroundContextMenu::CCBitBucketBackgroundContextMenu() -{ - iIdEmpty = 0; -} - -CCBitBucketBackgroundContextMenu::~CCBitBucketBackgroundContextMenu() -{ -} - -HRESULT WINAPI CCBitBucketBackgroundContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) -{ - WCHAR szBuffer[100]; - MENUITEMINFOW mii; - int id = 1; - - TRACE("%p %p %u %u %u %u\n", this, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags ); - - if (!hMenu) - return E_INVALIDARG; - - memset(&mii, 0, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; - mii.fState = MFS_ENABLED; - szBuffer[0] = L'\0'; - LoadStringW(shell32_hInstance, IDS_EMPTY_BITBUCKET, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)); - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - mii.dwTypeData = szBuffer; - mii.cch = wcslen( mii.dwTypeData ); - mii.wID = idCmdFirst + id++; - mii.fType = MFT_STRING; - iIdEmpty = 1; - - if (!InsertMenuItemW(hMenu, indexMenu, TRUE, &mii)) - return E_FAIL; - - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, id); -} - -HRESULT WINAPI CCBitBucketBackgroundContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) -{ - HRESULT hr; - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV = NULL; - - TRACE("%p %p verb %p\n", this, lpcmi, lpcmi->lpVerb); - - if (LOWORD(lpcmi->lpVerb) == iIdEmpty) - { - // FIXME - // path & flags - hr = SHEmptyRecycleBinW(lpcmi->hwnd, L"C:\\", 0); - TRACE("result %x\n", hr); - if (hr != S_OK) - return hr; - - lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER, 0, 0); - if (lpSB && SUCCEEDED(lpSB->QueryActiveShellView(&lpSV))) - lpSV->Refresh(); - } - return S_OK; -} - -HRESULT WINAPI CCBitBucketBackgroundContextMenu::GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) -{ - FIXME("%p %lu %u %p %p %u\n", this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - return E_NOTIMPL; -} - -HRESULT WINAPI CCBitBucketBackgroundContextMenu::HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - TRACE("CBitBucket_IContextMenu2Item_IContextMenu2Folder_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n", this, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - -static HRESULT WINAPI CBitBucketBackgroundContextMenuConstructor(REFIID riid, LPVOID *ppv) -{ - CComObject<CCBitBucketBackgroundContextMenu> *theMenu; - CComPtr<IUnknown> result; - HRESULT hResult; - - TRACE("%s\n", shdebugstr_guid(&riid)); - - if (ppv == NULL) - return E_POINTER; - *ppv = NULL; - ATLTRY(theMenu = new CComObject<CCBitBucketBackgroundContextMenu>); - if (theMenu == NULL) - return E_OUTOFMEMORY; - hResult = theMenu->QueryInterface(riid, (void **)&result); - if (FAILED(hResult)) - { - delete theMenu; - return hResult; - } - *ppv = result.Detach(); - TRACE ("--(%p)\n", *ppv); - return S_OK; } /************************************************************************** @@ -563,6 +432,7 @@ CBitBucket::CBitBucket() { pidl = NULL; + iIdEmpty = 0; } CBitBucket::~CBitBucket() @@ -570,6 +440,41 @@ /* InterlockedDecrement(&objCount);*/ SHFree(pidl); } + +/************************************************************************* + * BitBucket IPersistFolder2 interface + */ + +HRESULT WINAPI CBitBucket::GetClassID(CLSID *pClassID) +{ + TRACE("(%p, %p)\n", this, pClassID); + if (pClassID == NULL) + return E_INVALIDARG; + memcpy(pClassID, &CLSID_RecycleBin, sizeof(CLSID)); + return S_OK; +} + +HRESULT WINAPI CBitBucket::Initialize(LPCITEMIDLIST pidl) +{ + TRACE("(%p, %p)\n", this, pidl); + + SHFree((LPVOID)this->pidl); + this->pidl = ILClone(pidl); + if (this->pidl == NULL) + return E_OUTOFMEMORY; + return S_OK; +} + +HRESULT WINAPI CBitBucket::GetCurFolder(LPITEMIDLIST *ppidl) +{ + TRACE("\n"); + *ppidl = ILClone(pidl); + return S_OK; +} + +/************************************************************************* + * BitBucket IShellFolder2 interface + */ HRESULT WINAPI CBitBucket::ParseDisplayName(HWND hwnd, LPBC pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, LPITEMIDLIST *ppidl, @@ -656,7 +561,7 @@ } else if (IsEqualIID (riid, IID_IContextMenu) || IsEqualIID (riid, IID_IContextMenu2)) { - hr = CBitBucketBackgroundContextMenuConstructor(riid, ppv); + hr = this->QueryInterface(riid, ppv); } else if (IsEqualIID (riid, IID_IShellView)) { @@ -896,31 +801,87 @@ return S_OK; } -HRESULT WINAPI CBitBucket::GetClassID(CLSID *pClassID) -{ - TRACE("(%p, %p)\n", this, pClassID); - if (pClassID == NULL) +/************************************************************************* + * BitBucket IContextMenu interface + */ + +HRESULT WINAPI CBitBucket::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) +{ + WCHAR szBuffer[100]; + MENUITEMINFOW mii; + int id = 1; + + TRACE("%p %p %u %u %u %u\n", this, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags ); + + if (!hMenu) return E_INVALIDARG; - memcpy(pClassID, &CLSID_RecycleBin, sizeof(CLSID)); - return S_OK; -} - -HRESULT WINAPI CBitBucket::Initialize(LPCITEMIDLIST pidl) -{ - TRACE("(%p, %p)\n", this, pidl); - - SHFree((LPVOID)this->pidl); - this->pidl = ILClone(pidl); - if (this->pidl == NULL) - return E_OUTOFMEMORY; - return S_OK; -} - -HRESULT WINAPI CBitBucket::GetCurFolder(LPITEMIDLIST *ppidl) -{ - TRACE("\n"); - *ppidl = ILClone(pidl); - return S_OK; + + memset(&mii, 0, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; + mii.fState = MFS_ENABLED; + szBuffer[0] = L'\0'; + LoadStringW(shell32_hInstance, IDS_EMPTY_BITBUCKET, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)); + szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + mii.dwTypeData = szBuffer; + mii.cch = wcslen( mii.dwTypeData ); + mii.wID = idCmdFirst + id++; + mii.fType = MFT_STRING; + iIdEmpty = 1; + + if (!InsertMenuItemW(hMenu, indexMenu, TRUE, &mii)) + return E_FAIL; + + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, id); +} + +HRESULT WINAPI CBitBucket::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) +{ + HRESULT hr; + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV = NULL; + + TRACE("%p %p verb %p\n", this, lpcmi, lpcmi->lpVerb); + + if (LOWORD(lpcmi->lpVerb) == iIdEmpty) + { + // FIXME + // path & flags + hr = SHEmptyRecycleBinW(lpcmi->hwnd, L"C:\\", 0); + TRACE("result %x\n", hr); + if (hr != S_OK) + return hr; + + lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER, 0, 0); + if (lpSB && SUCCEEDED(lpSB->QueryActiveShellView(&lpSV))) + lpSV->Refresh(); + } + return S_OK; +} + +HRESULT WINAPI CBitBucket::GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) +{ + FIXME("%p %lu %u %p %p %u\n", this, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + return E_NOTIMPL; +} + +/************************************************************************* + * BitBucket IShellPropSheetExt interface + */ + +HRESULT WINAPI CBitBucket::AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) +{ + FIXME("%p %p %lu\n", this, pfnAddPage, lParam); + + return E_NOTIMPL; +} + +HRESULT WINAPI CBitBucket::ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam) +{ + FIXME("%p %lu %p %lu\n", this, uPageID, pfnReplaceWith, lParam); + + return E_NOTIMPL; } /************************************************************************* Modified: trunk/reactos/dll/win32/shell32/shfldr_recyclebin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_r…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_recyclebin.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_recyclebin.h [iso-8859-1] Mon Nov 14 22:18:42 2011 @@ -27,13 +27,24 @@ public CComObjectRootEx<CComMultiThreadModelNoCS>, public IShellFolder2, public IPersistFolder2, + public IContextMenu, + public IShellPropSheetExt, public IShellExtInit { private: LPITEMIDLIST pidl; + INT iIdEmpty; + public: CBitBucket(); ~CBitBucket(); + + // IPersistFolder + virtual HRESULT WINAPI GetClassID(CLSID *pClassID); + virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); + + // IPersistFolder2 + virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); // IShellFolder virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes); @@ -47,7 +58,7 @@ virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet); virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut); - /* ShellFolder2 */ + // IShellFolder2 virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); @@ -56,14 +67,14 @@ virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd); virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); - // IPersist - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + // IContextMenu + virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); + virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); - // IPersistFolder - virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); - - // IPersistFolder2 - virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); + // IShellPropSheetExt + virtual HRESULT WINAPI AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam); + virtual HRESULT WINAPI ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam); // IShellExtInit virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); @@ -74,11 +85,12 @@ DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CBitBucket) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) + COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) - COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) - COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder) - COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2) - COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) + COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) + COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt, IShellPropSheetExt) COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) END_COM_MAP() };
13 years, 1 month
1
0
0
0
[jimtabor] 54378: - Fix RosApps build.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Nov 14 22:14:52 2011 New Revision: 54378 URL:
http://svn.reactos.org/svn/reactos?rev=54378&view=rev
Log: - Fix RosApps build. Modified: trunk/rosapps/applications/sysutils/regexpl/ph.h Modified: trunk/rosapps/applications/sysutils/regexpl/ph.h URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rege…
============================================================================== --- trunk/rosapps/applications/sysutils/regexpl/ph.h [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/regexpl/ph.h [iso-8859-1] Mon Nov 14 22:14:52 2011 @@ -21,8 +21,8 @@ #include <stdarg.h> #include <windef.h> +#include <winbase.h> #include <wincon.h> -#include <winbase.h> #include <wingdi.h> #include <winuser.h> #include <winreg.h>
13 years, 1 month
1
0
0
0
[tfaber] 54377: [ADVAPI32_WINETEST] - Make the Spooler -> Eventlog hack complete instead of half-doing it. "Fixes" test failure on Windows. See r53502
by tfaber@svn.reactos.org
Author: tfaber Date: Mon Nov 14 18:43:26 2011 New Revision: 54377 URL:
http://svn.reactos.org/svn/reactos?rev=54377&view=rev
Log: [ADVAPI32_WINETEST] - Make the Spooler -> Eventlog hack complete instead of half-doing it. "Fixes" test failure on Windows. See r53502 Modified: trunk/rostests/winetests/advapi32/service.c Modified: trunk/rostests/winetests/advapi32/service.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/servic…
============================================================================== --- trunk/rostests/winetests/advapi32/service.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/service.c [iso-8859-1] Mon Nov 14 18:43:26 2011 @@ -145,7 +145,8 @@ /* Proper SCM handle but different access rights */ scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); SetLastError(0xdeadbeef); - svc_handle = OpenServiceA(scm_handle, "Spooler", GENERIC_WRITE); + /* ReactOS. See top of the file */ + svc_handle = OpenServiceA(scm_handle, spooler, GENERIC_WRITE); if (!svc_handle && (GetLastError() == ERROR_ACCESS_DENIED)) skip("Not enough rights to get a handle to the service\n"); else @@ -433,7 +434,8 @@ WCHAR displaynameW[2048]; DWORD displaysize, tempsize, tempsizeW; static const CHAR deadbeef[] = "Deadbeef"; - static const WCHAR spoolerW[] = {'S','p','o','o','l','e','r',0}; + /* ReactOS. See top of the file */ + static const WCHAR spoolerW[] = {'E','v','e','n','t','l','o','g',0}; static const WCHAR deadbeefW[] = {'D','e','a','d','b','e','e','f',0}; static const WCHAR abcW[] = {'A','B','C',0}; static const CHAR servicename[] = "Winetest";
13 years, 1 month
1
0
0
0
[jimtabor] 54376: [Win32k|User32] - Fix broadcast message, pass all wine tests. Code consolidation next round.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Nov 14 15:20:48 2011 New Revision: 54376 URL:
http://svn.reactos.org/svn/reactos?rev=54376&view=rev
Log: [Win32k|User32] - Fix broadcast message, pass all wine tests. Code consolidation next round. Modified: trunk/reactos/dll/win32/user32/windows/message.c trunk/reactos/subsystems/win32/win32k/ntuser/message.c Modified: trunk/reactos/dll/win32/user32/windows/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Mon Nov 14 15:20:48 2011 @@ -2728,7 +2728,7 @@ if (pci->CallbackWnd.hWnd == UMMsg.hwnd) pWnd = pci->CallbackWnd.pWnd; - + CallbackArgs->Result = IntCallWindowProcW( CallbackArgs->IsAnsiProc, CallbackArgs->Proc, pWnd, @@ -3059,16 +3059,13 @@ if (dwflags & BSF_LUID) parm.luid = pBSMInfo->luid; - if (*lpdwRecipients & BSM_APPLICATIONS) - { - ret = NtUserMessageCall(GetDesktopWindow(), - uiMessage, - wParam, - lParam, - (ULONG_PTR)&parm, - FNID_BROADCASTSYSTEMMESSAGE, - Ansi); - } + ret = NtUserMessageCall(GetDesktopWindow(), + uiMessage, + wParam, + lParam, + (ULONG_PTR)&parm, + FNID_BROADCASTSYSTEMMESSAGE, + Ansi); if (!ret) { Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Mon Nov 14 15:20:48 2011 @@ -2066,7 +2066,7 @@ break; case FNID_BROADCASTSYSTEMMESSAGE: { - BROADCASTPARM parm; + BROADCASTPARM parm, *retparam; DWORD_PTR RetVal = 0; if (ResultInfo) @@ -2086,53 +2086,286 @@ break; if ( parm.recipients & BSM_ALLDESKTOPS || - parm.recipients == BSM_ALLCOMPONENTS ) - { - } - else if (parm.recipients & BSM_APPLICATIONS) - { - if (parm.flags & BSF_QUERY) - { - if (parm.flags & BSF_FORCEIFHUNG || parm.flags & BSF_NOHANG) - { - co_IntSendMessageTimeout( HWND_BROADCAST, + parm.recipients == BSM_ALLCOMPONENTS ) + { + PLIST_ENTRY DesktopEntry; + PDESKTOP rpdesk; + HWND *List, hwndDenied = NULL; + HDESK hDesk = NULL; + PWND pwnd, pwndDesk; + ULONG i; + UINT fuFlags; + + for (DesktopEntry = InputWindowStation->DesktopListHead.Flink; + DesktopEntry != &InputWindowStation->DesktopListHead; + DesktopEntry = DesktopEntry->Flink) + { + rpdesk = CONTAINING_RECORD(DesktopEntry, DESKTOP, ListEntry); + pwndDesk = rpdesk->pDeskInfo->spwnd; + List = IntWinListChildren(pwndDesk); + + if (parm.flags & BSF_QUERY) + { + if (List != NULL) + { + if (parm.flags & BSF_FORCEIFHUNG || parm.flags & BSF_NOHANG) + { + fuFlags = SMTO_ABORTIFHUNG; + } + else if (parm.flags & BSF_NOTIMEOUTIFNOTHUNG) + { + fuFlags = SMTO_NOTIMEOUTIFNOTHUNG; + } + else + { + fuFlags = SMTO_NORMAL; + } + co_IntSendMessageTimeout( UserHMGetHandle(pwndDesk), Msg, wParam, lParam, - SMTO_ABORTIFHUNG, + fuFlags, 2000, &RetVal); - } - else if (parm.flags & BSF_NOTIMEOUTIFNOTHUNG) - { - co_IntSendMessageTimeout( HWND_BROADCAST, + Ret = TRUE; + for (i = 0; List[i]; i++) + { + pwnd = UserGetWindowObject(List[i]); + if (!pwnd) continue; + + if ( pwnd->fnid == FNID_MENU || + pwnd->pcls->atomClassName == gpsi->atomSysClass[ICLS_SWITCH] ) + continue; + + if ( parm.flags & BSF_IGNORECURRENTTASK ) + { + if ( pwnd->head.pti->MessageQueue == gptiCurrent->MessageQueue ) + continue; + } + co_IntSendMessageTimeout( List[i], + Msg, + wParam, + lParam, + fuFlags, + 2000, + &RetVal); + + if (!RetVal && EngGetLastError() == ERROR_TIMEOUT) + { + if (!(parm.flags & BSF_FORCEIFHUNG)) + Ret = FALSE; + } + if (RetVal == BROADCAST_QUERY_DENY) + { + hwndDenied = List[i]; + hDesk = UserHMGetHandle(pwndDesk); + Ret = FALSE; + } + } + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); + _SEH2_TRY + { + retparam = (PBROADCASTPARM) ResultInfo; + retparam->hDesk = hDesk; + retparam->hWnd = hwndDenied; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + _SEH2_YIELD(break); + } + _SEH2_END; + if (!Ret) break; // Have a hit! Let everyone know! + } + } + else if (parm.flags & BSF_POSTMESSAGE) + { + if (List != NULL) + { + UserPostMessage(UserHMGetHandle(pwndDesk), Msg, wParam, lParam); + + for (i = 0; List[i]; i++) + { + pwnd = UserGetWindowObject(List[i]); + if (!pwnd) continue; + + if ( pwnd->fnid == FNID_MENU || + pwnd->pcls->atomClassName == gpsi->atomSysClass[ICLS_SWITCH] ) + continue; + + if ( parm.flags & BSF_IGNORECURRENTTASK ) + { + if ( pwnd->head.pti->MessageQueue == gptiCurrent->MessageQueue ) + continue; + } + UserPostMessage(List[i], Msg, wParam, lParam); + } + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); + } + Ret = TRUE; + } + else + { + if (List != NULL) + { + UserSendNotifyMessage(UserHMGetHandle(pwndDesk), Msg, wParam, lParam); + + for (i = 0; List[i]; i++) + { + pwnd = UserGetWindowObject(List[i]); + if (!pwnd) continue; + + if ( pwnd->fnid == FNID_MENU || + pwnd->pcls->atomClassName == gpsi->atomSysClass[ICLS_SWITCH] ) + continue; + + if ( parm.flags & BSF_IGNORECURRENTTASK ) + { + if ( pwnd->head.pti->MessageQueue == gptiCurrent->MessageQueue ) + continue; + } + UserSendNotifyMessage(List[i], Msg, wParam, lParam); + } + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); + } + Ret = TRUE; + } + } + } + else if (parm.recipients & BSM_APPLICATIONS) + { + HWND *List, hwndDenied = NULL; + HDESK hDesk = NULL; + PWND pwnd, pwndDesk; + ULONG i; + UINT fuFlags; + + pwndDesk = UserGetWindowObject(IntGetDesktopWindow()); + List = IntWinListChildren(pwndDesk); + + if (parm.flags & BSF_QUERY) + { + if (List != NULL) + { + if (parm.flags & BSF_FORCEIFHUNG || parm.flags & BSF_NOHANG) + { + fuFlags = SMTO_ABORTIFHUNG; + } + else if (parm.flags & BSF_NOTIMEOUTIFNOTHUNG) + { + fuFlags = SMTO_NOTIMEOUTIFNOTHUNG; + } + else + { + fuFlags = SMTO_NORMAL; + } + co_IntSendMessageTimeout( UserHMGetHandle(pwndDesk), + Msg, + wParam, + lParam, + fuFlags, + 2000, + &RetVal); + Ret = TRUE; + for (i = 0; List[i]; i++) + { + pwnd = UserGetWindowObject(List[i]); + if (!pwnd) continue; + + if ( pwnd->fnid == FNID_MENU || + pwnd->pcls->atomClassName == gpsi->atomSysClass[ICLS_SWITCH] ) + continue; + + if ( parm.flags & BSF_IGNORECURRENTTASK ) + { + if ( pwnd->head.pti->MessageQueue == gptiCurrent->MessageQueue ) + continue; + } + co_IntSendMessageTimeout( List[i], Msg, wParam, lParam, - SMTO_NOTIMEOUTIFNOTHUNG, + fuFlags, 2000, &RetVal); - } - else - { - co_IntSendMessageTimeout( HWND_BROADCAST, - Msg, - wParam, - lParam, - SMTO_NORMAL, - 2000, - &RetVal); - } - Ret = RetVal; - } - else if (parm.flags & BSF_POSTMESSAGE) - { - Ret = UserPostMessage(HWND_BROADCAST, Msg, wParam, lParam); - } - else //Everything else,,,, if ( parm.flags & BSF_SENDNOTIFYMESSAGE) - { - Ret = UserSendNotifyMessage(HWND_BROADCAST, Msg, wParam, lParam); - } + + if (!RetVal && EngGetLastError() == ERROR_TIMEOUT) + { + if (!(parm.flags & BSF_FORCEIFHUNG)) + Ret = FALSE; + } + if (RetVal == BROADCAST_QUERY_DENY) + { + hwndDenied = List[i]; + hDesk = UserHMGetHandle(pwndDesk); + Ret = FALSE; + } + } + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); + _SEH2_TRY + { + retparam = (PBROADCASTPARM) ResultInfo; + retparam->hDesk = hDesk; + retparam->hWnd = hwndDenied; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + _SEH2_YIELD(break); + } + _SEH2_END; + } + } + else if (parm.flags & BSF_POSTMESSAGE) + { + if (List != NULL) + { + UserPostMessage(UserHMGetHandle(pwndDesk), Msg, wParam, lParam); + + for (i = 0; List[i]; i++) + { + pwnd = UserGetWindowObject(List[i]); + if (!pwnd) continue; + + if ( pwnd->fnid == FNID_MENU || + pwnd->pcls->atomClassName == gpsi->atomSysClass[ICLS_SWITCH] ) + continue; + + if ( parm.flags & BSF_IGNORECURRENTTASK ) + { + if ( pwnd->head.pti->MessageQueue == gptiCurrent->MessageQueue ) + continue; + } + UserPostMessage(List[i], Msg, wParam, lParam); + } + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); + } + Ret = TRUE; + } + else + { + if (List != NULL) + { + UserSendNotifyMessage(UserHMGetHandle(pwndDesk), Msg, wParam, lParam); + + for (i = 0; List[i]; i++) + { + pwnd = UserGetWindowObject(List[i]); + if (!pwnd) continue; + + if ( pwnd->fnid == FNID_MENU || + pwnd->pcls->atomClassName == gpsi->atomSysClass[ICLS_SWITCH] ) + continue; + + if ( parm.flags & BSF_IGNORECURRENTTASK ) + { + if ( pwnd->head.pti->MessageQueue == gptiCurrent->MessageQueue ) + continue; + } + UserSendNotifyMessage(List[i], Msg, wParam, lParam); + } + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); + } + Ret = TRUE; + } } } break;
13 years, 1 month
1
0
0
0
[spetreolle] 54375: [NDK] Fix definition of RtlExtendedLargeIntegerDivide.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Sun Nov 13 23:47:21 2011 New Revision: 54375 URL:
http://svn.reactos.org/svn/reactos?rev=54375&view=rev
Log: [NDK] Fix definition of RtlExtendedLargeIntegerDivide. Modified: trunk/reactos/include/ndk/rtlfuncs.h Modified: trunk/reactos/include/ndk/rtlfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Sun Nov 13 23:47:21 2011 @@ -3555,8 +3555,23 @@ return Product; } -#endif - +#if defined(_AMD64_) || defined(_IA64_) +static __inline +LARGE_INTEGER +NTAPI_INLINE +RtlExtendedLargeIntegerDivide( + IN LARGE_INTEGER Dividend, + IN ULONG Divisor, + OUT PULONG Remainder OPTIONAL) +{ + LARGE_INTEGER ret; + ret.QuadPart = (ULONG64)Dividend.QuadPart / Divisor; + if (Remainder) + *Remainder = (ULONG)(Dividend.QuadPart % Divisor); + return ret; +} + +#else NTSYSAPI LARGE_INTEGER NTAPI @@ -3565,6 +3580,11 @@ IN ULONG Divisor, OUT PULONG Remainder OPTIONAL ); + +#endif /* defined(_AMD64_) || defined(_IA64_) */ + +#endif + NTSYSAPI ULONG
13 years, 1 month
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
28
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
Results per page:
10
25
50
100
200