mirror of
https://github.com/reactos/reactos.git
synced 2024-06-01 10:11:43 +00:00
[0.4.11][SHELL32] Backport format+logging-trivia, ARRAYSIZE/_countof
Picks various trivial improvements from newer branches, does not fix specific JIRA-tickets and also doesn't *entirely* cover a specific PR, therefore none of those are mentioned here. Main motivation is to reduce large scale white-noise diff between the branches, to make future commits diffs (with some fixes that actually matter) smaller in size and therefore easier to review. Specifically: - large-scale formatting & logging improvements, including but not limited to 0.4.15-dev-7653-g6f91b6c0fe
- strip trailing whitespace - also typos like 'unkown', missing \n as it was part of 0.4.15-dev-6323-g3854a5d8e9
and 0.4.15-dev-4492-g03422451b3
(I left out the MOUSE_MOVE-one from that, because I consider the missing \n there intentional) - ports back many usages of ARRAYSIZE/_countof as it was added as part of some commits from Hermes, e.g.: *partial* pick of 0.4.13-dev-622-g8a30801516
and *partial* pick of 0.4.15-dev-3642-g83be315abf
(I left out the literals here for now, ... I *might* pick them later on their own, but not now. I first want to verify their isolated impact on all compilers generated file-sizes. Some of those changes would even increase the binary size, especially those where the same literal is used multiple times, because string-pooling is currently not enabled for all toolchains and configurations.) - COpenWithMenu.cpp: strip double-semicolon - COpenWithMenu.cpp && folder_options.cpp: add \n to some dbg-prints without increasing their length - CFSDropTarget.cpp: add \n to some dbg-prints, strip some good-path-traces that are no longer present in master in return to avoid size increase, fix indentation - CShellLink.cpp: add \n to some dbg-prints without increasing their length - iconcache.cpp: fix wrong indentation binary size of shell32.dll has tendency to shrink slightly, which is caused solely by the logging changes: master RosBEWin2.2.2 GCC8.4.0 dbg x86 10.538.496 (0.4.15-dev-7640-gbdcfc6b) releases/0.4.14 RosBEWin2.2.2 GCC8.4.0 dbg x86 9.317.888 -> 9.316.684 releases/0.4.14 RosBEWin2.1.6 GCC4.7.2 dbg x86 9.345.024 -> 9.345.024 releases/0.4.13 RosBEWin2.1.6 GCC4.7.2 dbg x86 9.201.152 -> 9.200.640 releases/0.4.12 RosBEWin2.1.6 GCC4.7.2 dbg x86 9.146.880 -> 9.146.880 releases/0.4.11 RosBEWin2.1.6 GCC4.7.2 dbg x86 9.077.760 -> 9.077.248 releases/0.4.10 RosBEWin2.1.6 GCC4.7.2 dbg x86 9.074.176 -> 9.072.128 releases/0.4. 9 RosBEWin2.1.6 GCC4.7.2 dbg x86 8.825.856 -> 8.824.832 releases/0.4. 8 RosBEWin2.1.6 GCC4.7.2 dbg x86 8.740.864 -> 8.738.816 releases/0.4. 7 RosBEWin2.1.6 GCC4.7.2 dbg x86 8.668.160 -> 8.666.624
This commit is contained in:
parent
69a8fd0a73
commit
f2aa852a77
File diff suppressed because it is too large
Load diff
|
@ -133,8 +133,8 @@ CDefViewBckgrndMenu::SetSite(IUnknown *pUnkSite)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT
|
||||
WINAPI
|
||||
HRESULT
|
||||
WINAPI
|
||||
CDefViewBckgrndMenu::GetSite(REFIID riid, void **ppvSite)
|
||||
{
|
||||
if (!m_site)
|
||||
|
@ -152,12 +152,12 @@ CDefViewBckgrndMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFir
|
|||
UINT cIds = 0;
|
||||
|
||||
/* This is something the implementations of IContextMenu should never really do.
|
||||
However CDefViewBckgrndMenu is more or less an overengineering result, its code could really be part of the
|
||||
However CDefViewBckgrndMenu is more or less an overengineering result, its code could really be part of the
|
||||
CDefView. Given this, I think that abusing the interface here is not that bad since only CDefView is the ony
|
||||
user of this class. Here we need to do two things to keep things as simple as possible.
|
||||
user of this class. Here we need to do two things to keep things as simple as possible.
|
||||
First we want the menu part added by the shell folder to be the first to add so as to make as few id translations
|
||||
as possible. Second, we want to add the default part of the background menu without shifted ids, so as
|
||||
to let the CDefView fill some parts like filling the arrange modes or checking the view mode. In order
|
||||
as possible. Second, we want to add the default part of the background menu without shifted ids, so as
|
||||
to let the CDefView fill some parts like filling the arrange modes or checking the view mode. In order
|
||||
for that to work we need to save idCmdFirst because our caller will pass id offsets to InvokeCommand.
|
||||
This makes it impossible to concatenate the CDefViewBckgrndMenu with other menus since it abuses IContextMenu
|
||||
but as stated above, its sole user is CDefView and should really be that way. */
|
||||
|
|
|
@ -58,7 +58,6 @@ struct _StaticInvokeCommandMap_
|
|||
{ "rename", FCIDM_SHVIEW_RENAME},
|
||||
};
|
||||
|
||||
|
||||
class CDefaultContextMenu :
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IContextMenu3,
|
||||
|
@ -160,7 +159,6 @@ CDefaultContextMenu::CDefaultContextMenu() :
|
|||
m_iIdCBLast(0),
|
||||
m_iIdDfltFirst(0),
|
||||
m_iIdDfltLast(0)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -515,7 +513,7 @@ UINT
|
|||
CDefaultContextMenu::AddStaticContextMenusToMenu(
|
||||
HMENU hMenu,
|
||||
UINT* pIndexMenu,
|
||||
UINT iIdCmdFirst,
|
||||
UINT iIdCmdFirst,
|
||||
UINT iIdCmdLast)
|
||||
{
|
||||
MENUITEMINFOW mii;
|
||||
|
@ -773,7 +771,7 @@ HRESULT CDefaultContextMenu::DoPaste(LPCMINVOKECOMMANDINFO lpcmi, BOOL bLink)
|
|||
dwKey = MK_SHIFT;
|
||||
}
|
||||
else {
|
||||
ERR("No drop effect obtained");
|
||||
ERR("No drop effect obtained\n");
|
||||
}
|
||||
GlobalUnlock(medium2.hGlobal);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ class CFolderOptions :
|
|||
// IShellPropSheetExt
|
||||
virtual HRESULT STDMETHODCALLTYPE AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam);
|
||||
virtual HRESULT STDMETHODCALLTYPE ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam);
|
||||
|
||||
|
||||
// IShellExtInit
|
||||
virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID);
|
||||
|
||||
|
|
|
@ -1,24 +1,5 @@
|
|||
/*
|
||||
* IEnumFORMATETC, IDataObject
|
||||
*
|
||||
* selecting and droping objects within the shell and/or common dialogs
|
||||
*
|
||||
* Copyright 1998, 1999 <juergen.schmied@metronet.de>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
// LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
// COPYRIGHT: 1998-1999 <juergen.schmied@metronet.de>
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
|
@ -65,7 +46,7 @@ IEnumFORMATETCImpl::~IEnumFORMATETCImpl()
|
|||
|
||||
HRESULT WINAPI IEnumFORMATETCImpl::Initialize(UINT cfmt, const FORMATETC afmt[])
|
||||
{
|
||||
DWORD size;
|
||||
DWORD size;
|
||||
|
||||
size = cfmt * sizeof(FORMATETC);
|
||||
countFmt = cfmt;
|
||||
|
@ -89,7 +70,7 @@ HRESULT WINAPI IEnumFORMATETCImpl::Next(ULONG celt, FORMATETC *rgelt, ULONG *pce
|
|||
|
||||
for(i = 0; posFmt < countFmt && celt > i; i++)
|
||||
{
|
||||
*rgelt++ = pFmt[posFmt++];
|
||||
*rgelt++ = pFmt[posFmt++];
|
||||
}
|
||||
|
||||
if (pceltFethed) *pceltFethed = i;
|
||||
|
@ -110,13 +91,13 @@ HRESULT WINAPI IEnumFORMATETCImpl::Reset()
|
|||
{
|
||||
TRACE("(%p)->()\n", this);
|
||||
|
||||
posFmt = 0;
|
||||
return S_OK;
|
||||
posFmt = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI IEnumFORMATETCImpl::Clone(LPENUMFORMATETC* ppenum)
|
||||
{
|
||||
HRESULT hResult;
|
||||
HRESULT hResult;
|
||||
|
||||
TRACE("(%p)->(ppenum=%p)\n", this, ppenum);
|
||||
|
||||
|
@ -143,7 +124,7 @@ HRESULT IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[], IEnumFORMA
|
|||
class CIDLDataObj :
|
||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||
public IDataObject,
|
||||
public IAsyncOperation
|
||||
public IAsyncOperation
|
||||
{
|
||||
private:
|
||||
LPITEMIDLIST pidl;
|
||||
|
@ -245,7 +226,7 @@ static HGLOBAL RenderPREFEREDDROPEFFECT (DWORD dwFlags)
|
|||
*/
|
||||
HRESULT WINAPI CIDLDataObj::GetData(LPFORMATETC pformatetcIn, STGMEDIUM *pmedium)
|
||||
{
|
||||
char szTemp[256];
|
||||
char szTemp[256];
|
||||
|
||||
szTemp[0] = 0;
|
||||
GetClipboardFormatNameA (pformatetcIn->cfFormat, szTemp, 256);
|
||||
|
@ -256,22 +237,22 @@ HRESULT WINAPI CIDLDataObj::GetData(LPFORMATETC pformatetcIn, STGMEDIUM *pmedium
|
|||
if (cidl < 1) return(E_UNEXPECTED);
|
||||
pmedium->hGlobal = RenderSHELLIDLIST(pidl, apidl, cidl);
|
||||
}
|
||||
else if (pformatetcIn->cfFormat == CF_HDROP)
|
||||
else if (pformatetcIn->cfFormat == CF_HDROP)
|
||||
{
|
||||
if (cidl < 1) return(E_UNEXPECTED);
|
||||
pmedium->hGlobal = RenderHDROP(pidl, apidl, cidl);
|
||||
}
|
||||
else if (pformatetcIn->cfFormat == cfFileNameA)
|
||||
else if (pformatetcIn->cfFormat == cfFileNameA)
|
||||
{
|
||||
if (cidl < 1) return(E_UNEXPECTED);
|
||||
pmedium->hGlobal = RenderFILENAMEA(pidl, apidl, cidl);
|
||||
}
|
||||
else if (pformatetcIn->cfFormat == cfFileNameW)
|
||||
else if (pformatetcIn->cfFormat == cfFileNameW)
|
||||
{
|
||||
if (cidl < 1) return(E_UNEXPECTED);
|
||||
pmedium->hGlobal = RenderFILENAMEW(pidl, apidl, cidl);
|
||||
}
|
||||
else if (pformatetcIn->cfFormat == cfPreferredDropEffect)
|
||||
else if (pformatetcIn->cfFormat == cfPreferredDropEffect)
|
||||
{
|
||||
pmedium->hGlobal = RenderPREFEREDDROPEFFECT(dropeffect);
|
||||
}
|
||||
|
@ -385,7 +366,7 @@ HRESULT WINAPI CIDLDataObj::InOperation(BOOL *pfInAsyncOp)
|
|||
FIXME("(%p)->()\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
HRESULT WINAPI CIDLDataObj::SetAsyncMode(BOOL fDoOpAsync)
|
||||
HRESULT WINAPI CIDLDataObj::SetAsyncMode(BOOL fDoOpAsync)
|
||||
{
|
||||
TRACE("(%p)->()\n", this);
|
||||
doasync = fDoOpAsync;
|
||||
|
|
|
@ -65,7 +65,6 @@ void CNewMenu::UnloadAllItems()
|
|||
{
|
||||
pCurItem = m_pItems;
|
||||
m_pItems = m_pItems->pNext;
|
||||
|
||||
UnloadItem(pCurItem);
|
||||
}
|
||||
|
||||
|
@ -201,9 +200,9 @@ CNewMenu::CacheItems()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dwSize++;
|
||||
|
||||
|
||||
lpValues = (LPWSTR) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize * sizeof(WCHAR));
|
||||
if (!lpValues)
|
||||
return FALSE;
|
||||
|
@ -222,17 +221,17 @@ CNewMenu::CacheItems()
|
|||
HeapFree(GetProcessHeap(), 0, lpValues);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (RegSetValueExW(hKey, L"Classes", NULL, REG_MULTI_SZ, (LPBYTE)lpValues, dwSize * sizeof(WCHAR)) != ERROR_SUCCESS)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, lpValues);
|
||||
RegCloseKey(hKey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, lpValues);
|
||||
RegCloseKey(hKey);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -245,17 +244,17 @@ CNewMenu::LoadCachedItems()
|
|||
HKEY hKey;
|
||||
SHELLNEW_ITEM *pNewItem;
|
||||
SHELLNEW_ITEM *pCurItem = NULL;
|
||||
|
||||
if (RegOpenKeyExW(HKEY_CURRENT_USER, ShellNewKey, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
|
||||
|
||||
if (RegOpenKeyExW(HKEY_CURRENT_USER, ShellNewKey, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (RegQueryValueExW(hKey, L"Classes", NULL, NULL, NULL, &dwSize) != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
|
||||
lpValues = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, dwSize);
|
||||
if (!lpValues)
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (RegQueryValueExW(hKey, L"Classes", NULL, NULL, (LPBYTE)lpValues, &dwSize) != ERROR_SUCCESS)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, lpValues);
|
||||
|
@ -287,10 +286,10 @@ CNewMenu::LoadCachedItems()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, lpValues);
|
||||
RegCloseKey(hKey);
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -299,12 +298,12 @@ CNewMenu::LoadAllItems()
|
|||
{
|
||||
/* If there are any unload them */
|
||||
UnloadAllItems();
|
||||
|
||||
|
||||
if (!LoadCachedItems())
|
||||
{
|
||||
CacheItems();
|
||||
}
|
||||
|
||||
|
||||
if (!m_pLinkItem)
|
||||
{
|
||||
m_pLinkItem = static_cast<SHELLNEW_ITEM *>(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SHELLNEW_ITEM)));
|
||||
|
@ -445,7 +444,7 @@ HRESULT CNewMenu::CreateNewFolder(LPCMINVOKECOMMANDINFO lpici)
|
|||
WCHAR wszName[MAX_PATH];
|
||||
WCHAR wszNewFolder[25];
|
||||
HRESULT hr;
|
||||
|
||||
|
||||
/* Get folder path */
|
||||
hr = SHGetPathFromIDListW(m_pidlFolder, wszPath);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
|
@ -708,7 +707,7 @@ CNewMenu::HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plRes
|
|||
DWORD id = LOWORD(lpdis->itemID);
|
||||
HICON hIcon = 0;
|
||||
if (id == 0)
|
||||
hIcon = m_hiconFolder;
|
||||
hIcon = m_hiconFolder;
|
||||
else if (id == 1)
|
||||
hIcon = m_hiconLink;
|
||||
else
|
||||
|
@ -721,12 +720,12 @@ CNewMenu::HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plRes
|
|||
if (!hIcon)
|
||||
break;
|
||||
|
||||
DrawIconEx(lpdis->hDC,
|
||||
2,
|
||||
lpdis->rcItem.top + (lpdis->rcItem.bottom - lpdis->rcItem.top - 16) / 2,
|
||||
hIcon,
|
||||
16,
|
||||
16,
|
||||
DrawIconEx(lpdis->hDC,
|
||||
2,
|
||||
lpdis->rcItem.top + (lpdis->rcItem.bottom - lpdis->rcItem.top - 16) / 2,
|
||||
hIcon,
|
||||
16,
|
||||
16,
|
||||
0, NULL, DI_NORMAL);
|
||||
|
||||
if(plResult)
|
||||
|
|
|
@ -111,7 +111,7 @@ COpenWithList::~COpenWithList()
|
|||
BOOL COpenWithList::Load()
|
||||
{
|
||||
HKEY hKey;
|
||||
WCHAR wszName[256], wszBuf[100];;
|
||||
WCHAR wszName[256], wszBuf[100];
|
||||
DWORD i = 0, cchName, dwSize;
|
||||
SApp *pApp;
|
||||
|
||||
|
@ -676,7 +676,7 @@ BOOL COpenWithList::SetDefaultHandler(SApp *pApp, LPCWSTR pwszFilename)
|
|||
/* Create file extension key */
|
||||
if (RegCreateKeyExW(HKEY_CLASSES_ROOT, pwszExt, 0, NULL, 0, KEY_READ|KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("Cannot open ext key");
|
||||
ERR("Can't open ext key\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -830,7 +830,7 @@ BOOL COpenWithDialog::IsNoOpen(HWND hwnd)
|
|||
return TRUE;
|
||||
else if (dReturnValue == -1)
|
||||
{
|
||||
ERR("IsNoOpen failed to load the dialog box.");
|
||||
ERR("IsNoOpen failed to load dialog box\n");
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,17 +80,17 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::Init(
|
|||
debugstr_w(pszAssoc),
|
||||
hkeyProgid,
|
||||
hWnd);
|
||||
|
||||
|
||||
if (hWnd != NULL)
|
||||
{
|
||||
FIXME("hwnd != NULL not supported\n");
|
||||
}
|
||||
|
||||
|
||||
if (cfFlags != 0)
|
||||
{
|
||||
FIXME("unsupported flags: %x\n", cfFlags);
|
||||
}
|
||||
|
||||
|
||||
RegCloseKey(this->hkeySource);
|
||||
RegCloseKey(this->hkeyProgID);
|
||||
this->hkeySource = this->hkeyProgID = NULL;
|
||||
|
@ -98,7 +98,7 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::Init(
|
|||
{
|
||||
WCHAR *progId;
|
||||
HRESULT hr;
|
||||
|
||||
|
||||
LONG ret = RegOpenKeyExW(HKEY_CLASSES_ROOT,
|
||||
pszAssoc,
|
||||
0,
|
||||
|
@ -108,7 +108,7 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::Init(
|
|||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/* if this is a progid */
|
||||
if (*pszAssoc != '.' && *pszAssoc != '{')
|
||||
{
|
||||
|
@ -195,12 +195,12 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::GetString(
|
|||
{
|
||||
FIXME("%08x: unimplemented flags\n", flags & unimplemented_flags);
|
||||
}
|
||||
|
||||
|
||||
if (!pcchOut)
|
||||
{
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
|
||||
if (!this->hkeySource && !this->hkeyProgID)
|
||||
{
|
||||
return HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION);
|
||||
|
@ -395,7 +395,7 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::GetString(
|
|||
|
||||
hr = CLSIDFromString(pszExtra, &clsid);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
{
|
||||
return hr;
|
||||
}
|
||||
strcpyW(keypath, shellexW);
|
||||
|
@ -414,7 +414,7 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::GetString(
|
|||
}
|
||||
return this->ReturnString(flags, pszOut, pcchOut, guid, size / sizeof(WCHAR));
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
{
|
||||
FIXME("assocstr %d unimplemented!\n", str);
|
||||
|
@ -476,8 +476,8 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::GetData(ASSOCF cfFlags, ASSOCDATA
|
|||
{
|
||||
FIXME("Unsupported flags: %x\n", cfFlags);
|
||||
}
|
||||
|
||||
switch(assocdata)
|
||||
|
||||
switch(assocdata)
|
||||
{
|
||||
case ASSOCDATA_EDITFLAGS:
|
||||
{
|
||||
|
@ -485,7 +485,7 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::GetData(ASSOCF cfFlags, ASSOCDATA
|
|||
{
|
||||
return HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION);
|
||||
}
|
||||
|
||||
|
||||
void *data;
|
||||
DWORD size;
|
||||
HRESULT hres = this->GetValue(this->hkeyProgID, edit_flags, &data, &size);
|
||||
|
@ -493,13 +493,13 @@ HRESULT STDMETHODCALLTYPE CQueryAssociations::GetData(ASSOCF cfFlags, ASSOCDATA
|
|||
{
|
||||
return hres;
|
||||
}
|
||||
|
||||
|
||||
if (!pcbOut)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
return hres;
|
||||
}
|
||||
|
||||
|
||||
hres = this->ReturnData(pvOut, pcbOut, data, size);
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
return hres;
|
||||
|
@ -609,12 +609,12 @@ HRESULT CQueryAssociations::GetCommand(const WCHAR *extra, WCHAR **command)
|
|||
{
|
||||
ret = RegOpenKeyExW(this->hkeySource, shellW, 0, KEY_READ, &hkeyShell);
|
||||
}
|
||||
|
||||
|
||||
if (ret)
|
||||
{
|
||||
{
|
||||
return HRESULT_FROM_WIN32(ret);
|
||||
}
|
||||
|
||||
|
||||
if (!extra)
|
||||
{
|
||||
/* check for default verb */
|
||||
|
@ -654,7 +654,7 @@ HRESULT CQueryAssociations::GetCommand(const WCHAR *extra, WCHAR **command)
|
|||
ret = RegOpenKeyExW(hkeyShell, extra, 0, KEY_READ, &hkeyVerb);
|
||||
HeapFree(GetProcessHeap(), 0, extra_from_reg);
|
||||
RegCloseKey(hkeyShell);
|
||||
if (ret)
|
||||
if (ret)
|
||||
{
|
||||
return HRESULT_FROM_WIN32(ret);
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ HRESULT CQueryAssociations::GetCommand(const WCHAR *extra, WCHAR **command)
|
|||
ret = RegOpenKeyExW(hkeyVerb, commandW, 0, KEY_READ, &hkeyCommand);
|
||||
RegCloseKey(hkeyVerb);
|
||||
if (ret)
|
||||
{
|
||||
{
|
||||
return HRESULT_FROM_WIN32(ret);
|
||||
}
|
||||
hr = this->GetValue(hkeyCommand, NULL, (void**)command, NULL);
|
||||
|
@ -681,7 +681,7 @@ HRESULT CQueryAssociations::GetExecutable(LPCWSTR pszExtra, LPWSTR path, DWORD p
|
|||
{
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
DWORD expLen = ExpandEnvironmentStringsW(pszCommand, NULL, 0);
|
||||
if (expLen > 0)
|
||||
{
|
||||
|
@ -691,7 +691,7 @@ HRESULT CQueryAssociations::GetExecutable(LPCWSTR pszExtra, LPWSTR path, DWORD p
|
|||
HeapFree(GetProcessHeap(), 0, pszCommand);
|
||||
pszCommand = buf;
|
||||
}
|
||||
|
||||
|
||||
/* cleanup pszCommand */
|
||||
if (pszCommand[0] == '"')
|
||||
{
|
||||
|
@ -782,11 +782,11 @@ HRESULT CQueryAssociations::ReturnString(ASSOCF flags, LPWSTR out, DWORD *outlen
|
|||
{
|
||||
len = datalen;
|
||||
}
|
||||
|
||||
|
||||
if (len)
|
||||
{
|
||||
memcpy(out, data, len*sizeof(WCHAR));
|
||||
}
|
||||
|
||||
|
||||
return hr;
|
||||
}
|
|
@ -14,18 +14,18 @@ private:
|
|||
HRESULT GetExecutable(LPCWSTR pszExtra, LPWSTR path, DWORD pathlen, DWORD *len);
|
||||
HRESULT ReturnData(void *out, DWORD *outlen, const void *data, DWORD datalen);
|
||||
HRESULT ReturnString(ASSOCF flags, LPWSTR out, DWORD *outlen, LPCWSTR data, DWORD datalen);
|
||||
|
||||
|
||||
public:
|
||||
CQueryAssociations();
|
||||
~CQueryAssociations();
|
||||
|
||||
|
||||
// *** IQueryAssociations methods ***
|
||||
virtual HRESULT STDMETHODCALLTYPE Init(ASSOCF flags, LPCWSTR pwszAssoc, HKEY hkProgid, HWND hwnd);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetString(ASSOCF flags, ASSOCSTR str, LPCWSTR pwszExtra, LPWSTR pwszOut, DWORD *pcchOut);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetKey(ASSOCF flags, ASSOCKEY key, LPCWSTR pwszExtra, HKEY *phkeyOut);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetData(ASSOCF flags, ASSOCDATA data, LPCWSTR pwszExtra, void *pvOut, DWORD *pcbOut);
|
||||
virtual HRESULT STDMETHODCALLTYPE GetEnum(ASSOCF cfFlags, ASSOCENUM assocenum, LPCWSTR pszExtra, REFIID riid, LPVOID *ppvOut);
|
||||
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_QUERYASSOCIATIONS)
|
||||
DECLARE_NOT_AGGREGATABLE(CQueryAssociations)
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
|
|
@ -2623,7 +2623,7 @@ HRESULT STDMETHODCALLTYPE CShellLink::InvokeCommand(LPCMINVOKECOMMANDINFO lpici)
|
|||
HRESULT hr = Resolve(lpici->hwnd, 0);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
TRACE("failed to resolve component with error 0x%08x", hr);
|
||||
TRACE("failed to resolve component error 0x%08x\n", hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,14 +51,12 @@ public:
|
|||
/* Link file formats */
|
||||
|
||||
#include "pshpack1.h"
|
||||
|
||||
struct volume_info
|
||||
{
|
||||
DWORD type;
|
||||
DWORD serial;
|
||||
WCHAR label[12]; /* assume 8.3 */
|
||||
};
|
||||
|
||||
#include "poppack.h"
|
||||
|
||||
private:
|
||||
|
|
|
@ -139,7 +139,7 @@ SH_ShowDriveProperties(WCHAR *pwszDrive, LPCITEMIDLIST pidlFolder, PCUITEMID_CHI
|
|||
psh.pszCaption = wszName;
|
||||
psh.dwFlags |= PSH_PROPTITLE;
|
||||
}
|
||||
|
||||
|
||||
ILFree(completePidl);
|
||||
|
||||
CComPtr<IDataObject> pDataObj;
|
||||
|
@ -633,5 +633,3 @@ SHFormatDrive(HWND hwnd, UINT drive, UINT fmtID, UINT options)
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ CDrvDefExt::PaintStaticControls(HWND hwndDlg, LPDRAWITEMSTRUCT pDrawItem)
|
|||
pDrawItem->rcItem.right, pDrawItem->rcItem.bottom - 10);
|
||||
|
||||
SelectObject(pDrawItem->hDC, hMagBrush);
|
||||
|
||||
|
||||
if (m_FreeSpacePerc > 0)
|
||||
{
|
||||
Pie(pDrawItem->hDC, pDrawItem->rcItem.left, pDrawItem->rcItem.top, pDrawItem->rcItem.right,
|
||||
|
@ -315,14 +315,14 @@ CDrvDefExt::InitGeneralPage(HWND hwndDlg)
|
|||
{
|
||||
/* volume label textbox */
|
||||
SendMessage(GetDlgItem(hwndDlg, 14000), EM_SETREADONLY, TRUE, 0);
|
||||
|
||||
|
||||
/* disk compression */
|
||||
ShowWindow(GetDlgItem(hwndDlg, 14011), FALSE);
|
||||
|
||||
/* index */
|
||||
ShowWindow(GetDlgItem(hwndDlg, 14012), FALSE);
|
||||
}
|
||||
|
||||
|
||||
HICON hIcon = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IconId), IMAGE_ICON, 32, 32, LR_SHARED);
|
||||
if (hIcon)
|
||||
SendDlgItemMessageW(hwndDlg, 14016, STM_SETICON, (WPARAM)hIcon, 0);
|
||||
|
@ -379,7 +379,7 @@ CDrvDefExt::InitGeneralPage(HWND hwndDlg)
|
|||
GetDlgItemTextW(hwndDlg, 14009, wszFormat, _countof(wszFormat));
|
||||
swprintf(wszBuf, wszFormat, m_wszDrive[0]);
|
||||
SetDlgItemTextW(hwndDlg, 14009, wszBuf);
|
||||
|
||||
|
||||
/* show disk cleanup button only for fixed drives */
|
||||
ShowWindow(GetDlgItem(hwndDlg, 14010), DriveType == DRIVE_FIXED);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class CFileVersionInfo
|
|||
PVOID m_pInfo;
|
||||
WORD m_wLang, m_wCode;
|
||||
WCHAR m_wszLang[64];
|
||||
|
||||
|
||||
typedef struct _LANGANDCODEPAGE_
|
||||
{
|
||||
WORD wLang;
|
||||
|
|
|
@ -264,7 +264,7 @@ Options_RunDLLCommon(HWND hWnd, HINSTANCE hInst, int fOptions, DWORD nCmdShow)
|
|||
|
||||
case 1:
|
||||
// show taskbar options dialog
|
||||
FIXME("notify explorer to show taskbar options dialog");
|
||||
FIXME("notify explorer to show taskbar options dlg\n");
|
||||
//PostMessage(GetShellWindow(), WM_USER+22, fOptions, 0);
|
||||
break;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ typedef struct REGSHELLSTATE
|
|||
|
||||
#define REGSHELLSTATE_SIZE 0x24
|
||||
|
||||
static const LPCWSTR s_pszExplorerKey =
|
||||
static const LPCWSTR s_pszExplorerKey =
|
||||
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer";
|
||||
|
||||
extern "C"
|
||||
|
@ -48,7 +48,7 @@ IntGetDefaultShellState(REGSHELLSTATE& rss)
|
|||
|
||||
rss.ss.fShowAllObjects = TRUE;
|
||||
rss.ss.fShowExtensions = TRUE;
|
||||
|
||||
|
||||
rss.ss.fShowCompColor = TRUE;
|
||||
rss.ss.fDoubleClickInWebView = TRUE;
|
||||
rss.ss.fShowInfoTip = TRUE;
|
||||
|
@ -74,7 +74,7 @@ IntSetShellStateSettings(BOOL bDoubleClick, BOOL bUseCommonTasks)
|
|||
LSTATUS nStatus;
|
||||
|
||||
// read ShellState
|
||||
nStatus = SHGetValueW(HKEY_CURRENT_USER,
|
||||
nStatus = SHGetValueW(HKEY_CURRENT_USER,
|
||||
s_pszExplorerKey,
|
||||
L"ShellState",
|
||||
NULL,
|
||||
|
@ -141,7 +141,7 @@ static BOOL IntSetUnderlineState(BOOL bIconUnderline)
|
|||
{
|
||||
LSTATUS Status;
|
||||
DWORD dwValue = (bIconUnderline ? 3 : 2), dwSize = sizeof(DWORD);
|
||||
Status = SHRegSetUSValue(s_pszExplorerKey, L"IconUnderline", REG_NONE,
|
||||
Status = SHRegSetUSValue(s_pszExplorerKey, L"IconUnderline", REG_NONE,
|
||||
&dwValue, dwSize, SHREGSET_FORCE_HKCU | SHREGSET_HKLM);
|
||||
if (Status != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
|
|
@ -46,7 +46,6 @@ static void toggleNukeOnDeleteOption(HWND hwndDlg, BOOL bEnable)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static VOID
|
||||
InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive)
|
||||
{
|
||||
|
@ -70,12 +69,12 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive)
|
|||
|
||||
hDlgCtrl = GetDlgItem(hwndDlg, 14000);
|
||||
|
||||
if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_LOCATION, szVolume, sizeof(szVolume) / sizeof(WCHAR)))
|
||||
if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_LOCATION, szVolume, _countof(szVolume)))
|
||||
szVolume[0] = 0;
|
||||
|
||||
GetClientRect(hDlgCtrl, &rect);
|
||||
|
||||
memset(&lc, 0, sizeof(LV_COLUMN) );
|
||||
memset(&lc, 0, sizeof(lc));
|
||||
lc.mask = LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM | LVCF_FMT;
|
||||
|
||||
columnSize = 140; //FIXME
|
||||
|
@ -86,7 +85,7 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive)
|
|||
lc.pszText = szVolume;
|
||||
(void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 0, (LPARAM)&lc);
|
||||
|
||||
if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_DISKSPACE, szVolume, sizeof(szVolume) / sizeof(WCHAR)))
|
||||
if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_DISKSPACE, szVolume, _countof(szVolume)))
|
||||
szVolume[0] = 0;
|
||||
|
||||
lc.iSubItem = 1;
|
||||
|
@ -99,29 +98,28 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive)
|
|||
itemCount = 0;
|
||||
do
|
||||
{
|
||||
if ((dwDrives & 0x1))
|
||||
if (dwDrives & 0x1)
|
||||
{
|
||||
UINT Type = GetDriveTypeW(szDrive);
|
||||
if (Type == DRIVE_FIXED) //FIXME
|
||||
{
|
||||
if (!GetVolumeInformationW(szDrive, szName, sizeof(szName) / sizeof(WCHAR), &dwSerial, &MaxComponent, &Flags, NULL, 0))
|
||||
if (!GetVolumeInformationW(szDrive, szName, _countof(szName), &dwSerial, &MaxComponent, &Flags, NULL, 0))
|
||||
{
|
||||
szName[0] = 0;
|
||||
dwSerial = -1;
|
||||
}
|
||||
|
||||
swprintf(szVolume, L"%s (%c:)", szName, szDrive[0]);
|
||||
memset(&li, 0x0, sizeof(LVITEMW));
|
||||
memset(&li, 0x0, sizeof(li));
|
||||
li.mask = LVIF_TEXT | LVIF_PARAM;
|
||||
li.iSubItem = 0;
|
||||
li.pszText = szVolume;
|
||||
li.iItem = itemCount;
|
||||
SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&li);
|
||||
if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable , &TotalNumberOfBytes, &TotalNumberOfFreeBytes))
|
||||
if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable, &TotalNumberOfBytes, &TotalNumberOfFreeBytes))
|
||||
{
|
||||
if (StrFormatByteSizeW(TotalNumberOfFreeBytes.QuadPart, szVolume, sizeof(szVolume) / sizeof(WCHAR)))
|
||||
if (StrFormatByteSizeW(TotalNumberOfFreeBytes.QuadPart, szVolume, _countof(szVolume)))
|
||||
{
|
||||
|
||||
pItem = (DRIVE_ITEM_CONTEXT *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DRIVE_ITEM_CONTEXT));
|
||||
if (pItem)
|
||||
{
|
||||
|
@ -167,11 +165,10 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive)
|
|||
}
|
||||
ZeroMemory(&li, sizeof(li));
|
||||
li.mask = LVIF_STATE;
|
||||
li.stateMask = (UINT) - 1;
|
||||
li.stateMask = (UINT)-1;
|
||||
li.state = LVIS_FOCUSED | LVIS_SELECTED;
|
||||
li.iItem = defIndex;
|
||||
(void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li);
|
||||
|
||||
}
|
||||
|
||||
static BOOL StoreDriveSettings(HWND hwndDlg)
|
||||
|
@ -184,7 +181,6 @@ static BOOL StoreDriveSettings(HWND hwndDlg)
|
|||
WCHAR szSerial[20];
|
||||
DWORD dwSize;
|
||||
|
||||
|
||||
if (RegCreateKeyExW(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume", 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
|
@ -212,7 +208,6 @@ static BOOL StoreDriveSettings(HWND hwndDlg)
|
|||
}
|
||||
RegCloseKey(hKey);
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
||||
static VOID FreeDriveItemContext(HWND hwndDlg)
|
||||
|
@ -231,13 +226,13 @@ static VOID FreeDriveItemContext(HWND hwndDlg)
|
|||
li.iItem = iIndex;
|
||||
if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&li))
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, (LPVOID)li.lParam);
|
||||
HeapFree(GetProcessHeap(), 0, (PVOID)li.lParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static INT
|
||||
GetDefaultItem(HWND hwndDlg, LVITEMW * li)
|
||||
GetDefaultItem(HWND hwndDlg, LVITEMW* li)
|
||||
{
|
||||
HWND hDlgCtrl;
|
||||
UINT iItemCount, iIndex;
|
||||
|
@ -252,7 +247,7 @@ GetDefaultItem(HWND hwndDlg, LVITEMW * li)
|
|||
|
||||
ZeroMemory(li, sizeof(LVITEMW));
|
||||
li->mask = LVIF_PARAM | LVIF_STATE;
|
||||
li->stateMask = (UINT) - 1;
|
||||
li->stateMask = (UINT)-1;
|
||||
for (iIndex = 0; iIndex < iItemCount; iIndex++)
|
||||
{
|
||||
li->iItem = iIndex;
|
||||
|
@ -263,7 +258,6 @@ GetDefaultItem(HWND hwndDlg, LVITEMW * li)
|
|||
}
|
||||
}
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
static INT_PTR CALLBACK
|
||||
|
@ -271,8 +265,7 @@ RecycleBinDlg(
|
|||
HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam
|
||||
)
|
||||
LPARAM lParam)
|
||||
{
|
||||
LPPSHNOTIFY lppsn;
|
||||
LPNMLISTVIEW lppl;
|
||||
|
@ -383,12 +376,10 @@ BOOL SH_ShowRecycleBinProperties(WCHAR sDrive)
|
|||
HPROPSHEETPAGE hpsp[1];
|
||||
PROPSHEETHEADERW psh;
|
||||
HPROPSHEETPAGE hprop;
|
||||
|
||||
BOOL ret;
|
||||
|
||||
|
||||
ZeroMemory(&psh, sizeof(PROPSHEETHEADERW));
|
||||
psh.dwSize = sizeof(PROPSHEETHEADERW);
|
||||
ZeroMemory(&psh, sizeof(psh));
|
||||
psh.dwSize = sizeof(psh);
|
||||
psh.dwFlags = PSP_DEFAULT | PSH_PROPTITLE;
|
||||
psh.pszCaption = MAKEINTRESOURCEW(IDS_RECYCLEBIN_FOLDER_NAME);
|
||||
psh.hwndParent = NULL;
|
||||
|
@ -404,10 +395,6 @@ BOOL SH_ShowRecycleBinProperties(WCHAR sDrive)
|
|||
hpsp[psh.nPages] = hprop;
|
||||
psh.nPages++;
|
||||
|
||||
|
||||
ret = PropertySheetW(&psh);
|
||||
if (ret < 0)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
return (ret >= 0);
|
||||
}
|
||||
|
|
|
@ -67,8 +67,6 @@ HRESULT CFSDropTarget::_CopyItems(IShellFolder * pSFFrom, UINT cidl,
|
|||
//Double NULL terminate.
|
||||
wszTargetPath[wcslen(wszTargetPath) + 1] = '\0';
|
||||
|
||||
TRACE ("(%p)->(%p,%u,%p)\n", this, pSFFrom, cidl, apidl);
|
||||
|
||||
STRRET strretFrom;
|
||||
hr = pSFFrom->GetDisplayNameOf(NULL, SHGDN_FORPARSING, &strretFrom);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
|
@ -446,7 +444,7 @@ HRESULT CFSDropTarget::_DoDrop(IDataObject *pDataObject,
|
|||
if (SUCCEEDED(pDataObject->QueryGetData(&fmt)))
|
||||
{
|
||||
hr = pDataObject->GetData(&fmt, &medium);
|
||||
TRACE("CFSTR_SHELLIDLIST.\n");
|
||||
TRACE("CFSTR_SHELLIDLIST\n");
|
||||
|
||||
/* lock the handle */
|
||||
LPIDA lpcida = (LPIDA)GlobalLock(medium.hGlobal);
|
||||
|
@ -500,33 +498,26 @@ HRESULT CFSDropTarget::_DoDrop(IDataObject *pDataObject,
|
|||
|
||||
if (bLinking)
|
||||
{
|
||||
WCHAR wszTargetPath[MAX_PATH];
|
||||
WCHAR wszPath[MAX_PATH];
|
||||
WCHAR wszTarget[MAX_PATH];
|
||||
|
||||
wcscpy(wszTargetPath, m_sPathTarget);
|
||||
|
||||
TRACE("target path = %s", debugstr_w(wszTargetPath));
|
||||
TRACE("target path = %s\n", debugstr_w(m_sPathTarget));
|
||||
|
||||
/* We need to create a link for each pidl in the copied items, so step through the pidls from the clipboard */
|
||||
for (UINT i = 0; i < lpcida->cidl; i++)
|
||||
{
|
||||
//Find out which file we're copying
|
||||
//Find out which file we're linking
|
||||
STRRET strFile;
|
||||
hr = psfFrom->GetDisplayNameOf(apidl[i], SHGDN_FORPARSING, &strFile);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
ERR("Error source obtaining path");
|
||||
break;
|
||||
}
|
||||
|
||||
hr = StrRetToBufW(&strFile, apidl[i], wszPath, _countof(wszPath));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
ERR("Error putting source path into buffer");
|
||||
ERR("Error to put source path into buffer\n");
|
||||
break;
|
||||
}
|
||||
TRACE("source path = %s", debugstr_w(wszPath));
|
||||
|
||||
// Creating a buffer to hold the combined path
|
||||
WCHAR buffer_1[MAX_PATH] = L"";
|
||||
|
@ -544,20 +535,20 @@ HRESULT CFSDropTarget::_DoDrop(IDataObject *pDataObject,
|
|||
//It's a link so, we create a new one which copies the old.
|
||||
if(!_GetUniqueFileName(placementPath, pwszExt, wszTarget, TRUE))
|
||||
{
|
||||
ERR("Error getting unique file name");
|
||||
ERR("Error to get unique filename\n");
|
||||
hr = E_FAIL;
|
||||
break;
|
||||
}
|
||||
hr = IShellLink_ConstructFromPath(wszPath, IID_PPV_ARG(IPersistFile, &ppf));
|
||||
if (FAILED(hr)) {
|
||||
ERR("Error constructing link from file");
|
||||
ERR("Error constructing link from file\n");
|
||||
break;
|
||||
}
|
||||
|
||||
hr = ppf->Save(wszTarget, FALSE);
|
||||
if (FAILED(hr))
|
||||
break;
|
||||
SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, wszTarget, NULL);
|
||||
if (FAILED(hr))
|
||||
break;
|
||||
SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, wszTarget, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -565,7 +556,7 @@ HRESULT CFSDropTarget::_DoDrop(IDataObject *pDataObject,
|
|||
//Create a file name for the link
|
||||
if (!_GetUniqueFileName(placementPath, L".lnk", wszTarget, TRUE))
|
||||
{
|
||||
ERR("Error creating unique file name");
|
||||
ERR("Error creating unique filename\n");
|
||||
hr = E_FAIL;
|
||||
break;
|
||||
}
|
||||
|
@ -573,7 +564,7 @@ HRESULT CFSDropTarget::_DoDrop(IDataObject *pDataObject,
|
|||
CComPtr<IShellLinkW> pLink;
|
||||
hr = CShellLink::_CreatorClass::CreateInstance(NULL, IID_PPV_ARG(IShellLinkW, &pLink));
|
||||
if (FAILED(hr)) {
|
||||
ERR("Error instantiating IShellLinkW");
|
||||
ERR("Error instantiating IShellLinkW\n");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -594,9 +585,9 @@ HRESULT CFSDropTarget::_DoDrop(IDataObject *pDataObject,
|
|||
break;
|
||||
|
||||
hr = ppf->Save(wszTarget, TRUE);
|
||||
if (FAILED(hr))
|
||||
break;
|
||||
SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, wszTarget, NULL);
|
||||
if (FAILED(hr))
|
||||
break;
|
||||
SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, wszTarget, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -646,7 +637,7 @@ HRESULT CFSDropTarget::_DoDrop(IDataObject *pDataObject,
|
|||
}
|
||||
else
|
||||
{
|
||||
ERR("No viable drop format.\n");
|
||||
ERR("No viable drop format\n");
|
||||
hr = E_FAIL;
|
||||
}
|
||||
return hr;
|
||||
|
|
|
@ -55,7 +55,7 @@ HRESULT WINAPI CExeDropHandler::DragLeave()
|
|||
|
||||
HRESULT WINAPI CExeDropHandler::Drop(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect)
|
||||
{
|
||||
TRACE ("(%p)\n", this);
|
||||
TRACE ("(%p)\n", this);
|
||||
FORMATETC fmt;
|
||||
STGMEDIUM medium;
|
||||
LPWSTR pszSrcList;
|
||||
|
@ -78,7 +78,7 @@ HRESULT WINAPI CExeDropHandler::Drop(IDataObject *pDataObject, DWORD dwKeyState,
|
|||
StringCchPrintfExW(pszEnd, cchRemaining, &pszEnd, &cchRemaining, 0, L"\"%ls\" ", pszSrcList);
|
||||
else
|
||||
StringCchPrintfExW(pszEnd, cchRemaining, &pszEnd, &cchRemaining, 0, L"%ls ", pszSrcList);
|
||||
|
||||
|
||||
pszSrcList += wcslen(pszSrcList) + 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,9 +68,9 @@ HRESULT WINAPI CAdminToolsFolder::CreateViewObject(HWND hwndOwner, REFIID riid,
|
|||
HRESULT WINAPI CAdminToolsFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
|
||||
{
|
||||
static const DWORD dwAdminToolsAttributes =
|
||||
SFGAO_STORAGE | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSANCESTOR |
|
||||
SFGAO_STORAGE | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSANCESTOR |
|
||||
SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER;
|
||||
|
||||
|
||||
if(cidl)
|
||||
return m_pisfInner->GetAttributesOf(cidl, apidl, rgfInOut);
|
||||
|
||||
|
@ -174,7 +174,7 @@ HRESULT WINAPI CAdminToolsFolder::Initialize(LPCITEMIDLIST pidl)
|
|||
if (!m_pidlInner)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
return SHELL32_CoCreateInitSF(m_pidlInner,
|
||||
return SHELL32_CoCreateInitSF(m_pidlInner,
|
||||
&CLSID_ShellFSFolder,
|
||||
CSIDL_COMMON_ADMINTOOLS,
|
||||
IID_PPV_ARG(IShellFolder2, &m_pisfInner));
|
||||
|
|
|
@ -155,9 +155,9 @@ BOOL CControlPanelEnum::RegisterCPanelApp(LPCWSTR wpath)
|
|||
else
|
||||
iconIdx = 0;
|
||||
|
||||
LPITEMIDLIST pidl = _ILCreateCPanelApplet(wpath,
|
||||
applet->info[i].name,
|
||||
applet->info[i].info,
|
||||
LPITEMIDLIST pidl = _ILCreateCPanelApplet(wpath,
|
||||
applet->info[i].name,
|
||||
applet->info[i].info,
|
||||
iconIdx);
|
||||
|
||||
if (pidl)
|
||||
|
@ -328,7 +328,7 @@ HRESULT WINAPI CControlPanelFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE
|
|||
return E_INVALIDARG;
|
||||
|
||||
int result;
|
||||
switch(LOWORD(lParam))
|
||||
switch(LOWORD(lParam))
|
||||
{
|
||||
case 0: /* name */
|
||||
result = wcsicmp(pData1->szName + pData1->offsDispName, pData2->szName + pData2->offsDispName);
|
||||
|
@ -406,7 +406,7 @@ HRESULT WINAPI CControlPanelFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_A
|
|||
else if (_ILIsSpecialFolder(*apidl))
|
||||
m_regFolder->GetAttributesOf(1, apidl, rgfInOut);
|
||||
else
|
||||
ERR("Got an unkown pidl here!\n");
|
||||
ERR("Got unknown pidl\n");
|
||||
apidl++;
|
||||
cidl--;
|
||||
}
|
||||
|
@ -443,7 +443,6 @@ HRESULT WINAPI CControlPanelFolder::GetUIObjectOf(HWND hwndOwner,
|
|||
*ppvOut = NULL;
|
||||
|
||||
if (IsEqualIID(riid, IID_IContextMenu) && (cidl >= 1)) {
|
||||
|
||||
/* HACK: We should use callbacks from CDefaultContextMenu instead of creating one on our own */
|
||||
BOOL bHasCpl = FALSE;
|
||||
for (UINT i = 0; i < cidl; i++)
|
||||
|
@ -560,7 +559,7 @@ HRESULT WINAPI CControlPanelFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iCol
|
|||
if (!psd || iColumn >= CONROLPANELSHELLVIEWCOLUMNS)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (!pidl)
|
||||
if (!pidl)
|
||||
{
|
||||
psd->fmt = ControlPanelSFHeader[iColumn].fmt;
|
||||
psd->cxChar = ControlPanelSFHeader[iColumn].cxChar;
|
||||
|
@ -570,14 +569,14 @@ HRESULT WINAPI CControlPanelFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iCol
|
|||
{
|
||||
return m_regFolder->GetDetailsOf(pidl, iColumn, psd);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
PIDLCPanelStruct *pCPanel = _ILGetCPanelPointer(pidl);
|
||||
|
||||
if (!pCPanel)
|
||||
return E_FAIL;
|
||||
|
||||
switch(iColumn)
|
||||
switch(iColumn)
|
||||
{
|
||||
case 0: /* name */
|
||||
return SHSetStrRet(&psd->str, pCPanel->szName + pCPanel->offsDispName);
|
||||
|
@ -626,7 +625,7 @@ HRESULT WINAPI CControlPanelFolder::Initialize(LPCITEMIDLIST pidl)
|
|||
static const WCHAR* pszCPanelPath = L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}";
|
||||
hr = CRegFolder_CreateInstance(&CLSID_ControlPanel,
|
||||
pidlRoot,
|
||||
pszCPanelPath,
|
||||
pszCPanelPath,
|
||||
L"ControlPanel",
|
||||
IID_PPV_ARG(IShellFolder2, &m_regFolder));
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
|
|
|
@ -211,7 +211,7 @@ HRESULT WINAPI CDesktopFolder::FinalConstruct()
|
|||
return E_OUTOFMEMORY;
|
||||
|
||||
/* Create the inner fs folder */
|
||||
hr = SHELL32_CoCreateInitSF(pidlRoot,
|
||||
hr = SHELL32_CoCreateInitSF(pidlRoot,
|
||||
&CLSID_ShellFSFolder,
|
||||
CSIDL_DESKTOPDIRECTORY,
|
||||
IID_PPV_ARG(IShellFolder2, &m_DesktopFSFolder));
|
||||
|
@ -219,7 +219,7 @@ HRESULT WINAPI CDesktopFolder::FinalConstruct()
|
|||
return hr;
|
||||
|
||||
/* Create the inner shared fs folder. Dont fail on failure. */
|
||||
hr = SHELL32_CoCreateInitSF(pidlRoot,
|
||||
hr = SHELL32_CoCreateInitSF(pidlRoot,
|
||||
&CLSID_ShellFSFolder,
|
||||
CSIDL_COMMON_DESKTOPDIRECTORY,
|
||||
IID_PPV_ARG(IShellFolder2, &m_SharedDesktopFSFolder));
|
||||
|
@ -229,7 +229,7 @@ HRESULT WINAPI CDesktopFolder::FinalConstruct()
|
|||
/* Create the inner reg folder */
|
||||
hr = CRegFolder_CreateInstance(&CLSID_ShellDesktop,
|
||||
pidlRoot,
|
||||
L"",
|
||||
L"",
|
||||
L"Desktop",
|
||||
IID_PPV_ARG(IShellFolder2, &m_regFolder));
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
|
@ -829,7 +829,7 @@ HRESULT WINAPI CDesktopFolder::GetCurFolder(LPITEMIDLIST * pidl)
|
|||
{
|
||||
TRACE ("(%p)->(%p)\n", this, pidl);
|
||||
|
||||
if (!pidl)
|
||||
if (!pidl)
|
||||
return E_INVALIDARG; /* xp doesn't have this check and crashes on NULL */
|
||||
*pidl = ILClone (pidlRoot);
|
||||
return S_OK;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <precomp.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL (shell);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
|
||||
/*
|
||||
CDrivesFolder should create a CRegFolder to represent the virtual items that exist only in
|
||||
|
@ -438,7 +438,7 @@ CDrivesFolder::CDrivesFolder()
|
|||
|
||||
CDrivesFolder::~CDrivesFolder()
|
||||
{
|
||||
TRACE ("-- destroying IShellFolder(%p)\n", this);
|
||||
TRACE("-- destroying IShellFolder(%p)\n", this);
|
||||
SHFree(pidlRoot);
|
||||
}
|
||||
|
||||
|
@ -448,9 +448,9 @@ HRESULT WINAPI CDrivesFolder::FinalConstruct()
|
|||
if (pidlRoot == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
HRESULT hr = CRegFolder_CreateInstance(&CLSID_MyComputer,
|
||||
pidlRoot,
|
||||
L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}",
|
||||
HRESULT hr = CRegFolder_CreateInstance(&CLSID_MyComputer,
|
||||
pidlRoot,
|
||||
L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}",
|
||||
L"MyComputer",
|
||||
IID_PPV_ARG(IShellFolder2, &m_regFolder));
|
||||
|
||||
|
@ -506,13 +506,13 @@ HRESULT WINAPI CDrivesFolder::ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLEST
|
|||
else if (_ILIsSpecialFolder(pidlTemp))
|
||||
m_regFolder->GetAttributesOf(1, &pidlTemp, pdwAttributes);
|
||||
else
|
||||
ERR("Got an unkown pidl here!\n");
|
||||
ERR("Got unknown pidl\n");
|
||||
}
|
||||
}
|
||||
|
||||
*ppidl = pidlTemp;
|
||||
|
||||
TRACE ("(%p)->(-- ret=0x%08x)\n", this, hr);
|
||||
TRACE("(%p)->(-- ret=0x%08x)\n", this, hr);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ HRESULT WINAPI CDrivesFolder::BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcRese
|
|||
return m_regFolder->BindToObject(pidl, pbcReserved, riid, ppvOut);
|
||||
|
||||
CHAR* pchDrive = _ILGetDataPointer(pidl)->u.drive.szDriveName;
|
||||
|
||||
|
||||
PERSIST_FOLDER_TARGET_INFO pfti = {0};
|
||||
pfti.dwAttributes = -1;
|
||||
pfti.csidl = -1;
|
||||
|
@ -596,7 +596,7 @@ HRESULT WINAPI CDrivesFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1
|
|||
CHAR* pszDrive2 = _ILGetDataPointer(pidl2)->u.drive.szDriveName;
|
||||
|
||||
int result;
|
||||
switch(LOWORD(lParam))
|
||||
switch(LOWORD(lParam))
|
||||
{
|
||||
case 0: /* name */
|
||||
{
|
||||
|
@ -690,7 +690,7 @@ HRESULT WINAPI CDrivesFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVO
|
|||
SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
|
||||
hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
|
||||
}
|
||||
TRACE ("-- (%p)->(interface=%p)\n", this, ppvOut);
|
||||
TRACE("-- (%p)->(interface=%p)\n", this, ppvOut);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -710,8 +710,8 @@ static BOOL _ILIsControlPanel(LPCITEMIDLIST pidl)
|
|||
*/
|
||||
HRESULT WINAPI CDrivesFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD * rgfInOut)
|
||||
{
|
||||
TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n",
|
||||
this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
|
||||
TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n",
|
||||
this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
|
||||
|
||||
if (cidl && !apidl)
|
||||
return E_INVALIDARG;
|
||||
|
@ -740,7 +740,7 @@ HRESULT WINAPI CDrivesFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY a
|
|||
/* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
|
||||
*rgfInOut &= ~SFGAO_VALIDATE;
|
||||
|
||||
TRACE ("-- result=0x%08x\n", *rgfInOut);
|
||||
TRACE("-- result=0x%08x\n", *rgfInOut);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -780,8 +780,8 @@ HRESULT WINAPI CDrivesFolder::GetUIObjectOf(HWND hwndOwner,
|
|||
}
|
||||
else if (IsEqualIID (riid, IID_IDataObject) && (cidl >= 1))
|
||||
{
|
||||
hr = IDataObject_Constructor (hwndOwner,
|
||||
pidlRoot, apidl, cidl, (IDataObject **)&pObj);
|
||||
hr = IDataObject_Constructor(hwndOwner,
|
||||
pidlRoot, apidl, cidl, (IDataObject **)&pObj);
|
||||
}
|
||||
else if ((IsEqualIID (riid, IID_IExtractIconA) || IsEqualIID (riid, IID_IExtractIconW)) && (cidl == 1))
|
||||
{
|
||||
|
@ -806,7 +806,7 @@ HRESULT WINAPI CDrivesFolder::GetUIObjectOf(HWND hwndOwner,
|
|||
hr = E_OUTOFMEMORY;
|
||||
|
||||
*ppvOut = pObj;
|
||||
TRACE ("(%p)->hr=0x%08x\n", this, hr);
|
||||
TRACE("(%p)->hr=0x%08x\n", this, hr);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -818,7 +818,7 @@ HRESULT WINAPI CDrivesFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFla
|
|||
LPWSTR pszPath;
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
TRACE ("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet);
|
||||
TRACE("(%p)->(pidl=%p,0x%08x,%p)\n", this, pidl, dwFlags, strRet);
|
||||
pdump (pidl);
|
||||
|
||||
if (!strRet)
|
||||
|
@ -856,9 +856,9 @@ HRESULT WINAPI CDrivesFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFla
|
|||
lstrcpynW(wszDrive, pszPath, 4);
|
||||
pszPath[0] = L'\0';
|
||||
GetVolumeInformationW(wszDrive, pszPath,
|
||||
MAX_PATH - 7,
|
||||
&dwVolumeSerialNumber,
|
||||
&dwMaximumComponentLength, &dwFileSystemFlags, NULL, 0);
|
||||
MAX_PATH - 7,
|
||||
&dwVolumeSerialNumber,
|
||||
&dwMaximumComponentLength, &dwFileSystemFlags, NULL, 0);
|
||||
pszPath[MAX_PATH-1] = L'\0';
|
||||
if (!wcslen(pszPath))
|
||||
{
|
||||
|
@ -885,10 +885,10 @@ HRESULT WINAPI CDrivesFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFla
|
|||
pszPath[MAX_PATH-7] = L'\0';
|
||||
}
|
||||
}
|
||||
wcscat (pszPath, wszOpenBracket);
|
||||
wcscat(pszPath, wszOpenBracket);
|
||||
wszDrive[2] = L'\0';
|
||||
wcscat (pszPath, wszDrive);
|
||||
wcscat (pszPath, wszCloseBracket);
|
||||
wcscat(pszPath, wszDrive);
|
||||
wcscat(pszPath, wszCloseBracket);
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
|
@ -934,19 +934,19 @@ HRESULT WINAPI CDrivesFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl,
|
|||
|
||||
HRESULT WINAPI CDrivesFolder::GetDefaultSearchGUID(GUID * pguid)
|
||||
{
|
||||
FIXME ("(%p)\n", this);
|
||||
FIXME("(%p)\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CDrivesFolder::EnumSearches(IEnumExtraSearch ** ppenum)
|
||||
{
|
||||
FIXME ("(%p)\n", this);
|
||||
FIXME("(%p)\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CDrivesFolder::GetDefaultColumn (DWORD dwRes, ULONG *pSort, ULONG *pDisplay)
|
||||
{
|
||||
TRACE ("(%p)\n", this);
|
||||
TRACE("(%p)\n", this);
|
||||
|
||||
if (pSort)
|
||||
*pSort = 0;
|
||||
|
@ -957,7 +957,7 @@ HRESULT WINAPI CDrivesFolder::GetDefaultColumn (DWORD dwRes, ULONG *pSort, ULONG
|
|||
|
||||
HRESULT WINAPI CDrivesFolder::GetDefaultColumnState(UINT iColumn, DWORD * pcsFlags)
|
||||
{
|
||||
TRACE ("(%p)\n", this);
|
||||
TRACE("(%p)\n", this);
|
||||
|
||||
if (!pcsFlags || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS)
|
||||
return E_INVALIDARG;
|
||||
|
@ -967,7 +967,7 @@ HRESULT WINAPI CDrivesFolder::GetDefaultColumnState(UINT iColumn, DWORD * pcsFla
|
|||
|
||||
HRESULT WINAPI CDrivesFolder::GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID * pscid, VARIANT * pv)
|
||||
{
|
||||
FIXME ("(%p)\n", this);
|
||||
FIXME("(%p)\n", this);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
@ -975,7 +975,7 @@ HRESULT WINAPI CDrivesFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, S
|
|||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE ("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd);
|
||||
TRACE("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd);
|
||||
|
||||
if (!psd || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS)
|
||||
return E_INVALIDARG;
|
||||
|
@ -1040,7 +1040,7 @@ HRESULT WINAPI CDrivesFolder::MapColumnToSCID(UINT column, SHCOLUMNID * pscid)
|
|||
*/
|
||||
HRESULT WINAPI CDrivesFolder::GetClassID(CLSID *lpClassId)
|
||||
{
|
||||
TRACE ("(%p)\n", this);
|
||||
TRACE("(%p)\n", this);
|
||||
|
||||
if (!lpClassId)
|
||||
return E_POINTER;
|
||||
|
|
|
@ -261,32 +261,32 @@ HRESULT CFSExtractIcon_CreateInstance(IShellFolder * psf, LPCITEMIDLIST pidl, RE
|
|||
|
||||
if (_ILIsFolder (pidl))
|
||||
{
|
||||
if (SUCCEEDED(getIconLocationForFolder(psf,
|
||||
if (SUCCEEDED(getIconLocationForFolder(psf,
|
||||
pidl, 0, wTemp, _countof(wTemp),
|
||||
&icon_idx,
|
||||
&flags)))
|
||||
{
|
||||
initIcon->SetNormalIcon(wTemp, icon_idx);
|
||||
// FIXME: if/when getIconLocationForFolder does something for
|
||||
// FIXME: if/when getIconLocationForFolder does something for
|
||||
// GIL_FORSHORTCUT, code below should be uncommented. and
|
||||
// the following line removed.
|
||||
initIcon->SetShortcutIcon(wTemp, icon_idx);
|
||||
}
|
||||
if (SUCCEEDED(getIconLocationForFolder(psf,
|
||||
if (SUCCEEDED(getIconLocationForFolder(psf,
|
||||
pidl, GIL_DEFAULTICON, wTemp, _countof(wTemp),
|
||||
&icon_idx,
|
||||
&flags)))
|
||||
{
|
||||
initIcon->SetDefaultIcon(wTemp, icon_idx);
|
||||
}
|
||||
// if (SUCCEEDED(getIconLocationForFolder(psf,
|
||||
// if (SUCCEEDED(getIconLocationForFolder(psf,
|
||||
// pidl, GIL_FORSHORTCUT, wTemp, _countof(wTemp),
|
||||
// &icon_idx,
|
||||
// &flags)))
|
||||
// {
|
||||
// initIcon->SetShortcutIcon(wTemp, icon_idx);
|
||||
// }
|
||||
if (SUCCEEDED(getIconLocationForFolder(psf,
|
||||
if (SUCCEEDED(getIconLocationForFolder(psf,
|
||||
pidl, GIL_OPENICON, wTemp, _countof(wTemp),
|
||||
&icon_idx,
|
||||
&flags)))
|
||||
|
@ -374,7 +374,7 @@ private:
|
|||
hr = SHELL32_GetCLSIDForDirectory(Tmp, L"CLSID", &clsidFolder);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
ERR("SHOULD DO SOMETHING WITH CLSID?\n");
|
||||
ERR("Got CLSID override\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -758,7 +758,7 @@ HRESULT WINAPI CFSFolder::ParseDisplayName(HWND hwndOwner,
|
|||
if (pidlTemp != NULL)
|
||||
{
|
||||
/* We are creating an id list without ensuring that the items exist.
|
||||
If we have a remaining path, this must be a folder.
|
||||
If we have a remaining path, this must be a folder.
|
||||
We have to do it now because it is set as a file by default */
|
||||
if (szNext)
|
||||
{
|
||||
|
@ -950,7 +950,7 @@ HRESULT WINAPI CFSFolder::CompareIDs(LPARAM lParam,
|
|||
case 2: /* Type */
|
||||
pExtension1 = PathFindExtensionW(pDataW1->wszName);
|
||||
pExtension2 = PathFindExtensionW(pDataW2->wszName);
|
||||
result = wcsicmp(pExtension1, pExtension2);
|
||||
result = wcsicmp(pExtension1, pExtension2);
|
||||
break;
|
||||
case 3: /* Size */
|
||||
result = pData1->u.file.dwFileSize - pData2->u.file.dwFileSize;
|
||||
|
@ -1190,7 +1190,7 @@ HRESULT WINAPI CFSFolder::GetUIObjectOf(HWND hwndOwner,
|
|||
}
|
||||
else if (IsEqualIID (riid, IID_IDataObject))
|
||||
{
|
||||
if (cidl >= 1)
|
||||
if (cidl >= 1)
|
||||
{
|
||||
hr = IDataObject_Constructor (hwndOwner, pidlRoot, apidl, cidl, (IDataObject **)&pObj);
|
||||
}
|
||||
|
@ -1253,7 +1253,7 @@ BOOL SHELL_FS_HideExtension(LPWSTR szPath)
|
|||
if (!RegCreateKeyExW(HKEY_CURRENT_USER, AdvancedW, 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0)) {
|
||||
if (!RegQueryValueExW(hKey, HideFileExtW, 0, 0, (LPBYTE) &dwData, &dwDataSize))
|
||||
doHide = dwData;
|
||||
RegCloseKey (hKey);
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
if (!doHide) {
|
||||
|
@ -1296,7 +1296,6 @@ void SHELL_FS_ProcessDisplayFilename(LPWSTR szPath, DWORD dwFlags)
|
|||
* FIXME
|
||||
* if the name is in the pidl the ret value should be a STRRET_OFFSET
|
||||
*/
|
||||
|
||||
HRESULT WINAPI CFSFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl,
|
||||
DWORD dwFlags, LPSTRRET strRet)
|
||||
{
|
||||
|
@ -1311,7 +1310,7 @@ HRESULT WINAPI CFSFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl,
|
|||
else if (pidl && !pidl->mkid.cb) /* empty pidl */
|
||||
{
|
||||
/* If it is an empty pidl return only the path of the folder */
|
||||
if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) &&
|
||||
if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) &&
|
||||
(GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) &&
|
||||
sPathTarget)
|
||||
{
|
||||
|
@ -1319,7 +1318,7 @@ HRESULT WINAPI CFSFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl,
|
|||
}
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
|
||||
int len = 0;
|
||||
LPWSTR pszPath = (LPWSTR)CoTaskMemAlloc((MAX_PATH + 1) * sizeof(WCHAR));
|
||||
if (!pszPath)
|
||||
|
@ -1689,7 +1688,7 @@ HRESULT CFSFolder::_CreateExtensionUIObject(PCUIDLIST_RELATIVE pidl, REFIID riid
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CFSFolder::_GetDropTarget(LPCITEMIDLIST pidl, LPVOID *ppvOut)
|
||||
HRESULT CFSFolder::_GetDropTarget(LPCITEMIDLIST pidl, LPVOID *ppvOut)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -1717,7 +1716,7 @@ HRESULT CFSFolder::_GetDropTarget(LPCITEMIDLIST pidl, LPVOID *ppvOut)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CFSFolder::_GetIconHandler(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut)
|
||||
HRESULT CFSFolder::_GetIconHandler(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut)
|
||||
{
|
||||
CLSID clsid;
|
||||
HRESULT hr;
|
||||
|
|
|
@ -34,7 +34,7 @@ class CFSFolder :
|
|||
public:
|
||||
CFSFolder();
|
||||
~CFSFolder();
|
||||
|
||||
|
||||
// IShellFolder
|
||||
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
|
||||
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
|
||||
|
|
|
@ -68,9 +68,9 @@ HRESULT WINAPI CFontsFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOI
|
|||
HRESULT WINAPI CFontsFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
|
||||
{
|
||||
static const DWORD dwFontsAttributes =
|
||||
SFGAO_STORAGE | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSANCESTOR |
|
||||
SFGAO_STORAGE | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSANCESTOR |
|
||||
SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER;
|
||||
|
||||
|
||||
if(cidl)
|
||||
return m_pisfInner->GetAttributesOf(cidl, apidl, rgfInOut);
|
||||
|
||||
|
|
|
@ -39,14 +39,14 @@ typedef struct
|
|||
|
||||
static const columninfo RecycleBinColumns[] =
|
||||
{
|
||||
{IDS_SHV_COLUMN_NAME, &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},
|
||||
{IDS_SHV_COLUMN_DELDATE, &FMTID_Displaced, PID_DISPLACED_DATE, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20},
|
||||
{IDS_SHV_COLUMN_SIZE, &FMTID_Storage, PID_STG_SIZE, SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 20},
|
||||
{IDS_SHV_COLUMN_TYPE, &FMTID_Storage, PID_STG_STORAGETYPE, SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20},
|
||||
{IDS_SHV_COLUMN_MODIFIED, &FMTID_Storage, PID_STG_WRITETIME, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20},
|
||||
/* {"creation time", &FMTID_Storage, PID_STG_CREATETIME, SHCOLSTATE_TYPE_DATE, LVCFMT_LEFT, 20}, */
|
||||
/* {"attribs", &FMTID_Storage, PID_STG_ATTRIBUTES, SHCOLSTATE_TYPE_STR, LVCFMT_LEFT, 20}, */
|
||||
{IDS_SHV_COLUMN_NAME, &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},
|
||||
{IDS_SHV_COLUMN_DELDATE, &FMTID_Displaced, PID_DISPLACED_DATE, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20},
|
||||
{IDS_SHV_COLUMN_SIZE, &FMTID_Storage, PID_STG_SIZE, SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 20},
|
||||
{IDS_SHV_COLUMN_TYPE, &FMTID_Storage, PID_STG_STORAGETYPE, SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20},
|
||||
{IDS_SHV_COLUMN_MODIFIED, &FMTID_Storage, PID_STG_WRITETIME, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20},
|
||||
/* {"creation time", &FMTID_Storage, PID_STG_CREATETIME, SHCOLSTATE_TYPE_DATE, LVCFMT_LEFT, 20}, */
|
||||
/* {"attribs", &FMTID_Storage, PID_STG_ATTRIBUTES, SHCOLSTATE_TYPE_STR, LVCFMT_LEFT, 20}, */
|
||||
};
|
||||
|
||||
#define COLUMN_NAME 0
|
||||
|
@ -320,30 +320,30 @@ HRESULT WINAPI CRecycleBinItemContextMenu::QueryContextMenu(HMENU hMenu, UINT in
|
|||
|
||||
TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", this, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
|
||||
|
||||
if (LoadStringW(shell32_hInstance, IDS_RESTORE, szBuffer, sizeof(szBuffer) / sizeof(WCHAR)))
|
||||
if (LoadStringW(shell32_hInstance, IDS_RESTORE, szBuffer, _countof(szBuffer)))
|
||||
{
|
||||
szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
|
||||
szBuffer[_countof(szBuffer)-1] = L'\0';
|
||||
_InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED);
|
||||
Count++;
|
||||
}
|
||||
|
||||
if (LoadStringW(shell32_hInstance, IDS_CUT, szBuffer, sizeof(szBuffer) / sizeof(WCHAR)))
|
||||
if (LoadStringW(shell32_hInstance, IDS_CUT, szBuffer, _countof(szBuffer)))
|
||||
{
|
||||
_InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED);
|
||||
szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
|
||||
szBuffer[_countof(szBuffer)-1] = L'\0';
|
||||
_InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED);
|
||||
}
|
||||
|
||||
if (LoadStringW(shell32_hInstance, IDS_DELETE, szBuffer, sizeof(szBuffer) / sizeof(WCHAR)))
|
||||
if (LoadStringW(shell32_hInstance, IDS_DELETE, szBuffer, _countof(szBuffer)))
|
||||
{
|
||||
szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
|
||||
szBuffer[_countof(szBuffer)-1] = L'\0';
|
||||
_InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED);
|
||||
_InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED);
|
||||
}
|
||||
|
||||
if (LoadStringW(shell32_hInstance, IDS_PROPERTIES, szBuffer, sizeof(szBuffer) / sizeof(WCHAR)))
|
||||
if (LoadStringW(shell32_hInstance, IDS_PROPERTIES, szBuffer, _countof(szBuffer)))
|
||||
{
|
||||
szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
|
||||
szBuffer[_countof(szBuffer)-1] = L'\0';
|
||||
_InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED);
|
||||
_InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT);
|
||||
}
|
||||
|
@ -796,7 +796,7 @@ HRESULT WINAPI CRecycleBin::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT i
|
|||
mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE;
|
||||
mii.fState = RecycleBinIsEmpty() ? MFS_DISABLED : MFS_ENABLED;
|
||||
szBuffer[0] = L'\0';
|
||||
LoadStringW(shell32_hInstance, IDS_EMPTY_BITBUCKET, szBuffer, sizeof(szBuffer) / sizeof(WCHAR));
|
||||
LoadStringW(shell32_hInstance, IDS_EMPTY_BITBUCKET, szBuffer, _countof(szBuffer));
|
||||
mii.dwTypeData = szBuffer;
|
||||
mii.cch = wcslen(mii.dwTypeData);
|
||||
mii.wID = idCmdFirst + id++;
|
||||
|
@ -1116,7 +1116,7 @@ HRESULT WINAPI SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags)
|
|||
if (dwType != REG_EXPAND_SZ) /* type dismatch */
|
||||
return S_OK;
|
||||
|
||||
szPath[(sizeof(szPath)/sizeof(WCHAR))-1] = L'\0';
|
||||
szPath[_countof(szPath)-1] = L'\0';
|
||||
PlaySoundW(szPath, NULL, SND_FILENAME);
|
||||
}
|
||||
return S_OK;
|
||||
|
@ -1155,8 +1155,8 @@ HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryR
|
|||
{
|
||||
FIXME("%s, %p - stub\n", debugstr_w(pszRootPath), pSHQueryRBInfo);
|
||||
|
||||
if (!(pszRootPath) || (pszRootPath[0] == 0) ||
|
||||
!(pSHQueryRBInfo) || (pSHQueryRBInfo->cbSize < sizeof(SHQUERYRBINFO)))
|
||||
if (!pszRootPath || (pszRootPath[0] == 0) ||
|
||||
!pSHQueryRBInfo || (pSHQueryRBInfo->cbSize < sizeof(SHQUERYRBINFO)))
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
|
|
@ -503,7 +503,7 @@ HRESULT WINAPI CRegFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apid
|
|||
if (_ILIsSpecialFolder(*apidl))
|
||||
GetGuidItemAttributes(*apidl, rgfInOut);
|
||||
else
|
||||
ERR("Got an unkown pidl here!\n");
|
||||
ERR("Got unknown pidl\n");
|
||||
apidl++;
|
||||
cidl--;
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ HRESULT WINAPI CRegFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags,
|
|||
GUID const *clsid = _ILGetGUIDPointer (pidl);
|
||||
|
||||
/* First of all check if we need to query the name from the child item */
|
||||
if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING &&
|
||||
if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING &&
|
||||
GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL)
|
||||
{
|
||||
int bWantsForParsing = FALSE;
|
||||
|
@ -750,7 +750,7 @@ HRESULT WINAPI CRegFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHEL
|
|||
|
||||
if (iColumn >= 3)
|
||||
{
|
||||
/* Return an empty string when we area asked for a column we don't support.
|
||||
/* Return an empty string when we area asked for a column we don't support.
|
||||
Only the regfolder is supposed to do this as it supports less columns compared to other folder
|
||||
and its contents are supposed to be presented alongside items that support more columns. */
|
||||
return SHSetStrRet(&psd->str, "");
|
||||
|
|
|
@ -71,9 +71,9 @@ static INT CALLBACK SIC_CompareEntries( LPVOID p1, LPVOID p2, LPARAM lparam)
|
|||
if (e1->dwSourceIndex != e2->dwSourceIndex)
|
||||
return (e1->dwSourceIndex < e2->dwSourceIndex) ? -1 : 1;
|
||||
|
||||
if ((e1->dwFlags & GIL_FORSHORTCUT) != (e2->dwFlags & GIL_FORSHORTCUT))
|
||||
if ((e1->dwFlags & GIL_FORSHORTCUT) != (e2->dwFlags & GIL_FORSHORTCUT))
|
||||
return ((e1->dwFlags & GIL_FORSHORTCUT) < (e2->dwFlags & GIL_FORSHORTCUT)) ? -1 : 1;
|
||||
|
||||
|
||||
return wcsicmp(e1->sSourceFile,e2->sSourceFile);
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ static int SIC_LoadOverlayIcon(int icon_idx);
|
|||
* FIXME: This should go to the ImageList implementation!
|
||||
*/
|
||||
static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large)
|
||||
{
|
||||
{
|
||||
ICONINFO ShortcutIconInfo, TargetIconInfo;
|
||||
HICON ShortcutIcon = NULL, TargetIcon;
|
||||
BITMAP TargetBitmapInfo, ShortcutBitmapInfo;
|
||||
|
@ -106,7 +106,7 @@ static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large)
|
|||
* We will write over the source bitmaps to get the final ones */
|
||||
if (! GetIconInfo(SourceIcon, &TargetIconInfo))
|
||||
return NULL;
|
||||
|
||||
|
||||
/* Is it possible with the ImageList implementation? */
|
||||
if(!TargetIconInfo.hbmColor)
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large)
|
|||
FIXME("1bpp icon wants its overlay!\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
if(!GetObjectW(TargetIconInfo.hbmColor, sizeof(BITMAP), &TargetBitmapInfo))
|
||||
{
|
||||
goto fail;
|
||||
|
@ -140,7 +140,7 @@ static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large)
|
|||
{
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
/* Is it possible with the ImageLists ? */
|
||||
if(!ShortcutIconInfo.hbmColor)
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large)
|
|||
FIXME("Should draw 1bpp overlay!\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
if(!GetObjectW(ShortcutIconInfo.hbmColor, sizeof(BITMAP), &ShortcutBitmapInfo))
|
||||
{
|
||||
goto fail;
|
||||
|
@ -191,7 +191,7 @@ static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large)
|
|||
PVOID bits;
|
||||
PULONG pixel;
|
||||
INT i, j;
|
||||
|
||||
|
||||
/* Find if the source bitmap has an alpha channel */
|
||||
if(TargetBitmapInfo.bmBitsPixel != 32) add_alpha = FALSE;
|
||||
else
|
||||
|
@ -202,21 +202,21 @@ static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large)
|
|||
lpbmi->bmiHeader.biHeight = TargetBitmapInfo.bmHeight;
|
||||
lpbmi->bmiHeader.biPlanes = 1;
|
||||
lpbmi->bmiHeader.biBitCount = 32;
|
||||
|
||||
|
||||
bits = HeapAlloc(GetProcessHeap(), 0, TargetBitmapInfo.bmHeight * TargetBitmapInfo.bmWidthBytes);
|
||||
|
||||
|
||||
if(!bits) goto fail;
|
||||
|
||||
|
||||
if(!GetDIBits(TargetDC, TargetIconInfo.hbmColor, 0, TargetBitmapInfo.bmHeight, bits, lpbmi, DIB_RGB_COLORS))
|
||||
{
|
||||
ERR("GetBIBits failed!\n");
|
||||
HeapFree(GetProcessHeap(), 0, bits);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
i = j = 0;
|
||||
pixel = (PULONG)bits;
|
||||
|
||||
|
||||
for(i=0; i<TargetBitmapInfo.bmHeight; i++)
|
||||
{
|
||||
for(j=0; j<TargetBitmapInfo.bmWidth; j++)
|
||||
|
@ -228,25 +228,25 @@ static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large)
|
|||
}
|
||||
HeapFree(GetProcessHeap(), 0, bits);
|
||||
}
|
||||
|
||||
|
||||
/* Allocate the bits */
|
||||
bits = HeapAlloc(GetProcessHeap(), 0, ShortcutBitmapInfo.bmHeight*ShortcutBitmapInfo.bmWidthBytes);
|
||||
if(!bits) goto fail;
|
||||
|
||||
|
||||
ZeroMemory(buffer, sizeof(buffer));
|
||||
lpbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
lpbmi->bmiHeader.biWidth = ShortcutBitmapInfo.bmWidth;
|
||||
lpbmi->bmiHeader.biHeight = ShortcutBitmapInfo.bmHeight;
|
||||
lpbmi->bmiHeader.biPlanes = 1;
|
||||
lpbmi->bmiHeader.biBitCount = 32;
|
||||
|
||||
|
||||
if(!GetDIBits(TargetDC, ShortcutIconInfo.hbmColor, 0, ShortcutBitmapInfo.bmHeight, bits, lpbmi, DIB_RGB_COLORS))
|
||||
{
|
||||
ERR("GetBIBits failed!\n");
|
||||
HeapFree(GetProcessHeap(), 0, bits);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
pixel = (PULONG)bits;
|
||||
/* Remove alpha channel component or make it totally opaque */
|
||||
for(i=0; i<ShortcutBitmapInfo.bmHeight; i++)
|
||||
|
@ -257,10 +257,10 @@ static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large)
|
|||
else *pixel++ &= 0x00FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* GetDIBits return BI_BITFIELDS with masks set to 0, and SetDIBits fails when masks are 0. The irony... */
|
||||
lpbmi->bmiHeader.biCompression = BI_RGB;
|
||||
|
||||
|
||||
/* Set the bits again */
|
||||
if(!SetDIBits(TargetDC, ShortcutIconInfo.hbmColor, 0, ShortcutBitmapInfo.bmHeight, bits, lpbmi, DIB_RGB_COLORS))
|
||||
{
|
||||
|
@ -556,7 +556,7 @@ BOOL SIC_Initialize(void)
|
|||
ERR("Failed to create the big icon list.\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
||||
/* Load the document icon, which is used as the default if an icon isn't found. */
|
||||
hSm = (HICON)LoadImageW(shell32_hInstance,
|
||||
MAKEINTRESOURCEW(IDI_SHELL_DOCUMENT),
|
||||
|
@ -592,15 +592,15 @@ BOOL SIC_Initialize(void)
|
|||
ERR("Failed to add IDI_SHELL_DOCUMENT icon to cache.\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
||||
/* Everything went fine */
|
||||
result = TRUE;
|
||||
|
||||
|
||||
end:
|
||||
/* The image list keeps a copy of the icons, we must destroy them */
|
||||
if(hSm) DestroyIcon(hSm);
|
||||
if(hLg) DestroyIcon(hLg);
|
||||
|
||||
|
||||
/* Clean everything if something went wrong */
|
||||
if(!result)
|
||||
{
|
||||
|
@ -678,13 +678,13 @@ static int SIC_LoadOverlayIcon(int icon_idx)
|
|||
/* read icon path and index */
|
||||
if (RegQueryValueExW(hKeyShellIcons, wszIdx, NULL, NULL, (LPBYTE)buffer, &count) == ERROR_SUCCESS)
|
||||
{
|
||||
LPWSTR p = wcschr(buffer, ',');
|
||||
LPWSTR p = wcschr(buffer, ',');
|
||||
|
||||
if (p)
|
||||
*p++ = 0;
|
||||
if (p)
|
||||
*p++ = 0;
|
||||
|
||||
iconPath = buffer;
|
||||
iconIdx = _wtoi(p);
|
||||
iconPath = buffer;
|
||||
iconIdx = _wtoi(p);
|
||||
}
|
||||
|
||||
RegCloseKey(hKeyShellIcons);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
The following avi's use icons from the Tango project and are
|
||||
The following avi's use icons from the Tango project and are
|
||||
released under Creative Commons Attribution-ShareAlike 2.5 License.
|
||||
Please see COPYING for details
|
||||
|
||||
|
@ -7,4 +7,3 @@ Please see COPYING for details
|
|||
163.avi
|
||||
164+169.avi
|
||||
170.avi
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
The following icons are the property of the Tango project and are
|
||||
The following icons are the property of the Tango project and are
|
||||
released under Creative Commons Attribution-ShareAlike 2.5 License.
|
||||
Please see COPYING for details
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ HKCR
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ForceRemove Applications
|
||||
{
|
||||
}
|
||||
|
|
|
@ -44,9 +44,9 @@ BEGIN
|
|||
"A", FCIDM_SHVIEW_SELECTALL, VIRTKEY, CONTROL
|
||||
VK_F1, FCIDM_SHVIEW_HELP, VIRTKEY
|
||||
|
||||
/* FIXME: the following accelerator doesn't belong here. This accelerator
|
||||
/* FIXME: the following accelerator doesn't belong here. This accelerator
|
||||
* table is used by the shell view control. F5 should be handled by the
|
||||
* a different accelerator table thats translated in IShellBrowser::TranslateAcceleratorSB
|
||||
* a different accelerator table thats translated in IShellBrowser::TranslateAcceleratorSB
|
||||
* but will put it here until the shell work fine */
|
||||
VK_F5, FCIDM_SHVIEW_REFRESH, VIRTKEY
|
||||
END
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#include <atlcoll.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(desktop);
|
||||
|
||||
static const WCHAR szProgmanClassName[] = L"Progman";
|
||||
|
@ -104,7 +102,7 @@ END_COM_MAP()
|
|||
};
|
||||
|
||||
CDesktopBrowser::CDesktopBrowser():
|
||||
m_hAccel(NULL),
|
||||
m_hAccel(NULL),
|
||||
m_hWndShellView(NULL)
|
||||
{
|
||||
}
|
||||
|
@ -184,7 +182,7 @@ HRESULT CDesktopBrowser::_Resize()
|
|||
}
|
||||
|
||||
HRESULT CDesktopBrowser::Initialize(IShellDesktopTray *ShellDesk)
|
||||
{
|
||||
{
|
||||
CComPtr<IShellFolder> psfDesktop;
|
||||
HRESULT hRet;
|
||||
hRet = SHGetDesktopFolder(&psfDesktop);
|
||||
|
@ -284,7 +282,7 @@ HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT
|
|||
* find an open shell window that shows the requested pidl and activate it
|
||||
*/
|
||||
|
||||
DWORD dwFlags = ((wFlags & SBSP_EXPLOREMODE) != 0) ? SH_EXPLORER_CMDLINE_FLAG_E : 0;
|
||||
DWORD dwFlags = ((wFlags & SBSP_EXPLOREMODE) != 0) ? SH_EXPLORER_CMDLINE_FLAG_E : 0;
|
||||
return SHOpenNewFrame(ILClone(pidl), NULL, 0, dwFlags);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
project(SHELL)
|
||||
set_cpp(WITH_RUNTIME)
|
||||
add_definitions(-DUNICODE -D_UNICODE)
|
||||
|
|
|
@ -203,7 +203,7 @@ HRESULT STDMETHODCALLTYPE CMenuDeskBar::SetClient(IUnknown *punkClient)
|
|||
return hr;
|
||||
|
||||
pDeskBandClient->SetDeskBarSite(NULL);
|
||||
|
||||
|
||||
pDeskBandClient = NULL;
|
||||
m_Client = NULL;
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ HRESULT STDMETHODCALLTYPE CMenuDeskBar::GetSite(REFIID riid, void **ppvSite)
|
|||
|
||||
static void AdjustForExcludeArea(BOOL alignLeft, BOOL alignTop, BOOL preferVertical, PINT px, PINT py, INT cx, INT cy, RECTL rcExclude) {
|
||||
RECT rcWindow = { *px, *py, *px + cx, *py + cy };
|
||||
|
||||
|
||||
if (rcWindow.right > rcExclude.left && rcWindow.left < rcExclude.right &&
|
||||
rcWindow.bottom > rcExclude.top && rcWindow.top < rcExclude.bottom)
|
||||
{
|
||||
|
@ -419,7 +419,7 @@ HRESULT STDMETHODCALLTYPE CMenuDeskBar::Popup(POINTL *ppt, RECTL *prcExclude, MP
|
|||
AdjustForExcludeArea(alignLeft, alignTop, preferVertical, &x, &y, cx, cy, *prcExclude);
|
||||
|
||||
// Verify that it doesn't escape the work area, and flip.
|
||||
if (alignLeft)
|
||||
if (alignLeft)
|
||||
{
|
||||
if (x < rcWorkArea.left && (ppt->x+cx) <= rcWorkArea.right)
|
||||
{
|
||||
|
@ -813,7 +813,7 @@ LRESULT CMenuDeskBar::_OnWinIniChange(UINT uMsg, WPARAM wParam, LPARAM lParam, B
|
|||
|
||||
LRESULT CMenuDeskBar::_OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
/* If it is a flat style menu we need to handle WM_NCPAINT
|
||||
/* If it is a flat style menu we need to handle WM_NCPAINT
|
||||
* and paint the border with the right colour */
|
||||
if ((GetStyle() & WS_BORDER) == 0)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
This file implements the CMenuFocusManager class.
|
||||
|
||||
This class manages the shell menus, by overriding the hot-tracking behaviour.
|
||||
|
@ -169,7 +169,7 @@ HRESULT CMenuFocusManager::PopFromArray(StackEntryType * pType, CMenuBand ** pMb
|
|||
{
|
||||
if (pMb) *pMb = m_bandStack[m_bandCount].mb;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -559,7 +559,7 @@ LRESULT CMenuFocusManager::GetMsgHook(INT nCode, WPARAM hookWParam, LPARAM hookL
|
|||
BOOL isLButton = FALSE;
|
||||
if (nCode < 0)
|
||||
return CallNextHookEx(m_hGetMsgHook, nCode, hookWParam, hookLParam);
|
||||
|
||||
|
||||
if (nCode == HC_ACTION)
|
||||
{
|
||||
BOOL callNext = TRUE;
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
|
||||
|
||||
|
||||
// Using custom message map instead
|
||||
// Using custom message map instead
|
||||
virtual BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD mapId = 0);
|
||||
|
||||
// UNIMPLEMENTED
|
||||
|
|
|
@ -165,7 +165,6 @@ HRESULT CMenuToolbarBase::OnCustomDraw(LPNMTBCUSTOMDRAW cdraw, LRESULT * theResu
|
|||
return S_OK;
|
||||
|
||||
case CDDS_ITEMPREPAINT:
|
||||
|
||||
HWND tlw;
|
||||
m_menuBand->_GetTopLevelWindow(&tlw);
|
||||
|
||||
|
@ -427,7 +426,7 @@ HRESULT CMenuToolbarBase::CreateToolbar(HWND hwndParent, DWORD dwFlags)
|
|||
m_pager.SubclassWindow(hwndPager);
|
||||
|
||||
::SetParent(m_hWnd, hwndPager);
|
||||
|
||||
|
||||
m_pager.SendMessageW(PGM_SETCHILD, 0, reinterpret_cast<LPARAM>(m_hWnd));
|
||||
}
|
||||
|
||||
|
@ -715,7 +714,7 @@ HRESULT CMenuToolbarBase::PopupSubMenu(UINT iItem, UINT index, IShellMenu* child
|
|||
|
||||
if (!GetItemRect(index, &rc))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
POINT a = { rc.left, rc.top };
|
||||
POINT b = { rc.right, rc.bottom };
|
||||
|
||||
|
@ -847,7 +846,7 @@ HRESULT CMenuToolbarBase::MenuBarMouseDown(INT iIndex, BOOL isLButton)
|
|||
|
||||
GetButton(iIndex, &btn);
|
||||
|
||||
if ((m_initFlags & SMINIT_VERTICAL)
|
||||
if ((m_initFlags & SMINIT_VERTICAL)
|
||||
|| m_popupBar
|
||||
|| m_cancelingPopup)
|
||||
{
|
||||
|
@ -1042,7 +1041,7 @@ HRESULT CMenuToolbarBase::AddPlaceholder()
|
|||
{
|
||||
TBBUTTON tbb = { 0 };
|
||||
WCHAR MenuString[128];
|
||||
|
||||
|
||||
LoadStringW(GetModuleHandle(L"shell32.dll"), IDS_MENU_EMPTY, MenuString, _countof(MenuString));
|
||||
|
||||
tbb.fsState = 0;
|
||||
|
@ -1251,7 +1250,7 @@ HRESULT CMenuStaticToolbar::OnDeletingButton(const NMTOOLBAR * tb)
|
|||
HRESULT CMenuStaticToolbar::InternalContextMenu(INT iItem, INT index, DWORD_PTR dwData, POINT pt)
|
||||
{
|
||||
CComPtr<IContextMenu> contextMenu;
|
||||
HRESULT hr = m_menuBand->_CallCBWithItemId(iItem, SMC_GETOBJECT,
|
||||
HRESULT hr = m_menuBand->_CallCBWithItemId(iItem, SMC_GETOBJECT,
|
||||
reinterpret_cast<WPARAM>(&IID_IContextMenu), reinterpret_cast<LPARAM>(&contextMenu));
|
||||
if (hr != S_OK)
|
||||
return hr;
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
HRESULT DisableMouseTrack(BOOL bDisable);
|
||||
|
||||
virtual HRESULT FillToolbar(BOOL clearFirst=FALSE) = 0;
|
||||
|
||||
|
||||
HRESULT CancelCurrentPopup();
|
||||
HRESULT PopupItem(INT iItem, BOOL keyInitiated);
|
||||
HRESULT GetDataFromId(INT iItem, INT* pIndex, DWORD_PTR* pData);
|
||||
|
|
|
@ -90,7 +90,7 @@ CEnumMergedFolder::CEnumMergedFolder() :
|
|||
m_hDsaCount(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CEnumMergedFolder::~CEnumMergedFolder()
|
||||
{
|
||||
DSA_DestroyCallback(m_hDsa, s_DsaDeleteCallback, this);
|
||||
|
@ -104,7 +104,7 @@ int CEnumMergedFolder::DsaDeleteCallback(LocalPidlInfo * info)
|
|||
CoTaskMemFree((LPVOID)info->parseName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int CALLBACK CEnumMergedFolder::s_DsaDeleteCallback(void *pItem, void *pData)
|
||||
{
|
||||
CEnumMergedFolder * mf = (CEnumMergedFolder*) pData;
|
||||
|
@ -270,7 +270,7 @@ HRESULT CEnumMergedFolder::FindPidlInList(HWND hwndOwner, LPCITEMIDLIST pcidl, L
|
|||
LocalPidlInfo * pInfo = (LocalPidlInfo *) DSA_GetItemPtr(m_hDsa, i);
|
||||
if (!pInfo)
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
TRACE("Comparing with item at %d with parent %p and pidl { cb=%d }\n", i, pInfo->parent, pInfo->pidl->mkid.cb);
|
||||
|
||||
hr = pInfo->parent->CompareIDs(0, pInfo->pidl, pcidl);
|
||||
|
@ -393,7 +393,7 @@ CMergedFolder::CMergedFolder() :
|
|||
{
|
||||
}
|
||||
|
||||
CMergedFolder::~CMergedFolder()
|
||||
CMergedFolder::~CMergedFolder()
|
||||
{
|
||||
if (m_UserLocalPidl) ILFree(m_UserLocalPidl);
|
||||
if (m_AllUsersPidl) ILFree(m_AllUsersPidl);
|
||||
|
@ -409,7 +409,7 @@ HRESULT STDMETHODCALLTYPE CMergedFolder::AddNameSpace(LPGUID lpGuid, IShellFolde
|
|||
}
|
||||
|
||||
TRACE("AddNameSpace %p %p\n", m_UserLocal.p, m_AllUsers.p);
|
||||
|
||||
|
||||
// FIXME: Use a DSA to store the list of merged namespaces, together with their related info (psf, pidl, ...)
|
||||
// For now, assume only 2 will ever be used, and ignore all the other data.
|
||||
if (!m_UserLocal)
|
||||
|
@ -513,7 +513,7 @@ HRESULT STDMETHODCALLTYPE CMergedFolder::BindToObject(
|
|||
{
|
||||
LocalPidlInfo info;
|
||||
HRESULT hr;
|
||||
|
||||
|
||||
hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
|
|
|
@ -61,7 +61,6 @@ class CShellMenuCallback :
|
|||
public IShellMenuCallback
|
||||
{
|
||||
private:
|
||||
|
||||
HWND m_hwndTray;
|
||||
CComPtr<IShellMenu> m_pShellMenu;
|
||||
CComPtr<IBandSite> m_pBandSite;
|
||||
|
@ -198,7 +197,6 @@ private:
|
|||
hr = pShellMenu->SetShellFolder(psfStartMenu, NULL, NULL, 0);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -461,7 +459,7 @@ RSHELL_CStartMenu_CreateInstance(REFIID riid, void **ppv)
|
|||
hr = SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAMS, &pidlProgramsAbsolute);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
{
|
||||
WARN("USER Programs folder not found.");
|
||||
WARN("USER Programs folder not found\n");
|
||||
hr = SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_PROGRAMS, &pidlProgramsAbsolute);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
|
|
|
@ -181,7 +181,6 @@ RestoreFile(
|
|||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IRecycleBinFile
|
||||
|
||||
DECLARE_INTERFACE_(IRecycleBinFile, IUnknown)
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
@ -203,10 +202,9 @@ DECLARE_INTERFACE_(IRecycleBinFile, IUnknown)
|
|||
|
||||
END_INTERFACE
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IRecycleBinEnumList
|
||||
|
||||
#define INTERFACE IRecycleBinEnumList
|
||||
DECLARE_INTERFACE_(IRecycleBinEnumList, IUnknown)
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
@ -223,10 +221,9 @@ DECLARE_INTERFACE_(IRecycleBinEnumList, IUnknown)
|
|||
|
||||
END_INTERFACE
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IRecycleBin
|
||||
|
||||
#define INTERFACE IRecycleBin
|
||||
DECLARE_INTERFACE_(IRecycleBin, IUnknown)
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
|
|
@ -60,7 +60,7 @@ HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, const GUID* clsid,
|
|||
|
||||
HRESULT SHELL32_BindToSF (LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO* ppfti,
|
||||
LPCITEMIDLIST pidl, const GUID* clsid, REFIID riid, LPVOID *ppvOut);
|
||||
|
||||
|
||||
extern "C"
|
||||
BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey);
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, DWORD len, const WCHAR* fmt, const WCHAR*
|
|||
if (!done || (*fmt == '1'))
|
||||
{
|
||||
/*FIXME Is the call to SearchPathW() really needed? We already have separated out the parameter string in args. */
|
||||
if (SearchPathW(lpDir, lpFile, wszExe, sizeof(xlpFile) / sizeof(WCHAR), xlpFile, NULL))
|
||||
if (SearchPathW(lpDir, lpFile, wszExe, ARRAY_SIZE(xlpFile), xlpFile, NULL))
|
||||
cmd = xlpFile;
|
||||
else
|
||||
cmd = lpFile;
|
||||
|
@ -315,7 +315,7 @@ static BOOL SHELL_ArgifyW(WCHAR* out, DWORD len, const WCHAR* fmt, const WCHAR*
|
|||
pv = SHLockShared(hmem, 0);
|
||||
chars = swprintf(buf, L":%p", pv);
|
||||
|
||||
if (chars >= sizeof(buf) / sizeof(WCHAR))
|
||||
if (chars >= ARRAY_SIZE(buf))
|
||||
ERR("pidl format buffer too small!\n");
|
||||
|
||||
used += chars;
|
||||
|
@ -631,7 +631,7 @@ static UINT SHELL_FindExecutableByVerb(LPCWSTR lpVerb, LPWSTR key, LPWSTR classn
|
|||
|
||||
if (RegOpenKeyExW(HKEY_CLASSES_ROOT, classname, 0, 0x02000000, &hkeyClass))
|
||||
return SE_ERR_NOASSOC;
|
||||
if (!HCR_GetDefaultVerbW(hkeyClass, lpVerb, verb, sizeof(verb) / sizeof(verb[0])))
|
||||
if (!HCR_GetDefaultVerbW(hkeyClass, lpVerb, verb, ARRAY_SIZE(verb)))
|
||||
return SE_ERR_NOASSOC;
|
||||
RegCloseKey(hkeyClass);
|
||||
|
||||
|
@ -729,13 +729,13 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpVerb,
|
|||
return 33;
|
||||
}
|
||||
|
||||
if (SearchPathW(lpPath, lpFile, wszExe, sizeof(xlpFile) / sizeof(WCHAR), xlpFile, NULL))
|
||||
if (SearchPathW(lpPath, lpFile, wszExe, ARRAY_SIZE(xlpFile), xlpFile, NULL))
|
||||
{
|
||||
TRACE("SearchPathW returned non-zero\n");
|
||||
lpFile = xlpFile;
|
||||
/* The file was found in the application-supplied default directory (or the system search path) */
|
||||
}
|
||||
else if (lpPath && SearchPathW(NULL, lpFile, wszExe, sizeof(xlpFile)/sizeof(WCHAR), xlpFile, NULL))
|
||||
else if (lpPath && SearchPathW(NULL, lpFile, wszExe, ARRAY_SIZE(xlpFile), xlpFile, NULL))
|
||||
{
|
||||
TRACE("SearchPathW returned non-zero\n");
|
||||
lpFile = xlpFile;
|
||||
|
@ -778,7 +778,7 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpVerb,
|
|||
/* See if it's a program - if GetProfileString fails, we skip this
|
||||
* section. Actually, if GetProfileString fails, we've probably
|
||||
* got a lot more to worry about than running a program... */
|
||||
if (GetProfileStringW(L"windows", L"programs", L"exe pif bat cmd com", wBuffer, sizeof(wBuffer) / sizeof(WCHAR)) > 0)
|
||||
if (GetProfileStringW(L"windows", L"programs", L"exe pif bat cmd com", wBuffer, ARRAY_SIZE(wBuffer)) > 0)
|
||||
{
|
||||
CharLowerW(wBuffer);
|
||||
tok = wBuffer;
|
||||
|
@ -810,7 +810,7 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpVerb,
|
|||
&classnamelen) == ERROR_SUCCESS)
|
||||
{
|
||||
classnamelen /= sizeof(WCHAR);
|
||||
if (classnamelen == sizeof(classname) / sizeof(WCHAR))
|
||||
if (classnamelen == ARRAY_SIZE(classname))
|
||||
classnamelen--;
|
||||
|
||||
classname[classnamelen] = '\0';
|
||||
|
@ -858,7 +858,7 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpVerb,
|
|||
{
|
||||
/* Toss the leading dot */
|
||||
extension++;
|
||||
if (GetProfileStringW(L"extensions", extension, L"", command, sizeof(command) / sizeof(WCHAR)) > 0)
|
||||
if (GetProfileStringW(L"extensions", extension, L"", command, ARRAY_SIZE(command)) > 0)
|
||||
{
|
||||
if (wcslen(command) != 0)
|
||||
{
|
||||
|
@ -927,14 +927,14 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
|
|||
unsigned ret = SE_ERR_NOASSOC;
|
||||
BOOL unicode = !(GetVersion() & 0x80000000);
|
||||
|
||||
if (strlenW(key) + 1 > sizeof(regkey) / sizeof(regkey[0]))
|
||||
if (strlenW(key) + 1 > ARRAY_SIZE(regkey))
|
||||
{
|
||||
FIXME("input parameter %s larger than buffer\n", debugstr_w(key));
|
||||
return 2;
|
||||
}
|
||||
wcscpy(regkey, key);
|
||||
static const WCHAR wApplication[] = L"\\application";
|
||||
endkeyLen = sizeof(regkey) / sizeof(regkey[0]) - (endkey - regkey);
|
||||
endkeyLen = ARRAY_SIZE(regkey) - (endkey - regkey);
|
||||
if (strlenW(wApplication) + 1 > endkeyLen)
|
||||
{
|
||||
FIXME("endkey %s overruns buffer\n", debugstr_w(wApplication));
|
||||
|
@ -946,14 +946,14 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
|
|||
{
|
||||
WCHAR command[1024], fullpath[MAX_PATH];
|
||||
static const WCHAR wSo[] = L".so";
|
||||
DWORD sizeSo = sizeof(wSo) / sizeof(WCHAR);
|
||||
DWORD sizeSo = ARRAY_SIZE(wSo);
|
||||
LPWSTR ptr = NULL;
|
||||
DWORD ret = 0;
|
||||
|
||||
/* Get application command from start string and find filename of application */
|
||||
if (*start == '"')
|
||||
{
|
||||
if (strlenW(start + 1) + 1 > sizeof(command) / sizeof(command[0]))
|
||||
if (strlenW(start + 1) + 1 > ARRAY_SIZE(command))
|
||||
{
|
||||
FIXME("size of input parameter %s larger than buffer\n",
|
||||
debugstr_w(start + 1));
|
||||
|
@ -962,7 +962,7 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
|
|||
wcscpy(command, start + 1);
|
||||
if ((ptr = wcschr(command, '"')))
|
||||
* ptr = 0;
|
||||
ret = SearchPathW(NULL, command, wszExe, sizeof(fullpath) / sizeof(WCHAR), fullpath, &ptr);
|
||||
ret = SearchPathW(NULL, command, wszExe, ARRAY_SIZE(fullpath), fullpath, &ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -973,11 +973,11 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
|
|||
int idx = space - start;
|
||||
memcpy(command, start, idx * sizeof(WCHAR));
|
||||
command[idx] = '\0';
|
||||
if ((ret = SearchPathW(NULL, command, wszExe, sizeof(fullpath) / sizeof(WCHAR), fullpath, &ptr)))
|
||||
if ((ret = SearchPathW(NULL, command, wszExe, ARRAY_SIZE(fullpath), fullpath, &ptr)))
|
||||
break;
|
||||
}
|
||||
if (!ret)
|
||||
ret = SearchPathW(NULL, start, wszExe, sizeof(fullpath) / sizeof(WCHAR), fullpath, &ptr);
|
||||
ret = SearchPathW(NULL, start, wszExe, ARRAY_SIZE(fullpath), fullpath, &ptr);
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
|
@ -985,7 +985,7 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
|
|||
ERR("Unable to find application path for command %s\n", debugstr_w(start));
|
||||
return ERROR_ACCESS_DENIED;
|
||||
}
|
||||
if (strlenW(ptr) + 1 > sizeof(app) / sizeof(app[0]))
|
||||
if (strlenW(ptr) + 1 > ARRAY_SIZE(app))
|
||||
{
|
||||
FIXME("size of found path %s larger than buffer\n", debugstr_w(ptr));
|
||||
return 2;
|
||||
|
@ -1079,8 +1079,8 @@ static unsigned dde_connect(const WCHAR* key, const WCHAR* start, WCHAR* ddeexec
|
|||
}
|
||||
}
|
||||
|
||||
SHELL_ArgifyW(static_res, sizeof(static_res)/sizeof(WCHAR), exec, lpFile, pidl, szCommandline, &resultLen, NULL);
|
||||
if (resultLen > sizeof(static_res)/sizeof(WCHAR))
|
||||
SHELL_ArgifyW(static_res, ARRAY_SIZE(static_res), exec, lpFile, pidl, szCommandline, &resultLen, NULL);
|
||||
if (resultLen > ARRAY_SIZE(static_res))
|
||||
{
|
||||
res = dynamic_res = static_cast<WCHAR *>(HeapAlloc(GetProcessHeap(), 0, resultLen * sizeof(WCHAR)));
|
||||
SHELL_ArgifyW(dynamic_res, resultLen, exec, lpFile, pidl, szCommandline, NULL, NULL);
|
||||
|
@ -1146,12 +1146,12 @@ static UINT_PTR execute_from_key(LPCWSTR key, LPCWSTR lpFile, WCHAR *env,
|
|||
|
||||
/* Is there a replace() function anywhere? */
|
||||
cmdlen /= sizeof(WCHAR);
|
||||
if (cmdlen >= sizeof(cmd) / sizeof(WCHAR))
|
||||
cmdlen = sizeof(cmd) / sizeof(WCHAR) - 1;
|
||||
if (cmdlen >= ARRAY_SIZE(cmd))
|
||||
cmdlen = ARRAY_SIZE(cmd) - 1;
|
||||
cmd[cmdlen] = '\0';
|
||||
SHELL_ArgifyW(param, sizeof(param) / sizeof(WCHAR), cmd, lpFile, (LPITEMIDLIST)psei->lpIDList, szCommandline, &resultLen,
|
||||
SHELL_ArgifyW(param, ARRAY_SIZE(param), cmd, lpFile, (LPITEMIDLIST)psei->lpIDList, szCommandline, &resultLen,
|
||||
(psei->lpDirectory && *psei->lpDirectory) ? psei->lpDirectory : NULL);
|
||||
if (resultLen > sizeof(param) / sizeof(WCHAR))
|
||||
if (resultLen > ARRAY_SIZE(param))
|
||||
ERR("Argify buffer not large enough, truncating\n");
|
||||
}
|
||||
|
||||
|
@ -1238,7 +1238,7 @@ HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpR
|
|||
|
||||
if (lpDirectory)
|
||||
{
|
||||
GetCurrentDirectoryW(sizeof(old_dir) / sizeof(WCHAR), old_dir);
|
||||
GetCurrentDirectoryW(ARRAY_SIZE(old_dir), old_dir);
|
||||
SetCurrentDirectoryW(lpDirectory);
|
||||
}
|
||||
|
||||
|
@ -1483,7 +1483,7 @@ static LONG ShellExecute_FromContextMenu( LPSHELLEXECUTEINFOW sei )
|
|||
i = 0;
|
||||
while (1)
|
||||
{
|
||||
r = RegEnumKeyW(hkeycm, i++, szguid, sizeof(szguid) / sizeof(szguid[0]));
|
||||
r = RegEnumKeyW(hkeycm, i++, szguid, ARRAY_SIZE(szguid));
|
||||
if (r != ERROR_SUCCESS)
|
||||
break;
|
||||
|
||||
|
@ -1530,7 +1530,7 @@ static UINT_PTR SHELL_execute_class(LPCWSTR wszApplicationName, LPSHELLEXECUTEIN
|
|||
TRACE("SEE_MASK_CLASSNAME->%s, doc->%s\n", debugstr_w(execCmd), debugstr_w(wszApplicationName));
|
||||
|
||||
wcmd[0] = '\0';
|
||||
done = SHELL_ArgifyW(wcmd, sizeof(wcmd) / sizeof(WCHAR), execCmd, wszApplicationName, (LPITEMIDLIST)psei->lpIDList, NULL, &resultLen,
|
||||
done = SHELL_ArgifyW(wcmd, ARRAY_SIZE(wcmd), execCmd, wszApplicationName, (LPITEMIDLIST)psei->lpIDList, NULL, &resultLen,
|
||||
(psei->lpDirectory && *psei->lpDirectory) ? psei->lpDirectory : NULL);
|
||||
if (!done && wszApplicationName[0])
|
||||
{
|
||||
|
@ -1544,7 +1544,7 @@ static UINT_PTR SHELL_execute_class(LPCWSTR wszApplicationName, LPSHELLEXECUTEIN
|
|||
else
|
||||
strcatW(wcmd, wszApplicationName);
|
||||
}
|
||||
if (resultLen > sizeof(wcmd) / sizeof(WCHAR))
|
||||
if (resultLen > ARRAY_SIZE(wcmd))
|
||||
ERR("Argify buffer not large enough... truncating\n");
|
||||
return execfunc(wcmd, NULL, FALSE, psei, psei_out);
|
||||
}
|
||||
|
@ -1569,7 +1569,7 @@ static BOOL SHELL_translate_idlist(LPSHELLEXECUTEINFOW sei, LPWSTR wszParameters
|
|||
BOOL appKnownSingular = FALSE;
|
||||
|
||||
/* last chance to translate IDList: now also allow CLSID paths */
|
||||
if (SUCCEEDED(SHELL_GetPathFromIDListForExecuteW((LPCITEMIDLIST)sei->lpIDList, buffer, sizeof(buffer)/sizeof(WCHAR)))) {
|
||||
if (SUCCEEDED(SHELL_GetPathFromIDListForExecuteW((LPCITEMIDLIST)sei->lpIDList, buffer, ARRAY_SIZE(buffer)))) {
|
||||
if (buffer[0] == ':' && buffer[1] == ':') {
|
||||
/* open shell folder for the specified class GUID */
|
||||
if (strlenW(buffer) + 1 > parametersLen)
|
||||
|
@ -1689,14 +1689,14 @@ static void do_error_dialog(UINT_PTR retval, HWND hwnd, WCHAR* filename)
|
|||
|
||||
error_code = GetLastError();
|
||||
if (retval == SE_ERR_NOASSOC)
|
||||
LoadStringW(shell32_hInstance, IDS_SHLEXEC_NOASSOC, msg, sizeof(msg) / sizeof(WCHAR));
|
||||
LoadStringW(shell32_hInstance, IDS_SHLEXEC_NOASSOC, msg, ARRAY_SIZE(msg));
|
||||
else
|
||||
FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ARGUMENT_ARRAY,
|
||||
NULL,
|
||||
error_code,
|
||||
LANG_USER_DEFAULT,
|
||||
msg,
|
||||
sizeof(msg) / sizeof(WCHAR),
|
||||
ARRAY_SIZE(msg),
|
||||
(va_list*)msgArguments);
|
||||
|
||||
MessageBoxW(hwnd, msg, NULL, MB_ICONERROR);
|
||||
|
@ -1735,9 +1735,9 @@ static BOOL SHELL_execute(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc)
|
|||
WCHAR parametersBuffer[1024], dirBuffer[MAX_PATH], wcmdBuffer[1024];
|
||||
WCHAR *wszApplicationName, *wszParameters, *wszDir, *wcmd;
|
||||
DWORD dwApplicationNameLen = MAX_PATH + 2;
|
||||
DWORD parametersLen = sizeof(parametersBuffer) / sizeof(WCHAR);
|
||||
DWORD dirLen = sizeof(dirBuffer) / sizeof(WCHAR);
|
||||
DWORD wcmdLen = sizeof(wcmdBuffer) / sizeof(WCHAR);
|
||||
DWORD parametersLen = ARRAY_SIZE(parametersBuffer);
|
||||
DWORD dirLen = ARRAY_SIZE(dirBuffer);
|
||||
DWORD wcmdLen = ARRAY_SIZE(wcmdBuffer);
|
||||
DWORD len;
|
||||
SHELLEXECUTEINFOW sei_tmp; /* modifiable copy of SHELLEXECUTEINFO struct */
|
||||
WCHAR wfileName[MAX_PATH];
|
||||
|
|
|
@ -164,10 +164,10 @@ HRESULT SHELL32_BindToSF (LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO* pp
|
|||
return E_FAIL;
|
||||
|
||||
CComPtr<IShellFolder> psf;
|
||||
HRESULT hr = SHELL32_CoCreateInitSF(pidlRoot,
|
||||
ppfti,
|
||||
pidlChild,
|
||||
clsid,
|
||||
HRESULT hr = SHELL32_CoCreateInitSF(pidlRoot,
|
||||
ppfti,
|
||||
pidlChild,
|
||||
clsid,
|
||||
IID_PPV_ARG(IShellFolder, &psf));
|
||||
ILFree(pidlChild);
|
||||
|
||||
|
|
|
@ -775,8 +775,6 @@
|
|||
#define IDM_MOVEHERE 0x8
|
||||
#define IDM_LINKHERE 0xB
|
||||
|
||||
|
||||
|
||||
/* Registrar scripts (RGS) */
|
||||
#define IDR_ADMINFOLDERSHORTCUT 128
|
||||
#define IDR_CONTROLPANEL 130
|
||||
|
|
|
@ -373,11 +373,11 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
|
|||
return;
|
||||
}
|
||||
|
||||
if( ( ( wEventId & SHCNE_NOITEMEVENTS ) &&
|
||||
if( ( ( wEventId & SHCNE_NOITEMEVENTS ) &&
|
||||
( wEventId & ~(SHCNE_NOITEMEVENTS | SHCNE_INTERRUPT) ) ) ||
|
||||
( ( wEventId & SHCNE_ONEITEMEVENTS ) &&
|
||||
( ( wEventId & SHCNE_ONEITEMEVENTS ) &&
|
||||
( wEventId & ~(SHCNE_ONEITEMEVENTS | SHCNE_INTERRUPT) ) ) ||
|
||||
( ( wEventId & SHCNE_TWOITEMEVENTS ) &&
|
||||
( ( wEventId & SHCNE_TWOITEMEVENTS ) &&
|
||||
( wEventId & ~(SHCNE_TWOITEMEVENTS | SHCNE_INTERRUPT) ) ) )
|
||||
{
|
||||
WARN("mutually incompatible events listed\n");
|
||||
|
|
|
@ -293,7 +293,7 @@ static BOOL HCR_RegGetIconA(HKEY hkey, LPSTR szDest, LPCSTR szName, DWORD len, i
|
|||
|
||||
BOOL HCR_GetIconW(LPCWSTR szClass, LPWSTR szDest, LPCWSTR szName, DWORD len, int* picon_idx)
|
||||
{
|
||||
static const WCHAR swDefaultIcon[] = {'\\','D','e','f','a','u','l','t','I','c','o','n',0};
|
||||
static const WCHAR swDefaultIcon[] = {'\\','D','e','f','a','u','l','t','I','c','o','n',0};
|
||||
HKEY hkey;
|
||||
WCHAR sTemp[MAX_PATH];
|
||||
BOOL ret = FALSE;
|
||||
|
@ -371,7 +371,7 @@ BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len)
|
|||
if (HCR_RegOpenClassIDKey(riid, &hkey))
|
||||
#endif
|
||||
{
|
||||
static const WCHAR wszLocalizedString[] =
|
||||
static const WCHAR wszLocalizedString[] =
|
||||
{ 'L','o','c','a','l','i','z','e','d','S','t','r','i','n','g', 0 };
|
||||
if (!RegLoadMUIStringW(hkey, wszLocalizedString, szDest, len, NULL, 0, NULL) ||
|
||||
!RegQueryValueExW(hkey, swEmpty, 0, NULL, (LPBYTE)szDest, &len))
|
||||
|
@ -520,7 +520,7 @@ BOOL HCR_GetFolderAttributes(LPCITEMIDLIST pidlFolder, LPDWORD pdwAttributes)
|
|||
LONG lResult;
|
||||
DWORD dwTemp, dwLen;
|
||||
static const WCHAR wszAttributes[] = { 'A','t','t','r','i','b','u','t','e','s',0 };
|
||||
static const WCHAR wszCallForAttributes[] = {
|
||||
static const WCHAR wszCallForAttributes[] = {
|
||||
'C','a','l','l','F','o','r','A','t','t','r','i','b','u','t','e','s',0 };
|
||||
WCHAR wszShellFolderKey[] = { 'C','L','S','I','D','\\','{','0','0','0','2','1','4','0','0','-',
|
||||
'0','0','0','0','-','0','0','0','0','-','C','0','0','0','-','0','0','0','0','0','0','0',
|
||||
|
|
|
@ -1306,7 +1306,7 @@ BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
|
|||
IShellFolder_Release(psfFolder);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
hr = IShellFolder_GetDisplayNameOf(psfFolder, pidlLast, SHGDN_FORPARSING, &strret);
|
||||
IShellFolder_Release(psfFolder);
|
||||
if (FAILED(hr)) return FALSE;
|
||||
|
|
|
@ -1098,7 +1098,7 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
|||
{
|
||||
BITMAP bmpLogo;
|
||||
|
||||
GetObject( hLogoBmp, sizeof(BITMAP), &bmpLogo );
|
||||
GetObject(hLogoBmp, sizeof(BITMAP), &bmpLogo);
|
||||
|
||||
cxLogoBmp = bmpLogo.bmWidth;
|
||||
cyLogoBmp = bmpLogo.bmHeight;
|
||||
|
@ -1107,28 +1107,28 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
|||
// Set App-specific stuff (icon, app name, szOtherStuff string)
|
||||
SendDlgItemMessageW(hWnd, IDC_ABOUT_ICON, STM_SETICON, (WPARAM)info->hIcon, 0);
|
||||
|
||||
GetWindowTextW( hWnd, szAppTitleTemplate, sizeof(szAppTitleTemplate) / sizeof(WCHAR) );
|
||||
swprintf( szAppTitle, szAppTitleTemplate, info->szApp );
|
||||
SetWindowTextW( hWnd, szAppTitle );
|
||||
GetWindowTextW(hWnd, szAppTitleTemplate, ARRAY_SIZE(szAppTitleTemplate));
|
||||
swprintf(szAppTitle, szAppTitleTemplate, info->szApp);
|
||||
SetWindowTextW(hWnd, szAppTitle);
|
||||
|
||||
SetDlgItemTextW( hWnd, IDC_ABOUT_APPNAME, info->szApp );
|
||||
SetDlgItemTextW(hWnd, IDC_ABOUT_APPNAME, info->szApp);
|
||||
#ifdef __REACTOS__
|
||||
SetDlgItemTextW( hWnd, IDC_ABOUT_VERSION, info->szOSVersion );
|
||||
SetDlgItemTextW(hWnd, IDC_ABOUT_VERSION, info->szOSVersion);
|
||||
#endif
|
||||
SetDlgItemTextW( hWnd, IDC_ABOUT_OTHERSTUFF, info->szOtherStuff );
|
||||
SetDlgItemTextW(hWnd, IDC_ABOUT_OTHERSTUFF, info->szOtherStuff);
|
||||
|
||||
// Set the registered user and organization name
|
||||
if(RegOpenKeyExW( HKEY_LOCAL_MACHINE, szRegKey, 0, KEY_QUERY_VALUE, &hRegKey ) == ERROR_SUCCESS)
|
||||
if(RegOpenKeyExW(HKEY_LOCAL_MACHINE, szRegKey, 0, KEY_QUERY_VALUE, &hRegKey) == ERROR_SUCCESS)
|
||||
{
|
||||
SetRegTextData( hWnd, hRegKey, L"RegisteredOwner", IDC_ABOUT_REG_USERNAME );
|
||||
SetRegTextData( hWnd, hRegKey, L"RegisteredOrganization", IDC_ABOUT_REG_ORGNAME );
|
||||
SetRegTextData(hWnd, hRegKey, L"RegisteredOwner", IDC_ABOUT_REG_USERNAME);
|
||||
SetRegTextData(hWnd, hRegKey, L"RegisteredOrganization", IDC_ABOUT_REG_ORGNAME);
|
||||
|
||||
RegCloseKey( hRegKey );
|
||||
RegCloseKey(hRegKey);
|
||||
}
|
||||
|
||||
// Set the value for the installed physical memory
|
||||
MemStat.dwLength = sizeof(MemStat);
|
||||
if( GlobalMemoryStatusEx(&MemStat) )
|
||||
if(GlobalMemoryStatusEx(&MemStat))
|
||||
{
|
||||
WCHAR szBuf[12];
|
||||
|
||||
|
@ -1152,24 +1152,24 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
|||
MemStat.ullTotalPhys /= 1024;
|
||||
|
||||
dTotalPhys = (double)MemStat.ullTotalPhys / 1024;
|
||||
wcscpy( szUnits, L"PB" );
|
||||
wcscpy(szUnits, L"PB");
|
||||
}
|
||||
else
|
||||
{
|
||||
dTotalPhys = (double)MemStat.ullTotalPhys / 1024;
|
||||
wcscpy( szUnits, L"TB" );
|
||||
wcscpy(szUnits, L"TB");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dTotalPhys = (double)MemStat.ullTotalPhys / 1024;
|
||||
wcscpy( szUnits, L"GB" );
|
||||
wcscpy(szUnits, L"GB");
|
||||
}
|
||||
|
||||
// We need the decimal point of the current locale to display the RAM size correctly
|
||||
if (GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL,
|
||||
szDecimalSeparator,
|
||||
sizeof(szDecimalSeparator) / sizeof(WCHAR)) > 0)
|
||||
ARRAY_SIZE(szDecimalSeparator)) > 0)
|
||||
{
|
||||
UCHAR uDecimals;
|
||||
UINT uIntegral;
|
||||
|
@ -1184,16 +1184,16 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
|||
else
|
||||
{
|
||||
// We're dealing with MBs, don't show any decimals
|
||||
swprintf( szBuf, L"%u MB", (UINT)MemStat.ullTotalPhys / 1024 / 1024 );
|
||||
swprintf(szBuf, L"%u MB", (UINT)MemStat.ullTotalPhys / 1024 / 1024);
|
||||
}
|
||||
|
||||
SetDlgItemTextW( hWnd, IDC_ABOUT_PHYSMEM, szBuf);
|
||||
SetDlgItemTextW(hWnd, IDC_ABOUT_PHYSMEM, szBuf);
|
||||
}
|
||||
|
||||
// Add the Authors dialog
|
||||
hWndAuthors = CreateDialogW( shell32_hInstance, MAKEINTRESOURCEW(IDD_ABOUT_AUTHORS), hWnd, AboutAuthorsDlgProc );
|
||||
LoadStringW( shell32_hInstance, IDS_SHELL_ABOUT_AUTHORS, szAuthorsText, sizeof(szAuthorsText) / sizeof(WCHAR) );
|
||||
SetDlgItemTextW( hWnd, IDC_ABOUT_AUTHORS, szAuthorsText );
|
||||
hWndAuthors = CreateDialogW(shell32_hInstance, MAKEINTRESOURCEW(IDD_ABOUT_AUTHORS), hWnd, AboutAuthorsDlgProc);
|
||||
LoadStringW(shell32_hInstance, IDS_SHELL_ABOUT_AUTHORS, szAuthorsText, ARRAY_SIZE(szAuthorsText));
|
||||
SetDlgItemTextW(hWnd, IDC_ABOUT_AUTHORS, szAuthorsText);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -1238,16 +1238,16 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM
|
|||
|
||||
if(bShowingAuthors)
|
||||
{
|
||||
LoadStringW( shell32_hInstance, IDS_SHELL_ABOUT_AUTHORS, szAuthorsText, sizeof(szAuthorsText) / sizeof(WCHAR) );
|
||||
ShowWindow( hWndAuthors, SW_HIDE );
|
||||
LoadStringW(shell32_hInstance, IDS_SHELL_ABOUT_AUTHORS, szAuthorsText, ARRAY_SIZE(szAuthorsText));
|
||||
ShowWindow(hWndAuthors, SW_HIDE);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadStringW( shell32_hInstance, IDS_SHELL_ABOUT_BACK, szAuthorsText, sizeof(szAuthorsText) / sizeof(WCHAR) );
|
||||
ShowWindow( hWndAuthors, SW_SHOW );
|
||||
LoadStringW(shell32_hInstance, IDS_SHELL_ABOUT_BACK, szAuthorsText, ARRAY_SIZE(szAuthorsText));
|
||||
ShowWindow(hWndAuthors, SW_SHOW);
|
||||
}
|
||||
|
||||
SetDlgItemTextW( hWnd, IDC_ABOUT_AUTHORS, szAuthorsText );
|
||||
SetDlgItemTextW(hWnd, IDC_ABOUT_AUTHORS, szAuthorsText);
|
||||
bShowingAuthors = !bShowingAuthors;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ HRESULT WINAPI SHCoCreateInstance(
|
|||
}
|
||||
|
||||
/* we look up the dll path in the registry */
|
||||
SHStringFromGUIDW(myclsid, sClassID, sizeof(sClassID)/sizeof(WCHAR));
|
||||
SHStringFromGUIDW(myclsid, sClassID, ARRAY_SIZE(sClassID));
|
||||
lstrcpyW(sKeyName, sCLSID);
|
||||
lstrcatW(sKeyName, sClassID);
|
||||
lstrcatW(sKeyName, sInProcServer32);
|
||||
|
|
|
@ -355,12 +355,12 @@ int ShellMessageBoxW(
|
|||
hInstance,hWnd,lpText,lpCaption,uType);
|
||||
|
||||
if (IS_INTRESOURCE(lpCaption))
|
||||
LoadStringW(hInstance, LOWORD(lpCaption), szTitle, sizeof(szTitle)/sizeof(szTitle[0]));
|
||||
LoadStringW(hInstance, LOWORD(lpCaption), szTitle, ARRAY_SIZE(szTitle));
|
||||
else
|
||||
pszTitle = lpCaption;
|
||||
|
||||
if (IS_INTRESOURCE(lpText))
|
||||
LoadStringW(hInstance, LOWORD(lpText), szText, sizeof(szText)/sizeof(szText[0]));
|
||||
LoadStringW(hInstance, LOWORD(lpText), szText, ARRAY_SIZE(szText));
|
||||
else
|
||||
pszText = lpText;
|
||||
|
||||
|
@ -1322,11 +1322,8 @@ BOOL WINAPI IsUserAnAdmin(VOID)
|
|||
DWORD i;
|
||||
BOOL bResult = FALSE;
|
||||
|
||||
TRACE("\n");
|
||||
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!GetTokenInformation(hToken, TokenGroups, NULL, 0, &dwSize))
|
||||
{
|
||||
|
@ -1900,7 +1897,7 @@ HRESULT WINAPI SHCreateStdEnumFmtEtc(
|
|||
*/
|
||||
BOOL WINAPI SHFindFiles( LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlSaveFile )
|
||||
{
|
||||
FIXME("%p %p\n", pidlFolder, pidlSaveFile );
|
||||
FIXME("%p %p\n", pidlFolder, pidlSaveFile);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ HRESULT WINAPI SHRegQueryValueExA(
|
|||
LPDWORD lpcbData)
|
||||
{
|
||||
TRACE("%p %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
|
||||
return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
|
||||
return RegQueryValueExA(hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -107,7 +107,7 @@ HRESULT WINAPI SHRegQueryValueW(
|
|||
* if the datatype REG_EXPAND_SZ then expand the string and change
|
||||
* *pdwType to REG_SZ.
|
||||
*/
|
||||
HRESULT WINAPI SHRegQueryValueExW (
|
||||
HRESULT WINAPI SHRegQueryValueExW(
|
||||
HKEY hkey,
|
||||
LPWSTR pszValue,
|
||||
LPDWORD pdwReserved,
|
||||
|
@ -116,9 +116,9 @@ HRESULT WINAPI SHRegQueryValueExW (
|
|||
LPDWORD pcbData)
|
||||
{
|
||||
DWORD ret;
|
||||
WARN("%p %s %p %p %p %p semi-stub\n",
|
||||
TRACE("%p %s %p %p %p %p\n",
|
||||
hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);
|
||||
ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
|
||||
ret = RegQueryValueExW(hkey, pszValue, pdwReserved, pdwType, pvData, pcbData);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue