[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:
Claudiu Mihail 2011-09-06 23:52:38 +00:00
parent 6cc65f4e4f
commit 270842aeb0
8 changed files with 47 additions and 31 deletions

View file

@ -50,6 +50,7 @@ CAutoComplete::CAutoComplete()
hwndListBox = NULL;
txtbackup = NULL;
quickComplete = NULL;
hwndEdit = NULL;
}
/**************************************************************************

View file

@ -67,6 +67,7 @@ void InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName);
COpenWithMenu::COpenWithMenu()
{
count = 0;
}
COpenWithMenu::~COpenWithMenu()

View file

@ -329,6 +329,7 @@ IDefClFImpl::IDefClFImpl()
lpfnCI = NULL;
riidInst = NULL;
pcRefDll = NULL;
rclsid = NULL;
}
HRESULT IDefClFImpl::Initialize(LPFNCREATEINSTANCE lpfnCIx, PLONG pcRefDllx, const IID *riidInstx)

View file

@ -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,19 +395,24 @@ 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)
return E_OUTOFMEMORY;
hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result);
if (FAILED (hResult))
{
delete theEnumerator;
return hResult;
}
hResult = theEnumerator->Initialize (this, hwndOwner, dwFlags);
if (FAILED (hResult))
return hResult;

View file

@ -174,6 +174,7 @@ BOOL CDesktopFolderEnumZ::CreateFontsEnumList(DWORD dwFlags)
CFontsFolder::CFontsFolder()
{
pidlRoot = NULL;
}
CFontsFolder::~CFontsFolder()

View file

@ -76,6 +76,7 @@ HRESULT WINAPI CFileSysEnumX::Initialize(DWORD dwFlags)
CMyDocsFolder::CMyDocsFolder()
{
pidlRoot = NULL;
}
CMyDocsFolder::~CMyDocsFolder()

View file

@ -193,12 +193,14 @@ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot,
ppfti.csidl = -1;
/* build path */
if (pathRoot) {
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))
@ -208,7 +210,8 @@ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot,
ppf->InitializeEx(NULL, pidlAbsolute, &ppfti);
ppf->Release();
}
else if (SUCCEEDED ((hr = ((IUnknown *)(*ppvOut))->QueryInterface (IID_IPersistFolder, (LPVOID *) & pPF)))) {
else if (SUCCEEDED ((hr = ((IUnknown *)(*ppvOut))->QueryInterface (IID_IPersistFolder, (LPVOID *) & pPF))))
{
pPF->Initialize(pidlAbsolute);
pPF->Release();
}

View file

@ -538,6 +538,7 @@ public:
{
ATLASSERT(_pModule == NULL);
_pModule = this;
_pModule->m_pObjMap = NULL;
}
~CComModule()