Author: dquintana
Date: Wed Aug 20 12:25:09 2014
New Revision: 63909
URL:
http://svn.reactos.org/svn/reactos?rev=63909&view=rev
Log:
[SHELL32]
* Another batch of interface pointers converted to CComPtr.
Modified:
branches/shell-experiments/dll/win32/shell32/brsfolder.cpp
branches/shell-experiments/dll/win32/shell32/defcontextmenu.cpp
branches/shell-experiments/dll/win32/shell32/folders.cpp
branches/shell-experiments/dll/win32/shell32/newmenu.cpp
branches/shell-experiments/dll/win32/shell32/newmenu.h
branches/shell-experiments/dll/win32/shell32/pidl.cpp
branches/shell-experiments/dll/win32/shell32/shelllink.h
branches/shell-experiments/dll/win32/shell32/shellord.cpp
branches/shell-experiments/dll/win32/shell32/shlexec.cpp
branches/shell-experiments/dll/win32/shell32/shlfolder.cpp
branches/shell-experiments/dll/win32/shell32/shlmenu.cpp
branches/shell-experiments/dll/win32/shell32/shlview.cpp
Modified: branches/shell-experiments/dll/win32/shell32/brsfolder.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/brsfolder.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/brsfolder.cpp [iso-8859-1] Wed Aug 20
12:25:09 2014
@@ -177,8 +177,9 @@
LPITEMIDLIST pidlParent, pidlChild;
HIMAGELIST hImageList;
HRESULT hr;
- IShellFolder *lpsfParent, *lpsfRoot;
- IEnumIDList * pEnumChildren = NULL;
+ CComPtr<IShellFolder> lpsfParent;
+ CComPtr<IShellFolder> lpsfRoot;
+ CComPtr<IEnumIDList> pEnumChildren;
HTREEITEM item;
DWORD flags;
LPCITEMIDLIST root = info->lpBrowseInfo->pidlRoot;
@@ -232,12 +233,10 @@
hr = lpsfParent->BindToObject(pidlChild, 0, IID_PPV_ARG(IShellFolder,
&lpsfRoot));
} else {
lpsfRoot = lpsfParent;
- hr = lpsfParent->AddRef();
}
if (FAILED(hr)) {
WARN("Could not bind to root shell folder! hr = %08x\n", hr);
- lpsfParent->Release();
ILFree(pidlChild);
ILFree(pidlParent);
return;
@@ -247,8 +246,6 @@
hr = lpsfRoot->EnumObjects(info->hWnd, flags, &pEnumChildren );
if (FAILED(hr)) {
WARN("Could not get child iterator! hr = %08x\n", hr);
- lpsfParent->Release();
- lpsfRoot->Release();
ILFree(pidlChild);
ILFree(pidlParent);
return;
@@ -261,8 +258,6 @@
ILFree(pidlChild);
ILFree(pidlParent);
- lpsfRoot->Release();
- lpsfParent->Release();
}
static int GetIcon(LPCITEMIDLIST lpi, UINT uFlags)
@@ -366,6 +361,7 @@
tvi.lParam = (LPARAM)lptvid;
lpsf->AddRef();
+ pEnumIL->AddRef();
lptvid->lpsfParent = lpsf;
lptvid->lpi = ILClone(pidl);
lptvid->lpifq = pidlParent ? ILCombine(pidlParent, pidl) : ILClone(pidl);
@@ -411,8 +407,8 @@
while (S_OK == lpe->Next(1,&pidlTemp,&ulFetched))
{
ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER;
- IEnumIDList* pEnumIL = NULL;
- IShellFolder* pSFChild = NULL;
+ CComPtr<IEnumIDList> pEnumIL;
+ CComPtr<IShellFolder> pSFChild;
lpsf->GetAttributesOf(1, (LPCITEMIDLIST*)&pidlTemp, &ulAttrs);
if (ulAttrs & SFGAO_FOLDER)
{
@@ -426,11 +422,9 @@
if ((pEnumIL->Skip(1) != S_OK) ||
FAILED(pEnumIL->Reset()))
{
- pEnumIL->Release();
pEnumIL = NULL;
}
}
- pSFChild->Release();
}
}
@@ -508,7 +502,7 @@
static LRESULT BrsFolder_Treeview_Expand( browse_info *info, NMTREEVIEWW *pnmtv )
{
- IShellFolder *lpsf2 = NULL;
+ CComPtr<IShellFolder> lpsf2;
LPTV_ITEMDATA lptvid = (LPTV_ITEMDATA) pnmtv->itemNew.lParam;
HRESULT r;
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] Wed Aug
20 12:25:09 2014
@@ -308,7 +308,7 @@
STGMEDIUM medium;
FORMATETC formatetc;
- TRACE("pDataObj=%p\n", pDataObj);
+ TRACE("pDataObj=%p\n", pDataObj.p);
/* Set the FORMATETC structure*/
InitFormatEtc(formatetc, RegisterClipboardFormatW(CFSTR_SHELLIDLIST),
TYMED_HGLOBAL);
@@ -933,15 +933,13 @@
if (!lpSB)
return E_FAIL;
- IShellView * lpSV = NULL;
+ CComPtr<IShellView> lpSV;
if (FAILED(lpSB->QueryActiveShellView(&lpSV)))
return E_FAIL;
HWND hwndSV = NULL;
if (SUCCEEDED(lpSV->GetWindow(&hwndSV)))
SendMessageW(hwndSV, WM_COMMAND, MAKEWPARAM(LOWORD(lpcmi->lpVerb), 0), 0);
-
- lpSV->Release();
return S_OK;
}
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] Wed Aug 20
12:25:09 2014
@@ -241,11 +241,11 @@
{
static const WCHAR szFull[] =
{'F','u','l','l',0};
static const WCHAR szEmpty[] =
{'E','m','p','t','y',0};
- IEnumIDList *EnumIDList = NULL;
+ CComPtr<IEnumIDList> EnumIDList;
CoInitialize(NULL);
- IShellFolder2 *psfRecycleBin = NULL;
- IShellFolder *psfDesktop = NULL;
+ CComPtr<IShellFolder2> psfRecycleBin;
+ CComPtr<IShellFolder> psfDesktop;
hr = SHGetDesktopFolder(&psfDesktop);
if (SUCCEEDED(hr))
@@ -262,13 +262,6 @@
} else {
iconname = szEmpty;
}
-
- if (psfDesktop)
- psfDesktop->Release();
- if (psfRecycleBin)
- psfRecycleBin->Release();
- if (EnumIDList)
- EnumIDList->Release();
}
if (HCR_GetIconW(xriid, wTemp, iconname, MAX_PATH, &icon_idx))
Modified: branches/shell-experiments/dll/win32/shell32/newmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/newmenu.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/newmenu.cpp [iso-8859-1] Wed Aug 20
12:25:09 2014
@@ -544,12 +544,7 @@
HRESULT STDMETHODCALLTYPE CNewMenu::GetSite(REFIID riid, void **ppvSite)
{
- if (ppvSite == NULL)
- return E_POINTER;
- *ppvSite = m_pSite;
- if (m_pSite != NULL)
- m_pSite->AddRef();
- return S_OK;
+ return m_pSite->QueryInterface(riid, ppvSite);
}
HRESULT
@@ -596,8 +591,8 @@
WINAPI
CNewMenu::InvokeCommand(LPCMINVOKECOMMANDINFO lpici)
{
- IShellBrowser *lpSB = NULL;
- CComPtr<IShellView> lpSV = NULL;
+ CComPtr<IShellBrowser> lpSB;
+ CComPtr<IShellView> lpSV;
HRESULT hr = E_FAIL;
/* Note: CWM_GETISHELLBROWSER returns shell browser without adding reference */
Modified: branches/shell-experiments/dll/win32/shell32/newmenu.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/newmenu.h [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/newmenu.h [iso-8859-1] Wed Aug 20
12:25:09 2014
@@ -54,7 +54,7 @@
LPWSTR m_wszPath;
SHELLNEW_ITEM *m_pItems;
SHELLNEW_ITEM *m_pLinkItem;
- IUnknown *m_pSite;
+ CComPtr<IUnknown> m_pSite;
HMENU m_hSubMenu;
HBITMAP m_hbmFolder, m_hbmLink;
Modified: branches/shell-experiments/dll/win32/shell32/pidl.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/pidl.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/pidl.cpp [iso-8859-1] Wed Aug 20 12:25:09
2014
@@ -71,7 +71,7 @@
BOOL WINAPI ILGetDisplayNameExW(IShellFolder * psf, LPCITEMIDLIST pidl, LPWSTR path,
DWORD type)
{
CComPtr<IShellFolder> psfParent;
- IShellFolder * lsf = psf;
+ CComPtr<IShellFolder> lsf = psf;
HRESULT ret = NO_ERROR;
LPCITEMIDLIST pidllast;
STRRET strret;
@@ -133,8 +133,6 @@
TRACE("%p %p %s\n", psf, pidl, debugstr_w(path));
- if (!psf)
- lsf->Release();
return SUCCEEDED(ret);
}
Modified: branches/shell-experiments/dll/win32/shell32/shelllink.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shelllink.h [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shelllink.h [iso-8859-1] Wed Aug 20
12:25:09 2014
@@ -76,7 +76,7 @@
BOOL bDirty;
INT iIdOpen; /* id of the "Open" entry in the context menu */
CComPtr<IUnknown> site;
- IDropTarget *mDropTarget;
+ CComPtr<IDropTarget> mDropTarget;
public:
CShellLink();
~CShellLink();
Modified: branches/shell-experiments/dll/win32/shell32/shellord.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shellord.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shellord.cpp [iso-8859-1] Wed Aug 20
12:25:09 2014
@@ -2275,10 +2275,11 @@
/* Get the interface for the new image list */
if (hNew)
{
- IImageList *imageList = (IImageList*) hNew;
+ IImageList *imageList = reinterpret_cast<IImageList*>(hNew);
ret = imageList->QueryInterface(riid, ppv);
- ImageList_Destroy(hNew);
+ // Since we are not duplicating, destroying makes no sense.
+ /* ImageList_Destroy(hNew); */
}
return ret;
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] Wed Aug 20
12:25:09 2014
@@ -1274,8 +1274,8 @@
static IDataObject *shellex_get_dataobj( LPSHELLEXECUTEINFOW sei )
{
LPCITEMIDLIST pidllast = NULL;
- IDataObject *dataobj = NULL;
- IShellFolder *shf = NULL;
+ CComPtr<IDataObject> dataobj;
+ CComPtr<IShellFolder> shf;
LPITEMIDLIST pidl = NULL;
HRESULT r;
@@ -1303,15 +1303,13 @@
end:
if (pidl != sei->lpIDList)
ILFree(pidl);
- if (shf)
- shf->Release();
- return dataobj;
+ return dataobj.Detach();
}
static HRESULT shellex_run_context_menu_default(IShellExtInit *obj,
LPSHELLEXECUTEINFOW sei)
{
- IContextMenu *cm = NULL;
+ CComPtr<IContextMenu> cm = NULL;
CMINVOKECOMMANDINFOEX ici;
MENUITEMINFOW info;
WCHAR string[0x80];
@@ -1374,13 +1372,12 @@
end:
if (hmenu)
DestroyMenu( hmenu );
- if (cm)
- cm->Release();
return r;
}
static HRESULT shellex_load_object_and_run(HKEY hkey, LPCGUID guid, LPSHELLEXECUTEINFOW
sei)
{
+ // Can not use CComPtr here because of CoUninitialize at the end, before the
destructors would run.
IDataObject *dataobj = NULL;
IObjectWithSite *ows = NULL;
IShellExtInit *obj = NULL;
Modified: branches/shell-experiments/dll/win32/shell32/shlfolder.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shlfolder.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shlfolder.cpp [iso-8859-1] Wed Aug 20
12:25:09 2014
@@ -204,7 +204,7 @@
LPCITEMIDLIST pidlChild, REFCLSID clsid, LPVOID * ppvOut)
{
HRESULT hr;
- IShellFolder* pShellFolder = NULL;
+ CComPtr<IShellFolder> pShellFolder;
TRACE ("%p %s %p\n", pidlRoot, debugstr_w(pathRoot), pidlChild);
@@ -250,7 +250,7 @@
ILFree (pidlAbsolute);
}
- *ppvOut = pShellFolder;
+ *ppvOut = pShellFolder.Detach();
TRACE ("-- (%p) ret=0x%08x\n", *ppvOut, hr);
@@ -490,12 +490,11 @@
CComPtr<IShellFolder> psf2;
if (SUCCEEDED(psf->BindToObject(pidl, 0, IID_PPV_ARG(IShellFolder,
&psf2))))
{
- IEnumIDList *pEnumIL = NULL;
+ CComPtr<IEnumIDList> pEnumIL;
if (SUCCEEDED(psf2->EnumObjects(0, SHCONTF_FOLDERS, &pEnumIL)))
{
if (pEnumIL->Skip(1) != S_OK)
*pdwAttributes &= ~SFGAO_HASSUBFOLDER;
- pEnumIL->Release();
}
}
}
Modified: branches/shell-experiments/dll/win32/shell32/shlmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shlmenu.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shlmenu.cpp [iso-8859-1] Wed Aug 20
12:25:09 2014
@@ -114,7 +114,9 @@
*
*/
static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl)
-{ IShellFolder *lpsf, *lpsf2;
+{
+ CComPtr<IShellFolder> lpsf;
+ CComPtr<IShellFolder> lpsf2;
ULONG ulItemAttr = SFGAO_FOLDER;
UINT uID, uEnumFlags;
LPFNFMCALLBACK lpfnCallback;
@@ -129,23 +131,23 @@
MenuInfo.cbSize = sizeof(MENUINFO);
MenuInfo.fMask = MIM_MENUDATA;
- if (! GetMenuInfo(hmenu, &MenuInfo))
- return FALSE;
-
- menudata = (LPFMINFO)MenuInfo.dwMenuData;
+ if (!GetMenuInfo(hmenu, &MenuInfo))
+ return FALSE;
+
+ menudata = (LPFMINFO) MenuInfo.dwMenuData;
if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO)))
{
- ERR("menudata corrupt: %p %u\n", menudata, MenuInfo.cbSize);
- return 0;
+ ERR("menudata corrupt: %p %u\n", menudata, MenuInfo.cbSize);
+ return 0;
}
if (menudata->bInitialized)
- return 0;
-
- pidl = (pAlternatePidl? pAlternatePidl: menudata->pidl);
+ return 0;
+
+ pidl = (pAlternatePidl ? pAlternatePidl : menudata->pidl);
if (!pidl)
- return 0;
+ return 0;
uID = menudata->uID;
uEnumFlags = menudata->uEnumFlags;
@@ -154,73 +156,70 @@
SetMenuInfo(hmenu, &MenuInfo);
- if (SUCCEEDED (SHGetDesktopFolder(&lpsf)))
- {
- if (SUCCEEDED(lpsf->BindToObject(pidl, 0, IID_PPV_ARG(IShellFolder,
&lpsf2))))
- {
- IEnumIDList *lpe = NULL;
-
- if (SUCCEEDED (lpsf2->EnumObjects(0, uEnumFlags, &lpe )))
+ if (SUCCEEDED(SHGetDesktopFolder(&lpsf)))
+ {
+ if (SUCCEEDED(lpsf->BindToObject(pidl, 0, IID_PPV_ARG(IShellFolder,
&lpsf2))))
{
-
- LPITEMIDLIST pidlTemp = NULL;
- ULONG ulFetched;
-
- while ((!bAbortInit) && (S_OK ==
lpe->Next(1,&pidlTemp,&ulFetched)))
- {
- if (SUCCEEDED (lpsf->GetAttributesOf(1, (LPCITEMIDLIST*)&pidlTemp,
&ulItemAttr)))
- {
- ILGetDisplayNameExW(NULL, pidlTemp, sTemp, ILGDN_FORPARSING);
- if (! (PidlToSicIndex(lpsf, pidlTemp, FALSE, 0, &iIcon)))
- iIcon = FM_BLANK_ICON;
- if ( SFGAO_FOLDER & ulItemAttr)
- {
- LPFMINFO lpFmMi;
- MENUINFO MenuInfo;
- HMENU hMenuPopup = CreatePopupMenu();
-
- lpFmMi = (LPFMINFO)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(FMINFO));
-
- lpFmMi->pidl = ILCombine(pidl, pidlTemp);
- lpFmMi->uEnumFlags = SHCONTF_FOLDERS | SHCONTF_NONFOLDERS;
-
- MenuInfo.cbSize = sizeof(MENUINFO);
- MenuInfo.fMask = MIM_MENUDATA;
- MenuInfo.dwMenuData = (ULONG_PTR) lpFmMi;
- SetMenuInfo (hMenuPopup, &MenuInfo);
-
- FileMenu_AppendItemW (hmenu, sTemp, uID, iIcon, hMenuPopup,
FM_DEFAULT_HEIGHT);
- }
- else
- {
- LPWSTR pExt = PathFindExtensionW(sTemp);
- if (pExt)
- *pExt = 0;
- FileMenu_AppendItemW (hmenu, sTemp, uID, iIcon, 0, FM_DEFAULT_HEIGHT);
- }
+ CComPtr<IEnumIDList> lpe;
+
+ if (SUCCEEDED(lpsf2->EnumObjects(0, uEnumFlags, &lpe)))
+ {
+
+ LPITEMIDLIST pidlTemp = NULL;
+ ULONG ulFetched;
+
+ while ((!bAbortInit) && (S_OK == lpe->Next(1, &pidlTemp,
&ulFetched)))
+ {
+ if (SUCCEEDED(lpsf->GetAttributesOf(1, (LPCITEMIDLIST*)
&pidlTemp, &ulItemAttr)))
+ {
+ ILGetDisplayNameExW(NULL, pidlTemp, sTemp, ILGDN_FORPARSING);
+ if (!(PidlToSicIndex(lpsf, pidlTemp, FALSE, 0, &iIcon)))
+ iIcon = FM_BLANK_ICON;
+ if (SFGAO_FOLDER & ulItemAttr)
+ {
+ LPFMINFO lpFmMi;
+ MENUINFO MenuInfo;
+ HMENU hMenuPopup = CreatePopupMenu();
+
+ lpFmMi = (LPFMINFO) HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY, sizeof(FMINFO));
+
+ lpFmMi->pidl = ILCombine(pidl, pidlTemp);
+ lpFmMi->uEnumFlags = SHCONTF_FOLDERS |
SHCONTF_NONFOLDERS;
+
+ MenuInfo.cbSize = sizeof(MENUINFO);
+ MenuInfo.fMask = MIM_MENUDATA;
+ MenuInfo.dwMenuData = (ULONG_PTR) lpFmMi;
+ SetMenuInfo(hMenuPopup, &MenuInfo);
+
+ FileMenu_AppendItemW(hmenu, sTemp, uID, iIcon, hMenuPopup,
FM_DEFAULT_HEIGHT);
+ }
+ else
+ {
+ LPWSTR pExt = PathFindExtensionW(sTemp);
+ if (pExt)
+ *pExt = 0;
+ FileMenu_AppendItemW(hmenu, sTemp, uID, iIcon, 0,
FM_DEFAULT_HEIGHT);
+ }
+ }
+
+ if (lpfnCallback)
+ {
+ TRACE("enter callback\n");
+ lpfnCallback(pidl, pidlTemp);
+ TRACE("leave callback\n");
+ }
+
+ NumberOfItems++;
+ }
+ }
}
-
- if (lpfnCallback)
- {
- TRACE("enter callback\n");
- lpfnCallback ( pidl, pidlTemp);
- TRACE("leave callback\n");
- }
-
+ }
+
+ if (GetMenuItemCount(hmenu) == 0)
+ {
+ static const WCHAR szEmpty [] = { '(', 'e', 'm',
'p', 't', 'y', ')', 0 };
+ FileMenu_AppendItemW(hmenu, szEmpty, uID, FM_BLANK_ICON, 0, FM_DEFAULT_HEIGHT);
NumberOfItems++;
- }
- lpe->Release();
- }
- lpsf2->Release();
- }
- lpsf->Release();
- }
-
- if ( GetMenuItemCount (hmenu) == 0 )
- {
- static const WCHAR szEmpty[] = {
'(','e','m','p','t','y',')',0 };
- FileMenu_AppendItemW (hmenu, szEmpty, uID, FM_BLANK_ICON, 0, FM_DEFAULT_HEIGHT);
- NumberOfItems++;
}
menudata->bInitialized = TRUE;
@@ -228,6 +227,7 @@
return NumberOfItems;
}
+
/*************************************************************************
* FileMenu_Create [SHELL32.114]
*
Modified: branches/shell-experiments/dll/win32/shell32/shlview.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/shlview.cpp [iso-8859-1] Wed Aug 20
12:25:09 2014
@@ -1761,7 +1761,7 @@
if (SUCCEEDED(m_pSFParent->GetUIObjectOf(m_hWnd, m_cidl,
(LPCITEMIDLIST*)m_apidl, IID_NULL_PPV_ARG(IDataObject, &pda))))
{
- IDropSource * pds = (IDropSource *)this; /* own DropSource
interface */
+ CComPtr<IDropSource> pds = static_cast<IDropSource
*>(this); /* own DropSource interface */
if (SUCCEEDED(m_pSFParent->GetAttributesOf(m_cidl,
(LPCITEMIDLIST*)m_apidl, &dwAttributes)))
{