Author: akhaldi Date: Fri May 17 11:19:48 2013 New Revision: 59024
URL: http://svn.reactos.org/svn/reactos?rev=59024&view=rev Log: [BROWSEUI] * Fix ITravelLogClient::GetWindowData() definition (parameters) and correct its use. * Account for tlogstg.h where the ITravelLogClient interface is now defined. [PSDK] * Import tlogstg.idl from Wine 1.5.26. * Remove the now duplicated definitions from shobjidl.idl. [UUID] * Add tlogstg.idl.
Added: trunk/reactos/include/psdk/tlogstg.idl (with props) Modified: trunk/reactos/dll/win32/browseui/precomp.h trunk/reactos/dll/win32/browseui/shellbrowser.cpp trunk/reactos/dll/win32/browseui/travellog.cpp trunk/reactos/include/psdk/CMakeLists.txt trunk/reactos/include/psdk/shobjidl.idl trunk/reactos/lib/sdk/uuid/CMakeLists.txt
Modified: trunk/reactos/dll/win32/browseui/precomp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/precomp.... ============================================================================== --- trunk/reactos/dll/win32/browseui/precomp.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/precomp.h [iso-8859-1] Fri May 17 11:19:48 2013 @@ -10,6 +10,7 @@ #include <wincon.h> #include <shellapi.h> #include <shlobj.h> +#include <tlogstg.h> #include <shlobj_undoc.h> #include <shlguid_undoc.h> #include <tchar.h>
Modified: trunk/reactos/dll/win32/browseui/shellbrowser.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/shellbro... ============================================================================== --- trunk/reactos/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] Fri May 17 11:19:48 2013 @@ -601,7 +601,7 @@
// *** ITravelLogClient methods *** virtual HRESULT STDMETHODCALLTYPE FindWindowByIndex(DWORD dwID, IUnknown **ppunk); - virtual HRESULT STDMETHODCALLTYPE GetWindowData(LPWINDOWDATA pWinData); + virtual HRESULT STDMETHODCALLTYPE GetWindowData(IStream *pStream, LPWINDOWDATA pWinData); virtual HRESULT STDMETHODCALLTYPE LoadHistoryPosition(LPWSTR pszUrlLocation, DWORD dwPosition);
// *** IPersist methods *** @@ -2890,7 +2890,7 @@ return E_NOTIMPL; }
-HRESULT STDMETHODCALLTYPE CShellBrowser::GetWindowData(LPWINDOWDATA pWinData) +HRESULT STDMETHODCALLTYPE CShellBrowser::GetWindowData(IStream *pStream, LPWINDOWDATA pWinData) { if (pWinData == NULL) return E_POINTER;
Modified: trunk/reactos/dll/win32/browseui/travellog.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/travello... ============================================================================== --- trunk/reactos/dll/win32/browseui/travellog.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/browseui/travellog.cpp [iso-8859-1] Fri May 17 11:19:48 2013 @@ -169,21 +169,21 @@ hResult = punk->QueryInterface(IID_ITravelLogClient, reinterpret_cast<void **>(&travelLogClient)); if (FAILED(hResult)) return hResult; - hResult = travelLogClient->GetWindowData(&windowData); + hResult = punk->QueryInterface(IID_IPersistHistory, reinterpret_cast<void **>(&persistHistory)); + if (FAILED(hResult)) + return hResult; + globalStorage = GlobalAlloc(GMEM_FIXED, 0); + hResult = CreateStreamOnHGlobal(globalStorage, FALSE, &globalStream); + if (FAILED(hResult)) + return hResult; + 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 = punk->QueryInterface(IID_IPersistHistory, reinterpret_cast<void **>(&persistHistory)); - if (FAILED(hResult)) - return hResult; - globalStorage = GlobalAlloc(GMEM_FIXED, 0); - hResult = CreateStreamOnHGlobal(globalStorage, FALSE, &globalStream); - if (FAILED(hResult)) - return hResult; - hResult = persistHistory->SaveHistory(globalStream); - if (FAILED(hResult)) - return hResult; hResult = GetHGlobalFromStream(globalStream, &fPersistState); if (FAILED(hResult)) return hResult;
Modified: trunk/reactos/include/psdk/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/CMakeLists.txt... ============================================================================== --- trunk/reactos/include/psdk/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/include/psdk/CMakeLists.txt [iso-8859-1] Fri May 17 11:19:48 2013 @@ -99,6 +99,7 @@ strmif.idl structuredquerycondition.idl textstor.idl + tlogstg.idl tom.idl tuner.idl unknwn.idl
Modified: trunk/reactos/include/psdk/shobjidl.idl URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shobjidl.idl?r... ============================================================================== --- trunk/reactos/include/psdk/shobjidl.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/shobjidl.idl [iso-8859-1] Fri May 17 11:19:48 2013 @@ -2364,20 +2364,6 @@ }
-typedef struct _WINDOWDATA -{ - DWORD dwWindowID; - UINT uiCP; - LPITEMIDLIST pidl; - [string] LPWSTR lpszUrl; - [string] LPWSTR lpszUrlLocation; - [string] LPWSTR lpszTitle; -} WINDOWDATA; - -typedef WINDOWDATA *LPWINDOWDATA; -typedef const WINDOWDATA *LPCWINDOWDATA; - - /***************************************************************************** * ITravelEntry interface */ @@ -2398,30 +2384,6 @@
HRESULT GetPidl( [in] LPITEMIDLIST *ppidl); -}; - - -/***************************************************************************** - * ITravelLogClient interface - */ -[ - uuid(241c033e-e659-43da-aa4d-4086dbc4758d), - object, - pointer_default(unique), - local -] -interface ITravelLogClient : IUnknown -{ - HRESULT FindWindowByIndex( - [in] DWORD dwID, - [out] IUnknown **ppunk); - - HRESULT GetWindowData( - [out] LPWINDOWDATA pWinData); - - HRESULT LoadHistoryPosition( - [in] LPWSTR pszUrlLocation, - [in] DWORD dwPosition); };
Added: trunk/reactos/include/psdk/tlogstg.idl URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/tlogstg.idl?re... ============================================================================== --- trunk/reactos/include/psdk/tlogstg.idl (added) +++ trunk/reactos/include/psdk/tlogstg.idl [iso-8859-1] Fri May 17 11:19:48 2013 @@ -0,0 +1,52 @@ +/* + * Copyright 2012 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "objidl.idl"; +import "oleidl.idl"; +import "shtypes.idl"; + +typedef struct _WINDOWDATA { + DWORD dwWindowID; + UINT uiCP; + PIDLIST_ABSOLUTE pidl; + [string] LPWSTR lpszUrl; + [string] LPWSTR lpszUrlLocation; + [string] LPWSTR lpszTitle; +} WINDOWDATA; + +typedef WINDOWDATA *LPWINDOWDATA; +typedef const WINDOWDATA *LPCWINDOWDATA; + +[ + uuid(241c033e-e659-43da-aa4d-4086dbc4758d), + object +] +interface ITravelLogClient : IUnknown +{ + HRESULT FindWindowByIndex( + [in] DWORD dwID, + [out] IUnknown **ppunk); + + HRESULT GetWindowData( + [in] IStream *pStream, + [out] LPWINDOWDATA pWinData); + + HRESULT LoadHistoryPosition( + [in] LPWSTR pszUrlLocation, + [in] DWORD dwPosition); +}
Propchange: trunk/reactos/include/psdk/tlogstg.idl ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/reactos/lib/sdk/uuid/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/uuid/CMakeLists.txt... ============================================================================== --- trunk/reactos/lib/sdk/uuid/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/uuid/CMakeLists.txt [iso-8859-1] Fri May 17 11:19:48 2013 @@ -126,7 +126,7 @@ # termmgr.idl textstor.idl # tlog.idl -# tlogstg.idl + tlogstg.idl # trkadm.idl # trkcom.idl unknwn.idl