146 TRACE(
"CTravelEntry::Invoke for IUnknown punk=%p\n", punk);
154 hResult = persistHistory->LoadHistory(globalStream,
NULL);
168 TRACE(
"CTravelEntry::Update for IUnknown punk=%p, fIsLocalAnchor=%s\n", punk, fIsLocalAnchor ?
"TRUE" :
"FALSE");
174 TRACE(
"Updating entry with display name: %S\n", wch);
191 hResult = persistHistory->SaveHistory(globalStream);
194 hResult = travelLogClient->GetWindowData(globalStream, &windowData);
207 TRACE(
"Updated entry display name is now: %S\n", wch);
221 TRACE(
"CTravelEntry::GetPidl returning ppidl=%p\n", *ppidl);
234 TRACE(
"CTravelLog created\n");
243 while (anEntry !=
NULL)
249 TRACE(
"CTravelLog destroyed\n");
265 if (foundEntry ==
NULL)
286 if (curEntry ==
NULL)
289 *foundEntry = curEntry;
291 TRACE(
"CTravelLog::FindRelativeEntry for offset %d, returning %p\n",
offset, *foundEntry);
301 TRACE(
"CTravelLog::DeleteChain deleting chain starting at %p\n", startHere);
315 while (startHere !=
NULL)
318 itemSize = startHere->
GetSize();
321 startHere = saveNext;
325 TRACE(
"CTravelLog::DeleteChain chain of %d items deleted\n", startEntryCount -
fEntryCount);
330 if (afterEntry ==
NULL)
332 TRACE(
"CTravelLog::AppendEntry appending %p after NULL. Resetting head and tail\n", newEntry);
338 TRACE(
"CTravelLog::AppendEntry appending %p after %p\n", newEntry, afterEntry);
355 TRACE(
"CTravelLog::AddEntry for IUnknown punk=%p, fIsLocalAnchor=%s\n", punk, fIsLocalAnchor ?
"TRUE" :
"FALSE");
360 if (newEntry ==
NULL)
366 itemSize = newEntry->GetSize();
391 TRACE(
"CTravelLog::Travel for IUnknown punk=%p at offset=%d\n", punk, iOffset);
397 hResult = destinationEntry->
Invoke(punk);
415 TRACE(
"CTravelLog::GetTravelEntry for IUnknown punk=%p at offset=%d returning %p\n", punk, iOffset, *ppte);
436 wchar_t templateString[200];
451 if(
LoadStringW(_AtlBaseModule.GetResourceInstance(),
452 IDS_BACK, templateString,
sizeof(templateString) /
sizeof(
wchar_t)) == 0)
457 if(
LoadStringW(_AtlBaseModule.GetResourceInstance(),
458 IDS_FORWARD, templateString,
sizeof(templateString) /
sizeof(
wchar_t)) == 0)
463 TRACE(
"CTravelLog::GetToolTipText for IUnknown punk=%p at offset=%d returning L\"%S\"\n", punk, iOffset, pwzText);
493 wchar_t itemTextBuffer[
MAX_PATH * 2];
496 TRACE(
"CTravelLog::InsertMenuEntries for IUnknown punk=%p, nPos=%d, idFirst=%d, idLast=%d\n", punk);
508 if (idLast <= idFirst)
510 menuItemInfo.
cbSize =
sizeof(menuItemInfo);
513 menuItemInfo.
wID = idFirst;
521 if (currentItem !=
NULL)
532 TRACE(
"CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.
dwTypeData, menuItemInfo.
wID);
545 if (currentItem !=
NULL)
547 while (currentItem !=
NULL)
553 TRACE(
"CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.
dwTypeData, menuItemInfo.
wID);
574 TRACE(
"CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.
dwTypeData, menuItemInfo.
wID);
580 menuItemInfo.
fState &= ~MFS_CHECKED;
587 if (currentItem !=
NULL)
589 while (currentItem !=
NULL)
595 TRACE(
"CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.
dwTypeData, menuItemInfo.
wID);
634 return ShellObjectCreatorInit<CTravelLog>(
riid,
ppv);
#define STDMETHODCALLTYPE
STDMETHOD() Update(IUnknown *punk, BOOL fIsLocalAnchor) override
HRESULT GetToolTipText(IUnknown *punk, LPWSTR pwzText) const
CTravelEntry * fNextEntry
STDMETHOD() GetPidl(LPITEMIDLIST *ppidl) override
STDMETHOD() Invoke(IUnknown *punk) override
CTravelEntry * fPreviousEntry
STDMETHOD() Revert() override
STDMETHOD_(DWORD, CountEntries)(IUnknown *punk) override
STDMETHOD() FindTravelEntry(IUnknown *punk, LPCITEMIDLIST pidl, ITravelEntry **ppte) override
STDMETHOD() UpdateEntry(IUnknown *punk, BOOL fIsLocalAnchor) override
STDMETHOD() GetTravelEntry(IUnknown *punk, int iOffset, ITravelEntry **ppte) override
STDMETHOD() Clone(ITravelLog **pptl) override
STDMETHOD() UpdateExternal(IUnknown *punk, IUnknown *punkHLBrowseContext) override
void AppendEntry(CTravelEntry *afterEntry, CTravelEntry *newEntry)
STDMETHOD() InsertMenuEntries(IUnknown *punk, HMENU hmenu, int nPos, int idFirst, int idLast, DWORD dwFlags) override
CTravelEntry * fCurrentEntry
STDMETHOD() AddEntry(IUnknown *punk, BOOL fIsLocalAnchor) override
void DeleteChain(CTravelEntry *startHere)
STDMETHOD() Travel(IUnknown *punk, int iOffset) override
unsigned long fEntryCount
STDMETHOD() GetToolTipText(IUnknown *punk, int iOffset, int idsTemplate, LPWSTR pwzText, DWORD cchText) override
HRESULT FindRelativeEntry(int offset, CTravelEntry **foundEntry)
#define FAILED_UNEXPECTEDLY(hr)
HRESULT WINAPI GetHGlobalFromStream(IStream *pstm, HGLOBAL *phglobal)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
DWORD CountEntries([in] IUnknown *punk)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define COM_INTERFACE_ENTRY_IID(iid, x)
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
void WINAPI ILFree(LPITEMIDLIST pidl)
BOOL WINAPI ILGetDisplayNameEx(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPVOID path, DWORD type)
static unsigned __int64 next
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define TLMENUF_CHECKCURRENT
#define TLMENUF_INCLUDECURRENT
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
HRESULT CTravelLog_CreateInstance(REFIID riid, void **ppv)
static void FixAmpersands(wchar_t *buffer)
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define HRESULT_FROM_WIN32(x)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define IID_PPV_ARG(Itype, ppType)