mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 04:13:33 +00:00
[EXPLORER-NEW]
* Initialize struct contents to zero. CID 1102492 [BROWSEUI] * Fix build. svn path=/branches/shell-experiments/; revision=64857
This commit is contained in:
@@ -117,7 +117,7 @@ static VOID
|
||||
SysPagerWnd_UpdateButton(IN OUT PSYS_PAGER_WND_DATA This,
|
||||
IN CONST NOTIFYICONDATA *iconData)
|
||||
{
|
||||
TBBUTTONINFO tbbi;
|
||||
TBBUTTONINFO tbbi = {0};
|
||||
PNOTIFY_ITEM notifyItem;
|
||||
PPNOTIFY_ITEM NotifyPointer;
|
||||
|
||||
|
||||
@@ -735,6 +735,32 @@ HRESULT inline ShellObjectCreatorInit(REFIID riid, R ** ppv)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
HRESULT inline ShellObjectCreatorInit(REFIID riid, void ** ppv)
|
||||
{
|
||||
CComPtr<T> obj;
|
||||
CComPtr<IUnknown> result;
|
||||
HRESULT hResult;
|
||||
|
||||
if (ppv == NULL)
|
||||
return E_POINTER;
|
||||
*ppv = NULL;
|
||||
ATLTRY(obj = new CComObject<T>);
|
||||
if (obj.p == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
hResult = obj->QueryInterface(riid, reinterpret_cast<void **>(&result));
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
|
||||
hResult = obj->Initialize();
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
|
||||
*ppv = result.Detach();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
template<class T, class T1, class R>
|
||||
HRESULT inline ShellObjectCreatorInit(T1 initArg1, REFIID riid, R ** ppv)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user