Implement Revert
*/
+
#include "precomp.h"
class CTravelEntry :
CComPtr<IStream> globalStream;
HRESULT hResult;
- hResult = punk->QueryInterface(IID_IPersistHistory, reinterpret_cast<void **>(&persistHistory));
+ hResult = punk->QueryInterface(IID_PPV_ARG(IPersistHistory, &persistHistory));
if (FAILED(hResult))
return hResult;
hResult = CreateStreamOnHGlobal(fPersistState, FALSE, &globalStream);
fPIDL = NULL;
GlobalFree(fPersistState);
fPersistState = NULL;
- hResult = punk->QueryInterface(IID_ITravelLogClient, reinterpret_cast<void **>(&travelLogClient));
- if (FAILED(hResult))
- return hResult;
- hResult = travelLogClient->GetWindowData(&windowData);
+ hResult = punk->QueryInterface(IID_PPV_ARG(ITravelLogClient, &travelLogClient));
if (FAILED(hResult))
return hResult;
- fPIDL = windowData.pidl;
- // TODO: Properly free the windowData
- hResult = punk->QueryInterface(IID_IPersistHistory, reinterpret_cast<void **>(&persistHistory));
+ hResult = punk->QueryInterface(IID_PPV_ARG(IPersistHistory, &persistHistory));
if (FAILED(hResult))
return hResult;
globalStorage = GlobalAlloc(GMEM_FIXED, 0);
hResult = persistHistory->SaveHistory(globalStream);
if (FAILED(hResult))
return hResult;
+ hResult = travelLogClient->GetWindowData(globalStream, &windowData);
+ if (FAILED(hResult))
+ return hResult;
+ fPIDL = windowData.pidl;
+ // TODO: Properly free the windowData
hResult = GetHGlobalFromStream(globalStream, &fPersistState);
if (FAILED(hResult))
return hResult;
hResult = FindRelativeEntry(iOffset, &destinationEntry);
if (FAILED(hResult))
return hResult;
- return destinationEntry->QueryInterface(IID_ITravelEntry, reinterpret_cast<void **>(ppte));
+ return destinationEntry->QueryInterface(IID_PPV_ARG(ITravelEntry, ppte));
}
HRESULT STDMETHODCALLTYPE CTravelLog::FindTravelEntry(IUnknown *punk, LPCITEMIDLIST pidl, ITravelEntry **ppte)