mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[shell32.dll]
- Initialize uninitialized variables in constructors. [atl] - Initialize uninitialized variables in constructors. All spotted by Amine Khaldi. svn path=/branches/shell32_new-bringup/; revision=53612
This commit is contained in:
parent
6cc65f4e4f
commit
270842aeb0
8 changed files with 47 additions and 31 deletions
|
@ -50,6 +50,7 @@ CAutoComplete::CAutoComplete()
|
|||
hwndListBox = NULL;
|
||||
txtbackup = NULL;
|
||||
quickComplete = NULL;
|
||||
hwndEdit = NULL;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
|
|
@ -67,6 +67,7 @@ void InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName);
|
|||
|
||||
COpenWithMenu::COpenWithMenu()
|
||||
{
|
||||
count = 0;
|
||||
}
|
||||
|
||||
COpenWithMenu::~COpenWithMenu()
|
||||
|
|
|
@ -329,6 +329,7 @@ IDefClFImpl::IDefClFImpl()
|
|||
lpfnCI = NULL;
|
||||
riidInst = NULL;
|
||||
pcRefDll = NULL;
|
||||
rclsid = NULL;
|
||||
}
|
||||
|
||||
HRESULT IDefClFImpl::Initialize(LPFNCREATEINSTANCE lpfnCIx, PLONG pcRefDllx, const IID *riidInstx)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <precomp.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL (shell);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
|
||||
/*
|
||||
CDesktopFolder should create two file system folders internally, one representing the
|
||||
|
@ -140,6 +140,7 @@ HRESULT WINAPI CDesktopFolderEnum::Initialize(CDesktopFolder *desktopFolder, HWN
|
|||
static WCHAR MyDocumentsClassString[] = L"{450D8FBA-AD25-11D0-98A8-0800361B1103}";
|
||||
|
||||
TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags);
|
||||
DbgPrint("[shell32, CDesktopFolderEnum::Initialize] Called with flags = %d\n", dwFlags);
|
||||
|
||||
/* enumerate the root folders */
|
||||
if (dwFlags & SHCONTF_FOLDERS)
|
||||
|
@ -262,6 +263,7 @@ HRESULT WINAPI CDesktopFolderEnum::Initialize(CDesktopFolder *desktopFolder, HWN
|
|||
|
||||
CDesktopFolder::CDesktopFolder()
|
||||
{
|
||||
pidlRoot = NULL;
|
||||
}
|
||||
|
||||
CDesktopFolder::~CDesktopFolder()
|
||||
|
@ -393,20 +395,25 @@ HRESULT WINAPI CDesktopFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUM
|
|||
HRESULT hResult;
|
||||
|
||||
TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList);
|
||||
DbgPrint("[shell32, CDesktopFolder::EnumObjects] Called with flags = %d\n", dwFlags);
|
||||
|
||||
if (ppEnumIDList == NULL)
|
||||
return E_POINTER;
|
||||
*ppEnumIDList = NULL;
|
||||
ATLTRY (theEnumerator = new CComObject<CDesktopFolderEnum>);
|
||||
if (theEnumerator == NULL)
|
||||
|
||||
ATLTRY (theEnumerator = new CComObject<CDesktopFolderEnum>);
|
||||
|
||||
if (theEnumerator == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result);
|
||||
|
||||
hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result);
|
||||
if (FAILED (hResult))
|
||||
{
|
||||
delete theEnumerator;
|
||||
return hResult;
|
||||
}
|
||||
hResult = theEnumerator->Initialize (this, hwndOwner, dwFlags);
|
||||
|
||||
hResult = theEnumerator->Initialize (this, hwndOwner, dwFlags);
|
||||
if (FAILED (hResult))
|
||||
return hResult;
|
||||
*ppEnumIDList = result.Detach ();
|
||||
|
|
|
@ -174,6 +174,7 @@ BOOL CDesktopFolderEnumZ::CreateFontsEnumList(DWORD dwFlags)
|
|||
|
||||
CFontsFolder::CFontsFolder()
|
||||
{
|
||||
pidlRoot = NULL;
|
||||
}
|
||||
|
||||
CFontsFolder::~CFontsFolder()
|
||||
|
|
|
@ -76,6 +76,7 @@ HRESULT WINAPI CFileSysEnumX::Initialize(DWORD dwFlags)
|
|||
|
||||
CMyDocsFolder::CMyDocsFolder()
|
||||
{
|
||||
pidlRoot = NULL;
|
||||
}
|
||||
|
||||
CMyDocsFolder::~CMyDocsFolder()
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <precomp.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL (shell);
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
|
||||
static const WCHAR wszDotShellClassInfo[] = {
|
||||
'.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0};
|
||||
|
@ -177,42 +177,45 @@ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot,
|
|||
hr = SHCoCreateInstance(NULL, &clsid, NULL, IID_IShellFolder, ppvOut);
|
||||
if (SUCCEEDED (hr))
|
||||
{
|
||||
LPITEMIDLIST pidlAbsolute = ILCombine (pidlRoot, pidlChild);
|
||||
IPersistFolder *pPF;
|
||||
IPersistFolder3 *ppf;
|
||||
LPITEMIDLIST pidlAbsolute = ILCombine (pidlRoot, pidlChild);
|
||||
IPersistFolder *pPF;
|
||||
IPersistFolder3 *ppf;
|
||||
|
||||
if (_ILIsFolder(pidlChild) &&
|
||||
SUCCEEDED (((IUnknown *)(*ppvOut))->QueryInterface(IID_IPersistFolder3, (LPVOID *) & ppf)))
|
||||
{
|
||||
PERSIST_FOLDER_TARGET_INFO ppfti;
|
||||
PERSIST_FOLDER_TARGET_INFO ppfti;
|
||||
|
||||
ZeroMemory (&ppfti, sizeof (ppfti));
|
||||
ZeroMemory (&ppfti, sizeof (ppfti));
|
||||
|
||||
/* fill the PERSIST_FOLDER_TARGET_INFO */
|
||||
ppfti.dwAttributes = -1;
|
||||
ppfti.csidl = -1;
|
||||
/* fill the PERSIST_FOLDER_TARGET_INFO */
|
||||
ppfti.dwAttributes = -1;
|
||||
ppfti.csidl = -1;
|
||||
|
||||
/* build path */
|
||||
if (pathRoot) {
|
||||
lstrcpynW (ppfti.szTargetParsingName, pathRoot, MAX_PATH - 1);
|
||||
PathAddBackslashW(ppfti.szTargetParsingName); /* FIXME: why have drives a backslash here ? */
|
||||
}
|
||||
/* build path */
|
||||
if (pathRoot)
|
||||
{
|
||||
lstrcpynW (ppfti.szTargetParsingName, pathRoot, MAX_PATH - 1);
|
||||
PathAddBackslashW(ppfti.szTargetParsingName); /* FIXME: why have drives a backslash here ? */
|
||||
}
|
||||
|
||||
if (pidlChild) {
|
||||
if (pidlChild)
|
||||
{
|
||||
int len = wcslen(ppfti.szTargetParsingName);
|
||||
|
||||
if (!_ILSimpleGetTextW(pidlChild, ppfti.szTargetParsingName + len, MAX_PATH - len))
|
||||
hr = E_INVALIDARG;
|
||||
}
|
||||
if (!_ILSimpleGetTextW(pidlChild, ppfti.szTargetParsingName + len, MAX_PATH - len))
|
||||
hr = E_INVALIDARG;
|
||||
}
|
||||
|
||||
ppf->InitializeEx(NULL, pidlAbsolute, &ppfti);
|
||||
ppf->Release();
|
||||
}
|
||||
else if (SUCCEEDED ((hr = ((IUnknown *)(*ppvOut))->QueryInterface (IID_IPersistFolder, (LPVOID *) & pPF)))) {
|
||||
pPF->Initialize(pidlAbsolute);
|
||||
pPF->Release();
|
||||
}
|
||||
ILFree (pidlAbsolute);
|
||||
ppf->InitializeEx(NULL, pidlAbsolute, &ppfti);
|
||||
ppf->Release();
|
||||
}
|
||||
else if (SUCCEEDED ((hr = ((IUnknown *)(*ppvOut))->QueryInterface (IID_IPersistFolder, (LPVOID *) & pPF))))
|
||||
{
|
||||
pPF->Initialize(pidlAbsolute);
|
||||
pPF->Release();
|
||||
}
|
||||
ILFree (pidlAbsolute);
|
||||
}
|
||||
TRACE ("-- (%p) ret=0x%08x\n", *ppvOut, hr);
|
||||
return hr;
|
||||
|
|
|
@ -538,6 +538,7 @@ public:
|
|||
{
|
||||
ATLASSERT(_pModule == NULL);
|
||||
_pModule = this;
|
||||
_pModule->m_pObjMap = NULL;
|
||||
}
|
||||
|
||||
~CComModule()
|
||||
|
|
Loading…
Reference in a new issue