mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:05:42 +00:00
parent
9c11be5a3a
commit
711f631849
1 changed files with 12 additions and 3 deletions
|
@ -191,13 +191,17 @@ CRecycleBinEnum::~CRecycleBinEnum()
|
||||||
|
|
||||||
HRESULT WINAPI CRecycleBinEnum::Initialize(DWORD dwFlags)
|
HRESULT WINAPI CRecycleBinEnum::Initialize(DWORD dwFlags)
|
||||||
{
|
{
|
||||||
static LPCWSTR szDrive = L"C:\\";
|
WCHAR szDrive[8];
|
||||||
|
if (GetEnvironmentVariableW(L"SystemDrive", szDrive, _countof(szDrive)))
|
||||||
|
PathAddBackslashW(szDrive);
|
||||||
|
else
|
||||||
|
StringCbCopyW(szDrive, sizeof(szDrive), L"C:\\");
|
||||||
|
|
||||||
if (dwFlags & SHCONTF_NONFOLDERS)
|
if (dwFlags & SHCONTF_NONFOLDERS)
|
||||||
{
|
{
|
||||||
TRACE("Starting Enumeration\n");
|
TRACE("Starting Enumeration\n");
|
||||||
|
|
||||||
if (!EnumerateRecycleBinW(szDrive /* FIXME */ , CBEnumRecycleBin, (PVOID)this))
|
if (!EnumerateRecycleBinW(szDrive, CBEnumRecycleBin, this))
|
||||||
{
|
{
|
||||||
WARN("Error: EnumerateCRecycleBinW failed\n");
|
WARN("Error: EnumerateCRecycleBinW failed\n");
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
@ -354,7 +358,7 @@ HRESULT WINAPI CRecycleBinItemContextMenu::QueryContextMenu(HMENU hMenu, UINT in
|
||||||
HRESULT WINAPI CRecycleBinItemContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi)
|
HRESULT WINAPI CRecycleBinItemContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi)
|
||||||
{
|
{
|
||||||
SEARCH_CONTEXT Context;
|
SEARCH_CONTEXT Context;
|
||||||
static LPCWSTR szDrive = L"C:\\";
|
WCHAR szDrive[8];
|
||||||
|
|
||||||
TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n", this, lpcmi, lpcmi->lpVerb, lpcmi->hwnd);
|
TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n", this, lpcmi, lpcmi->lpVerb, lpcmi->hwnd);
|
||||||
|
|
||||||
|
@ -363,6 +367,11 @@ HRESULT WINAPI CRecycleBinItemContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO l
|
||||||
Context.pFileDetails = _ILGetRecycleStruct(apidl);
|
Context.pFileDetails = _ILGetRecycleStruct(apidl);
|
||||||
Context.bFound = FALSE;
|
Context.bFound = FALSE;
|
||||||
|
|
||||||
|
if (GetEnvironmentVariableW(L"SystemDrive", szDrive, _countof(szDrive)))
|
||||||
|
PathAddBackslashW(szDrive);
|
||||||
|
else
|
||||||
|
StringCbCopyW(szDrive, sizeof(szDrive), L"C:\\");
|
||||||
|
|
||||||
EnumerateRecycleBinW(szDrive, CBSearchRecycleBin, (PVOID)&Context);
|
EnumerateRecycleBinW(szDrive, CBSearchRecycleBin, (PVOID)&Context);
|
||||||
if (!Context.bFound)
|
if (!Context.bFound)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue