- adjusted printing of refcounts to be equal
- cleaning up icon cache on PROCESS_DETACH - fixed ascii/unicode use in SH/ILCreateFromPath - fixed small memory leak in shellview
This commit is contained in:
parent
d208d8264a
commit
0ae30d3027
|
@ -182,7 +182,7 @@ static ULONG WINAPI IContextMenu_fnAddRef(IContextMenu *iface)
|
|||
{
|
||||
ICOM_THIS(IContextMenuImpl, iface);
|
||||
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This,(This->ref)+1);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This, This->ref);
|
||||
|
||||
shell32_ObjCount++;
|
||||
return ++(This->ref);
|
||||
|
|
|
@ -99,7 +99,7 @@ static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPENUMFORMATETC iface, REF
|
|||
static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPENUMFORMATETC iface)
|
||||
{
|
||||
ICOM_THIS(IEnumFORMATETCImpl,iface);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This,(This->ref)+1);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This, This->ref);
|
||||
shell32_ObjCount++;
|
||||
return ++(This->ref);
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ static ULONG WINAPI IDataObject_fnAddRef(LPDATAOBJECT iface)
|
|||
{
|
||||
ICOM_THIS(IDataObjectImpl,iface);
|
||||
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This,(This->ref)+1);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This, This->ref);
|
||||
|
||||
shell32_ObjCount++;
|
||||
return ++(This->ref);
|
||||
|
|
|
@ -84,7 +84,7 @@ static ULONG WINAPI IExtractIconA_fnAddRef(IExtractIconA * iface)
|
|||
{
|
||||
ICOM_THIS(IExtractIconAImpl,iface);
|
||||
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This,(This->ref)+1);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This, This->ref );
|
||||
|
||||
shell32_ObjCount++;
|
||||
|
||||
|
|
|
@ -610,7 +610,24 @@ BOOL SIC_Initialize(void)
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
/*************************************************************************
|
||||
* SIC_Destroy
|
||||
*
|
||||
* frees the cache
|
||||
*/
|
||||
void SIC_Destroy(void)
|
||||
{
|
||||
LPSIC_ENTRY lpsice;
|
||||
int i;
|
||||
|
||||
if (hdpa && NULL != pDPA_GetPtr (hdpa, 0))
|
||||
{ for (i=0; i < DPA_GetPtrCount(hdpa); ++i)
|
||||
{ lpsice = DPA_GetPtr(hdpa, i);
|
||||
SHFree(lpsice);
|
||||
}
|
||||
pDPA_Destroy(hdpa);
|
||||
}
|
||||
}
|
||||
/*************************************************************************
|
||||
* Shell_GetImageList [SHELL32.71]
|
||||
*
|
||||
|
@ -637,7 +654,8 @@ DWORD WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList
|
|||
* x pointer to an instance of IShellFolder
|
||||
*
|
||||
* NOTES
|
||||
* first hack
|
||||
* calls Release on the ShellFolder
|
||||
* FIXME: should get the icon by calling GetUIObjectOf(sh)
|
||||
*
|
||||
*/
|
||||
DWORD WINAPI SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh,LPITEMIDLIST pidl,DWORD z)
|
||||
|
@ -648,6 +666,9 @@ DWORD WINAPI SHMapPIDLToSystemImageListIndex(LPSHELLFOLDER sh,LPITEMIDLIST pidl,
|
|||
WARN(shell,"(SF=%p,pidl=%p,0x%08lx)\n",sh,pidl,z);
|
||||
pdump(pidl);
|
||||
|
||||
/* if (sh)
|
||||
IShellFolder_Release(sh);
|
||||
*/
|
||||
if (_ILIsDesktop(pidltemp))
|
||||
{ return 34;
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ HRESULT WINAPI SHILCreateFromPathW (LPWSTR path, LPITEMIDLIST * ppidl, DWORD att
|
|||
}
|
||||
HRESULT WINAPI SHILCreateFromPathAW (LPVOID path, LPITEMIDLIST * ppidl, DWORD attributes)
|
||||
{
|
||||
if ( !VERSION_OsIsUnicode())
|
||||
if ( VERSION_OsIsUnicode())
|
||||
return SHILCreateFromPathW (path, ppidl, attributes);
|
||||
return SHILCreateFromPathA (path, ppidl, attributes);
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ LPITEMIDLIST WINAPI ILCreateFromPathW (LPWSTR path)
|
|||
}
|
||||
LPITEMIDLIST WINAPI ILCreateFromPathAW (LPVOID path)
|
||||
{
|
||||
if ( !VERSION_OsIsUnicode())
|
||||
if ( VERSION_OsIsUnicode())
|
||||
return ILCreateFromPathW (path);
|
||||
return ILCreateFromPathA (path);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,17 @@
|
|||
#ifndef __WINE_SHELL_MAIN_H
|
||||
#define __WINE_SHELL_MAIN_H
|
||||
|
||||
#include "imagelist.h"
|
||||
#include "commctrl.h"
|
||||
#include "shell.h"
|
||||
|
||||
#include "wine/obj_shellfolder.h"
|
||||
#include "wine/obj_dataobject.h"
|
||||
#include "wine/obj_contextmenu.h"
|
||||
#include "wine/obj_shellview.h"
|
||||
#include "wine/obj_shelllink.h"
|
||||
#include "wine/obj_extracticon.h"
|
||||
|
||||
/*******************************************
|
||||
* global SHELL32.DLL variables
|
||||
*/
|
||||
|
@ -57,6 +68,7 @@ HRESULT WINAPI StrRetToStrN (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST
|
|||
/* Iconcache */
|
||||
#define INVALID_INDEX -1
|
||||
BOOL SIC_Initialize(void);
|
||||
void SIC_Destroy(void);
|
||||
/*INT32 SIC_GetIconIndex (LPCSTR sSourceFile, INT32 dwSourceIndex );*/
|
||||
|
||||
/* Classes Root */
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
typedef struct
|
||||
{ ICOM_VTABLE(IShellView)* lpvtbl;
|
||||
DWORD ref;
|
||||
LPITEMIDLIST mpidl;
|
||||
IShellFolder* pSFParent;
|
||||
IShellBrowser* pShellBrowser;
|
||||
ICommDlgBrowser* pCommDlgBrowser;
|
||||
|
@ -127,7 +126,6 @@ IShellView * IShellView_Constructor( IShellFolder * pFolder, LPCITEMIDLIST pidl)
|
|||
sv->ref=1;
|
||||
sv->lpvtbl=&svvt;
|
||||
|
||||
sv->mpidl = ILClone(pidl);
|
||||
sv->hMenu = 0;
|
||||
sv->pSFParent = pFolder;
|
||||
sv->uSelected = 0;
|
||||
|
@ -1237,7 +1235,7 @@ static ULONG WINAPI IShellView_fnAddRef(IShellView * iface)
|
|||
{
|
||||
ICOM_THIS(IShellViewImpl, iface);
|
||||
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This,(This->ref)+1);
|
||||
TRACE(shell,"(%p)->(count=%lu)\n",This,This->ref);
|
||||
|
||||
shell32_ObjCount++;
|
||||
return ++(This->ref);
|
||||
|
|
Loading…
Reference in New Issue