mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 20:56:04 +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;
|
hwndListBox = NULL;
|
||||||
txtbackup = NULL;
|
txtbackup = NULL;
|
||||||
quickComplete = NULL;
|
quickComplete = NULL;
|
||||||
|
hwndEdit = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
|
|
@ -67,6 +67,7 @@ void InsertOpenWithItem(POPEN_WITH_CONTEXT pContext, WCHAR * szAppName);
|
||||||
|
|
||||||
COpenWithMenu::COpenWithMenu()
|
COpenWithMenu::COpenWithMenu()
|
||||||
{
|
{
|
||||||
|
count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
COpenWithMenu::~COpenWithMenu()
|
COpenWithMenu::~COpenWithMenu()
|
||||||
|
|
|
@ -329,6 +329,7 @@ IDefClFImpl::IDefClFImpl()
|
||||||
lpfnCI = NULL;
|
lpfnCI = NULL;
|
||||||
riidInst = NULL;
|
riidInst = NULL;
|
||||||
pcRefDll = NULL;
|
pcRefDll = NULL;
|
||||||
|
rclsid = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT IDefClFImpl::Initialize(LPFNCREATEINSTANCE lpfnCIx, PLONG pcRefDllx, const IID *riidInstx)
|
HRESULT IDefClFImpl::Initialize(LPFNCREATEINSTANCE lpfnCIx, PLONG pcRefDllx, const IID *riidInstx)
|
||||||
|
|
|
@ -140,6 +140,7 @@ HRESULT WINAPI CDesktopFolderEnum::Initialize(CDesktopFolder *desktopFolder, HWN
|
||||||
static WCHAR MyDocumentsClassString[] = L"{450D8FBA-AD25-11D0-98A8-0800361B1103}";
|
static WCHAR MyDocumentsClassString[] = L"{450D8FBA-AD25-11D0-98A8-0800361B1103}";
|
||||||
|
|
||||||
TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags);
|
TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags);
|
||||||
|
DbgPrint("[shell32, CDesktopFolderEnum::Initialize] Called with flags = %d\n", dwFlags);
|
||||||
|
|
||||||
/* enumerate the root folders */
|
/* enumerate the root folders */
|
||||||
if (dwFlags & SHCONTF_FOLDERS)
|
if (dwFlags & SHCONTF_FOLDERS)
|
||||||
|
@ -262,6 +263,7 @@ HRESULT WINAPI CDesktopFolderEnum::Initialize(CDesktopFolder *desktopFolder, HWN
|
||||||
|
|
||||||
CDesktopFolder::CDesktopFolder()
|
CDesktopFolder::CDesktopFolder()
|
||||||
{
|
{
|
||||||
|
pidlRoot = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CDesktopFolder::~CDesktopFolder()
|
CDesktopFolder::~CDesktopFolder()
|
||||||
|
@ -393,19 +395,24 @@ HRESULT WINAPI CDesktopFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUM
|
||||||
HRESULT hResult;
|
HRESULT hResult;
|
||||||
|
|
||||||
TRACE ("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", this, hwndOwner, dwFlags, ppEnumIDList);
|
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)
|
if (ppEnumIDList == NULL)
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
*ppEnumIDList = NULL;
|
*ppEnumIDList = NULL;
|
||||||
|
|
||||||
ATLTRY (theEnumerator = new CComObject<CDesktopFolderEnum>);
|
ATLTRY (theEnumerator = new CComObject<CDesktopFolderEnum>);
|
||||||
|
|
||||||
if (theEnumerator == NULL)
|
if (theEnumerator == NULL)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result);
|
hResult = theEnumerator->QueryInterface (IID_IEnumIDList, (void **)&result);
|
||||||
if (FAILED (hResult))
|
if (FAILED (hResult))
|
||||||
{
|
{
|
||||||
delete theEnumerator;
|
delete theEnumerator;
|
||||||
return hResult;
|
return hResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
hResult = theEnumerator->Initialize (this, hwndOwner, dwFlags);
|
hResult = theEnumerator->Initialize (this, hwndOwner, dwFlags);
|
||||||
if (FAILED (hResult))
|
if (FAILED (hResult))
|
||||||
return hResult;
|
return hResult;
|
||||||
|
|
|
@ -174,6 +174,7 @@ BOOL CDesktopFolderEnumZ::CreateFontsEnumList(DWORD dwFlags)
|
||||||
|
|
||||||
CFontsFolder::CFontsFolder()
|
CFontsFolder::CFontsFolder()
|
||||||
{
|
{
|
||||||
|
pidlRoot = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CFontsFolder::~CFontsFolder()
|
CFontsFolder::~CFontsFolder()
|
||||||
|
|
|
@ -76,6 +76,7 @@ HRESULT WINAPI CFileSysEnumX::Initialize(DWORD dwFlags)
|
||||||
|
|
||||||
CMyDocsFolder::CMyDocsFolder()
|
CMyDocsFolder::CMyDocsFolder()
|
||||||
{
|
{
|
||||||
|
pidlRoot = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CMyDocsFolder::~CMyDocsFolder()
|
CMyDocsFolder::~CMyDocsFolder()
|
||||||
|
|
|
@ -193,12 +193,14 @@ static HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCWSTR pathRoot,
|
||||||
ppfti.csidl = -1;
|
ppfti.csidl = -1;
|
||||||
|
|
||||||
/* build path */
|
/* build path */
|
||||||
if (pathRoot) {
|
if (pathRoot)
|
||||||
|
{
|
||||||
lstrcpynW (ppfti.szTargetParsingName, pathRoot, MAX_PATH - 1);
|
lstrcpynW (ppfti.szTargetParsingName, pathRoot, MAX_PATH - 1);
|
||||||
PathAddBackslashW(ppfti.szTargetParsingName); /* FIXME: why have drives a backslash here ? */
|
PathAddBackslashW(ppfti.szTargetParsingName); /* FIXME: why have drives a backslash here ? */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pidlChild) {
|
if (pidlChild)
|
||||||
|
{
|
||||||
int len = wcslen(ppfti.szTargetParsingName);
|
int len = wcslen(ppfti.szTargetParsingName);
|
||||||
|
|
||||||
if (!_ILSimpleGetTextW(pidlChild, ppfti.szTargetParsingName + len, MAX_PATH - len))
|
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->InitializeEx(NULL, pidlAbsolute, &ppfti);
|
||||||
ppf->Release();
|
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->Initialize(pidlAbsolute);
|
||||||
pPF->Release();
|
pPF->Release();
|
||||||
}
|
}
|
||||||
|
|
|
@ -538,6 +538,7 @@ public:
|
||||||
{
|
{
|
||||||
ATLASSERT(_pModule == NULL);
|
ATLASSERT(_pModule == NULL);
|
||||||
_pModule = this;
|
_pModule = this;
|
||||||
|
_pModule->m_pObjMap = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
~CComModule()
|
~CComModule()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue