ReactOS  0.4.15-dev-1152-g6c94e4f
travellog.cpp
Go to the documentation of this file.
1 /*
2  * ReactOS Explorer
3  *
4  * Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22 Implements a class that keeps track of a PIDL history and allows
23 navigation forward and backward. This really should be in shdocvw, but it
24 is not registered for external instantiation, and the entire IBrowserService
25 hierarchy that normally spans browseui and shdocvw are collapsed into one
26 hierarchy in browseui, so I am moving it to browseui for now. If someone
27 decides to refactor code later, it wouldn't be difficult to move it.
28 
29 TODO:
30 ****Does original travel log update the current item in the Travel method before or after calling ITravelEntry::Invoke?
31 ****Change to load maximum size from registry
32 ****Add code to track current size
33 ****Fix InsertMenuEntries to not exceed limit of menu item ids provided. Perhaps the method should try to be intelligent and if there are
34  too many items, center around the current item? Could cause dispatch problems...
35 ****Move tool tip text templates to resources
36  **Simplify code in InsertMenuEntries
37  Implement UpdateExternal
38  Implement FindTravelEntry
39  Implement Clone
40  Implement Revert
41 
42 */
43 
44 #include "precomp.h"
45 
46 class CTravelEntry :
47  public CComObjectRootEx<CComMultiThreadModelNoCS>,
48  public ITravelEntry
49 {
50 public:
53 private:
56 public:
57  CTravelEntry();
58  ~CTravelEntry();
59  HRESULT GetToolTipText(IUnknown *punk, LPWSTR pwzText) const;
60  long GetSize() const;
61 
62  // *** ITravelEntry methods ***
64  virtual HRESULT STDMETHODCALLTYPE Update(IUnknown *punk, BOOL fIsLocalAnchor);
66 
68  COM_INTERFACE_ENTRY_IID(IID_ITravelEntry, ITravelEntry)
70 };
71 
72 class CTravelLog :
73  public CComObjectRootEx<CComMultiThreadModelNoCS>,
74  public ITravelLog
75 {
76 private:
82  unsigned long fEntryCount;
83 public:
84  CTravelLog();
85  ~CTravelLog();
87  HRESULT FindRelativeEntry(int offset, CTravelEntry **foundEntry);
88  void DeleteChain(CTravelEntry *startHere);
89  void AppendEntry(CTravelEntry *afterEntry, CTravelEntry *newEntry);
90 public:
91 
92  // *** ITravelLog methods ***
93  virtual HRESULT STDMETHODCALLTYPE AddEntry(IUnknown *punk, BOOL fIsLocalAnchor);
94  virtual HRESULT STDMETHODCALLTYPE UpdateEntry(IUnknown *punk, BOOL fIsLocalAnchor);
95  virtual HRESULT STDMETHODCALLTYPE UpdateExternal(IUnknown *punk, IUnknown *punkHLBrowseContext);
96  virtual HRESULT STDMETHODCALLTYPE Travel(IUnknown *punk, int iOffset);
97  virtual HRESULT STDMETHODCALLTYPE GetTravelEntry(IUnknown *punk, int iOffset, ITravelEntry **ppte);
99  virtual HRESULT STDMETHODCALLTYPE GetToolTipText(IUnknown *punk, int iOffset, int idsTemplate, LPWSTR pwzText, DWORD cchText);
100  virtual HRESULT STDMETHODCALLTYPE InsertMenuEntries(IUnknown *punk, HMENU hmenu, int nPos, int idFirst, int idLast, DWORD dwFlags);
103  virtual HRESULT STDMETHODCALLTYPE Revert();
104 
106  COM_INTERFACE_ENTRY_IID(IID_ITravelLog, ITravelLog)
107 END_COM_MAP()
108 };
109 
111 {
112  fNextEntry = NULL;
114  fPIDL = NULL;
116 }
117 
119 {
120  ILFree(fPIDL);
122 }
123 
125 {
126  HRESULT hResult;
127 
128  hResult = ILGetDisplayNameEx(NULL, fPIDL, pwzText, ILGDN_NORMAL) ? S_OK : E_FAIL;
129  if (FAILED_UNEXPECTEDLY(hResult))
130  return hResult;
131 
132  return S_OK;
133 }
134 
136 {
137  return 0;
138 }
139 
141 {
142  CComPtr<IPersistHistory> persistHistory;
143  CComPtr<IStream> globalStream;
144  HRESULT hResult;
145 
146  TRACE("CTravelEntry::Invoke for IUnknown punk=%p\n", punk);
147 
148  hResult = punk->QueryInterface(IID_PPV_ARG(IPersistHistory, &persistHistory));
149  if (FAILED_UNEXPECTEDLY(hResult))
150  return hResult;
151  hResult = CreateStreamOnHGlobal(fPersistState, FALSE, &globalStream);
152  if (FAILED_UNEXPECTEDLY(hResult))
153  return hResult;
154  hResult = persistHistory->LoadHistory(globalStream, NULL);
155  if (FAILED_UNEXPECTEDLY(hResult))
156  return hResult;
157  return S_OK;
158 }
159 
161 {
162  CComPtr<ITravelLogClient> travelLogClient;
163  CComPtr<IPersistHistory> persistHistory;
164  CComPtr<IStream> globalStream;
165  WINDOWDATA windowData;
166  HRESULT hResult;
167 
168  TRACE("CTravelEntry::Update for IUnknown punk=%p, fIsLocalAnchor=%s\n", punk, fIsLocalAnchor ? "TRUE" : "FALSE");
169 
170 
171  WCHAR wch[MAX_PATH * 2];
172  GetToolTipText(punk, wch);
173  TRACE("Updating entry with display name: %S\n", wch);
174 
175  ZeroMemory(&windowData, sizeof(WINDOWDATA));
176  ILFree(fPIDL);
177  fPIDL = NULL;
180  hResult = punk->QueryInterface(IID_PPV_ARG(ITravelLogClient, &travelLogClient));
181  if (FAILED_UNEXPECTEDLY(hResult))
182  return hResult;
183  hResult = punk->QueryInterface(IID_PPV_ARG(IPersistHistory, &persistHistory));
184  if (FAILED_UNEXPECTEDLY(hResult))
185  return hResult;
186  hResult = CreateStreamOnHGlobal(NULL, FALSE, &globalStream);
187  if (FAILED_UNEXPECTEDLY(hResult))
188  return hResult;
189  hResult = persistHistory->SaveHistory(globalStream);
190  if (FAILED_UNEXPECTEDLY(hResult))
191  return hResult;
192  hResult = travelLogClient->GetWindowData(globalStream, &windowData);
193  if (FAILED_UNEXPECTEDLY(hResult))
194  return hResult;
195  fPIDL = windowData.pidl;
196  // TODO: Properly free the windowData
197  hResult = GetHGlobalFromStream(globalStream, &fPersistState);
198  if (FAILED_UNEXPECTEDLY(hResult))
199  return hResult;
200 
201  GetToolTipText(punk, wch);
202  TRACE("Updated entry display name is now: %S\n", wch);
203 
204  return S_OK;
205 }
206 
208 {
209  if (ppidl == NULL)
210  return E_POINTER;
211  *ppidl = ILClone(fPIDL);
212  if (*ppidl == NULL)
213  return E_OUTOFMEMORY;
214 
215  TRACE("CTravelEntry::GetPidl returning ppidl=%p\n", *ppidl);
216 
217  return S_OK;
218 }
219 
221 {
222  fListHead = NULL;
223  fListTail = NULL;
225  fMaximumSize = 0;
226  fCurrentSize = 0;
227  fEntryCount = 0;
228  TRACE("CTravelLog created\n");
229 }
230 
232 {
233  CTravelEntry *anEntry;
235 
236  anEntry = fListHead;
237  while (anEntry != NULL)
238  {
239  next = anEntry->fNextEntry;
240  anEntry->Release();
241  anEntry = next;
242  }
243  TRACE("CTravelLog destroyed\n");
244 }
245 
247 {
248  fMaximumSize = 1024 * 1024; // TODO: change to read this from registry
249  // Software\Microsoft\Windows\CurrentVersion\Explorer\TravelLog
250  // MaxSize
251  return S_OK;
252 }
253 
255 {
256  CTravelEntry *curEntry;
257  int offset = _offset;
258 
259  if (foundEntry == NULL)
260  return E_INVALIDARG;
261 
262  *foundEntry = NULL;
263  curEntry = fCurrentEntry;
264  if (offset < 0)
265  {
266  while (offset < 0 && curEntry != NULL)
267  {
268  curEntry = curEntry->fPreviousEntry;
269  offset++;
270  }
271  }
272  else
273  {
274  while (offset > 0 && curEntry != NULL)
275  {
276  curEntry = curEntry->fNextEntry;
277  offset--;
278  }
279  }
280  if (curEntry == NULL)
281  return E_INVALIDARG;
282 
283  *foundEntry = curEntry;
284 
285  TRACE("CTravelLog::FindRelativeEntry for offset %d, returning %p\n", offset, *foundEntry);
286 
287  return S_OK;
288 }
289 
291 {
292  CTravelEntry *saveNext;
293  long itemSize;
294 
295  TRACE("CTravelLog::DeleteChain deleting chain starting at %p\n", startHere);
296 
297  long startEntryCount = fEntryCount;
298 
299  if (startHere->fPreviousEntry != NULL)
300  {
301  startHere->fPreviousEntry->fNextEntry = NULL;
302  fListTail = startHere->fPreviousEntry;
303  }
304  else
305  {
306  fListHead = NULL;
307  fListTail = NULL;
308  }
309  while (startHere != NULL)
310  {
311  saveNext = startHere->fNextEntry;
312  itemSize = startHere->GetSize();
313  fCurrentSize -= itemSize;
314  startHere->Release();
315  startHere = saveNext;
316  fEntryCount--;
317  }
318 
319  TRACE("CTravelLog::DeleteChain chain of %d items deleted\n", startEntryCount - fEntryCount);
320 }
321 
323 {
324  if (afterEntry == NULL)
325  {
326  TRACE("CTravelLog::AppendEntry appending %p after NULL. Resetting head and tail\n", newEntry);
327  fListHead = newEntry;
328  fListTail = newEntry;
329  }
330  else
331  {
332  TRACE("CTravelLog::AppendEntry appending %p after %p\n", newEntry, afterEntry);
333  newEntry->fNextEntry = afterEntry->fNextEntry;
334  afterEntry->fNextEntry = newEntry;
335  newEntry->fPreviousEntry = afterEntry;
336  if (newEntry->fNextEntry == NULL)
337  fListTail = newEntry;
338  else
339  newEntry->fNextEntry->fPreviousEntry = newEntry;
340  }
341  fEntryCount++;
342 }
343 
345 {
346  CComObject<CTravelEntry> *newEntry;
347  long itemSize;
348 
349  TRACE("CTravelLog::AddEntry for IUnknown punk=%p, fIsLocalAnchor=%s\n", punk, fIsLocalAnchor ? "TRUE" : "FALSE");
350 
351  if (punk == NULL)
352  return E_INVALIDARG;
353  ATLTRY (newEntry = new CComObject<CTravelEntry>);
354  if (newEntry == NULL)
355  return E_OUTOFMEMORY;
356  newEntry->AddRef();
359  AppendEntry(fCurrentEntry, newEntry);
360  itemSize = newEntry->GetSize();
361  fCurrentSize += itemSize;
362  fCurrentEntry = newEntry;
363  return S_OK;
364 }
365 
367 {
368  if (punk == NULL)
369  return E_INVALIDARG;
370  if (fCurrentEntry == NULL)
371  return E_UNEXPECTED;
372  return fCurrentEntry->Update(punk, fIsLocalAnchor);
373 }
374 
376 {
377  return E_NOTIMPL;
378 }
379 
381 {
382  CTravelEntry *destinationEntry;
383  HRESULT hResult;
384 
385  TRACE("CTravelLog::Travel for IUnknown punk=%p at offset=%d\n", punk, iOffset);
386 
387  hResult = FindRelativeEntry(iOffset, &destinationEntry);
388  if (FAILED_UNEXPECTEDLY(hResult))
389  return hResult;
390  fCurrentEntry = destinationEntry;
391  hResult = destinationEntry->Invoke(punk);
392  if (FAILED_UNEXPECTEDLY(hResult))
393  return hResult;
394  return S_OK;
395 }
396 
398 {
399  CTravelEntry *destinationEntry;
400  HRESULT hResult;
401 
402  hResult = FindRelativeEntry(iOffset, &destinationEntry);
403  if (FAILED(hResult))
404  return hResult;
405  hResult = destinationEntry->QueryInterface(IID_PPV_ARG(ITravelEntry, ppte));
406  if (FAILED_UNEXPECTEDLY(hResult))
407  return hResult;
408 
409  TRACE("CTravelLog::GetTravelEntry for IUnknown punk=%p at offset=%d returning %p\n", punk, iOffset, *ppte);
410 
411  return hResult;
412 }
413 
415 {
416  if (ppte == NULL)
417  return E_POINTER;
418  if (punk == NULL || pidl == NULL)
419  return E_INVALIDARG;
420 
422 
423  return E_NOTIMPL;
424 }
425 
426 HRESULT STDMETHODCALLTYPE CTravelLog::GetToolTipText(IUnknown *punk, int iOffset, int idsTemplate, LPWSTR pwzText, DWORD cchText)
427 {
428  CTravelEntry *destinationEntry;
429  wchar_t tempString[MAX_PATH];
430  wchar_t templateString[200];
431  HRESULT hResult;
432 
433  if (pwzText == NULL)
434  return E_POINTER;
435  if (punk == NULL || cchText == 0)
436  return E_INVALIDARG;
437  hResult = FindRelativeEntry(iOffset, &destinationEntry);
438  if (FAILED_UNEXPECTEDLY(hResult))
439  return hResult;
440  hResult = destinationEntry->GetToolTipText(punk, tempString);
441  if (FAILED_UNEXPECTEDLY(hResult))
442  return hResult;
443  if (iOffset < 0)
444  {
445  if(LoadStringW(_AtlBaseModule.GetResourceInstance(),
446  IDS_BACK, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
448  }
449  else
450  {
451  if(LoadStringW(_AtlBaseModule.GetResourceInstance(),
452  IDS_FORWARD, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
454  }
455  _snwprintf(pwzText, cchText, templateString, tempString);
456 
457  TRACE("CTravelLog::GetToolTipText for IUnknown punk=%p at offset=%d returning L\"%S\"\n", punk, iOffset, pwzText);
458 
459  return S_OK;
460 }
461 
462 static void FixAmpersands(wchar_t *buffer)
463 {
464  wchar_t tempBuffer[MAX_PATH * 2];
465  wchar_t ch;
466  wchar_t *srcPtr;
467  wchar_t *dstPtr;
468 
469  srcPtr = buffer;
470  dstPtr = tempBuffer;
471  while (*srcPtr != 0)
472  {
473  ch = *srcPtr++;
474  *dstPtr++ = ch;
475  if (ch == '&')
476  *dstPtr++ = '&';
477  }
478  *dstPtr = 0;
479  wcscpy(buffer, tempBuffer);
480 }
481 
483  int nPos, int idFirst, int idLast, DWORD dwFlags)
484 {
485  CTravelEntry *currentItem;
486  MENUITEMINFO menuItemInfo;
487  wchar_t itemTextBuffer[MAX_PATH * 2];
488  HRESULT hResult;
489 
490  TRACE("CTravelLog::InsertMenuEntries for IUnknown punk=%p, nPos=%d, idFirst=%d, idLast=%d\n", punk);
491 
492  // TLMENUF_BACK - include back entries
493  // TLMENUF_INCLUDECURRENT - include current entry, if TLMENUF_CHECKCURRENT then check the entry
494  // TLMENUF_FORE - include next entries
495  // if fore+back, list from oldest to newest
496  // if back, list from newest to oldest
497  // if fore, list from newest to oldest
498 
499  // don't forget to patch ampersands before adding to menu
500  if (punk == NULL)
501  return E_INVALIDARG;
502  if (idLast <= idFirst)
503  return E_INVALIDARG;
504  menuItemInfo.cbSize = sizeof(menuItemInfo);
505  menuItemInfo.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STATE | MIIM_STRING;
506  menuItemInfo.fType = MFT_STRING;
507  menuItemInfo.wID = idFirst;
508  menuItemInfo.fState = MFS_ENABLED;
509  menuItemInfo.dwTypeData = itemTextBuffer;
510  if ((dwFlags & TLMENUF_BACK) != 0)
511  {
512  if ((dwFlags & TLMENUF_FORE) != 0)
513  {
514  currentItem = fCurrentEntry;
515  if (currentItem != NULL)
516  {
517  while (currentItem->fPreviousEntry != NULL)
518  currentItem = currentItem->fPreviousEntry;
519  }
520  while (currentItem != fCurrentEntry)
521  {
522  hResult = currentItem->GetToolTipText(punk, itemTextBuffer);
523  if (SUCCEEDED(hResult))
524  {
525  FixAmpersands(itemTextBuffer);
526  TRACE("CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.dwTypeData, menuItemInfo.wID);
527  if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
528  {
529  nPos++;
530  menuItemInfo.wID++;
531  }
532  }
533  currentItem = currentItem->fNextEntry;
534  }
535  }
536  else
537  {
538  currentItem = fCurrentEntry;
539  if (currentItem != NULL)
540  currentItem = currentItem->fPreviousEntry;
541  while (currentItem != NULL)
542  {
543  hResult = currentItem->GetToolTipText(punk, itemTextBuffer);
544  if (SUCCEEDED(hResult))
545  {
546  FixAmpersands(itemTextBuffer);
547  TRACE("CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.dwTypeData, menuItemInfo.wID);
548  if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
549  {
550  nPos++;
551  menuItemInfo.wID++;
552  }
553  }
554  currentItem = currentItem->fPreviousEntry;
555  }
556  }
557  }
558  if ((dwFlags & TLMENUF_INCLUDECURRENT) != 0)
559  {
560  if (fCurrentEntry != NULL)
561  {
562  hResult = fCurrentEntry->GetToolTipText(punk, itemTextBuffer);
563  if (SUCCEEDED(hResult))
564  {
565  FixAmpersands(itemTextBuffer);
566  if ((dwFlags & TLMENUF_CHECKCURRENT) != 0)
567  menuItemInfo.fState |= MFS_CHECKED;
568  TRACE("CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.dwTypeData, menuItemInfo.wID);
569  if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
570  {
571  nPos++;
572  menuItemInfo.wID++;
573  }
574  menuItemInfo.fState &= ~MFS_CHECKED;
575  }
576  }
577  }
578  if ((dwFlags & TLMENUF_FORE) != 0)
579  {
580  currentItem = fCurrentEntry;
581  if (currentItem != NULL)
582  currentItem = currentItem->fNextEntry;
583  while (currentItem != NULL)
584  {
585  hResult = currentItem->GetToolTipText(punk, itemTextBuffer);
586  if (SUCCEEDED(hResult))
587  {
588  FixAmpersands(itemTextBuffer);
589  TRACE("CTravelLog::InsertMenuEntries adding entry L\"%S\"/L\"%S\" with id %d\n", itemTextBuffer, menuItemInfo.dwTypeData, menuItemInfo.wID);
590  if (InsertMenuItem(hmenu, nPos, TRUE, &menuItemInfo))
591  {
592  nPos++;
593  menuItemInfo.wID++;
594  }
595  }
596  currentItem = currentItem->fNextEntry;
597  }
598  }
599  return S_OK;
600 }
601 
603 {
604  if (pptl == NULL)
605  return E_POINTER;
606  *pptl = NULL;
607  // duplicate the log
609  return E_NOTIMPL;
610 }
611 
613 {
614  if (punk == NULL)
615  return E_INVALIDARG;
616  return fEntryCount;
617 }
618 
620 {
621  // remove the current entry?
623  return E_NOTIMPL;
624 }
625 
627 {
628  return ShellObjectCreatorInit<CTravelLog>(riid, ppv);
629 }
HRESULT FindRelativeEntry(int offset, CTravelEntry **foundEntry)
Definition: travellog.cpp:254
#define ATLTRY(x)
Definition: atlcomcli.h:44
virtual HRESULT STDMETHODCALLTYPE InsertMenuEntries(IUnknown *punk, HMENU hmenu, int nPos, int idFirst, int idLast, DWORD dwFlags)
Definition: travellog.cpp:482
#define MFT_STRING
Definition: winuser.h:741
#define MIIM_FTYPE
Definition: winuser.h:724
#define REFIID
Definition: guiddef.h:118
HRESULT WINAPI GetHGlobalFromStream(IStream *pstm, HGLOBAL *phglobal)
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
long GetSize() const
Definition: travellog.cpp:135
virtual HRESULT STDMETHODCALLTYPE FindTravelEntry(IUnknown *punk, LPCITEMIDLIST pidl, ITravelEntry **ppte)
Definition: travellog.cpp:414
virtual HRESULT STDMETHODCALLTYPE UpdateExternal(IUnknown *punk, IUnknown *punkHLBrowseContext)
Definition: travellog.cpp:375
static HMENU hmenu
Definition: win.c:66
virtual HRESULT STDMETHODCALLTYPE GetToolTipText(IUnknown *punk, int iOffset, int idsTemplate, LPWSTR pwzText, DWORD cchText)
Definition: travellog.cpp:426
#define TRUE
Definition: types.h:120
HRESULT CTravelLog_CreateInstance(REFIID riid, void **ppv)
Definition: travellog.cpp:626
REFIID riid
Definition: precomp.h:44
HGLOBAL fPersistState
Definition: travellog.cpp:55
virtual HRESULT STDMETHODCALLTYPE Invoke(IUnknown *punk)
Definition: travellog.cpp:140
long fMaximumSize
Definition: travellog.cpp:80
void DeleteChain(CTravelEntry *startHere)
Definition: travellog.cpp:290
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
GLintptr offset
Definition: glext.h:5920
virtual HRESULT STDMETHODCALLTYPE UpdateEntry(IUnknown *punk, BOOL fIsLocalAnchor)
Definition: travellog.cpp:366
REFIID LPVOID * ppv
Definition: atlbase.h:39
CTravelEntry * fNextEntry
Definition: travellog.cpp:51
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
#define ZeroMemory
Definition: winbase.h:1648
GLuint buffer
Definition: glext.h:5915
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
unsigned long fEntryCount
Definition: travellog.cpp:82
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define TLMENUF_INCLUDECURRENT
Definition: shlobj.h:2545
_In_ POINTL * pptl
Definition: winddi.h:3741
HRESULT Initialize()
Definition: travellog.cpp:246
virtual HRESULT STDMETHODCALLTYPE AddEntry(IUnknown *punk, BOOL fIsLocalAnchor)
Definition: travellog.cpp:344
CTravelEntry * fListTail
Definition: travellog.cpp:78
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
virtual HRESULT STDMETHODCALLTYPE Clone(ITravelLog **pptl)
Definition: travellog.cpp:602
#define MFS_ENABLED
Definition: winuser.h:745
#define FALSE
Definition: types.h:117
#define MIIM_STATE
Definition: winuser.h:716
unsigned int BOOL
Definition: ntddk_ex.h:94
static void FixAmpersands(wchar_t *buffer)
Definition: travellog.cpp:462
virtual HRESULT STDMETHODCALLTYPE GetTravelEntry(IUnknown *punk, int iOffset, ITravelEntry **ppte)
Definition: travellog.cpp:397
ULONG Release()
#define IDS_BACK
Definition: resource.h:127
#define TLMENUF_CHECKCURRENT
Definition: shlobj.h:2546
#define E_INVALIDARG
Definition: ddrawi.h:101
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
smooth NULL
Definition: ftsmooth.c:416
#define ILGDN_NORMAL
Definition: undocshell.h:69
#define MIIM_ID
Definition: winuser.h:717
_In_ int cchText
Definition: winuser.h:4440
#define TLMENUF_BACK
Definition: shlobj.h:2547
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
CTravelEntry * fPreviousEntry
Definition: travellog.cpp:52
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define MAX_PATH
Definition: compat.h:34
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned long DWORD
Definition: ntddk_ex.h:95
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
CTravelEntry * fCurrentEntry
Definition: travellog.cpp:79
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
virtual HRESULT STDMETHODCALLTYPE Revert()
Definition: travellog.cpp:619
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
long fCurrentSize
Definition: travellog.cpp:81
PIDLIST_ABSOLUTE pidl
Definition: tlogstg.idl:26
HRESULT GetToolTipText(IUnknown *punk, LPWSTR pwzText) const
Definition: travellog.cpp:124
#define MIIM_STRING
Definition: winuser.h:722
#define S_OK
Definition: intsafe.h:51
virtual DWORD STDMETHODCALLTYPE CountEntries(IUnknown *punk)
Definition: travellog.cpp:612
static unsigned __int64 next
Definition: rand_nt.c:6
LPITEMIDLIST fPIDL
Definition: travellog.cpp:54
#define IDS_FORWARD
Definition: resource.h:128
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
#define E_NOTIMPL
Definition: ddrawi.h:99
BOOL WINAPI ILGetDisplayNameEx(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPVOID path, DWORD type)
Definition: pidl.c:162
#define E_UNEXPECTED
Definition: winerror.h:2456
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
virtual HRESULT STDMETHODCALLTYPE GetPidl(LPITEMIDLIST *ppidl)
Definition: travellog.cpp:207
void AppendEntry(CTravelEntry *afterEntry, CTravelEntry *newEntry)
Definition: travellog.cpp:322
#define UNIMPLEMENTED
Definition: debug.h:115
virtual HRESULT STDMETHODCALLTYPE Update(IUnknown *punk, BOOL fIsLocalAnchor)
Definition: travellog.cpp:160
#define MFS_CHECKED
Definition: winuser.h:742
#define TLMENUF_FORE
Definition: shlobj.h:2548
#define END_COM_MAP()
Definition: atlcom.h:552
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define E_POINTER
Definition: winerror.h:2365
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPSTR dwTypeData
Definition: winuser.h:3226
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
CTravelEntry * fListHead
Definition: travellog.cpp:77
#define InsertMenuItem
Definition: winuser.h:5779
#define SUCCEEDED(hr)
Definition: intsafe.h:49
virtual HRESULT STDMETHODCALLTYPE Travel(IUnknown *punk, int iOffset)
Definition: travellog.cpp:380