Author: dquintana
Date: Mon Apr 28 21:59:02 2014
New Revision: 63040
URL:
http://svn.reactos.org/svn/reactos?rev=63040&view=rev
Log:
[BROWSEUI]
[SHELL32]
* Make use of IID_PPV_ARG (part 2).
Modified:
branches/shell-experiments/dll/win32/browseui/bandproxy.cpp
branches/shell-experiments/dll/win32/browseui/bandsite.cpp
branches/shell-experiments/dll/win32/browseui/basebar.cpp
branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp
branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp
branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp
branches/shell-experiments/dll/win32/shell32/folders.cpp
branches/shell-experiments/dll/win32/shell32/folders/admintools.cpp
branches/shell-experiments/dll/win32/shell32/folders/desktop.cpp
branches/shell-experiments/dll/win32/shell32/folders/fonts.cpp
branches/shell-experiments/dll/win32/shell32/folders/fs.cpp
branches/shell-experiments/dll/win32/shell32/folders/mycomp.cpp
branches/shell-experiments/dll/win32/shell32/folders/mydocuments.cpp
branches/shell-experiments/dll/win32/shell32/folders/netplaces.cpp
branches/shell-experiments/dll/win32/shell32/folders/recyclebin.cpp
branches/shell-experiments/dll/win32/shell32/shellole.cpp
branches/shell-experiments/dll/win32/shell32/shlexec.cpp
branches/shell-experiments/dll/win32/shell32/startmenu.cpp
Modified: branches/shell-experiments/dll/win32/browseui/bandproxy.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/bandproxy.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/browseui/bandproxy.cpp [iso-8859-1] Mon Apr 28
21:59:02 2014
@@ -47,7 +47,7 @@
if (FAILED(hResult))
return hResult;
hResult = serviceProvider->QueryService(
- SID_IWebBrowserApp, IID_IWebBrowser2, reinterpret_cast<void
**>(&webBrowser));
+ SID_IWebBrowserApp, IID_PPV_ARG(IWebBrowser2, &webBrowser));
if (FAILED(hResult))
return hResult;
*browser = webBrowser.Detach();
Modified: branches/shell-experiments/dll/win32/browseui/bandsite.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/bandsite.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/browseui/bandsite.cpp [iso-8859-1] Mon Apr 28
21:59:02 2014
@@ -283,16 +283,16 @@
if (punk == NULL || fRebarWindow == NULL)
return E_FAIL;
- hRet = punk->QueryInterface(IID_IDeskBand, reinterpret_cast<PVOID
*>(&DeskBand));
+ hRet = punk->QueryInterface(IID_PPV_ARG(IDeskBand, &DeskBand));
if (!SUCCEEDED(hRet) || DeskBand == NULL)
goto Cleanup;
- hRet = punk->QueryInterface(IID_IObjectWithSite, reinterpret_cast<PVOID
*>(&ObjWithSite));
+ hRet = punk->QueryInterface(IID_PPV_ARG(IObjectWithSite, &ObjWithSite));
if (!SUCCEEDED(hRet) || ObjWithSite == NULL)
goto Cleanup;
- hRet = punk->QueryInterface(IID_IOleWindow, reinterpret_cast<PVOID
*>(&OleWindow));
+ hRet = punk->QueryInterface(IID_PPV_ARG(IOleWindow, &OleWindow));
if (!SUCCEEDED(hRet) || OleWindow == NULL)
goto Cleanup;
- hRet = punk->QueryInterface(IID_IWinEventHandler, reinterpret_cast<PVOID
*>(&WndEvtHandler));
+ hRet = punk->QueryInterface(IID_PPV_ARG(IWinEventHandler, &WndEvtHandler));
if (!SUCCEEDED(hRet) || WndEvtHandler == NULL)
goto Cleanup;
@@ -627,7 +627,7 @@
fOleWindow.Release();
- hRet = pUnk->QueryInterface(IID_IOleWindow, (PVOID *)&fOleWindow);
+ hRet = pUnk->QueryInterface(IID_PPV_ARG(IOleWindow, &fOleWindow));
if (FAILED(hRet))
return E_FAIL;
Modified: branches/shell-experiments/dll/win32/browseui/basebar.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/basebar.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/browseui/basebar.cpp [iso-8859-1] Mon Apr 28
21:59:02 2014
@@ -430,21 +430,6 @@
LRESULT CBaseBar::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
{
-/* CComPtr<IOleWindow> oleWindow;
- RECT clientRect;
- HRESULT hResult;
-
- if (fClientWindow == NULL && fClient.p != NULL)
- {
- hResult = fClient->QueryInterface(IID_IOleWindow, (void **)&oleWindow);
- hResult = oleWindow->GetWindow(&fClientWindow);
- }
- if (fClientWindow != NULL)
- {
- GetClientRect(&clientRect);
- ::SetWindowPos(fClientWindow, NULL, clientRect.left, clientRect.top,
clientRect.right - clientRect.left - GetSystemMetrics(SM_CXFRAME),
- clientRect.bottom - clientRect.top, SWP_NOOWNERZORDER |
SWP_NOZORDER);
- }*/
return 0;
}
Modified: branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp [iso-8859-1] Mon Apr
28 21:59:02 2014
@@ -621,8 +621,7 @@
#if 1
hResult = ::CreateBrandBand(IID_PPV_ARG(IUnknown, logoBar));
#else
- hResult = CoCreateInstance(CLSID_BrandBand, NULL, CLSCTX_INPROC_SERVER,
IID_IUnknown,
- reinterpret_cast<void **>(logoBar));
+ hResult = CoCreateInstance(CLSID_BrandBand, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(IUnknown, logoBar));
#endif
if (FAILED(hResult))
return hResult;
@@ -647,8 +646,7 @@
#if 1
hResult = ::CreateAddressBand(IID_PPV_ARG(IUnknown, toolsBar));
#else
- hResult = CoCreateInstance(CLSID_SH_AddressBand, NULL, CLSCTX_INPROC_SERVER,
IID_IUnknown,
- reinterpret_cast<void **>(toolsBar));
+ hResult = CoCreateInstance(CLSID_SH_AddressBand, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(IUnknown, toolsBar));
#endif
if (FAILED(hResult))
return hResult;
@@ -1403,8 +1401,7 @@
case gForwardCommandID:
newMenu = CreatePopupMenu();
hResult = fSite->QueryInterface(IID_PPV_ARG(IServiceProvider,
&serviceProvider));
- hResult = serviceProvider->QueryService(SID_SShellBrowser,
IID_IBrowserService,
- reinterpret_cast<void **>(&browserService));
+ hResult = serviceProvider->QueryService(SID_SShellBrowser,
IID_PPV_ARG(IBrowserService, &browserService));
hResult = browserService->GetTravelLog(&travelLog);
hResult = travelLog->InsertMenuEntries(browserService, newMenu, 0, 1, 9,
TLMENUF_FORE);
hResult = browserService->QueryInterface(IID_PPV_ARG(IOleCommandTarget,
&commandTarget));
Modified: branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] Mon Apr 28
21:59:02 2014
@@ -743,11 +743,11 @@
return E_FAIL;
#if 0
- hResult = CoCreateInstance(CLSID_InternetToolbar, NULL, CLSCTX_INPROC_SERVER,
IID_IUnknown, (void **)&fClientBars[BIInternetToolbar].clientBar);
+ hResult = CoCreateInstance(CLSID_InternetToolbar, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(IUnknown, &fClientBars[BIInternetToolbar].clientBar));
if (FAILED(hResult))
return hResult;
#else
- hResult = CreateInternetToolbar(IID_IUnknown, (void
**)&fClientBars[BIInternetToolbar].clientBar);
+ hResult = CreateInternetToolbar(IID_PPV_ARG(IUnknown,
&fClientBars[BIInternetToolbar].clientBar));
if (FAILED(hResult))
return hResult;
#endif
@@ -903,8 +903,7 @@
STRRET L108;
HRESULT hResult;
- hResult = SHBindToFolderIDListParent(NULL, pidl, &IID_IShellFolder,
- reinterpret_cast<void **>(&parentFolder), &childPIDL);
+ hResult = SHBindToFolderIDListParent(NULL, pidl, &IID_PPV_ARG(IShellFolder,
&parentFolder), &childPIDL);
hResult = parentFolder->GetDisplayNameOf(childPIDL, uFlags, &L108);
StrRetToBufW(&L108, childPIDL, pszBuf, cchBuf);
if (rgfInOut)
@@ -1137,8 +1136,7 @@
hResult = GetBaseBar(vertical, (IUnknown **)&theBaseBar);
if (FAILED(hResult))
return hResult;
- hResult = CoCreateInstance(classID, NULL, CLSCTX_INPROC_SERVER, IID_IUnknown,
- reinterpret_cast<void **>(&newBand));
+ hResult = CoCreateInstance(classID, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IUnknown,
&newBand));
if (FAILED(hResult))
return hResult;
hResult = theBaseBar->QueryInterface(IID_PPV_ARG(IDeskBar, &deskBar));
@@ -1218,7 +1216,7 @@
m_PropSheet.phpage = m_psp;
#if 0
- hResult = CoCreateInstance(CLSID_GlobalFolderSettings, NULL, CLSCTX_INPROC_SERVER,
IID_IGlobalFolderSettings, (void **)&globalSettings);
+ hResult = CoCreateInstance(CLSID_GlobalFolderSettings, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(IGlobalFolderSettings, &globalSettings));
if (FAILED(hResult))
return E_FAIL;
hResult = globalSettings->Get(&shellState, sizeof(shellState));
@@ -1601,8 +1599,7 @@
{
if (fCurrentShellView.p != NULL)
{
- hResult = fCurrentShellView->QueryInterface(IID_IOleCommandTarget,
- reinterpret_cast<void **>(&commandTarget));
+ hResult = fCurrentShellView->QueryInterface(IID_PPV_ARG(IOleCommandTarget,
&commandTarget));
if (SUCCEEDED(hResult) && commandTarget.p != NULL)
return commandTarget->QueryStatus(NULL, 1, prgCmds, pCmdText);
}
Modified: branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp [iso-8859-1] Mon Apr
28 21:59:02 2014
@@ -1185,7 +1185,7 @@
return hr;
}
- hr = lpSV->GetItemObject(SVGIO_SELECTION, IID_IDataObject,
(LPVOID*)&pDataObj);
+ hr = lpSV->GetItemObject(SVGIO_SELECTION, IID_PPV_ARG(IDataObject,
&pDataObj));
if (SUCCEEDED(hr))
{
hr = OleSetClipboard(pDataObj);
Modified: branches/shell-experiments/dll/win32/shell32/folders.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/folders.cpp [iso-8859-1] Mon Apr 28
21:59:02 2014
@@ -119,7 +119,7 @@
{
CLSIDFromString(szValue, &clsid);
- dwResult = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER,
IID_IUnknown, (LPVOID*)&Overlay);
+ dwResult = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER,
IID_PPV_ARG(IShellIconOverlayIdentifier, &Overlay));
if (dwResult == S_OK)
{
Handlers[NumIconOverlayHandlers] = Overlay;
Modified: branches/shell-experiments/dll/win32/shell32/folders/admintools.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders/admintools.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/folders/admintools.cpp [iso-8859-1] Mon
Apr 28 21:59:02 2014
@@ -303,11 +303,15 @@
if (IsEqualIID (riid, IID_IContextMenu))
{
- hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, (IShellFolder
*)this, NULL, 0, NULL, (IContextMenu **)&pObj);
+ IContextMenu * pCm = NULL;
+ hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl,
static_cast<IShellFolder*>(this), NULL, 0, NULL, &pCm);
+ pObj = pCm;
}
else if (IsEqualIID (riid, IID_IDataObject) && (cidl >= 1))
{
- hr = IDataObject_Constructor(hwndOwner, pidlRoot, apidl, cidl, (IDataObject
**)&pObj);
+ IDataObject * pDo = NULL;
+ hr = IDataObject_Constructor(hwndOwner, pidlRoot, apidl, cidl, &pDo);
+ pObj = pDo;
}
else if (IsEqualIID (riid, IID_IExtractIconA) && (cidl == 1))
{
@@ -325,13 +329,15 @@
}
else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1))
{
- hr = this->QueryInterface(IID_IDropTarget, (LPVOID *)&pObj);
+ IDropTarget * pDt = NULL;
+ hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt));
+ pObj = pDt;
}
else if ((IsEqualIID(riid, IID_IShellLinkW) ||
IsEqualIID(riid, IID_IShellLinkA)) && (cidl == 1))
{
pidl = ILCombine (pidlRoot, apidl[0]);
- hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj);
+ hr = IShellLink_ConstructFromFile(NULL, riid, pidl,
reinterpret_cast<LPVOID*>(&pObj));
SHFree (pidl);
}
else
Modified: branches/shell-experiments/dll/win32/shell32/folders/desktop.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders/desktop.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/folders/desktop.cpp [iso-8859-1] Mon Apr
28 21:59:02 2014
@@ -651,9 +651,12 @@
else if (IsEqualIID (riid, IID_IDropTarget))
{
/* only interested in attempting to bind to shell folders, not files, semicolon
intentionate */
- if (cidl == 1 && SUCCEEDED(hr = this->_GetDropTarget(apidl[0],
(LPVOID*)&pObj)));
- else
- hr = this->QueryInterface(IID_IDropTarget, (LPVOID*)&pObj);
+ if (cidl != 1 || FAILED(hr = this->_GetDropTarget(apidl[0], (LPVOID*)
&pObj)))
+ {
+ IDropTarget * pDt = NULL;
+ hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt));
+ pObj = pDt;
+ }
}
else if ((IsEqualIID(riid, IID_IShellLinkW) ||
IsEqualIID(riid, IID_IShellLinkA)) && (cidl == 1))
@@ -1474,7 +1477,7 @@
if (SUCCEEDED(hr))
{
IDropTarget *pDT;
- hr = this->BindToObject(pidl, NULL, IID_IDropTarget, (LPVOID*)&pDT);
+ hr = this->BindToObject(pidl, NULL, IID_PPV_ARG(IDropTarget, &pDT));
CoTaskMemFree(pidl);
if (SUCCEEDED(hr))
SHSimulateDrop(pDT, pDataObject, dwKeyState, NULL, pdwEffect);
@@ -1515,7 +1518,7 @@
if (SUCCEEDED(hr))
{
IShellFolder *psf;
- hr = this->BindToObject(pidlNext, NULL, IID_IShellFolder,
(LPVOID*)&psf);
+ hr = this->BindToObject(pidlNext, NULL, IID_PPV_ARG(IShellFolder,
&psf));
CoTaskMemFree(pidlNext);
if (SUCCEEDED(hr))
{
Modified: branches/shell-experiments/dll/win32/shell32/folders/fonts.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders/fonts.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/folders/fonts.cpp [iso-8859-1] Mon Apr 28
21:59:02 2014
@@ -422,7 +422,9 @@
}
else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1))
{
- hr = this->QueryInterface(IID_IDropTarget, (LPVOID *) & pObj);
+ IDropTarget * pDt = NULL;
+ hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt));
+ pObj = pDt;
}
else
hr = E_NOINTERFACE;
Modified: branches/shell-experiments/dll/win32/shell32/folders/fs.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders/fs.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/folders/fs.cpp [iso-8859-1] Mon Apr 28
21:59:02 2014
@@ -474,11 +474,16 @@
{
*ppvOut = NULL;
- if (IsEqualIID (riid, IID_IContextMenu) && (cidl >= 1))
- hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl,
(IShellFolder*)this, NULL, 0, NULL, (IContextMenu**)&pObj);
+ if (IsEqualIID(riid, IID_IContextMenu) && (cidl >= 1))
+ {
+ IContextMenu * pCm = NULL;
+ hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl,
static_cast<IShellFolder*>(this), NULL, 0, NULL, &pCm);
+ pObj = pCm;
+ }
else if (IsEqualIID (riid, IID_IDataObject))
{
- if (cidl >= 1) {
+ if (cidl >= 1)
+ {
hr = IDataObject_Constructor (hwndOwner, pidlRoot, apidl, cidl,
(IDataObject **)&pObj);
}
else
@@ -503,9 +508,12 @@
else if (IsEqualIID (riid, IID_IDropTarget))
{
/* only interested in attempting to bind to shell folders, not files (except
exe), so if we fail, rebind to root */
- if (cidl == 1 && SUCCEEDED(hr = this->_GetDropTarget(apidl[0],
(LPVOID*)&pObj)));
- else
- hr = this->QueryInterface(IID_IDropTarget, (LPVOID*)&pObj);
+ if (cidl != 1 || FAILED(hr = this->_GetDropTarget(apidl[0], (LPVOID*)
&pObj)))
+ {
+ IDropTarget * pDt = NULL;
+ hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt));
+ pObj = pDt;
+ }
}
else if ((IsEqualIID(riid, IID_IShellLinkW) ||
IsEqualIID(riid, IID_IShellLinkA)) && (cidl == 1))
@@ -1529,7 +1537,7 @@
}
else
{
- hr = psfDesktop->BindToObject(pidl, NULL, IID_IShellFolder,
(LPVOID*)&psfFrom);
+ hr = psfDesktop->BindToObject(pidl, NULL, IID_PPV_ARG(IShellFolder,
&psfFrom));
if (FAILED(hr))
{
ERR("no IShellFolder\n");
@@ -1549,7 +1557,7 @@
WCHAR wszPath[MAX_PATH];
WCHAR wszTarget[MAX_PATH];
- hr = this->QueryInterface(IID_IPersistFolder2, (LPVOID *) &ppf2);
+ hr = this->QueryInterface(IID_PPV_ARG(IPersistFolder2, &ppf2));
if (SUCCEEDED(hr))
{
hr = ppf2->GetCurFolder(&targetpidl);
@@ -1691,7 +1699,7 @@
return E_FAIL;
}
- hr = this->QueryInterface(IID_IPersistFolder2, (LPVOID *) &ppf2);
+ hr = this->QueryInterface(IID_PPV_ARG(IPersistFolder2, &ppf2));
if (SUCCEEDED(hr))
{
hr = ppf2->GetCurFolder(&targetpidl);
Modified: branches/shell-experiments/dll/win32/shell32/folders/mycomp.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders/mycomp.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/folders/mycomp.cpp [iso-8859-1] Mon Apr
28 21:59:02 2014
@@ -462,8 +462,9 @@
}
else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1))
{
- hr = this->QueryInterface(IID_IDropTarget,
- (LPVOID *) &pObj);
+ IDropTarget * pDt = NULL;
+ hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt));
+ pObj = pDt;
}
else if ((IsEqualIID(riid, IID_IShellLinkW) ||
IsEqualIID(riid, IID_IShellLinkA)) && (cidl == 1))
Modified: branches/shell-experiments/dll/win32/shell32/folders/mydocuments.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders/mydocuments.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/folders/mydocuments.cpp [iso-8859-1] Mon
Apr 28 21:59:02 2014
@@ -115,7 +115,7 @@
if (SUCCEEDED(hr))
{
- hr = psfDesktop->BindToObject(pidl, NULL, IID_IDropTarget, (LPVOID*)
&mFSDropTarget);
+ hr = psfDesktop->BindToObject(pidl, NULL, IID_PPV_ARG(IDropTarget,
&mFSDropTarget));
CoTaskMemFree(pidl);
if (FAILED(hr))
ERR("Error Binding");
@@ -388,12 +388,15 @@
if (IsEqualIID (riid, IID_IContextMenu))
{
- hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, (IShellFolder
*)this, NULL, 0, NULL, (IContextMenu**)&pObj);
+ IContextMenu * pCm = NULL;
+ hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl,
static_cast<IShellFolder*>(this), NULL, 0, NULL, &pCm);
+ pObj = pCm;
}
else if (IsEqualIID (riid, IID_IDataObject) && (cidl >= 1))
{
- hr = IDataObject_Constructor( hwndOwner,
- pidlRoot, apidl, cidl, (IDataObject **)&pObj);
+ IDataObject * pDo = NULL;
+ hr = IDataObject_Constructor(hwndOwner, pidlRoot, apidl, cidl, &pDo);
+ pObj = pDo;
}
else if (IsEqualIID (riid, IID_IExtractIconA) && (cidl == 1))
{
@@ -411,7 +414,9 @@
}
else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1))
{
- hr = this->QueryInterface (IID_IDropTarget, (LPVOID *)&pObj);
+ IDropTarget * pDt = NULL;
+ hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt));
+ pObj = pDt;
}
else if ((IsEqualIID(riid, IID_IShellLinkW) ||
IsEqualIID(riid, IID_IShellLinkA)) && (cidl == 1))
Modified: branches/shell-experiments/dll/win32/shell32/folders/netplaces.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders/netplaces.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/folders/netplaces.cpp [iso-8859-1] Mon
Apr 28 21:59:02 2014
@@ -244,11 +244,15 @@
if (IsEqualIID(riid, IID_IContextMenu) && (cidl >= 1))
{
- hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl,
(IShellFolder*)this, NULL, 0, NULL, (IContextMenu**)&pObj);
+ IContextMenu * pCm = NULL;
+ hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl,
static_cast<IShellFolder*>(this), NULL, 0, NULL, &pCm);
+ pObj = pCm;
}
else if (IsEqualIID(riid, IID_IDataObject) && (cidl >= 1))
{
- hr = IDataObject_Constructor (hwndOwner, pidlRoot, apidl, cidl, (IDataObject
**)&pObj);
+ IDataObject * pDo = NULL;
+ hr = IDataObject_Constructor (hwndOwner, pidlRoot, apidl, cidl, &pDo);
+ pObj = pDo;
}
else if (IsEqualIID(riid, IID_IExtractIconA) && (cidl == 1))
{
@@ -266,7 +270,9 @@
}
else if (IsEqualIID(riid, IID_IDropTarget) && (cidl >= 1))
{
- hr = this->QueryInterface(IID_IDropTarget, (LPVOID *) & pObj);
+ IDropTarget * pDt = NULL;
+ hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt));
+ pObj = pDt;
}
else
hr = E_NOINTERFACE;
Modified: branches/shell-experiments/dll/win32/shell32/folders/recyclebin.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders/recyclebin.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/shell32/folders/recyclebin.cpp [iso-8859-1] Mon
Apr 28 21:59:02 2014
@@ -622,7 +622,9 @@
}
else if (IsEqualIID (riid, IID_IDropTarget) && (cidl == 1))
{
- hr = this->QueryInterface(IID_IDropTarget, (LPVOID *) & pObj);
+ IDropTarget * pDt = NULL;
+ hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt));
+ pObj = pDt;
}
else
hr = E_NOINTERFACE;
@@ -1531,7 +1533,7 @@
}
else
{
- hr = psfDesktop->BindToObject(pidl, NULL, IID_IShellFolder,
(LPVOID*)&psfFrom);
+ hr = psfDesktop->BindToObject(pidl, NULL, IID_PPV_ARG(IShellFolder,
&psfFrom));
if (FAILED(hr))
{
ERR("no IShellFolder\n");
Modified: branches/shell-experiments/dll/win32/shell32/shellole.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shellole.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shellole.cpp [iso-8859-1] Mon Apr 28
21:59:02 2014
@@ -146,7 +146,7 @@
FreeLibrary( hLibrary );
hres = E_ACCESSDENIED;
goto end;
- } else if (! SUCCEEDED(hres = DllGetClassObject(*myclsid, IID_IClassFactory,
(LPVOID*)&pcf))) {
+ } else if (! SUCCEEDED(hres = DllGetClassObject(*myclsid,
IID_PPV_ARG(IClassFactory, &pcf)))) {
TRACE("GetClassObject failed 0x%08x\n", hres);
goto end;
}
Modified: branches/shell-experiments/dll/win32/shell32/shlexec.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shlexec.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shlexec.cpp [iso-8859-1] Mon Apr 28
21:59:02 2014
@@ -1252,7 +1252,7 @@
TRACE("%p %p\n", obj, sei);
- r = obj->QueryInterface(IID_IContextMenu, (LPVOID*) &cm);
+ r = obj->QueryInterface(IID_PPV_ARG(IContextMenu, &cm));
if (FAILED(r))
return r;
@@ -1342,7 +1342,7 @@
if (FAILED(r))
goto end;
- r = obj->QueryInterface(IID_IObjectWithSite, (LPVOID*) &ows);
+ r = obj->QueryInterface(IID_PPV_ARG(IObjectWithSite, &ows));
if (FAILED(r))
goto end;
Modified: branches/shell-experiments/dll/win32/shell32/startmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/startmenu.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/startmenu.cpp [iso-8859-1] Mon Apr 28
21:59:02 2014
@@ -117,7 +117,7 @@
if (pBandSiteObj == NULL)
return E_OUTOFMEMORY;
- hr = pBandSiteObj->QueryInterface(IID_IBandSite, (VOID**)&m_pBandSite);
+ hr = pBandSiteObj->QueryInterface(IID_PPV_ARG(IBandSite, &m_pBandSite));
if (FAILED(hr))
return NULL;