26#define SLOT_LOADED 0x1
30#define COMPARE_BY_MEMCMP 0x0
31#define COMPARE_BY_STRCMPIW 0x1
32#define COMPARE_BY_STRCMPW 0x2
33#define COMPARE_BY_IEILISEQUAL 0x3
34#define COMPARE_BY_MASK 0xF
96 return ::InterlockedIncrement(&
m_cRefs);
120 static void*
operator new(
size_t size)
124 static void operator delete(
void *
ptr)
162 *ppvObj =
static_cast<IMruDataList*
>(
this);
347 if (cbData < pItem->cbData)
362 *piGotSlot = iGotSlot;
394 if (pItem->
cbData != cbData)
492 UINT iData, cDataToMove = iSlot;
526 psz[0] = (
WCHAR)(
L'a' + iSlot);
613 UINT cSlotsToMove, uSlotData;
615 cSlotsToMove = iSlot;
633 if (cSlotsToMove > 0)
707 pShortList->Release();
716 TRACE(
"%p %p %p\n", dwUnused1,
ppv, dwUnused3);
722 *
ppv =
static_cast<IMruDataList*
>(pMruList);
803 *ppNewNode = pNewNode;
810 if (!pidl || !pidl->mkid.cb)
840 pNewNode->
GetNode(bAdd, pidl2, ppNewNode);
910 return FindData(pidl,
sizeof(
WORD) + pidl->mkid.cb, piSlot);
969 ,
public IMruPidlList
991 return CMruBase::AddRef();
995 return CMruBase::Release();
1005 UINT *pcNodeSlots)
override;
1026 *ppvObj =
static_cast<IMruPidlList*
>(
this);
1084 *pnNodeSlot = iNodeSlot + 1;
1104 ERR(
"0x%08lX\n",
hr);
1111 ERR(
"0x%08lX\n",
hr);
1119 ERR(
"0x%08lX\n",
hr);
1127 TRACE(
"%p -> %p %p\n",
this, pidl, pnNodeSlot);
1133 ERR(
"0x%08lX\n",
hr);
1143 ERR(
"0x%08lX\n",
hr);
1167 TRACE(
"%p -> %p %u %p %p\n",
this, pidl, cSlots, pnNodeSlots, pcNodeSlots);
1173 ERR(
"0x%08lX\n",
hr);
1183 ERR(
"0x%08lX\n",
hr);
1187 while (pNode && *pcNodeSlots < cSlots)
1192 else if (
hr ==
S_OK && !*pcNodeSlots)
1210 TRACE(
"%p -> %p\n",
this, pidl);
1216 ERR(
"0x%08lX\n",
hr);
1250 TRACE(
"%p %p %p\n", dwUnused1,
ppv, dwUnused3);
1258 if (pMruList ==
NULL)
1261 *
ppv =
static_cast<IMruPidlList*
>(pMruList);
1268 UINT uSlot, nNodeSlot;
1279 pList->EmptyNodeSlot(nNodeSlot);
1309 return ::InterlockedIncrement(&
m_cRefs);
1325 static void*
operator new(
size_t size)
1329 static void operator delete(
void *
ptr)
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
STDMETHODIMP AddData(LPCVOID pvData, DWORD cbData, UINT *piSlot) override
virtual HRESULT _RemoveSlot(UINT iSlot, UINT *puSlot)=0
void _DeleteItem(UINT iSlot)
HRESULT _LoadItem(UINT iSlot)
STDMETHODIMP_(ULONG) Release() override
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj) override
HRESULT _GetItem(UINT iSlot, SLOTITEMDATA **ppItem)
virtual DWORD _DeleteValue(LPCWSTR pszValue)
STDMETHODIMP Delete(UINT iSlot) override
virtual BOOL _IsEqual(const SLOTITEMDATA *pItem, LPCVOID pvData, UINT cbData) const
virtual UINT _UpdateSlots(UINT iSlot)=0
HRESULT _GetSlotItem(UINT iSlot, SLOTITEMDATA **ppItem)
virtual HRESULT _GetSlot(UINT iSlot, UINT *puSlot)=0
STDMETHODIMP_(ULONG) AddRef() override
virtual void _SlotString(UINT iSlot, LPWSTR psz, DWORD cch)=0
HRESULT _UseEmptySlot(UINT *piSlot)
STDMETHODIMP GetData(UINT iSlot, LPVOID pvData, DWORD cbData) override
STDMETHODIMP FindData(LPCVOID pvData, DWORD cbData, UINT *piSlot) override
STDMETHODIMP InitData(UINT cCapacity, UINT flags, HKEY hKey, LPCWSTR pszSubKey OPTIONAL, SLOTCOMPARE fnCompare OPTIONAL) override
virtual HRESULT _InitSlots()=0
STDMETHODIMP QueryInfo(UINT iSlot, UINT *piGotSlot, DWORD *pcbData) override
virtual void _SaveSlots()=0
HRESULT _AddItem(UINT iSlot, LPCVOID pvData, DWORD cbData)
STDMETHODIMP LockServer(BOOL fLock)
STDMETHODIMP_(ULONG) Release()
STDMETHODIMP_(ULONG) AddRef() override
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj) override
STDMETHODIMP CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
virtual ~CMruClassFactory()
UINT _UpdateSlots(UINT iSlot) override
void _SaveSlots() override
HRESULT _InitSlots() override
HRESULT _GetSlot(UINT iSlot, UINT *puSlot) override
HRESULT _RemoveSlot(UINT iSlot, UINT *puSlot) override
void _SlotString(UINT iSlot, LPWSTR psz, DWORD cch) override
HRESULT SetNodeSlot(UINT nNodeSlot)
HRESULT Clear(CMruPidlList *pList)
HRESULT _GetPidlSlot(LPCITEMIDLIST pidl, BOOL bAdd, UINT *piSlot)
HRESULT BindToSlot(UINT iSlot, IShellFolder **ppSF)
HRESULT RemoveLeast(UINT *pnNodeSlot)
HRESULT _CreateNode(UINT iSlot, CMruNode **ppNewNode)
BOOL _IsEqual(SLOTITEMDATA *pItem, LPCVOID pvData, UINT cbData)
IShellFolder * m_pShellFolder
HRESULT _AddPidl(UINT iSlot, LPCITEMIDLIST pidl)
HRESULT GetNode(BOOL bAdd, LPCITEMIDLIST pidl, CMruNode **pNewNode)
HRESULT GetNodeSlot(UINT *pnNodeSlot)
DWORD _DeleteValue(LPCWSTR pszValue) override
HRESULT _FindPidl(LPCITEMIDLIST pidl, UINT *piSlot)
STDMETHODIMP QueryPidl(LPCITEMIDLIST pidl, UINT cSlots, UINT *pnNodeSlots, UINT *pcNodeSlots) override
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj) override
STDMETHODIMP PruneKids(LPCITEMIDLIST pidl) override
STDMETHODIMP_(ULONG) Release() override
void EmptyNodeSlot(UINT nNodeSlot)
STDMETHODIMP UsePidl(LPCITEMIDLIST pidl, UINT *pnNodeSlot) override
HRESULT GetEmptySlot(UINT *pnNodeSlot)
STDMETHODIMP_(ULONG) AddRef() override
STDMETHODIMP InitList(UINT cMRUSize, HKEY hKey, LPCWSTR pszSubKey) override
void _SaveSlots() override
void _SlotString(UINT iSlot, LPWSTR psz, DWORD cch) override
HRESULT _InitSlots() override
HRESULT _GetSlot(UINT iSlot, UINT *puSlot) override
HRESULT _RemoveSlot(UINT iSlot, UINT *puSlot) override
~CMruShortList() override
UINT _UpdateSlots(UINT iSlot) override
HRESULT Enter(HANDLE hMutex)
ULONG __inline AddRef(__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
#define ERROR_INSUFFICIENT_BUFFER
EXTERN_C BOOL WINAPI IEILIsEqual(_In_ LPCITEMIDLIST pidl1, _In_ LPCITEMIDLIST pidl2, _In_ BOOL bUnknown)
DWORD WINAPI SHDeleteValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue)
DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
DWORD WINAPI SHGetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
HKEY WINAPI SHRegDuplicateHKey(HKEY hKey)
DWORD WINAPI SHSetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, DWORD dwType, LPCVOID pvData, DWORD cbData)
int WINAPI StrCmpIW(LPCWSTR lpszStr, LPCWSTR lpszComp)
int WINAPI StrCmpW(LPCWSTR lpszStr, LPCWSTR lpszComp)
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
HRESULT BindToObject([in] PCUIDLIST_RELATIVE pidl, [in] LPBC pbcReserved, [in] REFIID riid, [out, iid_is(riid)] void **ppvOut)
HRESULT CompareIDs([in] LPARAM lParam, [in] PCUIDLIST_RELATIVE pidl1, [in] PCUIDLIST_RELATIVE pidl2)
static DWORD DWORD void LPSTR DWORD cch
static HANDLE ULONG_PTR dwData
static ULONG WINAPI AddRef(IStream *iface)
#define COMPARE_BY_STRCMPIW
#define COMPARE_BY_MEMCMP
EXTERN_C HRESULT CMruPidlList_CreateInstance(DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3)
EXTERN_C HRESULT CMruLongList_CreateInstance(DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3)
#define COMPARE_BY_STRCMPW
EXTERN_C HRESULT CMruClassFactory_CreateInstance(REFIID riid, void **ppv)
#define COMPARE_BY_IEILISEQUAL
#define UNREFERENCED_PARAMETER(P)
void WINAPI ILFree(LPITEMIDLIST pidl)
LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
#define IsEqualGUID(rguid1, rguid2)
static void SHDOCVW_LockModule(void)
static void SHDOCVW_UnlockModule(void)
INT(CALLBACK * SLOTCOMPARE)(LPCVOID pvData1, LPCVOID pvData2, UINT cbData)
LONG WINAPI RegCreateKeyExWrapW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
PULONG MinorVersion OPTIONAL
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseMutex(IN HANDLE hMutex)
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
_In_ DWORD _Out_writes_bytes_to_opt_ pcbData void _Inout_ DWORD * pcbData
_In_ ULONG _In_opt_ PVOID pvData
#define CLASS_E_NOAGGREGATION
#define HRESULT_FROM_WIN32(x)