mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
[IEFRAME]
* Import from Wine 1.5.26. [PSDK] * Import docobjectservice.idl and htiface.idl from Wine. * Add some missing definitions in shlobj.h. [UUID] * Add docobjectservice.idl and htiface.idl to the list. * Add CGID_DocHostCommandHandler. svn path=/trunk/; revision=58783
This commit is contained in:
parent
78e547c553
commit
00ac0d48b1
35 changed files with 12981 additions and 2 deletions
|
@ -49,6 +49,7 @@ add_subdirectory(hnetcfg)
|
|||
add_subdirectory(httpapi)
|
||||
add_subdirectory(iccvid)
|
||||
add_subdirectory(icmp)
|
||||
add_subdirectory(ieframe)
|
||||
add_subdirectory(imaadp32.acm)
|
||||
add_subdirectory(imagehlp)
|
||||
add_subdirectory(imm32)
|
||||
|
|
42
reactos/dll/win32/ieframe/CMakeLists.txt
Normal file
42
reactos/dll/win32/ieframe/CMakeLists.txt
Normal file
|
@ -0,0 +1,42 @@
|
|||
|
||||
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
|
||||
add_definitions(-D__WINESRC__)
|
||||
|
||||
spec2def(ieframe.dll ieframe.spec ADD_IMPORTLIB)
|
||||
|
||||
list(APPEND SOURCE
|
||||
classinfo.c
|
||||
client.c
|
||||
dochost.c
|
||||
events.c
|
||||
frame.c
|
||||
ie.c
|
||||
ieframe_main.c
|
||||
iehtmlwnd.c
|
||||
iexplore.c
|
||||
intshcut.c
|
||||
navigate.c
|
||||
oleobject.c
|
||||
persist.c
|
||||
shellbrowser.c
|
||||
shelluihelper.c
|
||||
urlhist.c
|
||||
view.c
|
||||
webbrowser.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ieframe_stubs.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ieframe.def)
|
||||
|
||||
add_library(ieframe SHARED ${SOURCE} ieframe.rc)
|
||||
|
||||
if(NOT MSVC)
|
||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
||||
#allow_warnings(aclui)
|
||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error")
|
||||
endif()
|
||||
|
||||
add_typelib(ieframe_v1.idl)
|
||||
set_source_files_properties(ieframe.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ieframe_v1.tlb)
|
||||
set_module_type(ieframe win32dll)
|
||||
target_link_libraries(ieframe uuid wine)
|
||||
add_importlibs(ieframe urlmon shell32 comctl32 shlwapi oleaut32 ole32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
|
||||
add_cd_file(TARGET ieframe DESTINATION reactos/system32 FOR all)
|
103
reactos/dll/win32/ieframe/classinfo.c
Normal file
103
reactos/dll/win32/ieframe/classinfo.c
Normal file
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
* Implementation of IProvideClassInfo interfaces for WebBrowser control
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (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
|
||||
*/
|
||||
|
||||
#include "ieframe.h"
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IProvideClassInfo2 interface
|
||||
*/
|
||||
|
||||
static inline WebBrowser *impl_from_IProvideClassInfo2(IProvideClassInfo2 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IProvideClassInfo2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ProvideClassInfo_QueryInterface(IProvideClassInfo2 *iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
WebBrowser *This = impl_from_IProvideClassInfo2(iface);
|
||||
return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ProvideClassInfo_AddRef(IProvideClassInfo2 *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IProvideClassInfo2(iface);
|
||||
return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ProvideClassInfo_Release(IProvideClassInfo2 *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IProvideClassInfo2(iface);
|
||||
return IWebBrowser2_Release(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ProvideClassInfo_GetClassInfo(IProvideClassInfo2 *iface, ITypeInfo **ppTI)
|
||||
{
|
||||
WebBrowser *This = impl_from_IProvideClassInfo2(iface);
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, ppTI);
|
||||
|
||||
hres = get_typeinfo(This->version > 1 ? WebBrowser_tid : WebBrowser_V1_tid, ppTI);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
ITypeInfo_AddRef(*ppTI);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ProvideClassInfo_GetGUID(IProvideClassInfo2 *iface,
|
||||
DWORD dwGuidKind, GUID *pGUID)
|
||||
{
|
||||
WebBrowser *This = impl_from_IProvideClassInfo2(iface);
|
||||
|
||||
TRACE("(%p)->(%d %p)\n", This, dwGuidKind, pGUID);
|
||||
|
||||
if(!pGUID)
|
||||
return E_POINTER;
|
||||
|
||||
if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID) {
|
||||
WARN("Wrong GUID type: %d\n", dwGuidKind);
|
||||
*pGUID = IID_NULL;
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
memcpy(pGUID, This->version == 1 ? &DIID_DWebBrowserEvents : &DIID_DWebBrowserEvents2,
|
||||
sizeof(GUID));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IProvideClassInfo2Vtbl ProvideClassInfoVtbl =
|
||||
{
|
||||
ProvideClassInfo_QueryInterface,
|
||||
ProvideClassInfo_AddRef,
|
||||
ProvideClassInfo_Release,
|
||||
ProvideClassInfo_GetClassInfo,
|
||||
ProvideClassInfo_GetGUID
|
||||
};
|
||||
|
||||
void WebBrowser_ClassInfo_Init(WebBrowser *This)
|
||||
{
|
||||
This->IProvideClassInfo2_iface.lpVtbl = &ProvideClassInfoVtbl;
|
||||
}
|
721
reactos/dll/win32/ieframe/client.c
Normal file
721
reactos/dll/win32/ieframe/client.c
Normal file
|
@ -0,0 +1,721 @@
|
|||
/*
|
||||
* Copyright 2005 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
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <ieframe.h>
|
||||
|
||||
#include <mshtmdid.h>
|
||||
#include <idispids.h>
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
static inline DocHost *impl_from_IOleClientSite(IOleClientSite *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
DocHost *This = impl_from_IOleClientSite(iface);
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = &This->IOleClientSite_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleClientSite, riid)) {
|
||||
TRACE("(%p)->(IID_IOleClientSite %p)\n", This, ppv);
|
||||
*ppv = &This->IOleClientSite_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleWindow, riid)) {
|
||||
TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
|
||||
*ppv = &This->IOleInPlaceSiteEx_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleInPlaceSite, riid)) {
|
||||
TRACE("(%p)->(IID_IOleInPlaceSite %p)\n", This, ppv);
|
||||
*ppv = &This->IOleInPlaceSiteEx_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleInPlaceSiteEx, riid)) {
|
||||
TRACE("(%p)->(IID_IOleInPlaceSiteEx %p)\n", This, ppv);
|
||||
*ppv = &This->IOleInPlaceSiteEx_iface;
|
||||
}else if(IsEqualGUID(&IID_IDocHostUIHandler, riid)) {
|
||||
TRACE("(%p)->(IID_IDocHostUIHandler %p)\n", This, ppv);
|
||||
*ppv = &This->IDocHostUIHandler2_iface;
|
||||
}else if(IsEqualGUID(&IID_IDocHostUIHandler2, riid)) {
|
||||
TRACE("(%p)->(IID_IDocHostUIHandler2 %p)\n", This, ppv);
|
||||
*ppv = &This->IDocHostUIHandler2_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleDocumentSite, riid)) {
|
||||
TRACE("(%p)->(IID_IOleDocumentSite %p)\n", This, ppv);
|
||||
*ppv = &This->IOleDocumentSite_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleControlSite, riid)) {
|
||||
TRACE("(%p)->(IID_IOleControlSite %p)\n", This, ppv);
|
||||
*ppv = &This->IOleControlSite_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) {
|
||||
TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This, ppv);
|
||||
*ppv = &This->IOleCommandTarget_iface;
|
||||
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
||||
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
||||
*ppv = &This->IDispatch_iface;
|
||||
}else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) {
|
||||
TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppv);
|
||||
*ppv = &This->IPropertyNotifySink_iface;
|
||||
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
|
||||
TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
|
||||
*ppv = &This->IServiceProvider_iface;
|
||||
}else {
|
||||
*ppv = NULL;
|
||||
WARN("Unsupported interface %s\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClientSite_AddRef(IOleClientSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleClientSite(iface);
|
||||
return This->container_vtbl->addref(This);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClientSite_Release(IOleClientSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleClientSite(iface);
|
||||
return This->container_vtbl->release(This);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClientSite_SaveObject(IOleClientSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleClientSite(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign,
|
||||
DWORD dwWhichMoniker, IMoniker **ppmk)
|
||||
{
|
||||
DocHost *This = impl_from_IOleClientSite(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer)
|
||||
{
|
||||
DocHost *This = impl_from_IOleClientSite(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppContainer);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClientSite_ShowObject(IOleClientSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleClientSite(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow)
|
||||
{
|
||||
DocHost *This = impl_from_IOleClientSite(iface);
|
||||
FIXME("(%p)->(%x)\n", This, fShow);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClientSite_RequestNewObjectLayout(IOleClientSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleClientSite(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IOleClientSiteVtbl OleClientSiteVtbl = {
|
||||
ClientSite_QueryInterface,
|
||||
ClientSite_AddRef,
|
||||
ClientSite_Release,
|
||||
ClientSite_SaveObject,
|
||||
ClientSite_GetMoniker,
|
||||
ClientSite_GetContainer,
|
||||
ClientSite_ShowObject,
|
||||
ClientSite_OnShowWindow,
|
||||
ClientSite_RequestNewObjectLayout
|
||||
};
|
||||
|
||||
static inline DocHost *impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleInPlaceSiteEx_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSiteEx *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI InPlaceSite_AddRef(IOleInPlaceSiteEx *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI InPlaceSite_Release(IOleInPlaceSiteEx *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSiteEx *iface, HWND *phwnd)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, phwnd);
|
||||
|
||||
*phwnd = This->hwnd;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp(IOleInPlaceSiteEx *iface, BOOL fEnterMode)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
FIXME("(%p)->(%x)\n", This, fEnterMode);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSiteEx *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
/* Nothing to do here */
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_OnInPlaceActivate(IOleInPlaceSiteEx *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
/* Nothing to do here */
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_OnUIActivate(IOleInPlaceSiteEx *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface,
|
||||
IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect,
|
||||
LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
|
||||
TRACE("(%p)->(%p %p %p %p %p)\n", This, ppFrame, ppDoc, lprcPosRect,
|
||||
lprcClipRect, lpFrameInfo);
|
||||
|
||||
IOleInPlaceFrame_AddRef(&This->IOleInPlaceFrame_iface);
|
||||
*ppFrame = &This->IOleInPlaceFrame_iface;
|
||||
*ppDoc = NULL;
|
||||
|
||||
GetClientRect(This->hwnd, lprcPosRect);
|
||||
*lprcClipRect = *lprcPosRect;
|
||||
|
||||
lpFrameInfo->fMDIApp = FALSE;
|
||||
lpFrameInfo->hwndFrame = This->frame_hwnd;
|
||||
lpFrameInfo->haccel = NULL;
|
||||
lpFrameInfo->cAccelEntries = 0; /* FIXME: should be 5 */
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_Scroll(IOleInPlaceSiteEx *iface, SIZE scrollExtent)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
FIXME("(%p)->({%d %d})\n", This, scrollExtent.cx, scrollExtent.cy);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_OnUIDeactivate(IOleInPlaceSiteEx *iface, BOOL fUndoable)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
FIXME("(%p)->(%x)\n", This, fUndoable);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate(IOleInPlaceSiteEx *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
/* Nothing to do here */
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_DiscardUndoState(IOleInPlaceSiteEx *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_DeactivateAndUndo(IOleInPlaceSiteEx *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_OnPosRectChange(IOleInPlaceSiteEx *iface,
|
||||
LPCRECT lprcPosRect)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
FIXME("(%p)->(%p)\n", This, lprcPosRect);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_OnInPlaceActivateEx(IOleInPlaceSiteEx *iface,
|
||||
BOOL *pfNoRedraw, DWORD dwFlags)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
|
||||
TRACE("(%p)->(%p, %x)\n", This, pfNoRedraw, dwFlags);
|
||||
|
||||
/* FIXME: Avoid redraw, when possible */
|
||||
pfNoRedraw = FALSE;
|
||||
|
||||
if (dwFlags) {
|
||||
FIXME("dwFlags not supported (%x)\n", dwFlags);
|
||||
}
|
||||
|
||||
/* Nothing to do here */
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivateEx(IOleInPlaceSiteEx *iface, BOOL fNoRedraw)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
|
||||
TRACE("(%p)->(%x)\n", This, fNoRedraw);
|
||||
|
||||
if (fNoRedraw) {
|
||||
FIXME("fNoRedraw (%x) ignored\n", fNoRedraw);
|
||||
}
|
||||
|
||||
/* Nothing to do here */
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceSite_RequestUIActivate(IOleInPlaceSiteEx *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
/* OnUIActivate is always possible */
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IOleInPlaceSiteExVtbl OleInPlaceSiteExVtbl = {
|
||||
InPlaceSite_QueryInterface,
|
||||
InPlaceSite_AddRef,
|
||||
InPlaceSite_Release,
|
||||
InPlaceSite_GetWindow,
|
||||
InPlaceSite_ContextSensitiveHelp,
|
||||
InPlaceSite_CanInPlaceActivate,
|
||||
InPlaceSite_OnInPlaceActivate,
|
||||
InPlaceSite_OnUIActivate,
|
||||
InPlaceSite_GetWindowContext,
|
||||
InPlaceSite_Scroll,
|
||||
InPlaceSite_OnUIDeactivate,
|
||||
InPlaceSite_OnInPlaceDeactivate,
|
||||
InPlaceSite_DiscardUndoState,
|
||||
InPlaceSite_DeactivateAndUndo,
|
||||
InPlaceSite_OnPosRectChange,
|
||||
/* OleInPlaceSiteEx */
|
||||
InPlaceSite_OnInPlaceActivateEx,
|
||||
InPlaceSite_OnInPlaceDeactivateEx,
|
||||
InPlaceSite_RequestUIActivate
|
||||
};
|
||||
|
||||
static inline DocHost *impl_from_IOleDocumentSite(IOleDocumentSite *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleDocumentSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI OleDocumentSite_QueryInterface(IOleDocumentSite *iface,
|
||||
REFIID riid, void **ppv)
|
||||
{
|
||||
DocHost *This = impl_from_IOleDocumentSite(iface);
|
||||
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI OleDocumentSite_AddRef(IOleDocumentSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleDocumentSite(iface);
|
||||
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI OleDocumentSite_Release(IOleDocumentSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleDocumentSite(iface);
|
||||
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI OleDocumentSite_ActivateMe(IOleDocumentSite *iface,
|
||||
IOleDocumentView *pViewToActivate)
|
||||
{
|
||||
DocHost *This = impl_from_IOleDocumentSite(iface);
|
||||
IOleDocument *oledoc;
|
||||
RECT rect;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pViewToActivate);
|
||||
|
||||
hres = IUnknown_QueryInterface(This->document, &IID_IOleDocument, (void**)&oledoc);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
IOleDocument_CreateView(oledoc, (IOleInPlaceSite*) &This->IOleInPlaceSiteEx_iface, NULL, 0, &This->view);
|
||||
IOleDocument_Release(oledoc);
|
||||
|
||||
GetClientRect(This->hwnd, &rect);
|
||||
IOleDocumentView_SetRect(This->view, &rect);
|
||||
|
||||
hres = IOleDocumentView_Show(This->view, TRUE);
|
||||
|
||||
return hres;
|
||||
}
|
||||
|
||||
static const IOleDocumentSiteVtbl OleDocumentSiteVtbl = {
|
||||
OleDocumentSite_QueryInterface,
|
||||
OleDocumentSite_AddRef,
|
||||
OleDocumentSite_Release,
|
||||
OleDocumentSite_ActivateMe
|
||||
};
|
||||
|
||||
static inline DocHost *impl_from_IOleControlSite(IOleControlSite *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleControlSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ControlSite_QueryInterface(IOleControlSite *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
DocHost *This = impl_from_IOleControlSite(iface);
|
||||
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ControlSite_AddRef(IOleControlSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleControlSite(iface);
|
||||
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ControlSite_Release(IOleControlSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleControlSite(iface);
|
||||
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ControlSite_OnControlInfoChanged(IOleControlSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleControlSite(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ControlSite_LockInPlaceActive(IOleControlSite *iface, BOOL fLock)
|
||||
{
|
||||
DocHost *This = impl_from_IOleControlSite(iface);
|
||||
FIXME("(%p)->(%d)\n", This, fLock);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ControlSite_GetExtendedControl(IOleControlSite *iface, IDispatch **ppDisp)
|
||||
{
|
||||
DocHost *This = impl_from_IOleControlSite(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppDisp);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ControlSite_TransformCoords(IOleControlSite *iface, POINTL *pPtlHimetric,
|
||||
POINTF *pPtfContainer, DWORD dwFlags)
|
||||
{
|
||||
DocHost *This = impl_from_IOleControlSite(iface);
|
||||
FIXME("(%p)->(%p, %p, %08x)\n", This, pPtlHimetric, pPtfContainer, dwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ControlSite_TranslateAccelerator(IOleControlSite *iface, MSG *pMsg,
|
||||
DWORD grfModifiers)
|
||||
{
|
||||
DocHost *This = impl_from_IOleControlSite(iface);
|
||||
IOleObject *wb_obj;
|
||||
IOleClientSite *clientsite;
|
||||
IOleControlSite *controlsite;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p)->(%p, %08x)\n", This, pMsg, grfModifiers);
|
||||
|
||||
hr = IWebBrowser2_QueryInterface(This->wb, &IID_IOleObject, (void**)&wb_obj);
|
||||
if(SUCCEEDED(hr)) {
|
||||
hr = IOleObject_GetClientSite(wb_obj, &clientsite);
|
||||
if(SUCCEEDED(hr)) {
|
||||
hr = IOleClientSite_QueryInterface(clientsite, &IID_IOleControlSite, (void**)&controlsite);
|
||||
if(SUCCEEDED(hr)) {
|
||||
hr = IOleControlSite_TranslateAccelerator(controlsite, pMsg, grfModifiers);
|
||||
IOleControlSite_Release(controlsite);
|
||||
}
|
||||
IOleClientSite_Release(clientsite);
|
||||
}
|
||||
IOleObject_Release(wb_obj);
|
||||
}
|
||||
|
||||
if(FAILED(hr))
|
||||
return S_FALSE;
|
||||
else
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ControlSite_OnFocus(IOleControlSite *iface, BOOL fGotFocus)
|
||||
{
|
||||
DocHost *This = impl_from_IOleControlSite(iface);
|
||||
FIXME("(%p)->(%d)\n", This, fGotFocus);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ControlSite_ShowPropertyFrame(IOleControlSite *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleControlSite(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static IOleControlSiteVtbl OleControlSiteVtbl = {
|
||||
ControlSite_QueryInterface,
|
||||
ControlSite_AddRef,
|
||||
ControlSite_Release,
|
||||
ControlSite_OnControlInfoChanged,
|
||||
ControlSite_LockInPlaceActive,
|
||||
ControlSite_GetExtendedControl,
|
||||
ControlSite_TransformCoords,
|
||||
ControlSite_TranslateAccelerator,
|
||||
ControlSite_OnFocus,
|
||||
ControlSite_ShowPropertyFrame
|
||||
};
|
||||
|
||||
static inline DocHost *impl_from_IDispatch(IDispatch *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, DocHost, IDispatch_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClDispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
DocHost *This = impl_from_IDispatch(iface);
|
||||
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClDispatch_AddRef(IDispatch *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IDispatch(iface);
|
||||
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClDispatch_Release(IDispatch *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IDispatch(iface);
|
||||
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClDispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo)
|
||||
{
|
||||
DocHost *This = impl_from_IDispatch(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pctinfo);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClDispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid,
|
||||
ITypeInfo **ppTInfo)
|
||||
{
|
||||
DocHost *This = impl_from_IDispatch(iface);
|
||||
|
||||
TRACE("(%p)->(%u %d %p)\n", This, iTInfo, lcid, ppTInfo);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClDispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames,
|
||||
UINT cNames, LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
DocHost *This = impl_from_IDispatch(iface);
|
||||
|
||||
TRACE("(%p)->(%s %p %u %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
|
||||
lcid, rgDispId);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const char *debugstr_dispid(DISPID dispid)
|
||||
{
|
||||
static char buf[16];
|
||||
|
||||
#define CASE_DISPID(did) case did: return #did
|
||||
switch(dispid) {
|
||||
CASE_DISPID(DISPID_AMBIENT_USERMODE);
|
||||
CASE_DISPID(DISPID_AMBIENT_DLCONTROL);
|
||||
CASE_DISPID(DISPID_AMBIENT_USERAGENT);
|
||||
CASE_DISPID(DISPID_AMBIENT_PALETTE);
|
||||
CASE_DISPID(DISPID_AMBIENT_OFFLINEIFNOTCONNECTED);
|
||||
CASE_DISPID(DISPID_AMBIENT_SILENT);
|
||||
}
|
||||
#undef CASE_DISPID
|
||||
|
||||
sprintf(buf, "%d", dispid);
|
||||
return buf;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClDispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid,
|
||||
LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
||||
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||
{
|
||||
DocHost *This = impl_from_IDispatch(iface);
|
||||
|
||||
TRACE("(%p)->(%s %s %d %04x %p %p %p %p)\n", This, debugstr_dispid(dispIdMember),
|
||||
debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
|
||||
switch(dispIdMember) {
|
||||
case DISPID_AMBIENT_USERMODE:
|
||||
case DISPID_AMBIENT_DLCONTROL:
|
||||
case DISPID_AMBIENT_USERAGENT:
|
||||
case DISPID_AMBIENT_PALETTE:
|
||||
if(!This->client_disp)
|
||||
return E_FAIL;
|
||||
return IDispatch_Invoke(This->client_disp, dispIdMember, riid, lcid, wFlags,
|
||||
pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED:
|
||||
V_VT(pVarResult) = VT_BOOL;
|
||||
V_BOOL(pVarResult) = This->offline;
|
||||
return S_OK;
|
||||
case DISPID_AMBIENT_SILENT:
|
||||
V_VT(pVarResult) = VT_BOOL;
|
||||
V_BOOL(pVarResult) = This->offline;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
FIXME("unhandled dispid %d\n", dispIdMember);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IDispatchVtbl DispatchVtbl = {
|
||||
ClDispatch_QueryInterface,
|
||||
ClDispatch_AddRef,
|
||||
ClDispatch_Release,
|
||||
ClDispatch_GetTypeInfoCount,
|
||||
ClDispatch_GetTypeInfo,
|
||||
ClDispatch_GetIDsOfNames,
|
||||
ClDispatch_Invoke
|
||||
};
|
||||
|
||||
static inline DocHost *impl_from_IServiceProvider(IServiceProvider *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, DocHost, IServiceProvider_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid,
|
||||
void **ppv)
|
||||
{
|
||||
DocHost *This = impl_from_IServiceProvider(iface);
|
||||
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClServiceProvider_AddRef(IServiceProvider *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IServiceProvider(iface);
|
||||
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClServiceProvider_Release(IServiceProvider *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IServiceProvider(iface);
|
||||
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService,
|
||||
REFIID riid, void **ppv)
|
||||
{
|
||||
DocHost *This = impl_from_IServiceProvider(iface);
|
||||
|
||||
if(IsEqualGUID(&IID_IHlinkFrame, guidService)) {
|
||||
TRACE("(%p)->(IID_IHlinkFrame %s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
|
||||
}
|
||||
|
||||
if(IsEqualGUID(&IID_IWebBrowserApp, guidService)) {
|
||||
TRACE("IWebBrowserApp service\n");
|
||||
return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
|
||||
}
|
||||
|
||||
if(IsEqualGUID(&IID_IShellBrowser, guidService)) {
|
||||
TRACE("(%p)->(IID_IShellBrowser %s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
|
||||
if(!This->browser_service) {
|
||||
HRESULT hres;
|
||||
|
||||
hres = create_browser_service(This, &This->browser_service);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
}
|
||||
|
||||
return IShellBrowser_QueryInterface(&This->browser_service->IShellBrowser_iface, riid, ppv);
|
||||
}
|
||||
|
||||
if(IsEqualGUID(&SID_SNewWindowManager, guidService)) {
|
||||
TRACE("SID_SNewWindowManager service\n");
|
||||
return INewWindowManager_QueryInterface(&This->nwm.INewWindowManager_iface, riid, ppv);
|
||||
}
|
||||
|
||||
FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static const IServiceProviderVtbl ServiceProviderVtbl = {
|
||||
ClServiceProvider_QueryInterface,
|
||||
ClServiceProvider_AddRef,
|
||||
ClServiceProvider_Release,
|
||||
ClServiceProvider_QueryService
|
||||
};
|
||||
|
||||
void DocHost_ClientSite_Init(DocHost *This)
|
||||
{
|
||||
This->IOleClientSite_iface.lpVtbl = &OleClientSiteVtbl;
|
||||
This->IOleInPlaceSiteEx_iface.lpVtbl = &OleInPlaceSiteExVtbl;
|
||||
This->IOleDocumentSite_iface.lpVtbl = &OleDocumentSiteVtbl;
|
||||
This->IOleControlSite_iface.lpVtbl = &OleControlSiteVtbl;
|
||||
This->IDispatch_iface.lpVtbl = &DispatchVtbl;
|
||||
This->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
|
||||
}
|
||||
|
||||
void DocHost_ClientSite_Release(DocHost *This)
|
||||
{
|
||||
if(This->browser_service)
|
||||
detach_browser_service(This->browser_service);
|
||||
if(This->view)
|
||||
IOleDocumentView_Release(This->view);
|
||||
}
|
1002
reactos/dll/win32/ieframe/dochost.c
Normal file
1002
reactos/dll/win32/ieframe/dochost.c
Normal file
File diff suppressed because it is too large
Load diff
320
reactos/dll/win32/ieframe/events.c
Normal file
320
reactos/dll/win32/ieframe/events.c
Normal file
|
@ -0,0 +1,320 @@
|
|||
/*
|
||||
* Implementation of event-related interfaces for WebBrowser control:
|
||||
*
|
||||
* - IConnectionPointContainer
|
||||
* - IConnectionPoint
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
* Copyright 2006 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
|
||||
*/
|
||||
|
||||
//#include <string.h>
|
||||
|
||||
#include "ieframe.h"
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
struct ConnectionPoint {
|
||||
IConnectionPoint IConnectionPoint_iface;
|
||||
|
||||
IConnectionPointContainer *container;
|
||||
|
||||
IDispatch **sinks;
|
||||
DWORD sinks_size;
|
||||
|
||||
IID iid;
|
||||
};
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IConnectionPointContainer interface
|
||||
*/
|
||||
|
||||
static inline ConnectionPointContainer *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ConnectionPointContainer, IConnectionPointContainer_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface,
|
||||
REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
ConnectionPointContainer *This = impl_from_IConnectionPointContainer(iface);
|
||||
return IUnknown_QueryInterface(This->impl, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
|
||||
{
|
||||
ConnectionPointContainer *This = impl_from_IConnectionPointContainer(iface);
|
||||
return IUnknown_AddRef(This->impl);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ConnectionPointContainer_Release(IConnectionPointContainer *iface)
|
||||
{
|
||||
ConnectionPointContainer *This = impl_from_IConnectionPointContainer(iface);
|
||||
return IUnknown_Release(This->impl);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionPointContainer *iface,
|
||||
LPENUMCONNECTIONPOINTS *ppEnum)
|
||||
{
|
||||
ConnectionPointContainer *This = impl_from_IConnectionPointContainer(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppEnum);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface,
|
||||
REFIID riid, LPCONNECTIONPOINT *ppCP)
|
||||
{
|
||||
ConnectionPointContainer *This = impl_from_IConnectionPointContainer(iface);
|
||||
|
||||
if(!ppCP) {
|
||||
WARN("ppCP == NULL\n");
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*ppCP = NULL;
|
||||
|
||||
if(IsEqualGUID(&DIID_DWebBrowserEvents2, riid)) {
|
||||
TRACE("(%p)->(DIID_DWebBrowserEvents2 %p)\n", This, ppCP);
|
||||
*ppCP = &This->wbe2->IConnectionPoint_iface;
|
||||
}else if(IsEqualGUID(&DIID_DWebBrowserEvents, riid)) {
|
||||
TRACE("(%p)->(DIID_DWebBrowserEvents %p)\n", This, ppCP);
|
||||
*ppCP = &This->wbe->IConnectionPoint_iface;
|
||||
}else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) {
|
||||
TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppCP);
|
||||
*ppCP = &This->pns->IConnectionPoint_iface;
|
||||
}
|
||||
|
||||
if(*ppCP) {
|
||||
IConnectionPoint_AddRef(*ppCP);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("Unsupported IID %s\n", debugstr_guid(riid));
|
||||
return CONNECT_E_NOCONNECTION;
|
||||
}
|
||||
|
||||
#undef impl_from_IConnectionPointContainer
|
||||
|
||||
static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl =
|
||||
{
|
||||
ConnectionPointContainer_QueryInterface,
|
||||
ConnectionPointContainer_AddRef,
|
||||
ConnectionPointContainer_Release,
|
||||
ConnectionPointContainer_EnumConnectionPoints,
|
||||
ConnectionPointContainer_FindConnectionPoint
|
||||
};
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IConnectionPoint interface
|
||||
*/
|
||||
|
||||
static inline ConnectionPoint *impl_from_IConnectionPoint(IConnectionPoint *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ConnectionPoint, IConnectionPoint_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface,
|
||||
REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
ConnectionPoint *This = impl_from_IConnectionPoint(iface);
|
||||
|
||||
*ppv = NULL;
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = &This->IConnectionPoint_iface;
|
||||
}else if(IsEqualGUID(&IID_IConnectionPoint, riid)) {
|
||||
TRACE("(%p)->(IID_IConnectionPoint %p)\n", This, ppv);
|
||||
*ppv = &This->IConnectionPoint_iface;
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
IConnectionPointContainer_AddRef(This->container);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("Unsupported interface %s\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ConnectionPoint_AddRef(IConnectionPoint *iface)
|
||||
{
|
||||
ConnectionPoint *This = impl_from_IConnectionPoint(iface);
|
||||
return IConnectionPointContainer_AddRef(This->container);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ConnectionPoint_Release(IConnectionPoint *iface)
|
||||
{
|
||||
ConnectionPoint *This = impl_from_IConnectionPoint(iface);
|
||||
return IConnectionPointContainer_Release(This->container);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *iface, IID *pIID)
|
||||
{
|
||||
ConnectionPoint *This = impl_from_IConnectionPoint(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pIID);
|
||||
|
||||
*pIID = This->iid;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoint *iface,
|
||||
IConnectionPointContainer **ppCPC)
|
||||
{
|
||||
ConnectionPoint *This = impl_from_IConnectionPoint(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, ppCPC);
|
||||
|
||||
*ppCPC = This->container;
|
||||
IConnectionPointContainer_AddRef(This->container);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *pUnkSink,
|
||||
DWORD *pdwCookie)
|
||||
{
|
||||
ConnectionPoint *This = impl_from_IConnectionPoint(iface);
|
||||
IDispatch *disp;
|
||||
DWORD i;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p %p)\n", This, pUnkSink, pdwCookie);
|
||||
|
||||
hres = IUnknown_QueryInterface(pUnkSink, &This->iid, (void**)&disp);
|
||||
if(FAILED(hres)) {
|
||||
hres = IUnknown_QueryInterface(pUnkSink, &IID_IDispatch, (void**)&disp);
|
||||
if(FAILED(hres))
|
||||
return CONNECT_E_CANNOTCONNECT;
|
||||
}
|
||||
|
||||
if(This->sinks) {
|
||||
for(i=0; i<This->sinks_size; i++) {
|
||||
if(!This->sinks[i])
|
||||
break;
|
||||
}
|
||||
|
||||
if(i == This->sinks_size)
|
||||
This->sinks = heap_realloc(This->sinks,
|
||||
(++This->sinks_size)*sizeof(*This->sinks));
|
||||
}else {
|
||||
This->sinks = heap_alloc(sizeof(*This->sinks));
|
||||
This->sinks_size = 1;
|
||||
i = 0;
|
||||
}
|
||||
|
||||
This->sinks[i] = disp;
|
||||
*pdwCookie = i+1;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dwCookie)
|
||||
{
|
||||
ConnectionPoint *This = impl_from_IConnectionPoint(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", This, dwCookie);
|
||||
|
||||
if(!dwCookie || dwCookie > This->sinks_size || !This->sinks[dwCookie-1])
|
||||
return CONNECT_E_NOCONNECTION;
|
||||
|
||||
IDispatch_Release(This->sinks[dwCookie-1]);
|
||||
This->sinks[dwCookie-1] = NULL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface,
|
||||
IEnumConnections **ppEnum)
|
||||
{
|
||||
ConnectionPoint *This = impl_from_IConnectionPoint(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppEnum);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IConnectionPointVtbl ConnectionPointVtbl =
|
||||
{
|
||||
ConnectionPoint_QueryInterface,
|
||||
ConnectionPoint_AddRef,
|
||||
ConnectionPoint_Release,
|
||||
ConnectionPoint_GetConnectionInterface,
|
||||
ConnectionPoint_GetConnectionPointContainer,
|
||||
ConnectionPoint_Advise,
|
||||
ConnectionPoint_Unadvise,
|
||||
ConnectionPoint_EnumConnections
|
||||
};
|
||||
|
||||
void call_sink(ConnectionPoint *This, DISPID dispid, DISPPARAMS *dispparams)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
for(i=0; i<This->sinks_size; i++) {
|
||||
if(This->sinks[i])
|
||||
IDispatch_Invoke(This->sinks[i], dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
|
||||
DISPATCH_METHOD, dispparams, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void ConnectionPoint_Create(REFIID riid, ConnectionPoint **cp,
|
||||
IConnectionPointContainer *container)
|
||||
{
|
||||
ConnectionPoint *ret = heap_alloc(sizeof(ConnectionPoint));
|
||||
|
||||
ret->IConnectionPoint_iface.lpVtbl = &ConnectionPointVtbl;
|
||||
|
||||
ret->sinks = NULL;
|
||||
ret->sinks_size = 0;
|
||||
ret->container = container;
|
||||
|
||||
ret->iid = *riid;
|
||||
|
||||
*cp = ret;
|
||||
}
|
||||
|
||||
static void ConnectionPoint_Destroy(ConnectionPoint *This)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
for(i=0; i<This->sinks_size; i++) {
|
||||
if(This->sinks[i])
|
||||
IDispatch_Release(This->sinks[i]);
|
||||
}
|
||||
|
||||
heap_free(This->sinks);
|
||||
heap_free(This);
|
||||
}
|
||||
|
||||
void ConnectionPointContainer_Init(ConnectionPointContainer *This, IUnknown *impl)
|
||||
{
|
||||
This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl;
|
||||
|
||||
ConnectionPoint_Create(&DIID_DWebBrowserEvents2, &This->wbe2, &This->IConnectionPointContainer_iface);
|
||||
ConnectionPoint_Create(&DIID_DWebBrowserEvents, &This->wbe, &This->IConnectionPointContainer_iface);
|
||||
ConnectionPoint_Create(&IID_IPropertyNotifySink, &This->pns, &This->IConnectionPointContainer_iface);
|
||||
|
||||
This->impl = impl;
|
||||
}
|
||||
|
||||
void ConnectionPointContainer_Destroy(ConnectionPointContainer *This)
|
||||
{
|
||||
ConnectionPoint_Destroy(This->wbe2);
|
||||
ConnectionPoint_Destroy(This->wbe);
|
||||
ConnectionPoint_Destroy(This->pns);
|
||||
}
|
185
reactos/dll/win32/ieframe/frame.c
Normal file
185
reactos/dll/win32/ieframe/frame.c
Normal file
|
@ -0,0 +1,185 @@
|
|||
/*
|
||||
* Copyright 2005 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
|
||||
*/
|
||||
|
||||
#include "ieframe.h"
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
static inline DocHost *impl_from_IOleInPlaceFrame(IOleInPlaceFrame *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, DocHost, IOleInPlaceFrame_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_QueryInterface(IOleInPlaceFrame *iface,
|
||||
REFIID riid, void **ppv)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = &This->IOleInPlaceFrame_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleWindow, riid)) {
|
||||
TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
|
||||
*ppv = &This->IOleInPlaceFrame_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleInPlaceUIWindow, riid)) {
|
||||
TRACE("(%p)->(IID_IOleInPlaceUIWindow %p)\n", This, ppv);
|
||||
*ppv = &This->IOleInPlaceFrame_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleInPlaceFrame, riid)) {
|
||||
TRACE("(%p)->(IID_IOleInPlaceFrame %p)\n", This, ppv);
|
||||
*ppv = &This->IOleInPlaceFrame_iface;
|
||||
}else {
|
||||
*ppv = NULL;
|
||||
WARN("Unsopported interface %s\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI InPlaceFrame_AddRef(IOleInPlaceFrame *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI InPlaceFrame_Release(IOleInPlaceFrame *iface)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_GetWindow(IOleInPlaceFrame *iface, HWND *phwnd)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, phwnd);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame *iface,
|
||||
BOOL fEnterMode)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%x)\n", This, fEnterMode);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_GetBorder(IOleInPlaceFrame *iface, LPRECT lprectBorder)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, lprectBorder);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_RequestBorderSpace(IOleInPlaceFrame *iface,
|
||||
LPCBORDERWIDTHS pborderwidths)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pborderwidths);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_SetBorderSpace(IOleInPlaceFrame *iface,
|
||||
LPCBORDERWIDTHS pborderwidths)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pborderwidths);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_SetActiveObject(IOleInPlaceFrame *iface,
|
||||
IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%p %s)\n", This, pActiveObject, debugstr_w(pszObjName));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_InsertMenus(IOleInPlaceFrame *iface, HMENU hmenuShared,
|
||||
LPOLEMENUGROUPWIDTHS lpMenuWidths)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%p %p)\n", This, hmenuShared, lpMenuWidths);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_SetMenu(IOleInPlaceFrame *iface, HMENU hmenuShared,
|
||||
HOLEMENU holemenu, HWND hwndActiveObject)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%p %p %p)\n", This, hmenuShared, holemenu, hwndActiveObject);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_RemoveMenus(IOleInPlaceFrame *iface, HMENU hmenuShared)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%p)\n", This, hmenuShared);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_SetStatusText(IOleInPlaceFrame *iface,
|
||||
LPCOLESTR pszStatusText)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
TRACE("(%p)->(%s)\n", This, debugstr_w(pszStatusText));
|
||||
return This->container_vtbl->SetStatusText(This, pszStatusText);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_EnableModeless(IOleInPlaceFrame *iface, BOOL fEnable)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%x)\n", This, fEnable);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InPlaceFrame_TranslateAccelerator(IOleInPlaceFrame *iface, LPMSG lpmsg,
|
||||
WORD wID)
|
||||
{
|
||||
DocHost *This = impl_from_IOleInPlaceFrame(iface);
|
||||
FIXME("(%p)->(%p %d)\n", This, lpmsg, wID);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
#undef impl_from_IOleInPlaceFrame
|
||||
|
||||
static const IOleInPlaceFrameVtbl OleInPlaceFrameVtbl = {
|
||||
InPlaceFrame_QueryInterface,
|
||||
InPlaceFrame_AddRef,
|
||||
InPlaceFrame_Release,
|
||||
InPlaceFrame_GetWindow,
|
||||
InPlaceFrame_ContextSensitiveHelp,
|
||||
InPlaceFrame_GetBorder,
|
||||
InPlaceFrame_RequestBorderSpace,
|
||||
InPlaceFrame_SetBorderSpace,
|
||||
InPlaceFrame_SetActiveObject,
|
||||
InPlaceFrame_InsertMenus,
|
||||
InPlaceFrame_SetMenu,
|
||||
InPlaceFrame_RemoveMenus,
|
||||
InPlaceFrame_SetStatusText,
|
||||
InPlaceFrame_EnableModeless,
|
||||
InPlaceFrame_TranslateAccelerator
|
||||
};
|
||||
|
||||
void DocHost_Frame_Init(DocHost *This)
|
||||
{
|
||||
This->IOleInPlaceFrame_iface.lpVtbl = &OleInPlaceFrameVtbl;
|
||||
}
|
759
reactos/dll/win32/ieframe/ie.c
Normal file
759
reactos/dll/win32/ieframe/ie.c
Normal file
|
@ -0,0 +1,759 @@
|
|||
/*
|
||||
* Copyright 2006 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
|
||||
*/
|
||||
|
||||
#include "ieframe.h"
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
static inline InternetExplorer *impl_from_IWebBrowser2(IWebBrowser2 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, InternetExplorer, IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_QueryInterface(IWebBrowser2 *iface, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
|
||||
*ppv = NULL;
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = &This->IWebBrowser2_iface;
|
||||
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
||||
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
||||
*ppv = &This->IWebBrowser2_iface;
|
||||
}else if(IsEqualGUID(&IID_IWebBrowser, riid)) {
|
||||
TRACE("(%p)->(IID_IWebBrowser %p)\n", This, ppv);
|
||||
*ppv = &This->IWebBrowser2_iface;
|
||||
}else if(IsEqualGUID(&IID_IWebBrowserApp, riid)) {
|
||||
TRACE("(%p)->(IID_IWebBrowserApp %p)\n", This, ppv);
|
||||
*ppv = &This->IWebBrowser2_iface;
|
||||
}else if(IsEqualGUID(&IID_IWebBrowser2, riid)) {
|
||||
TRACE("(%p)->(IID_IWebBrowser2 %p)\n", This, ppv);
|
||||
*ppv = &This->IWebBrowser2_iface;
|
||||
}else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
|
||||
TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
|
||||
*ppv = &This->doc_host->doc_host.cps.IConnectionPointContainer_iface;
|
||||
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
|
||||
TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
|
||||
*ppv = &This->IServiceProvider_iface;
|
||||
}else if(HlinkFrame_QI(&This->hlink_frame, riid, ppv)) {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s %p) interface not supported\n", This, debugstr_guid(riid), ppv);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI InternetExplorer_AddRef(IWebBrowser2 *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI InternetExplorer_Release(IWebBrowser2 *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
if(This->doc_host) {
|
||||
deactivate_document(&This->doc_host->doc_host);
|
||||
DocHost_Release(&This->doc_host->doc_host);
|
||||
if(This->doc_host) {
|
||||
This->doc_host->ie = NULL;
|
||||
This->doc_host->doc_host.container_vtbl->release(&This->doc_host->doc_host);
|
||||
}
|
||||
}
|
||||
|
||||
if(This->frame_hwnd)
|
||||
DestroyWindow(This->frame_hwnd);
|
||||
list_remove(&This->entry);
|
||||
heap_free(This);
|
||||
|
||||
released_obj();
|
||||
}
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_GetTypeInfoCount(IWebBrowser2 *iface, UINT *pctinfo)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pctinfo);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_GetTypeInfo(IWebBrowser2 *iface, UINT iTInfo, LCID lcid,
|
||||
LPTYPEINFO *ppTInfo)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_GetIDsOfNames(IWebBrowser2 *iface, REFIID riid,
|
||||
LPOLESTR *rgszNames, UINT cNames,
|
||||
LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%s %p %d %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
|
||||
lcid, rgDispId);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_Invoke(IWebBrowser2 *iface, DISPID dispIdMember,
|
||||
REFIID riid, LCID lcid, WORD wFlags,
|
||||
DISPPARAMS *pDispParams, VARIANT *pVarResult,
|
||||
EXCEPINFO *pExepInfo, UINT *puArgErr)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%d %s %d %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
|
||||
lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_GoBack(IWebBrowser2 *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
TRACE("(%p)\n", This);
|
||||
return go_back(&This->doc_host->doc_host);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_GoForward(IWebBrowser2 *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_GoHome(IWebBrowser2 *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
TRACE("(%p)\n", This);
|
||||
return go_home(&This->doc_host->doc_host);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_GoSearch(IWebBrowser2 *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_Navigate(IWebBrowser2 *iface, BSTR szUrl,
|
||||
VARIANT *Flags, VARIANT *TargetFrameName,
|
||||
VARIANT *PostData, VARIANT *Headers)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
|
||||
TRACE("(%p)->(%s %p %p %p %p)\n", This, debugstr_w(szUrl), Flags, TargetFrameName,
|
||||
PostData, Headers);
|
||||
|
||||
return navigate_url(&This->doc_host->doc_host, szUrl, Flags, TargetFrameName, PostData, Headers);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_Refresh(IWebBrowser2 *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
return refresh_document(&This->doc_host->doc_host);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_Refresh2(IWebBrowser2 *iface, VARIANT *Level)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, Level);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_Stop(IWebBrowser2 *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Application(IWebBrowser2 *iface, IDispatch **ppDisp)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppDisp);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Parent(IWebBrowser2 *iface, IDispatch **ppDisp)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppDisp);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Container(IWebBrowser2 *iface, IDispatch **ppDisp)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppDisp);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Document(IWebBrowser2 *iface, IDispatch **ppDisp)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppDisp);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_TopLevelContainer(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pBool);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Type(IWebBrowser2 *iface, BSTR *Type)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, Type);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Left(IWebBrowser2 *iface, LONG *pl)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pl);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_Left(IWebBrowser2 *iface, LONG Left)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%d)\n", This, Left);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Top(IWebBrowser2 *iface, LONG *pl)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pl);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_Top(IWebBrowser2 *iface, LONG Top)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%d)\n", This, Top);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Width(IWebBrowser2 *iface, LONG *pl)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pl);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_Width(IWebBrowser2 *iface, LONG Width)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%d)\n", This, Width);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Height(IWebBrowser2 *iface, LONG *pl)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pl);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_Height(IWebBrowser2 *iface, LONG Height)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%d)\n", This, Height);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_LocationName(IWebBrowser2 *iface, BSTR *LocationName)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, LocationName);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_LocationURL(IWebBrowser2 *iface, BSTR *LocationURL)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, LocationURL);
|
||||
|
||||
return get_location_url(&This->doc_host->doc_host, LocationURL);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Busy(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pBool);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_Quit(IWebBrowser2 *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_ClientToWindow(IWebBrowser2 *iface, int *pcx, int *pcy)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p %p)\n", This, pcx, pcy);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_PutProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT vtValue)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(szProperty));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_GetProperty(IWebBrowser2 *iface, BSTR szProperty, VARIANT *pvtValue)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%s %p)\n", This, debugstr_w(szProperty), pvtValue);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Name(IWebBrowser2 *iface, BSTR *Name)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, Name);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_HWND(IWebBrowser2 *iface, LONG *pHWND)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pHWND);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_FullName(IWebBrowser2 *iface, BSTR *FullName)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, FullName);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Path(IWebBrowser2 *iface, BSTR *Path)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, Path);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Visible(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pBool);
|
||||
|
||||
*pBool = IsWindowVisible(This->frame_hwnd) ? VARIANT_TRUE : VARIANT_FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_Visible(IWebBrowser2 *iface, VARIANT_BOOL Value)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
TRACE("(%p)->(%x)\n", This, Value);
|
||||
|
||||
ShowWindow(This->frame_hwnd, Value ? SW_SHOW : SW_HIDE);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL *pBool)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pBool);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, Value);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_StatusText(IWebBrowser2 *iface, BSTR *StatusText)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, StatusText);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_StatusText(IWebBrowser2 *iface, BSTR StatusText)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
|
||||
TRACE("(%p)->(%s)\n", This, debugstr_w(StatusText));
|
||||
|
||||
return update_ie_statustext(This, StatusText);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_ToolBar(IWebBrowser2 *iface, int *Value)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, Value);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_ToolBar(IWebBrowser2 *iface, int Value)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%d)\n", This, Value);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, Value);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
HMENU menu = NULL;
|
||||
|
||||
TRACE("(%p)->(%x)\n", This, Value);
|
||||
|
||||
if(Value)
|
||||
menu = This->menu;
|
||||
|
||||
if(!SetMenu(This->frame_hwnd, menu))
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL *pbFullScreen)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pbFullScreen);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_FullScreen(IWebBrowser2 *iface, VARIANT_BOOL bFullScreen)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, bFullScreen);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_Navigate2(IWebBrowser2 *iface, VARIANT *URL, VARIANT *Flags,
|
||||
VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
|
||||
TRACE("(%p)->(%p %p %p %p %p)\n", This, URL, Flags, TargetFrameName, PostData, Headers);
|
||||
|
||||
if(!URL)
|
||||
return S_OK;
|
||||
|
||||
if(V_VT(URL) != VT_BSTR) {
|
||||
FIXME("Unsupported V_VT(URL) %d\n", V_VT(URL));
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
return navigate_url(&This->doc_host->doc_host, V_BSTR(URL), Flags, TargetFrameName, PostData, Headers);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDF *pcmdf)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%d %p)\n", This, cmdID, pcmdf);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_ExecWB(IWebBrowser2 *iface, OLECMDID cmdID,
|
||||
OLECMDEXECOPT cmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%d %d %p %p)\n", This, cmdID, cmdexecopt, pvaIn, pvaOut);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_ShowBrowserBar(IWebBrowser2 *iface, VARIANT *pvaClsid,
|
||||
VARIANT *pvarShow, VARIANT *pvarSize)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p %p %p)\n", This, pvaClsid, pvarShow, pvarSize);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_ReadyState(IWebBrowser2 *iface, READYSTATE *lpReadyState)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, lpReadyState);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Offline(IWebBrowser2 *iface, VARIANT_BOOL *pbOffline)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pbOffline);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_Offline(IWebBrowser2 *iface, VARIANT_BOOL bOffline)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, bOffline);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Silent(IWebBrowser2 *iface, VARIANT_BOOL *pbSilent)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pbSilent);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_Silent(IWebBrowser2 *iface, VARIANT_BOOL bSilent)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, bSilent);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_RegisterAsBrowser(IWebBrowser2 *iface,
|
||||
VARIANT_BOOL *pbRegister)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pbRegister);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_RegisterAsBrowser(IWebBrowser2 *iface,
|
||||
VARIANT_BOOL bRegister)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, bRegister);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_RegisterAsDropTarget(IWebBrowser2 *iface,
|
||||
VARIANT_BOOL *pbRegister)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pbRegister);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_RegisterAsDropTarget(IWebBrowser2 *iface,
|
||||
VARIANT_BOOL bRegister)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, bRegister);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL *pbRegister)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pbRegister);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_TheaterMode(IWebBrowser2 *iface, VARIANT_BOOL bRegister)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, bRegister);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL *Value)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, Value);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_AddressBar(IWebBrowser2 *iface, VARIANT_BOOL Value)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, Value);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_get_Resizable(IWebBrowser2 *iface, VARIANT_BOOL *Value)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, Value);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI InternetExplorer_put_Resizable(IWebBrowser2 *iface, VARIANT_BOOL Value)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IWebBrowser2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, Value);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IWebBrowser2Vtbl InternetExplorerVtbl =
|
||||
{
|
||||
InternetExplorer_QueryInterface,
|
||||
InternetExplorer_AddRef,
|
||||
InternetExplorer_Release,
|
||||
InternetExplorer_GetTypeInfoCount,
|
||||
InternetExplorer_GetTypeInfo,
|
||||
InternetExplorer_GetIDsOfNames,
|
||||
InternetExplorer_Invoke,
|
||||
InternetExplorer_GoBack,
|
||||
InternetExplorer_GoForward,
|
||||
InternetExplorer_GoHome,
|
||||
InternetExplorer_GoSearch,
|
||||
InternetExplorer_Navigate,
|
||||
InternetExplorer_Refresh,
|
||||
InternetExplorer_Refresh2,
|
||||
InternetExplorer_Stop,
|
||||
InternetExplorer_get_Application,
|
||||
InternetExplorer_get_Parent,
|
||||
InternetExplorer_get_Container,
|
||||
InternetExplorer_get_Document,
|
||||
InternetExplorer_get_TopLevelContainer,
|
||||
InternetExplorer_get_Type,
|
||||
InternetExplorer_get_Left,
|
||||
InternetExplorer_put_Left,
|
||||
InternetExplorer_get_Top,
|
||||
InternetExplorer_put_Top,
|
||||
InternetExplorer_get_Width,
|
||||
InternetExplorer_put_Width,
|
||||
InternetExplorer_get_Height,
|
||||
InternetExplorer_put_Height,
|
||||
InternetExplorer_get_LocationName,
|
||||
InternetExplorer_get_LocationURL,
|
||||
InternetExplorer_get_Busy,
|
||||
InternetExplorer_Quit,
|
||||
InternetExplorer_ClientToWindow,
|
||||
InternetExplorer_PutProperty,
|
||||
InternetExplorer_GetProperty,
|
||||
InternetExplorer_get_Name,
|
||||
InternetExplorer_get_HWND,
|
||||
InternetExplorer_get_FullName,
|
||||
InternetExplorer_get_Path,
|
||||
InternetExplorer_get_Visible,
|
||||
InternetExplorer_put_Visible,
|
||||
InternetExplorer_get_StatusBar,
|
||||
InternetExplorer_put_StatusBar,
|
||||
InternetExplorer_get_StatusText,
|
||||
InternetExplorer_put_StatusText,
|
||||
InternetExplorer_get_ToolBar,
|
||||
InternetExplorer_put_ToolBar,
|
||||
InternetExplorer_get_MenuBar,
|
||||
InternetExplorer_put_MenuBar,
|
||||
InternetExplorer_get_FullScreen,
|
||||
InternetExplorer_put_FullScreen,
|
||||
InternetExplorer_Navigate2,
|
||||
InternetExplorer_QueryStatusWB,
|
||||
InternetExplorer_ExecWB,
|
||||
InternetExplorer_ShowBrowserBar,
|
||||
InternetExplorer_get_ReadyState,
|
||||
InternetExplorer_get_Offline,
|
||||
InternetExplorer_put_Offline,
|
||||
InternetExplorer_get_Silent,
|
||||
InternetExplorer_put_Silent,
|
||||
InternetExplorer_get_RegisterAsBrowser,
|
||||
InternetExplorer_put_RegisterAsBrowser,
|
||||
InternetExplorer_get_RegisterAsDropTarget,
|
||||
InternetExplorer_put_RegisterAsDropTarget,
|
||||
InternetExplorer_get_TheaterMode,
|
||||
InternetExplorer_put_TheaterMode,
|
||||
InternetExplorer_get_AddressBar,
|
||||
InternetExplorer_put_AddressBar,
|
||||
InternetExplorer_get_Resizable,
|
||||
InternetExplorer_put_Resizable
|
||||
};
|
||||
|
||||
static inline InternetExplorer *impl_from_IServiceProvider(IServiceProvider *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, InternetExplorer, IServiceProvider_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEServiceProvider_QueryInterface(IServiceProvider *iface,
|
||||
REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IServiceProvider(iface);
|
||||
return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI IEServiceProvider_AddRef(IServiceProvider *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IServiceProvider(iface);
|
||||
return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI IEServiceProvider_Release(IServiceProvider *iface)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IServiceProvider(iface);
|
||||
return IWebBrowser2_Release(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEServiceProvider_QueryService(IServiceProvider *iface,
|
||||
REFGUID guidService, REFIID riid, void **ppv)
|
||||
{
|
||||
InternetExplorer *This = impl_from_IServiceProvider(iface);
|
||||
|
||||
if(IsEqualGUID(&SID_SHTMLWindow, riid)) {
|
||||
TRACE("(%p)->(SID_SHTMLWindow)\n", This);
|
||||
return IHTMLWindow2_QueryInterface(&This->doc_host->doc_host.html_window.IHTMLWindow2_iface, riid, ppv);
|
||||
}
|
||||
|
||||
FIXME("(%p)->(%s, %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
|
||||
*ppv = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static const IServiceProviderVtbl ServiceProviderVtbl =
|
||||
{
|
||||
IEServiceProvider_QueryInterface,
|
||||
IEServiceProvider_AddRef,
|
||||
IEServiceProvider_Release,
|
||||
IEServiceProvider_QueryService
|
||||
};
|
||||
|
||||
void InternetExplorer_WebBrowser_Init(InternetExplorer *This)
|
||||
{
|
||||
This->IWebBrowser2_iface.lpVtbl = &InternetExplorerVtbl;
|
||||
This->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
|
||||
}
|
393
reactos/dll/win32/ieframe/ieframe.h
Normal file
393
reactos/dll/win32/ieframe/ieframe.h
Normal file
|
@ -0,0 +1,393 @@
|
|||
/*
|
||||
* Header includes for ieframe.dll
|
||||
*
|
||||
* Copyright 2011 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
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define WIN32_NO_STATUS
|
||||
#define _INC_WINDOWS
|
||||
#define COM_NO_WINDOWS_H
|
||||
|
||||
#define COBJMACROS
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <wingdi.h>
|
||||
//#include "winuser.h"
|
||||
|
||||
//#include "ole2.h"
|
||||
//#include "olectl.h"
|
||||
#include <shlobj.h>
|
||||
#include <mshtmhst.h>
|
||||
//#include "exdisp.h"
|
||||
#include <hlink.h>
|
||||
#include <htiface.h>
|
||||
//#include "shdeprecated.h"
|
||||
#include <docobjectservice.h>
|
||||
|
||||
#include <wine/unicode.h>
|
||||
#include <wine/list.h>
|
||||
|
||||
typedef struct ConnectionPoint ConnectionPoint;
|
||||
typedef struct DocHost DocHost;
|
||||
|
||||
typedef struct {
|
||||
IConnectionPointContainer IConnectionPointContainer_iface;
|
||||
|
||||
ConnectionPoint *wbe2;
|
||||
ConnectionPoint *wbe;
|
||||
ConnectionPoint *pns;
|
||||
|
||||
IUnknown *impl;
|
||||
} ConnectionPointContainer;
|
||||
|
||||
typedef struct {
|
||||
IHlinkFrame IHlinkFrame_iface;
|
||||
ITargetFrame2 ITargetFrame2_iface;
|
||||
ITargetFramePriv2 ITargetFramePriv2_iface;
|
||||
|
||||
IUnknown *outer;
|
||||
DocHost *doc_host;
|
||||
} HlinkFrame;
|
||||
|
||||
struct _task_header_t;
|
||||
|
||||
typedef void (*task_proc_t)(DocHost*, struct _task_header_t*);
|
||||
typedef void (*task_destr_t)(struct _task_header_t*);
|
||||
|
||||
typedef struct _task_header_t {
|
||||
struct list entry;
|
||||
task_proc_t proc;
|
||||
task_destr_t destr;
|
||||
} task_header_t;
|
||||
|
||||
typedef struct {
|
||||
IShellBrowser IShellBrowser_iface;
|
||||
IBrowserService IBrowserService_iface;
|
||||
IDocObjectService IDocObjectService_iface;
|
||||
|
||||
LONG ref;
|
||||
|
||||
DocHost *doc_host;
|
||||
} ShellBrowser;
|
||||
|
||||
typedef struct {
|
||||
IHTMLWindow2 IHTMLWindow2_iface;
|
||||
DocHost *doc_host;
|
||||
} IEHTMLWindow;
|
||||
|
||||
typedef struct {
|
||||
INewWindowManager INewWindowManager_iface;
|
||||
DocHost *doc_host;
|
||||
} NewWindowManager;
|
||||
|
||||
typedef struct {
|
||||
WCHAR *url;
|
||||
} travellog_entry_t;
|
||||
|
||||
typedef struct _IDocHostContainerVtbl
|
||||
{
|
||||
ULONG (*addref)(DocHost*);
|
||||
ULONG (*release)(DocHost*);
|
||||
void (WINAPI* GetDocObjRect)(DocHost*,RECT*);
|
||||
HRESULT (WINAPI* SetStatusText)(DocHost*,LPCWSTR);
|
||||
void (WINAPI* SetURL)(DocHost*,LPCWSTR);
|
||||
HRESULT (*exec)(DocHost*,const GUID*,DWORD,DWORD,VARIANT*,VARIANT*);
|
||||
} IDocHostContainerVtbl;
|
||||
|
||||
struct DocHost {
|
||||
IOleClientSite IOleClientSite_iface;
|
||||
IOleInPlaceSiteEx IOleInPlaceSiteEx_iface;
|
||||
IDocHostUIHandler2 IDocHostUIHandler2_iface;
|
||||
IOleDocumentSite IOleDocumentSite_iface;
|
||||
IOleControlSite IOleControlSite_iface;
|
||||
IOleCommandTarget IOleCommandTarget_iface;
|
||||
IDispatch IDispatch_iface;
|
||||
IPropertyNotifySink IPropertyNotifySink_iface;
|
||||
IServiceProvider IServiceProvider_iface;
|
||||
|
||||
/* Interfaces of InPlaceFrame object */
|
||||
IOleInPlaceFrame IOleInPlaceFrame_iface;
|
||||
|
||||
IWebBrowser2 *wb;
|
||||
|
||||
IDispatch *client_disp;
|
||||
IDocHostUIHandler *hostui;
|
||||
IOleInPlaceFrame *frame;
|
||||
|
||||
IUnknown *document;
|
||||
IOleDocumentView *view;
|
||||
IUnknown *doc_navigate;
|
||||
|
||||
const IDocHostContainerVtbl *container_vtbl;
|
||||
|
||||
HWND hwnd;
|
||||
HWND frame_hwnd;
|
||||
|
||||
struct list task_queue;
|
||||
|
||||
LPOLESTR url;
|
||||
|
||||
VARIANT_BOOL silent;
|
||||
VARIANT_BOOL offline;
|
||||
VARIANT_BOOL busy;
|
||||
|
||||
READYSTATE ready_state;
|
||||
READYSTATE doc_state;
|
||||
DWORD prop_notif_cookie;
|
||||
BOOL is_prop_notif;
|
||||
|
||||
ShellBrowser *browser_service;
|
||||
IShellUIHelper2 *shell_ui_helper;
|
||||
|
||||
travellog_entry_t *travellog;
|
||||
unsigned travellog_size;
|
||||
unsigned travellog_length;
|
||||
unsigned travellog_position;
|
||||
|
||||
ConnectionPointContainer cps;
|
||||
IEHTMLWindow html_window;
|
||||
NewWindowManager nwm;
|
||||
};
|
||||
|
||||
struct WebBrowser {
|
||||
IWebBrowser2 IWebBrowser2_iface;
|
||||
IOleObject IOleObject_iface;
|
||||
IOleInPlaceObject IOleInPlaceObject_iface;
|
||||
IOleControl IOleControl_iface;
|
||||
IPersistStorage IPersistStorage_iface;
|
||||
IPersistMemory IPersistMemory_iface;
|
||||
IPersistStreamInit IPersistStreamInit_iface;
|
||||
IProvideClassInfo2 IProvideClassInfo2_iface;
|
||||
IViewObject2 IViewObject2_iface;
|
||||
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface;
|
||||
IOleCommandTarget IOleCommandTarget_iface;
|
||||
IServiceProvider IServiceProvider_iface;
|
||||
IDataObject IDataObject_iface;
|
||||
HlinkFrame hlink_frame;
|
||||
|
||||
LONG ref;
|
||||
|
||||
INT version;
|
||||
|
||||
IOleClientSite *client;
|
||||
IOleContainer *container;
|
||||
IOleInPlaceSiteEx *inplace;
|
||||
|
||||
/* window context */
|
||||
|
||||
HWND frame_hwnd;
|
||||
IOleInPlaceUIWindow *uiwindow;
|
||||
RECT pos_rect;
|
||||
RECT clip_rect;
|
||||
OLEINPLACEFRAMEINFO frameinfo;
|
||||
SIZEL extent;
|
||||
|
||||
HWND shell_embedding_hwnd;
|
||||
|
||||
VARIANT_BOOL register_browser;
|
||||
VARIANT_BOOL visible;
|
||||
VARIANT_BOOL menu_bar;
|
||||
VARIANT_BOOL address_bar;
|
||||
VARIANT_BOOL status_bar;
|
||||
VARIANT_BOOL tool_bar;
|
||||
VARIANT_BOOL full_screen;
|
||||
VARIANT_BOOL theater_mode;
|
||||
|
||||
DocHost doc_host;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
DocHost doc_host;
|
||||
|
||||
LONG ref;
|
||||
|
||||
InternetExplorer *ie;
|
||||
} IEDocHost;
|
||||
|
||||
struct InternetExplorer {
|
||||
IWebBrowser2 IWebBrowser2_iface;
|
||||
IServiceProvider IServiceProvider_iface;
|
||||
HlinkFrame hlink_frame;
|
||||
|
||||
LONG ref;
|
||||
|
||||
HWND frame_hwnd;
|
||||
HWND status_hwnd;
|
||||
HMENU menu;
|
||||
BOOL nohome;
|
||||
|
||||
struct list entry;
|
||||
IEDocHost *doc_host;
|
||||
};
|
||||
|
||||
void WebBrowser_OleObject_Init(WebBrowser*) DECLSPEC_HIDDEN;
|
||||
void WebBrowser_ViewObject_Init(WebBrowser*) DECLSPEC_HIDDEN;
|
||||
void WebBrowser_Persist_Init(WebBrowser*) DECLSPEC_HIDDEN;
|
||||
void WebBrowser_ClassInfo_Init(WebBrowser*) DECLSPEC_HIDDEN;
|
||||
|
||||
void WebBrowser_OleObject_Destroy(WebBrowser*) DECLSPEC_HIDDEN;
|
||||
|
||||
void DocHost_Init(DocHost*,IWebBrowser2*,const IDocHostContainerVtbl*) DECLSPEC_HIDDEN;
|
||||
void DocHost_Release(DocHost*) DECLSPEC_HIDDEN;
|
||||
void DocHost_ClientSite_Init(DocHost*) DECLSPEC_HIDDEN;
|
||||
void DocHost_ClientSite_Release(DocHost*) DECLSPEC_HIDDEN;
|
||||
void DocHost_Frame_Init(DocHost*) DECLSPEC_HIDDEN;
|
||||
void release_dochost_client(DocHost*) DECLSPEC_HIDDEN;
|
||||
|
||||
void IEHTMLWindow_Init(DocHost*) DECLSPEC_HIDDEN;
|
||||
void NewWindowManager_Init(DocHost*) DECLSPEC_HIDDEN;
|
||||
|
||||
void HlinkFrame_Init(HlinkFrame*,IUnknown*,DocHost*) DECLSPEC_HIDDEN;
|
||||
BOOL HlinkFrame_QI(HlinkFrame*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT create_browser_service(DocHost*,ShellBrowser**) DECLSPEC_HIDDEN;
|
||||
void detach_browser_service(ShellBrowser*) DECLSPEC_HIDDEN;
|
||||
HRESULT create_shell_ui_helper(IShellUIHelper2**) DECLSPEC_HIDDEN;
|
||||
|
||||
void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*) DECLSPEC_HIDDEN;
|
||||
void ConnectionPointContainer_Destroy(ConnectionPointContainer*) DECLSPEC_HIDDEN;
|
||||
|
||||
void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*) DECLSPEC_HIDDEN;
|
||||
HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*) DECLSPEC_HIDDEN;
|
||||
HRESULT go_home(DocHost*) DECLSPEC_HIDDEN;
|
||||
HRESULT go_back(DocHost*) DECLSPEC_HIDDEN;
|
||||
HRESULT refresh_document(DocHost*) DECLSPEC_HIDDEN;
|
||||
HRESULT get_location_url(DocHost*,BSTR*) DECLSPEC_HIDDEN;
|
||||
HRESULT set_dochost_url(DocHost*,const WCHAR*) DECLSPEC_HIDDEN;
|
||||
void handle_navigation_error(DocHost*,HRESULT,BSTR,IHTMLWindow2*) DECLSPEC_HIDDEN;
|
||||
HRESULT dochost_object_available(DocHost*,IUnknown*) DECLSPEC_HIDDEN;
|
||||
void set_doc_state(DocHost*,READYSTATE) DECLSPEC_HIDDEN;
|
||||
void deactivate_document(DocHost*) DECLSPEC_HIDDEN;
|
||||
void create_doc_view_hwnd(DocHost*) DECLSPEC_HIDDEN;
|
||||
|
||||
#define WM_DOCHOSTTASK (WM_USER+0x300)
|
||||
void push_dochost_task(DocHost*,task_header_t*,task_proc_t,task_destr_t,BOOL) DECLSPEC_HIDDEN;
|
||||
void abort_dochost_tasks(DocHost*,task_proc_t) DECLSPEC_HIDDEN;
|
||||
LRESULT process_dochost_tasks(DocHost*) DECLSPEC_HIDDEN;
|
||||
|
||||
void InternetExplorer_WebBrowser_Init(InternetExplorer*) DECLSPEC_HIDDEN;
|
||||
HRESULT update_ie_statustext(InternetExplorer*, LPCWSTR) DECLSPEC_HIDDEN;
|
||||
void released_obj(void) DECLSPEC_HIDDEN;
|
||||
|
||||
void register_iewindow_class(void) DECLSPEC_HIDDEN;
|
||||
void unregister_iewindow_class(void) DECLSPEC_HIDDEN;
|
||||
|
||||
#define TID_LIST \
|
||||
XCLSID(WebBrowser) \
|
||||
XCLSID(WebBrowser_V1) \
|
||||
XIID(IWebBrowser2)
|
||||
|
||||
typedef enum {
|
||||
#define XIID(iface) iface ## _tid,
|
||||
#define XCLSID(class) class ## _tid,
|
||||
TID_LIST
|
||||
#undef XIID
|
||||
#undef XCLSID
|
||||
LAST_tid
|
||||
} tid_t;
|
||||
|
||||
HRESULT get_typeinfo(tid_t,ITypeInfo**) DECLSPEC_HIDDEN;
|
||||
HRESULT register_class_object(BOOL) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT WINAPI CUrlHistory_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
HRESULT WINAPI InternetExplorer_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
HRESULT WINAPI InternetShortcut_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
HRESULT WINAPI WebBrowser_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
HRESULT WINAPI WebBrowserV1_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
|
||||
const char *debugstr_variant(const VARIANT*) DECLSPEC_HIDDEN;
|
||||
|
||||
extern LONG module_ref DECLSPEC_HIDDEN;
|
||||
extern HINSTANCE ieframe_instance DECLSPEC_HIDDEN;
|
||||
|
||||
static inline void lock_module(void) {
|
||||
InterlockedIncrement(&module_ref);
|
||||
}
|
||||
|
||||
static inline void unlock_module(void) {
|
||||
InterlockedDecrement(&module_ref);
|
||||
}
|
||||
|
||||
static inline void *heap_alloc(size_t len)
|
||||
{
|
||||
return HeapAlloc(GetProcessHeap(), 0, len);
|
||||
}
|
||||
|
||||
static inline void *heap_alloc_zero(size_t len)
|
||||
{
|
||||
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
||||
}
|
||||
|
||||
static inline void *heap_realloc(void *mem, size_t len)
|
||||
{
|
||||
return HeapReAlloc(GetProcessHeap(), 0, mem, len);
|
||||
}
|
||||
|
||||
static inline BOOL heap_free(void *mem)
|
||||
{
|
||||
return HeapFree(GetProcessHeap(), 0, mem);
|
||||
}
|
||||
|
||||
static inline LPWSTR heap_strdupW(LPCWSTR str)
|
||||
{
|
||||
LPWSTR ret = NULL;
|
||||
|
||||
if(str) {
|
||||
DWORD size;
|
||||
|
||||
size = (strlenW(str)+1)*sizeof(WCHAR);
|
||||
ret = heap_alloc(size);
|
||||
if(ret)
|
||||
memcpy(ret, str, size);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline LPWSTR co_strdupW(LPCWSTR str)
|
||||
{
|
||||
WCHAR *ret = CoTaskMemAlloc((strlenW(str) + 1)*sizeof(WCHAR));
|
||||
if (ret)
|
||||
lstrcpyW(ret, str);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline LPWSTR co_strdupAtoW(LPCSTR str)
|
||||
{
|
||||
INT len;
|
||||
WCHAR *ret;
|
||||
len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||
ret = CoTaskMemAlloc(len*sizeof(WCHAR));
|
||||
if (ret)
|
||||
MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline LPSTR co_strdupWtoA(LPCWSTR str)
|
||||
{
|
||||
INT len;
|
||||
CHAR *ret;
|
||||
len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, 0, 0);
|
||||
ret = CoTaskMemAlloc(len);
|
||||
if (ret)
|
||||
WideCharToMultiByte(CP_ACP, 0, str, -1, ret, len, 0, 0);
|
||||
return ret;
|
||||
}
|
117
reactos/dll/win32/ieframe/ieframe.rc
Normal file
117
reactos/dll/win32/ieframe/ieframe.rc
Normal file
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* Copyright 2011 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
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
||||
|
||||
IDR_BROWSE_MAIN_MENU MENU
|
||||
{
|
||||
POPUP "&File"
|
||||
{
|
||||
POPUP "&New"
|
||||
{
|
||||
MENUITEM "&Window", ID_BROWSE_NEW_WINDOW
|
||||
}
|
||||
MENUITEM "&Open...", ID_BROWSE_OPEN
|
||||
MENUITEM "&Save", ID_BROWSE_SAVE
|
||||
MENUITEM "Save &as...", ID_BROWSE_SAVE_AS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Print &format...", ID_BROWSE_PRINT_FORMAT
|
||||
MENUITEM "Pr&int...", ID_BROWSE_PRINT
|
||||
MENUITEM "Print previe&w", ID_BROWSE_PRINT_PREVIEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Properties", ID_BROWSE_PROPERTIES
|
||||
MENUITEM "&Close", ID_BROWSE_QUIT
|
||||
}
|
||||
POPUP "&View"
|
||||
{
|
||||
POPUP "&Toolbars"
|
||||
{
|
||||
MENUITEM "&Standard bar", ID_BROWSE_BAR_STD
|
||||
MENUITEM "&Address bar", ID_BROWSE_BAR_ADDR
|
||||
}
|
||||
}
|
||||
POPUP "&Favorites"
|
||||
{
|
||||
MENUITEM "&Add to Favorites...", ID_BROWSE_ADDFAV
|
||||
MENUITEM SEPARATOR
|
||||
}
|
||||
POPUP "&Help"
|
||||
{
|
||||
MENUITEM "&About Internet Explorer", ID_BROWSE_ABOUT
|
||||
}
|
||||
}
|
||||
|
||||
STRINGTABLE
|
||||
{
|
||||
IDS_TB_BACK "Back"
|
||||
IDS_TB_FORWARD "Forward"
|
||||
IDS_TB_STOP "Stop"
|
||||
IDS_TB_REFRESH "Refresh"
|
||||
IDS_TB_HOME "#msgctxt#home page#Home"
|
||||
IDS_TB_PRINT "Print..."
|
||||
}
|
||||
|
||||
STRINGTABLE
|
||||
{
|
||||
IDS_ADDRESS "Address"
|
||||
}
|
||||
|
||||
STRINGTABLE
|
||||
{
|
||||
IDS_FINDINGRESOURCE "Searching for %s"
|
||||
IDS_BEGINDOWNLOADDATA "Start downloading %s"
|
||||
IDS_ENDDOWNLOADDATA "Downloading %s"
|
||||
IDS_SENDINGREQUEST "Asking for %s"
|
||||
}
|
||||
|
||||
|
||||
IDD_BROWSE_OPEN DIALOG 10, 10, 200, 70
|
||||
STYLE DS_MODALFRAME | WS_CAPTION
|
||||
CAPTION "Open URL"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
LTEXT "Specify the URL you wish to open in Internet Explorer",-1, 35,5,160,25
|
||||
LTEXT "Open:", -1, 5, 32, 30, 15
|
||||
EDITTEXT IDC_BROWSE_OPEN_URL, 35, 30, 160, 13
|
||||
DEFPUSHBUTTON "OK", IDOK, 90, 50, 50, 14
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 145, 50, 50, 14
|
||||
}
|
||||
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
||||
#define WINE_FILEDESCRIPTION_STR "Internet Browser"
|
||||
#define WINE_FILENAME_STR "ieframe.dll"
|
||||
#define WINE_FILEVERSION 8,00,7601,17601
|
||||
#define WINE_FILEVERSION_STR "8.00.7601.17601"
|
||||
#define WINE_PRODUCTVERSION 8,00,7601,17601
|
||||
#define WINE_PRODUCTVERSION_STR "8.00.7601.17601"
|
||||
#define WINE_EXTRAVALUES VALUE "OLESelfRegister",""
|
||||
|
||||
#include "wine/wine_common_ver.rc"
|
||||
|
||||
/* @makedep: ietoolbar.bmp */
|
||||
IDB_IETOOLBAR BITMAP ietoolbar.bmp
|
||||
|
||||
/* @makedep: ieframe.rgs */
|
||||
2 WINE_REGISTRY ieframe.rgs
|
||||
|
||||
3 WINE_REGISTRY ieframe_v1.rgs
|
||||
|
||||
1 TYPELIB ieframe_v1.tlb
|
73
reactos/dll/win32/ieframe/ieframe.rgs
Normal file
73
reactos/dll/win32/ieframe/ieframe.rgs
Normal file
|
@ -0,0 +1,73 @@
|
|||
HKLM
|
||||
{
|
||||
NoRemove 'Software'
|
||||
{
|
||||
NoRemove 'Microsoft'
|
||||
{
|
||||
NoRemove 'Windows'
|
||||
{
|
||||
NoRemove 'CurrentVersion'
|
||||
{
|
||||
NoRemove 'URL'
|
||||
{
|
||||
DefaultPrefix = s 'http://'
|
||||
Prefixes
|
||||
{
|
||||
val 'ftp' = s 'ftp://'
|
||||
val 'gopher' = s 'gopher://'
|
||||
val 'home' = s 'http://'
|
||||
val 'mosaic' = s 'http://'
|
||||
val 'www' = s 'http://'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HKCR
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
'{fbf23b40-e3f0-101b-8488-00aa003e56f8}'
|
||||
{
|
||||
shellex
|
||||
{
|
||||
MayChangeDefaultMenu {}
|
||||
}
|
||||
}
|
||||
}
|
||||
'InternetShortcut'
|
||||
{
|
||||
val 'EditFlags' = s '2'
|
||||
val 'IsShortcut' = s ''
|
||||
val 'NeverShowExt' = s ''
|
||||
DefaultIcon = s 'url.dll,0'
|
||||
shell
|
||||
{
|
||||
open
|
||||
{
|
||||
command = s 'rundll32.exe ieframe.dll,OpenURL %%l'
|
||||
}
|
||||
}
|
||||
}
|
||||
ForceRemove '.url' = s 'InternetShortcut'
|
||||
|
||||
ftp
|
||||
{
|
||||
val 'URL Protocol' = s ''
|
||||
}
|
||||
http
|
||||
{
|
||||
val 'URL Protocol' = s ''
|
||||
}
|
||||
https
|
||||
{
|
||||
val 'URL Protocol' = s ''
|
||||
}
|
||||
mailto
|
||||
{
|
||||
val 'URL Protocol' = s ''
|
||||
}
|
||||
}
|
9
reactos/dll/win32/ieframe/ieframe.spec
Normal file
9
reactos/dll/win32/ieframe/ieframe.spec
Normal file
|
@ -0,0 +1,9 @@
|
|||
# ordinal exports
|
||||
101 stdcall -noname IEWinMain(str long)
|
||||
|
||||
@ stdcall -private DllCanUnloadNow()
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stdcall -private DllRegisterServer()
|
||||
@ stdcall -private DllUnregisterServer()
|
||||
@ stdcall IEGetWriteableHKCU(ptr)
|
||||
@ stdcall OpenURL(long long str long)
|
326
reactos/dll/win32/ieframe/ieframe_main.c
Normal file
326
reactos/dll/win32/ieframe/ieframe_main.c
Normal file
|
@ -0,0 +1,326 @@
|
|||
/*
|
||||
* Copyright 2011 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
|
||||
*/
|
||||
|
||||
#include "ieframe.h"
|
||||
|
||||
#include <rpcproxy.h>
|
||||
//#include "shlguid.h"
|
||||
//#include "isguids.h"
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
LONG module_ref = 0;
|
||||
HINSTANCE ieframe_instance;
|
||||
|
||||
const char *debugstr_variant(const VARIANT *v)
|
||||
{
|
||||
if(!v)
|
||||
return "(null)";
|
||||
|
||||
switch(V_VT(v)) {
|
||||
case VT_EMPTY:
|
||||
return "{VT_EMPTY}";
|
||||
case VT_NULL:
|
||||
return "{VT_NULL}";
|
||||
case VT_I4:
|
||||
return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v));
|
||||
case VT_R8:
|
||||
return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v));
|
||||
case VT_BSTR:
|
||||
return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v)));
|
||||
case VT_DISPATCH:
|
||||
return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v));
|
||||
case VT_BOOL:
|
||||
return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v));
|
||||
default:
|
||||
return wine_dbg_sprintf("{vt %d}", V_VT(v));
|
||||
}
|
||||
}
|
||||
|
||||
static ITypeLib *typelib;
|
||||
static ITypeInfo *typeinfos[LAST_tid];
|
||||
|
||||
static REFIID tid_ids[] = {
|
||||
#define XIID(iface) &IID_ ## iface,
|
||||
#define XCLSID(class) &CLSID_ ## class,
|
||||
TID_LIST
|
||||
#undef XIID
|
||||
#undef XCLSID
|
||||
};
|
||||
|
||||
static HRESULT load_typelib(void)
|
||||
{
|
||||
HRESULT hres;
|
||||
ITypeLib *tl;
|
||||
|
||||
hres = LoadRegTypeLib(&LIBID_SHDocVw, 1, 1, LOCALE_SYSTEM_DEFAULT, &tl);
|
||||
if(FAILED(hres)) {
|
||||
ERR("LoadRegTypeLib failed: %08x\n", hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
if(InterlockedCompareExchangePointer((void**)&typelib, tl, NULL))
|
||||
ITypeLib_Release(tl);
|
||||
return hres;
|
||||
}
|
||||
|
||||
HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
if(!typelib)
|
||||
hres = load_typelib();
|
||||
if(!typelib)
|
||||
return hres;
|
||||
|
||||
if(!typeinfos[tid]) {
|
||||
ITypeInfo *ti;
|
||||
|
||||
hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti);
|
||||
if(FAILED(hres)) {
|
||||
ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), ti, NULL))
|
||||
ITypeInfo_Release(ti);
|
||||
}
|
||||
|
||||
*typeinfo = typeinfos[tid];
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void release_typelib(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
if(!typelib)
|
||||
return;
|
||||
|
||||
for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) {
|
||||
if(typeinfos[i])
|
||||
ITypeInfo_Release(typeinfos[i]);
|
||||
}
|
||||
|
||||
ITypeLib_Release(typelib);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
*ppv = NULL;
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
|
||||
*ppv = iface;
|
||||
}else if(IsEqualGUID(&IID_IClassFactory, riid)) {
|
||||
TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
|
||||
*ppv = iface;
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
|
||||
{
|
||||
TRACE("(%p)\n", iface);
|
||||
return 2;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
|
||||
{
|
||||
TRACE("(%p)\n", iface);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
|
||||
{
|
||||
TRACE("(%p)->(%x)\n", iface, fLock);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IClassFactoryVtbl WebBrowserFactoryVtbl = {
|
||||
ClassFactory_QueryInterface,
|
||||
ClassFactory_AddRef,
|
||||
ClassFactory_Release,
|
||||
WebBrowser_Create,
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
static IClassFactory WebBrowserFactory = { &WebBrowserFactoryVtbl };
|
||||
|
||||
static const IClassFactoryVtbl WebBrowserV1FactoryVtbl = {
|
||||
ClassFactory_QueryInterface,
|
||||
ClassFactory_AddRef,
|
||||
ClassFactory_Release,
|
||||
WebBrowserV1_Create,
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
static IClassFactory WebBrowserV1Factory = { &WebBrowserV1FactoryVtbl };
|
||||
|
||||
static const IClassFactoryVtbl InternetShortcutFactoryVtbl = {
|
||||
ClassFactory_QueryInterface,
|
||||
ClassFactory_AddRef,
|
||||
ClassFactory_Release,
|
||||
InternetShortcut_Create,
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
static IClassFactory InternetShortcutFactory = { &InternetShortcutFactoryVtbl };
|
||||
|
||||
static const IClassFactoryVtbl CUrlHistoryFactoryVtbl = {
|
||||
ClassFactory_QueryInterface,
|
||||
ClassFactory_AddRef,
|
||||
ClassFactory_Release,
|
||||
CUrlHistory_Create,
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
static IClassFactory CUrlHistoryFactory = { &CUrlHistoryFactoryVtbl };
|
||||
|
||||
/******************************************************************
|
||||
* DllMain (ieframe.@)
|
||||
*/
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
||||
{
|
||||
TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv);
|
||||
|
||||
switch(fdwReason)
|
||||
{
|
||||
case DLL_WINE_PREATTACH:
|
||||
return FALSE; /* prefer native version */
|
||||
case DLL_PROCESS_ATTACH:
|
||||
ieframe_instance = hInstDLL;
|
||||
register_iewindow_class();
|
||||
DisableThreadLibraryCalls(ieframe_instance);
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
unregister_iewindow_class();
|
||||
release_typelib();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject (ieframe.@)
|
||||
*/
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
if(IsEqualGUID(&CLSID_WebBrowser, rclsid)) {
|
||||
TRACE("(CLSID_WebBrowser %s %p)\n", debugstr_guid(riid), ppv);
|
||||
return IClassFactory_QueryInterface(&WebBrowserFactory, riid, ppv);
|
||||
}
|
||||
|
||||
if(IsEqualGUID(&CLSID_WebBrowser_V1, rclsid)) {
|
||||
TRACE("(CLSID_WebBrowser_V1 %s %p)\n", debugstr_guid(riid), ppv);
|
||||
return IClassFactory_QueryInterface(&WebBrowserV1Factory, riid, ppv);
|
||||
}
|
||||
|
||||
if(IsEqualGUID(rclsid, &CLSID_InternetShortcut)) {
|
||||
TRACE("(CLSID_InternetShortcut %s %p)\n", debugstr_guid(riid), ppv);
|
||||
return IClassFactory_QueryInterface(&InternetShortcutFactory, riid, ppv);
|
||||
}
|
||||
|
||||
if(IsEqualGUID(&CLSID_CUrlHistory, rclsid)) {
|
||||
TRACE("(CLSID_CUrlHistory %s %p)\n", debugstr_guid(riid), ppv);
|
||||
return IClassFactory_QueryInterface(&CUrlHistoryFactory, riid, ppv);
|
||||
}
|
||||
|
||||
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
static const IClassFactoryVtbl InternetExplorerFactoryVtbl = {
|
||||
ClassFactory_QueryInterface,
|
||||
ClassFactory_AddRef,
|
||||
ClassFactory_Release,
|
||||
InternetExplorer_Create,
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
static IClassFactory InternetExplorerFactory = { &InternetExplorerFactoryVtbl };
|
||||
|
||||
HRESULT register_class_object(BOOL do_reg)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
static DWORD cookie;
|
||||
|
||||
if(do_reg) {
|
||||
hres = CoRegisterClassObject(&CLSID_InternetExplorer,
|
||||
(IUnknown*)&InternetExplorerFactory, CLSCTX_SERVER,
|
||||
REGCLS_MULTIPLEUSE|REGCLS_SUSPENDED, &cookie);
|
||||
if (FAILED(hres)) {
|
||||
ERR("failed to register object %08x\n", hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
hres = CoResumeClassObjects();
|
||||
if(SUCCEEDED(hres))
|
||||
return hres;
|
||||
|
||||
ERR("failed to resume object %08x\n", hres);
|
||||
}
|
||||
|
||||
return CoRevokeClassObject(cookie);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllCanUnloadNow (ieframe.@)
|
||||
*/
|
||||
HRESULT WINAPI DllCanUnloadNow(void)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return module_ref ? S_FALSE : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (ieframe.@)
|
||||
*/
|
||||
HRESULT WINAPI DllRegisterServer(void)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return __wine_register_resources(ieframe_instance);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer (ieframe.@)
|
||||
*/
|
||||
HRESULT WINAPI DllUnregisterServer(void)
|
||||
{
|
||||
TRACE("()\n");
|
||||
return __wine_unregister_resources(ieframe_instance);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* IEGetWriteableHKCU (ieframe.@)
|
||||
*/
|
||||
HRESULT WINAPI IEGetWriteableHKCU(HKEY *pkey)
|
||||
{
|
||||
FIXME("(%p) stub\n", pkey);
|
||||
return E_NOTIMPL;
|
||||
}
|
43
reactos/dll/win32/ieframe/ieframe_v1.idl
Normal file
43
reactos/dll/win32/ieframe/ieframe_v1.idl
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright 2006 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
|
||||
*/
|
||||
|
||||
#include "exdisp.idl"
|
||||
|
||||
[
|
||||
threading(apartment),
|
||||
uuid(871c5380-42a0-1069-a2ea-08002b30309d)
|
||||
] coclass Internet { }
|
||||
|
||||
[
|
||||
helpstring("Microsoft Url History Service"),
|
||||
threading(apartment),
|
||||
uuid(3c374a40-bae4-11cf-bf7d-00aa006946ee)
|
||||
] coclass CUrlHistory { interface IUrlHistoryStg2; }
|
||||
|
||||
[
|
||||
helpstring("Internet Shortcut"),
|
||||
threading(apartment),
|
||||
progid("InternetShortcut"),
|
||||
uuid(fbf23b40-e3f0-101b-8488-00aa003e56f8)
|
||||
] coclass InternetShortcut
|
||||
{
|
||||
interface IUniformResourceLocatorA;
|
||||
interface IUniformResourceLocatorW;
|
||||
interface IPersistFile;
|
||||
interface IPropertySetStorage;
|
||||
}
|
26
reactos/dll/win32/ieframe/ieframe_v1.rgs
Normal file
26
reactos/dll/win32/ieframe/ieframe_v1.rgs
Normal file
|
@ -0,0 +1,26 @@
|
|||
HKCR
|
||||
{
|
||||
NoRemove Interface
|
||||
{
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
'{871C5380-42A0-1069-A2EA-08002B30309D}' = s 'Internet'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{3C374A40-BAE4-11CF-BF7D-00AA006946EE}' = s 'Microsoft Url History Service'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{FBF23B40-E3F0-101B-8488-00AA003E56F8}' = s 'Internet Shortcut'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
ProgId = s 'InternetShortcut'
|
||||
}
|
||||
}
|
||||
'InternetShortcut' = s 'Internet Shortcut'
|
||||
{
|
||||
CLSID = s '{FBF23B40-E3F0-101B-8488-00AA003E56F8}'
|
||||
}
|
||||
}
|
695
reactos/dll/win32/ieframe/iehtmlwnd.c
Normal file
695
reactos/dll/win32/ieframe/iehtmlwnd.c
Normal file
|
@ -0,0 +1,695 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "ieframe.h"
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
static inline IEHTMLWindow *impl_from_IHTMLWindow2(IHTMLWindow2 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, IEHTMLWindow, IHTMLWindow2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_QueryInterface(IHTMLWindow2 *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = &This->IHTMLWindow2_iface;
|
||||
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
||||
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
||||
*ppv = &This->IHTMLWindow2_iface;
|
||||
}else if(IsEqualGUID(&IID_IHTMLFramesCollection2, riid)) {
|
||||
TRACE("(%p)->(IID_IHTMLFramesCollection2 %p)\n", This, ppv);
|
||||
*ppv = &This->IHTMLWindow2_iface;
|
||||
}else if(IsEqualGUID(&IID_IHTMLWindow2, riid)) {
|
||||
TRACE("(%p)->(IID_IHTMLWindow2 %p)\n", This, ppv);
|
||||
*ppv = &This->IHTMLWindow2_iface;
|
||||
}else {
|
||||
WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
*ppv = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IEHTMLWindow2_AddRef(IHTMLWindow2 *iface)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
return IOleClientSite_AddRef(&This->doc_host->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI IEHTMLWindow2_Release(IHTMLWindow2 *iface)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
return IOleClientSite_Release(&This->doc_host->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_GetTypeInfoCount(IHTMLWindow2 *iface, UINT *pctinfo)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_GetTypeInfo(IHTMLWindow2 *iface, UINT iTInfo,
|
||||
LCID lcid, ITypeInfo **ppTInfo)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_GetIDsOfNames(IHTMLWindow2 *iface, REFIID riid,
|
||||
LPOLESTR *rgszNames, UINT cNames,
|
||||
LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_Invoke(IHTMLWindow2 *iface, DISPID dispIdMember,
|
||||
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
||||
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, VARIANT *pvarResult)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p %p)\n", This, pvarIndex, pvarResult);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_length(IHTMLWindow2 *iface, LONG *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_frames(IHTMLWindow2 *iface, IHTMLFramesCollection2 **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_defaultStatus(IHTMLWindow2 *iface, BSTR v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_defaultStatus(IHTMLWindow2 *iface, BSTR *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_status(IHTMLWindow2 *iface, BSTR v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_status(IHTMLWindow2 *iface, BSTR *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_setTimeout(IHTMLWindow2 *iface, BSTR expression,
|
||||
LONG msec, VARIANT *language, LONG *timerID)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s %d %p %p)\n", This, debugstr_w(expression), msec, language, timerID);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_clearTimeout(IHTMLWindow2 *iface, LONG timerID)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%d)\n", This, timerID);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_alert(IHTMLWindow2 *iface, BSTR message)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(message));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_confirm(IHTMLWindow2 *iface, BSTR message,
|
||||
VARIANT_BOOL *confirmed)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s %p)\n", This, debugstr_w(message), confirmed);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_prompt(IHTMLWindow2 *iface, BSTR message,
|
||||
BSTR dststr, VARIANT *textdata)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(message), debugstr_w(dststr), textdata);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_Image(IHTMLWindow2 *iface, IHTMLImageElementFactory **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_location(IHTMLWindow2 *iface, IHTMLLocation **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_history(IHTMLWindow2 *iface, IOmHistory **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_close(IHTMLWindow2 *iface)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
|
||||
FIXME("(%p) semi-stub\n", This);
|
||||
|
||||
if(!This->doc_host->wb)
|
||||
return E_UNEXPECTED;
|
||||
|
||||
return IWebBrowser2_put_Visible(This->doc_host->wb, VARIANT_FALSE);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_opener(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_opener(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_navigator(IHTMLWindow2 *iface, IOmNavigator **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_name(IHTMLWindow2 *iface, BSTR v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_name(IHTMLWindow2 *iface, BSTR *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_parent(IHTMLWindow2 *iface, IHTMLWindow2 **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
|
||||
BSTR features, VARIANT_BOOL replace, IHTMLWindow2 **pomWindowResult)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s %s %s %x %p)\n", This, debugstr_w(url), debugstr_w(name),
|
||||
debugstr_w(features), replace, pomWindowResult);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_self(IHTMLWindow2 *iface, IHTMLWindow2 **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_top(IHTMLWindow2 *iface, IHTMLWindow2 **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_window(IHTMLWindow2 *iface, IHTMLWindow2 **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_navigate(IHTMLWindow2 *iface, BSTR url)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(url));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_onfocus(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_onfocus(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_onblur(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_onblur(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_onload(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_onload(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_onbeforeunload(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_onbeforeunload(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_onunload(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_onunload(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_onhelp(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_onhelp(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_onerror(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_onerror(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_onresize(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_onresize(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_onscroll(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_onscroll(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_document(IHTMLWindow2 *iface, IHTMLDocument2 **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_event(IHTMLWindow2 *iface, IHTMLEventObj **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get__newEnum(IHTMLWindow2 *iface, IUnknown **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_showModalDialog(IHTMLWindow2 *iface, BSTR dialog,
|
||||
VARIANT *varArgIn, VARIANT *varOptions, VARIANT *varArgOut)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s %p %p %p)\n", This, debugstr_w(dialog), varArgIn, varOptions, varArgOut);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_showHelp(IHTMLWindow2 *iface, BSTR helpURL, VARIANT helpArg,
|
||||
BSTR features)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s v(%d) %s)\n", This, debugstr_w(helpURL), V_VT(&helpArg), debugstr_w(features));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_screen(IHTMLWindow2 *iface, IHTMLScreen **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_Option(IHTMLWindow2 *iface, IHTMLOptionElementFactory **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_focus(IHTMLWindow2 *iface)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_closed(IHTMLWindow2 *iface, VARIANT_BOOL *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_blur(IHTMLWindow2 *iface)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_scroll(IHTMLWindow2 *iface, LONG x, LONG y)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%d %d)\n", This, x, y);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_clientInformation(IHTMLWindow2 *iface, IOmNavigator **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_setInterval(IHTMLWindow2 *iface, BSTR expression,
|
||||
LONG msec, VARIANT *language, LONG *timerID)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s %d %p %p)\n", This, debugstr_w(expression), msec, language, timerID);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_clearInterval(IHTMLWindow2 *iface, LONG timerID)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%d)\n", This, timerID);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_put_offscreenBuffering(IHTMLWindow2 *iface, VARIANT v)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(v(%d))\n", This, V_VT(&v));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_offscreenBuffering(IHTMLWindow2 *iface, VARIANT *p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_execScript(IHTMLWindow2 *iface, BSTR scode, BSTR language,
|
||||
VARIANT *pvarRet)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(scode), debugstr_w(language), pvarRet);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_toString(IHTMLWindow2 *iface, BSTR *String)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, String);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_scrollBy(IHTMLWindow2 *iface, LONG x, LONG y)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%d %d)\n", This, x, y);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_scrollTo(IHTMLWindow2 *iface, LONG x, LONG y)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%d %d)\n", This, x, y);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_moveTo(IHTMLWindow2 *iface, LONG x, LONG y)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%d %d)\n", This, x, y);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_moveBy(IHTMLWindow2 *iface, LONG x, LONG y)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%d %d)\n", This, x, y);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_resizeTo(IHTMLWindow2 *iface, LONG x, LONG y)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%d %d)\n", This, x, y);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_resizeBy(IHTMLWindow2 *iface, LONG x, LONG y)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%d %d)\n", This, x, y);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IEHTMLWindow2_get_external(IHTMLWindow2 *iface, IDispatch **p)
|
||||
{
|
||||
IEHTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IHTMLWindow2Vtbl IEHTMLWindow2Vtbl = {
|
||||
IEHTMLWindow2_QueryInterface,
|
||||
IEHTMLWindow2_AddRef,
|
||||
IEHTMLWindow2_Release,
|
||||
IEHTMLWindow2_GetTypeInfoCount,
|
||||
IEHTMLWindow2_GetTypeInfo,
|
||||
IEHTMLWindow2_GetIDsOfNames,
|
||||
IEHTMLWindow2_Invoke,
|
||||
IEHTMLWindow2_item,
|
||||
IEHTMLWindow2_get_length,
|
||||
IEHTMLWindow2_get_frames,
|
||||
IEHTMLWindow2_put_defaultStatus,
|
||||
IEHTMLWindow2_get_defaultStatus,
|
||||
IEHTMLWindow2_put_status,
|
||||
IEHTMLWindow2_get_status,
|
||||
IEHTMLWindow2_setTimeout,
|
||||
IEHTMLWindow2_clearTimeout,
|
||||
IEHTMLWindow2_alert,
|
||||
IEHTMLWindow2_confirm,
|
||||
IEHTMLWindow2_prompt,
|
||||
IEHTMLWindow2_get_Image,
|
||||
IEHTMLWindow2_get_location,
|
||||
IEHTMLWindow2_get_history,
|
||||
IEHTMLWindow2_close,
|
||||
IEHTMLWindow2_put_opener,
|
||||
IEHTMLWindow2_get_opener,
|
||||
IEHTMLWindow2_get_navigator,
|
||||
IEHTMLWindow2_put_name,
|
||||
IEHTMLWindow2_get_name,
|
||||
IEHTMLWindow2_get_parent,
|
||||
IEHTMLWindow2_open,
|
||||
IEHTMLWindow2_get_self,
|
||||
IEHTMLWindow2_get_top,
|
||||
IEHTMLWindow2_get_window,
|
||||
IEHTMLWindow2_navigate,
|
||||
IEHTMLWindow2_put_onfocus,
|
||||
IEHTMLWindow2_get_onfocus,
|
||||
IEHTMLWindow2_put_onblur,
|
||||
IEHTMLWindow2_get_onblur,
|
||||
IEHTMLWindow2_put_onload,
|
||||
IEHTMLWindow2_get_onload,
|
||||
IEHTMLWindow2_put_onbeforeunload,
|
||||
IEHTMLWindow2_get_onbeforeunload,
|
||||
IEHTMLWindow2_put_onunload,
|
||||
IEHTMLWindow2_get_onunload,
|
||||
IEHTMLWindow2_put_onhelp,
|
||||
IEHTMLWindow2_get_onhelp,
|
||||
IEHTMLWindow2_put_onerror,
|
||||
IEHTMLWindow2_get_onerror,
|
||||
IEHTMLWindow2_put_onresize,
|
||||
IEHTMLWindow2_get_onresize,
|
||||
IEHTMLWindow2_put_onscroll,
|
||||
IEHTMLWindow2_get_onscroll,
|
||||
IEHTMLWindow2_get_document,
|
||||
IEHTMLWindow2_get_event,
|
||||
IEHTMLWindow2_get__newEnum,
|
||||
IEHTMLWindow2_showModalDialog,
|
||||
IEHTMLWindow2_showHelp,
|
||||
IEHTMLWindow2_get_screen,
|
||||
IEHTMLWindow2_get_Option,
|
||||
IEHTMLWindow2_focus,
|
||||
IEHTMLWindow2_get_closed,
|
||||
IEHTMLWindow2_blur,
|
||||
IEHTMLWindow2_scroll,
|
||||
IEHTMLWindow2_get_clientInformation,
|
||||
IEHTMLWindow2_setInterval,
|
||||
IEHTMLWindow2_clearInterval,
|
||||
IEHTMLWindow2_put_offscreenBuffering,
|
||||
IEHTMLWindow2_get_offscreenBuffering,
|
||||
IEHTMLWindow2_execScript,
|
||||
IEHTMLWindow2_toString,
|
||||
IEHTMLWindow2_scrollBy,
|
||||
IEHTMLWindow2_scrollTo,
|
||||
IEHTMLWindow2_moveTo,
|
||||
IEHTMLWindow2_moveBy,
|
||||
IEHTMLWindow2_resizeTo,
|
||||
IEHTMLWindow2_resizeBy,
|
||||
IEHTMLWindow2_get_external
|
||||
};
|
||||
|
||||
void IEHTMLWindow_Init(DocHost *doc_host)
|
||||
{
|
||||
doc_host->html_window.IHTMLWindow2_iface.lpVtbl = &IEHTMLWindow2Vtbl;
|
||||
doc_host->html_window.doc_host = doc_host;
|
||||
}
|
BIN
reactos/dll/win32/ieframe/ietoolbar.bmp
Normal file
BIN
reactos/dll/win32/ieframe/ietoolbar.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
1094
reactos/dll/win32/ieframe/iexplore.c
Normal file
1094
reactos/dll/win32/ieframe/iexplore.c
Normal file
File diff suppressed because it is too large
Load diff
897
reactos/dll/win32/ieframe/intshcut.c
Normal file
897
reactos/dll/win32/ieframe/intshcut.c
Normal file
|
@ -0,0 +1,897 @@
|
|||
/*
|
||||
* Copyright 2008 Damjan Jovanovic
|
||||
*
|
||||
* ShellLink's barely documented cousin that handles URLs.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* Implement the IShellLinkA/W interfaces
|
||||
* Handle the SetURL flags
|
||||
* Implement any other interfaces? Does any software actually use them?
|
||||
*
|
||||
* The installer for the Zuma Deluxe Popcap game is good for testing.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ieframe.h"
|
||||
|
||||
//#include "shlobj.h"
|
||||
//#include "shobjidl.h"
|
||||
#include <intshcut.h>
|
||||
#include <shellapi.h>
|
||||
#include <winreg.h>
|
||||
//#include "shlwapi.h"
|
||||
//#include "shlguid.h"
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
IUniformResourceLocatorA IUniformResourceLocatorA_iface;
|
||||
IUniformResourceLocatorW IUniformResourceLocatorW_iface;
|
||||
IPersistFile IPersistFile_iface;
|
||||
IPropertySetStorage IPropertySetStorage_iface;
|
||||
|
||||
LONG refCount;
|
||||
|
||||
IPropertySetStorage *property_set_storage;
|
||||
WCHAR *url;
|
||||
BOOLEAN isDirty;
|
||||
LPOLESTR currentFile;
|
||||
} InternetShortcut;
|
||||
|
||||
/* utility functions */
|
||||
|
||||
static inline InternetShortcut* impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, InternetShortcut, IUniformResourceLocatorA_iface);
|
||||
}
|
||||
|
||||
static inline InternetShortcut* impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, InternetShortcut, IUniformResourceLocatorW_iface);
|
||||
}
|
||||
|
||||
static inline InternetShortcut* impl_from_IPersistFile(IPersistFile *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, InternetShortcut, IPersistFile_iface);
|
||||
}
|
||||
|
||||
static inline InternetShortcut* impl_from_IPropertySetStorage(IPropertySetStorage *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, InternetShortcut, IPropertySetStorage_iface);
|
||||
}
|
||||
|
||||
static BOOL run_winemenubuilder( const WCHAR *args )
|
||||
{
|
||||
static const WCHAR menubuilder[] = {'\\','w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e',0};
|
||||
LONG len;
|
||||
LPWSTR buffer;
|
||||
STARTUPINFOW si;
|
||||
PROCESS_INFORMATION pi;
|
||||
BOOL ret;
|
||||
WCHAR app[MAX_PATH];
|
||||
void *redir;
|
||||
|
||||
GetSystemDirectoryW( app, MAX_PATH - sizeof(menubuilder)/sizeof(WCHAR) );
|
||||
strcatW( app, menubuilder );
|
||||
|
||||
len = (strlenW( app ) + strlenW( args ) + 1) * sizeof(WCHAR);
|
||||
buffer = heap_alloc( len );
|
||||
if( !buffer )
|
||||
return FALSE;
|
||||
|
||||
strcpyW( buffer, app );
|
||||
strcatW( buffer, args );
|
||||
|
||||
TRACE("starting %s\n",debugstr_w(buffer));
|
||||
|
||||
memset(&si, 0, sizeof(si));
|
||||
si.cb = sizeof(si);
|
||||
|
||||
Wow64DisableWow64FsRedirection( &redir );
|
||||
ret = CreateProcessW( app, buffer, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi );
|
||||
Wow64RevertWow64FsRedirection( redir );
|
||||
|
||||
heap_free( buffer );
|
||||
|
||||
if (ret)
|
||||
{
|
||||
CloseHandle( pi.hProcess );
|
||||
CloseHandle( pi.hThread );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static BOOL StartLinkProcessor( LPCOLESTR szLink )
|
||||
{
|
||||
static const WCHAR szFormat[] = { ' ','-','w',' ','-','u',' ','"','%','s','"',0 };
|
||||
LONG len;
|
||||
LPWSTR buffer;
|
||||
BOOL ret;
|
||||
|
||||
len = sizeof(szFormat) + lstrlenW( szLink ) * sizeof(WCHAR);
|
||||
buffer = heap_alloc( len );
|
||||
if( !buffer )
|
||||
return FALSE;
|
||||
|
||||
sprintfW( buffer, szFormat, szLink );
|
||||
ret = run_winemenubuilder( buffer );
|
||||
heap_free( buffer );
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* interface functions */
|
||||
|
||||
static HRESULT Unknown_QueryInterface(InternetShortcut *This, REFIID riid, PVOID *ppvObject)
|
||||
{
|
||||
TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
|
||||
*ppvObject = NULL;
|
||||
if (IsEqualGUID(&IID_IUnknown, riid))
|
||||
*ppvObject = &This->IUniformResourceLocatorA_iface;
|
||||
else if (IsEqualGUID(&IID_IUniformResourceLocatorA, riid))
|
||||
*ppvObject = &This->IUniformResourceLocatorA_iface;
|
||||
else if (IsEqualGUID(&IID_IUniformResourceLocatorW, riid))
|
||||
*ppvObject = &This->IUniformResourceLocatorW_iface;
|
||||
else if (IsEqualGUID(&IID_IPersistFile, riid))
|
||||
*ppvObject = &This->IPersistFile_iface;
|
||||
else if (IsEqualGUID(&IID_IPropertySetStorage, riid))
|
||||
*ppvObject = &This->IPropertySetStorage_iface;
|
||||
else if (IsEqualGUID(&IID_IShellLinkA, riid))
|
||||
{
|
||||
FIXME("The IShellLinkA interface is not yet supported by InternetShortcut\n");
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IShellLinkW, riid))
|
||||
{
|
||||
FIXME("The IShellLinkW interface is not yet supported by InternetShortcut\n");
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
else
|
||||
{
|
||||
FIXME("Interface with GUID %s not yet implemented by InternetShortcut\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
IUnknown_AddRef((IUnknown*)*ppvObject);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG Unknown_AddRef(InternetShortcut *This)
|
||||
{
|
||||
TRACE("(%p)\n", This);
|
||||
return InterlockedIncrement(&This->refCount);
|
||||
}
|
||||
|
||||
static ULONG Unknown_Release(InternetShortcut *This)
|
||||
{
|
||||
ULONG count;
|
||||
TRACE("(%p)\n", This);
|
||||
count = InterlockedDecrement(&This->refCount);
|
||||
if (count == 0)
|
||||
{
|
||||
CoTaskMemFree(This->url);
|
||||
CoTaskMemFree(This->currentFile);
|
||||
IPropertySetStorage_Release(This->property_set_storage);
|
||||
heap_free(This);
|
||||
unlock_module();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UniformResourceLocatorW_QueryInterface(IUniformResourceLocatorW *url, REFIID riid, PVOID *ppvObject)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorW(url);
|
||||
TRACE("(%p, %s, %p)\n", url, debugstr_guid(riid), ppvObject);
|
||||
return Unknown_QueryInterface(This, riid, ppvObject);
|
||||
}
|
||||
|
||||
static ULONG WINAPI UniformResourceLocatorW_AddRef(IUniformResourceLocatorW *url)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorW(url);
|
||||
TRACE("(%p)\n", url);
|
||||
return Unknown_AddRef(This);
|
||||
}
|
||||
|
||||
static ULONG WINAPI UniformResourceLocatorW_Release(IUniformResourceLocatorW *url)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorW(url);
|
||||
TRACE("(%p)\n", url);
|
||||
return Unknown_Release(This);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UniformResourceLocatorW_SetUrl(IUniformResourceLocatorW *url, LPCWSTR pcszURL, DWORD dwInFlags)
|
||||
{
|
||||
WCHAR *newURL = NULL;
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorW(url);
|
||||
TRACE("(%p, %s, 0x%x)\n", url, debugstr_w(pcszURL), dwInFlags);
|
||||
if (dwInFlags != 0)
|
||||
FIXME("ignoring unsupported flags 0x%x\n", dwInFlags);
|
||||
if (pcszURL != NULL)
|
||||
{
|
||||
newURL = co_strdupW(pcszURL);
|
||||
if (newURL == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
CoTaskMemFree(This->url);
|
||||
This->url = newURL;
|
||||
This->isDirty = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UniformResourceLocatorW_GetUrl(IUniformResourceLocatorW *url, LPWSTR *ppszURL)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorW(url);
|
||||
|
||||
TRACE("(%p, %p)\n", url, ppszURL);
|
||||
|
||||
if (!This->url) {
|
||||
*ppszURL = NULL;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
*ppszURL = co_strdupW(This->url);
|
||||
if (!*ppszURL)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UniformResourceLocatorW_InvokeCommand(IUniformResourceLocatorW *url, PURLINVOKECOMMANDINFOW pCommandInfo)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorW(url);
|
||||
WCHAR app[64];
|
||||
HKEY hkey;
|
||||
static const WCHAR wszURLProtocol[] = {'U','R','L',' ','P','r','o','t','o','c','o','l',0};
|
||||
SHELLEXECUTEINFOW sei;
|
||||
DWORD res, type;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("%p %p\n", This, pCommandInfo );
|
||||
|
||||
if (pCommandInfo->dwcbSize < sizeof (URLINVOKECOMMANDINFOW))
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (pCommandInfo->dwFlags != IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB)
|
||||
{
|
||||
FIXME("(%p, %p): non-default verbs not implemented\n", url, pCommandInfo);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
hres = CoInternetParseUrl(This->url, PARSE_SCHEMA, 0, app, sizeof(app)/sizeof(WCHAR), NULL, 0);
|
||||
if(FAILED(hres))
|
||||
return E_FAIL;
|
||||
|
||||
res = RegOpenKeyW(HKEY_CLASSES_ROOT, app, &hkey);
|
||||
if(res != ERROR_SUCCESS)
|
||||
return E_FAIL;
|
||||
|
||||
res = RegQueryValueExW(hkey, wszURLProtocol, NULL, &type, NULL, NULL);
|
||||
RegCloseKey(hkey);
|
||||
if(res != ERROR_SUCCESS || type != REG_SZ)
|
||||
return E_FAIL;
|
||||
|
||||
memset(&sei, 0, sizeof(sei));
|
||||
sei.cbSize = sizeof(sei);
|
||||
sei.lpFile = This->url;
|
||||
sei.nShow = SW_SHOW;
|
||||
|
||||
if( ShellExecuteExW(&sei) )
|
||||
return S_OK;
|
||||
else
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UniformResourceLocatorA_QueryInterface(IUniformResourceLocatorA *url, REFIID riid, PVOID *ppvObject)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorA(url);
|
||||
TRACE("(%p, %s, %p)\n", url, debugstr_guid(riid), ppvObject);
|
||||
return Unknown_QueryInterface(This, riid, ppvObject);
|
||||
}
|
||||
|
||||
static ULONG WINAPI UniformResourceLocatorA_AddRef(IUniformResourceLocatorA *url)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorA(url);
|
||||
TRACE("(%p)\n", url);
|
||||
return Unknown_AddRef(This);
|
||||
}
|
||||
|
||||
static ULONG WINAPI UniformResourceLocatorA_Release(IUniformResourceLocatorA *url)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorA(url);
|
||||
TRACE("(%p)\n", url);
|
||||
return Unknown_Release(This);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UniformResourceLocatorA_SetUrl(IUniformResourceLocatorA *url, LPCSTR pcszURL, DWORD dwInFlags)
|
||||
{
|
||||
WCHAR *newURL = NULL;
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorA(url);
|
||||
TRACE("(%p, %s, 0x%x)\n", url, debugstr_a(pcszURL), dwInFlags);
|
||||
if (dwInFlags != 0)
|
||||
FIXME("ignoring unsupported flags 0x%x\n", dwInFlags);
|
||||
if (pcszURL != NULL)
|
||||
{
|
||||
newURL = co_strdupAtoW(pcszURL);
|
||||
if (newURL == NULL)
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
CoTaskMemFree(This->url);
|
||||
This->url = newURL;
|
||||
This->isDirty = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UniformResourceLocatorA_GetUrl(IUniformResourceLocatorA *url, LPSTR *ppszURL)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorA(url);
|
||||
|
||||
TRACE("(%p, %p)\n", url, ppszURL);
|
||||
|
||||
if (!This->url) {
|
||||
*ppszURL = NULL;
|
||||
return S_FALSE;
|
||||
|
||||
}
|
||||
|
||||
*ppszURL = co_strdupWtoA(This->url);
|
||||
if (!*ppszURL)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UniformResourceLocatorA_InvokeCommand(IUniformResourceLocatorA *url, PURLINVOKECOMMANDINFOA pCommandInfo)
|
||||
{
|
||||
URLINVOKECOMMANDINFOW wideCommandInfo;
|
||||
int len;
|
||||
WCHAR *wideVerb;
|
||||
HRESULT res;
|
||||
InternetShortcut *This = impl_from_IUniformResourceLocatorA(url);
|
||||
|
||||
wideCommandInfo.dwcbSize = sizeof wideCommandInfo;
|
||||
wideCommandInfo.dwFlags = pCommandInfo->dwFlags;
|
||||
wideCommandInfo.hwndParent = pCommandInfo->hwndParent;
|
||||
|
||||
len = MultiByteToWideChar(CP_ACP, 0, pCommandInfo->pcszVerb, -1, NULL, 0);
|
||||
wideVerb = heap_alloc(len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, pCommandInfo->pcszVerb, -1, wideVerb, len);
|
||||
|
||||
wideCommandInfo.pcszVerb = wideVerb;
|
||||
|
||||
res = UniformResourceLocatorW_InvokeCommand(&This->IUniformResourceLocatorW_iface, &wideCommandInfo);
|
||||
heap_free(wideVerb);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *pFile, REFIID riid, PVOID *ppvObject)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IPersistFile(pFile);
|
||||
TRACE("(%p, %s, %p)\n", pFile, debugstr_guid(riid), ppvObject);
|
||||
return Unknown_QueryInterface(This, riid, ppvObject);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PersistFile_AddRef(IPersistFile *pFile)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IPersistFile(pFile);
|
||||
TRACE("(%p)\n", pFile);
|
||||
return Unknown_AddRef(This);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PersistFile_Release(IPersistFile *pFile)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IPersistFile(pFile);
|
||||
TRACE("(%p)\n", pFile);
|
||||
return Unknown_Release(This);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *pFile, CLSID *pClassID)
|
||||
{
|
||||
TRACE("(%p, %p)\n", pFile, pClassID);
|
||||
*pClassID = CLSID_InternetShortcut;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistFile_IsDirty(IPersistFile *pFile)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IPersistFile(pFile);
|
||||
TRACE("(%p)\n", pFile);
|
||||
return This->isDirty ? S_OK : S_FALSE;
|
||||
}
|
||||
|
||||
/* A helper function: Allocate and fill rString. Return number of bytes read. */
|
||||
static DWORD get_profile_string(LPCWSTR lpAppName, LPCWSTR lpKeyName,
|
||||
LPCWSTR lpFileName, WCHAR **rString )
|
||||
{
|
||||
DWORD r = 0;
|
||||
DWORD len = 128;
|
||||
WCHAR *buffer;
|
||||
|
||||
buffer = CoTaskMemAlloc(len * sizeof(*buffer));
|
||||
if (buffer != NULL)
|
||||
{
|
||||
r = GetPrivateProfileStringW(lpAppName, lpKeyName, NULL, buffer, len, lpFileName);
|
||||
while (r == len-1)
|
||||
{
|
||||
WCHAR *realloc_buf;
|
||||
|
||||
len *= 2;
|
||||
realloc_buf = CoTaskMemRealloc(buffer, len * sizeof(*buffer));
|
||||
if (realloc_buf == NULL)
|
||||
{
|
||||
CoTaskMemFree(buffer);
|
||||
*rString = NULL;
|
||||
return 0;
|
||||
}
|
||||
buffer = realloc_buf;
|
||||
|
||||
r = GetPrivateProfileStringW(lpAppName, lpKeyName, NULL, buffer, len, lpFileName);
|
||||
}
|
||||
}
|
||||
|
||||
*rString = buffer;
|
||||
return r;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileName, DWORD dwMode)
|
||||
{
|
||||
WCHAR str_header[] = {'I','n','t','e','r','n','e','t','S','h','o','r','t','c','u','t',0};
|
||||
WCHAR str_URL[] = {'U','R','L',0};
|
||||
WCHAR str_iconfile[] = {'i','c','o','n','f','i','l','e',0};
|
||||
WCHAR str_iconindex[] = {'i','c','o','n','i','n','d','e','x',0};
|
||||
WCHAR *filename = NULL;
|
||||
HRESULT hr;
|
||||
InternetShortcut *This = impl_from_IPersistFile(pFile);
|
||||
TRACE("(%p, %s, 0x%x)\n", pFile, debugstr_w(pszFileName), dwMode);
|
||||
if (dwMode != 0)
|
||||
FIXME("ignoring unimplemented mode 0x%x\n", dwMode);
|
||||
filename = co_strdupW(pszFileName);
|
||||
if (filename != NULL)
|
||||
{
|
||||
DWORD r;
|
||||
WCHAR *url;
|
||||
|
||||
r = get_profile_string(str_header, str_URL, pszFileName, &url);
|
||||
|
||||
if (url == NULL)
|
||||
{
|
||||
hr = E_OUTOFMEMORY;
|
||||
CoTaskMemFree(filename);
|
||||
}
|
||||
else if (r == 0)
|
||||
{
|
||||
hr = E_FAIL;
|
||||
CoTaskMemFree(filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
hr = S_OK;
|
||||
CoTaskMemFree(This->currentFile);
|
||||
This->currentFile = filename;
|
||||
CoTaskMemFree(This->url);
|
||||
This->url = url;
|
||||
This->isDirty = FALSE;
|
||||
}
|
||||
|
||||
/* Now we're going to read in the iconfile and iconindex.
|
||||
If we don't find them, that's not a failure case -- it's possible
|
||||
that they just aren't in there. */
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
IPropertyStorage *pPropStg;
|
||||
WCHAR *iconfile;
|
||||
WCHAR *iconindexstring;
|
||||
hr = IPropertySetStorage_Open(This->property_set_storage, &FMTID_Intshcut,
|
||||
STGM_READWRITE | STGM_SHARE_EXCLUSIVE,
|
||||
&pPropStg);
|
||||
|
||||
r = get_profile_string(str_header, str_iconfile, pszFileName, &iconfile);
|
||||
if (iconfile != NULL)
|
||||
{
|
||||
PROPSPEC ps;
|
||||
PROPVARIANT pv;
|
||||
ps.ulKind = PRSPEC_PROPID;
|
||||
ps.u.propid = PID_IS_ICONFILE;
|
||||
pv.vt = VT_LPWSTR;
|
||||
pv.u.pwszVal = iconfile;
|
||||
hr = IPropertyStorage_WriteMultiple(pPropStg, 1, &ps, &pv, 0);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
TRACE("Failed to store the iconfile to our property storage. hr = 0x%x\n", hr);
|
||||
}
|
||||
|
||||
CoTaskMemFree(iconfile);
|
||||
}
|
||||
|
||||
r = get_profile_string(str_header, str_iconindex, pszFileName, &iconindexstring);
|
||||
|
||||
if (iconindexstring != NULL)
|
||||
{
|
||||
int iconindex;
|
||||
PROPSPEC ps;
|
||||
PROPVARIANT pv;
|
||||
char *iconindexastring = co_strdupWtoA(iconindexstring);
|
||||
sscanf(iconindexastring, "%d", &iconindex);
|
||||
CoTaskMemFree(iconindexastring);
|
||||
ps.ulKind = PRSPEC_PROPID;
|
||||
ps.u.propid = PID_IS_ICONINDEX;
|
||||
pv.vt = VT_I4;
|
||||
pv.u.iVal = iconindex;
|
||||
hr = IPropertyStorage_WriteMultiple(pPropStg, 1, &ps, &pv, 0);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
TRACE("Failed to store the iconindex to our property storage. hr = 0x%x\n", hr);
|
||||
}
|
||||
|
||||
CoTaskMemFree(iconindexstring);
|
||||
}
|
||||
|
||||
IPropertyStorage_Release(pPropStg);
|
||||
}
|
||||
else
|
||||
hr = E_OUTOFMEMORY;
|
||||
}
|
||||
else
|
||||
hr = E_OUTOFMEMORY;
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistFile_Save(IPersistFile *pFile, LPCOLESTR pszFileName, BOOL fRemember)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
INT len;
|
||||
CHAR *url;
|
||||
InternetShortcut *This = impl_from_IPersistFile(pFile);
|
||||
|
||||
TRACE("(%p, %s, %d)\n", pFile, debugstr_w(pszFileName), fRemember);
|
||||
|
||||
if (pszFileName != NULL && fRemember)
|
||||
{
|
||||
LPOLESTR oldFile = This->currentFile;
|
||||
This->currentFile = co_strdupW(pszFileName);
|
||||
if (This->currentFile == NULL)
|
||||
{
|
||||
This->currentFile = oldFile;
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
CoTaskMemFree(oldFile);
|
||||
}
|
||||
if (This->url == NULL)
|
||||
return E_FAIL;
|
||||
|
||||
/* Windows seems to always write:
|
||||
* ASCII "[InternetShortcut]" headers
|
||||
* ASCII names in "name=value" pairs
|
||||
* An ASCII (probably UTF8?) value in "URL=..."
|
||||
*/
|
||||
len = WideCharToMultiByte(CP_UTF8, 0, This->url, -1, NULL, 0, 0, 0);
|
||||
url = heap_alloc(len);
|
||||
if (url != NULL)
|
||||
{
|
||||
HANDLE file;
|
||||
WideCharToMultiByte(CP_UTF8, 0, This->url, -1, url, len, 0, 0);
|
||||
file = CreateFileW(pszFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (file != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
DWORD bytesWritten;
|
||||
char *iconfile;
|
||||
char str_header[] = "[InternetShortcut]";
|
||||
char str_URL[] = "URL=";
|
||||
char str_ICONFILE[] = "ICONFILE=";
|
||||
char str_eol[] = "\r\n";
|
||||
IPropertyStorage *pPropStgRead;
|
||||
PROPSPEC ps[2];
|
||||
PROPVARIANT pvread[2];
|
||||
ps[0].ulKind = PRSPEC_PROPID;
|
||||
ps[0].u.propid = PID_IS_ICONFILE;
|
||||
ps[1].ulKind = PRSPEC_PROPID;
|
||||
ps[1].u.propid = PID_IS_ICONINDEX;
|
||||
|
||||
WriteFile(file, str_header, lstrlenA(str_header), &bytesWritten, NULL);
|
||||
WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL);
|
||||
WriteFile(file, str_URL, lstrlenA(str_URL), &bytesWritten, NULL);
|
||||
WriteFile(file, url, lstrlenA(url), &bytesWritten, NULL);
|
||||
WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL);
|
||||
|
||||
hr = IPropertySetStorage_Open(This->property_set_storage, &FMTID_Intshcut, STGM_READ|STGM_SHARE_EXCLUSIVE, &pPropStgRead);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = IPropertyStorage_ReadMultiple(pPropStgRead, 2, ps, pvread);
|
||||
if (hr == S_FALSE)
|
||||
{
|
||||
/* None of the properties are present, that's ok */
|
||||
hr = S_OK;
|
||||
IPropertyStorage_Release(pPropStgRead);
|
||||
}
|
||||
else if (SUCCEEDED(hr))
|
||||
{
|
||||
char indexString[50];
|
||||
len = WideCharToMultiByte(CP_UTF8, 0, pvread[0].u.pwszVal, -1, NULL, 0, 0, 0);
|
||||
iconfile = heap_alloc(len);
|
||||
if (iconfile != NULL)
|
||||
{
|
||||
WideCharToMultiByte(CP_UTF8, 0, pvread[0].u.pwszVal, -1, iconfile, len, 0, 0);
|
||||
WriteFile(file, str_ICONFILE, lstrlenA(str_ICONFILE), &bytesWritten, NULL);
|
||||
WriteFile(file, iconfile, lstrlenA(iconfile), &bytesWritten, NULL);
|
||||
WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL);
|
||||
}
|
||||
|
||||
sprintf(indexString, "ICONINDEX=%d", pvread[1].u.iVal);
|
||||
WriteFile(file, indexString, lstrlenA(indexString), &bytesWritten, NULL);
|
||||
WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL);
|
||||
|
||||
IPropertyStorage_Release(pPropStgRead);
|
||||
PropVariantClear(&pvread[0]);
|
||||
PropVariantClear(&pvread[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE("Unable to read properties.\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE("Unable to get the IPropertyStorage.\n");
|
||||
}
|
||||
|
||||
CloseHandle(file);
|
||||
if (pszFileName == NULL || fRemember)
|
||||
This->isDirty = FALSE;
|
||||
StartLinkProcessor(pszFileName);
|
||||
}
|
||||
else
|
||||
hr = E_FAIL;
|
||||
heap_free(url);
|
||||
}
|
||||
else
|
||||
hr = E_OUTOFMEMORY;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistFile_SaveCompleted(IPersistFile *pFile, LPCOLESTR pszFileName)
|
||||
{
|
||||
FIXME("(%p, %p): stub\n", pFile, pszFileName);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *pFile, LPOLESTR *ppszFileName)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
InternetShortcut *This = impl_from_IPersistFile(pFile);
|
||||
TRACE("(%p, %p)\n", pFile, ppszFileName);
|
||||
if (This->currentFile == NULL)
|
||||
*ppszFileName = NULL;
|
||||
else
|
||||
{
|
||||
*ppszFileName = co_strdupW(This->currentFile);
|
||||
if (*ppszFileName == NULL)
|
||||
hr = E_OUTOFMEMORY;
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PropertySetStorage_QueryInterface(IPropertySetStorage *iface, REFIID riid, PVOID *ppvObject)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IPropertySetStorage(iface);
|
||||
TRACE("(%p)\n", iface);
|
||||
return Unknown_QueryInterface(This, riid, ppvObject);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PropertySetStorage_AddRef(IPropertySetStorage *iface)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IPropertySetStorage(iface);
|
||||
TRACE("(%p)\n", iface);
|
||||
return Unknown_AddRef(This);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PropertySetStorage_Release(IPropertySetStorage *iface)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IPropertySetStorage(iface);
|
||||
TRACE("(%p)\n", iface);
|
||||
return Unknown_Release(This);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PropertySetStorage_Create(
|
||||
IPropertySetStorage* iface,
|
||||
REFFMTID rfmtid,
|
||||
const CLSID *pclsid,
|
||||
DWORD grfFlags,
|
||||
DWORD grfMode,
|
||||
IPropertyStorage **ppprstg)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IPropertySetStorage(iface);
|
||||
TRACE("(%s, %p, 0x%x, 0x%x, %p)\n", debugstr_guid(rfmtid), pclsid, grfFlags, grfMode, ppprstg);
|
||||
|
||||
return IPropertySetStorage_Create(This->property_set_storage,
|
||||
rfmtid,
|
||||
pclsid,
|
||||
grfFlags,
|
||||
grfMode,
|
||||
ppprstg);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PropertySetStorage_Open(
|
||||
IPropertySetStorage* iface,
|
||||
REFFMTID rfmtid,
|
||||
DWORD grfMode,
|
||||
IPropertyStorage **ppprstg)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IPropertySetStorage(iface);
|
||||
TRACE("(%s, 0x%x, %p)\n", debugstr_guid(rfmtid), grfMode, ppprstg);
|
||||
|
||||
/* Note: The |STGM_SHARE_EXCLUSIVE is to cope with a bug in the implementation. Should be fixed in ole32. */
|
||||
return IPropertySetStorage_Open(This->property_set_storage,
|
||||
rfmtid,
|
||||
grfMode|STGM_SHARE_EXCLUSIVE,
|
||||
ppprstg);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PropertySetStorage_Delete(IPropertySetStorage *iface, REFFMTID rfmtid)
|
||||
{
|
||||
InternetShortcut *This = impl_from_IPropertySetStorage(iface);
|
||||
TRACE("(%s)\n", debugstr_guid(rfmtid));
|
||||
|
||||
|
||||
return IPropertySetStorage_Delete(This->property_set_storage,
|
||||
rfmtid);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PropertySetStorage_Enum(IPropertySetStorage *iface, IEnumSTATPROPSETSTG **ppenum)
|
||||
{
|
||||
FIXME("(%p): stub\n", ppenum);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IUniformResourceLocatorWVtbl uniformResourceLocatorWVtbl = {
|
||||
UniformResourceLocatorW_QueryInterface,
|
||||
UniformResourceLocatorW_AddRef,
|
||||
UniformResourceLocatorW_Release,
|
||||
UniformResourceLocatorW_SetUrl,
|
||||
UniformResourceLocatorW_GetUrl,
|
||||
UniformResourceLocatorW_InvokeCommand
|
||||
};
|
||||
|
||||
static const IUniformResourceLocatorAVtbl uniformResourceLocatorAVtbl = {
|
||||
UniformResourceLocatorA_QueryInterface,
|
||||
UniformResourceLocatorA_AddRef,
|
||||
UniformResourceLocatorA_Release,
|
||||
UniformResourceLocatorA_SetUrl,
|
||||
UniformResourceLocatorA_GetUrl,
|
||||
UniformResourceLocatorA_InvokeCommand
|
||||
};
|
||||
|
||||
static const IPersistFileVtbl persistFileVtbl = {
|
||||
PersistFile_QueryInterface,
|
||||
PersistFile_AddRef,
|
||||
PersistFile_Release,
|
||||
PersistFile_GetClassID,
|
||||
PersistFile_IsDirty,
|
||||
PersistFile_Load,
|
||||
PersistFile_Save,
|
||||
PersistFile_SaveCompleted,
|
||||
PersistFile_GetCurFile
|
||||
};
|
||||
|
||||
static const IPropertySetStorageVtbl propertySetStorageVtbl = {
|
||||
PropertySetStorage_QueryInterface,
|
||||
PropertySetStorage_AddRef,
|
||||
PropertySetStorage_Release,
|
||||
PropertySetStorage_Create,
|
||||
PropertySetStorage_Open,
|
||||
PropertySetStorage_Delete,
|
||||
PropertySetStorage_Enum
|
||||
};
|
||||
|
||||
static InternetShortcut *create_shortcut(void)
|
||||
{
|
||||
InternetShortcut *newshortcut;
|
||||
|
||||
newshortcut = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(InternetShortcut));
|
||||
if (newshortcut)
|
||||
{
|
||||
HRESULT hr;
|
||||
IPropertyStorage *dummy;
|
||||
|
||||
newshortcut->IUniformResourceLocatorA_iface.lpVtbl = &uniformResourceLocatorAVtbl;
|
||||
newshortcut->IUniformResourceLocatorW_iface.lpVtbl = &uniformResourceLocatorWVtbl;
|
||||
newshortcut->IPersistFile_iface.lpVtbl = &persistFileVtbl;
|
||||
newshortcut->IPropertySetStorage_iface.lpVtbl = &propertySetStorageVtbl;
|
||||
newshortcut->refCount = 1;
|
||||
hr = StgCreateStorageEx(NULL, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_DELETEONRELEASE,
|
||||
STGFMT_STORAGE, 0, NULL, NULL, &IID_IPropertySetStorage, (void **) &newshortcut->property_set_storage);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
TRACE("Failed to create the storage object needed for the shortcut.\n");
|
||||
heap_free(newshortcut);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hr = IPropertySetStorage_Create(newshortcut->property_set_storage, &FMTID_Intshcut, NULL, PROPSETFLAG_DEFAULT, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &dummy);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
TRACE("Failed to create the property object needed for the shortcut.\n");
|
||||
IPropertySetStorage_Release(newshortcut->property_set_storage);
|
||||
heap_free(newshortcut);
|
||||
return NULL;
|
||||
}
|
||||
IPropertyStorage_Release(dummy);
|
||||
}
|
||||
|
||||
return newshortcut;
|
||||
}
|
||||
|
||||
HRESULT WINAPI InternetShortcut_Create(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
{
|
||||
InternetShortcut *This;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
|
||||
*ppv = NULL;
|
||||
|
||||
if(outer)
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
|
||||
This = create_shortcut();
|
||||
if(!This)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
hres = Unknown_QueryInterface(This, riid, ppv);
|
||||
Unknown_Release(This);
|
||||
return hres;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* OpenURL (ieframe.@)
|
||||
*/
|
||||
void WINAPI OpenURL(HWND hWnd, HINSTANCE hInst, LPCSTR lpcstrUrl, int nShowCmd)
|
||||
{
|
||||
InternetShortcut *shortcut;
|
||||
WCHAR* urlfilepath = NULL;
|
||||
int len;
|
||||
|
||||
shortcut = create_shortcut();
|
||||
|
||||
if(!shortcut)
|
||||
return;
|
||||
|
||||
len = MultiByteToWideChar(CP_ACP, 0, lpcstrUrl, -1, NULL, 0);
|
||||
urlfilepath = heap_alloc(len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, lpcstrUrl, -1, urlfilepath, len);
|
||||
|
||||
if(SUCCEEDED(IPersistFile_Load(&shortcut->IPersistFile_iface, urlfilepath, 0))) {
|
||||
URLINVOKECOMMANDINFOW ici;
|
||||
|
||||
memset( &ici, 0, sizeof ici );
|
||||
ici.dwcbSize = sizeof ici;
|
||||
ici.dwFlags = IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB;
|
||||
ici.hwndParent = hWnd;
|
||||
|
||||
if(FAILED(UniformResourceLocatorW_InvokeCommand(&shortcut->IUniformResourceLocatorW_iface, (PURLINVOKECOMMANDINFOW) &ici)))
|
||||
TRACE("failed to open URL: %s\n", debugstr_a(lpcstrUrl));
|
||||
}
|
||||
|
||||
heap_free(urlfilepath);
|
||||
Unknown_Release(shortcut);
|
||||
}
|
1456
reactos/dll/win32/ieframe/navigate.c
Normal file
1456
reactos/dll/win32/ieframe/navigate.c
Normal file
File diff suppressed because it is too large
Load diff
1124
reactos/dll/win32/ieframe/oleobject.c
Normal file
1124
reactos/dll/win32/ieframe/oleobject.c
Normal file
File diff suppressed because it is too large
Load diff
284
reactos/dll/win32/ieframe/persist.c
Normal file
284
reactos/dll/win32/ieframe/persist.c
Normal file
|
@ -0,0 +1,284 @@
|
|||
/*
|
||||
* Implementation of IPersist interfaces for WebBrowser control
|
||||
*
|
||||
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
||||
* Copyright 2005 Jacek Caban
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "ieframe.h"
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IPersistStorage interface
|
||||
*/
|
||||
|
||||
static inline WebBrowser *impl_from_IPersistStorage(IPersistStorage *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IPersistStorage_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStorage_QueryInterface(IPersistStorage *iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStorage(iface);
|
||||
return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PersistStorage_AddRef(IPersistStorage *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStorage(iface);
|
||||
return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PersistStorage_Release(IPersistStorage *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStorage(iface);
|
||||
return IWebBrowser2_Release(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStorage_GetClassID(IPersistStorage *iface, CLSID *pClassID)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStorage(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pClassID);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStorage_IsDirty(IPersistStorage *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStorage(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStorage_InitNew(IPersistStorage *iface, LPSTORAGE pStg)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStorage(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pStg);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStorage_Load(IPersistStorage *iface, LPSTORAGE pStg)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStorage(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pStg);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStorage_Save(IPersistStorage *iface, LPSTORAGE pStg,
|
||||
BOOL fSameAsLoad)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStorage(iface);
|
||||
FIXME("(%p)->(%p %x)\n", This, pStg, fSameAsLoad);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStorage_SaveCompleted(IPersistStorage *iface, LPSTORAGE pStgNew)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStorage(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pStgNew);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IPersistStorageVtbl PersistStorageVtbl =
|
||||
{
|
||||
PersistStorage_QueryInterface,
|
||||
PersistStorage_AddRef,
|
||||
PersistStorage_Release,
|
||||
PersistStorage_GetClassID,
|
||||
PersistStorage_IsDirty,
|
||||
PersistStorage_InitNew,
|
||||
PersistStorage_Load,
|
||||
PersistStorage_Save,
|
||||
PersistStorage_SaveCompleted
|
||||
};
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IPersistMemory interface
|
||||
*/
|
||||
|
||||
static inline WebBrowser *impl_from_IPersistMemory(IPersistMemory *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IPersistMemory_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistMemory_QueryInterface(IPersistMemory *iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistMemory(iface);
|
||||
return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PersistMemory_AddRef(IPersistMemory *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistMemory(iface);
|
||||
return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PersistMemory_Release(IPersistMemory *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistMemory(iface);
|
||||
return IWebBrowser2_Release(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistMemory_GetClassID(IPersistMemory *iface, CLSID *pClassID)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistMemory(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pClassID);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistMemory_IsDirty(IPersistMemory *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistMemory(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistMemory_InitNew(IPersistMemory *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistMemory(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistMemory_Load(IPersistMemory *iface, LPVOID pMem, ULONG cbSize)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistMemory(iface);
|
||||
FIXME("(%p)->(%p %x)\n", This, pMem, cbSize);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistMemory_Save(IPersistMemory *iface, LPVOID pMem,
|
||||
BOOL fClearDirty, ULONG cbSize)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistMemory(iface);
|
||||
FIXME("(%p)->(%p %x %x)\n", This, pMem, fClearDirty, cbSize);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistMemory_GetSizeMax(IPersistMemory *iface, ULONG *pCbSize)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistMemory(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pCbSize);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IPersistMemoryVtbl PersistMemoryVtbl =
|
||||
{
|
||||
PersistMemory_QueryInterface,
|
||||
PersistMemory_AddRef,
|
||||
PersistMemory_Release,
|
||||
PersistMemory_GetClassID,
|
||||
PersistMemory_IsDirty,
|
||||
PersistMemory_Load,
|
||||
PersistMemory_Save,
|
||||
PersistMemory_GetSizeMax,
|
||||
PersistMemory_InitNew
|
||||
};
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IPersistStreamInit interface
|
||||
*/
|
||||
|
||||
static inline WebBrowser *impl_from_IPersistStreamInit(IPersistStreamInit *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IPersistStreamInit_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface,
|
||||
REFIID riid, LPVOID *ppobj)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStreamInit(iface);
|
||||
return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PersistStreamInit_AddRef(IPersistStreamInit *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStreamInit(iface);
|
||||
return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI PersistStreamInit_Release(IPersistStreamInit *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStreamInit(iface);
|
||||
return IWebBrowser2_Release(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *pClassID)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStreamInit(iface);
|
||||
return IPersistStorage_GetClassID(&This->IPersistStorage_iface, pClassID);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStreamInit_IsDirty(IPersistStreamInit *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStreamInit(iface);
|
||||
return IPersistStorage_IsDirty(&This->IPersistStorage_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM pStg)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStreamInit(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pStg);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM pStg,
|
||||
BOOL fSameAsLoad)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStreamInit(iface);
|
||||
FIXME("(%p)->(%p %x)\n", This, pStg, fSameAsLoad);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStreamInit_GetSizeMax(IPersistStreamInit *iface,
|
||||
ULARGE_INTEGER *pcbSize)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStreamInit(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pcbSize);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IPersistStreamInit(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IPersistStreamInitVtbl PersistStreamInitVtbl =
|
||||
{
|
||||
PersistStreamInit_QueryInterface,
|
||||
PersistStreamInit_AddRef,
|
||||
PersistStreamInit_Release,
|
||||
PersistStreamInit_GetClassID,
|
||||
PersistStreamInit_IsDirty,
|
||||
PersistStreamInit_Load,
|
||||
PersistStreamInit_Save,
|
||||
PersistStreamInit_GetSizeMax,
|
||||
PersistStreamInit_InitNew
|
||||
};
|
||||
|
||||
void WebBrowser_Persist_Init(WebBrowser *This)
|
||||
{
|
||||
This->IPersistStorage_iface.lpVtbl = &PersistStorageVtbl;
|
||||
This->IPersistMemory_iface.lpVtbl = &PersistMemoryVtbl;
|
||||
This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl;
|
||||
}
|
73
reactos/dll/win32/ieframe/resource.h
Normal file
73
reactos/dll/win32/ieframe/resource.h
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Resource identifiers for ieframe.dll
|
||||
*
|
||||
* Copyright 2010 Alexander N. Sørnes <alex@thehandofagony.com>
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include <windef.h>
|
||||
#include <winuser.h>
|
||||
|
||||
#define IDR_BROWSE_MAIN_MENU 1000
|
||||
#define IDD_BROWSE_OPEN 1001
|
||||
#define IDC_BROWSE_OPEN_URL 1002
|
||||
#define IDC_BROWSE_REBAR 1003
|
||||
#define IDC_BROWSE_ADDRESSBAR 1004
|
||||
#define IDC_BROWSE_STATUSBAR 1005
|
||||
#define IDC_BROWSE_TOOLBAR 1006
|
||||
|
||||
#define ID_BROWSE_NEW_WINDOW 275
|
||||
#define ID_BROWSE_OPEN 256
|
||||
#define ID_BROWSE_SAVE 257
|
||||
#define ID_BROWSE_SAVE_AS 258
|
||||
#define ID_BROWSE_PRINT_FORMAT 259
|
||||
#define ID_BROWSE_PRINT 260
|
||||
#define ID_BROWSE_PRINT_PREVIEW 277
|
||||
#define ID_BROWSE_PROPERTIES 262
|
||||
#define ID_BROWSE_QUIT 278
|
||||
#define ID_BROWSE_ABOUT 336
|
||||
|
||||
#define ID_BROWSE_ADDFAV 1200
|
||||
#define ID_BROWSE_HOME 1201
|
||||
#define ID_BROWSE_BACK 1202
|
||||
#define ID_BROWSE_FORWARD 1203
|
||||
#define ID_BROWSE_STOP 1204
|
||||
#define ID_BROWSE_REFRESH 1205
|
||||
|
||||
#define ID_BROWSE_BAR_STD 1300
|
||||
#define ID_BROWSE_BAR_ADDR 1301
|
||||
|
||||
#define ID_BROWSE_GOTOFAV_FIRST 2000
|
||||
#define ID_BROWSE_GOTOFAV_MAX 65000
|
||||
|
||||
#define IDS_TB_BACK 1100
|
||||
#define IDS_TB_FORWARD 1101
|
||||
#define IDS_TB_STOP 1102
|
||||
#define IDS_TB_REFRESH 1103
|
||||
#define IDS_TB_HOME 1104
|
||||
#define IDS_TB_PRINT 1105
|
||||
|
||||
#define IDS_ADDRESS 1106
|
||||
|
||||
#define IDB_IETOOLBAR 1400
|
||||
|
||||
/* update status text in BINDSTATUS_* callback */
|
||||
#define IDS_STATUSFMT_FIRST 4096
|
||||
#define IDS_FINDINGRESOURCE (IDS_STATUSFMT_FIRST + 1)
|
||||
#define IDS_BEGINDOWNLOADDATA (IDS_STATUSFMT_FIRST + 4)
|
||||
#define IDS_ENDDOWNLOADDATA (IDS_STATUSFMT_FIRST + 6)
|
||||
#define IDS_SENDINGREQUEST (IDS_STATUSFMT_FIRST + 11)
|
||||
#define IDS_STATUSFMT_MAXLEN 256
|
982
reactos/dll/win32/ieframe/shellbrowser.c
Normal file
982
reactos/dll/win32/ieframe/shellbrowser.c
Normal file
|
@ -0,0 +1,982 @@
|
|||
/*
|
||||
* Implementation of IShellBrowser interface
|
||||
*
|
||||
* Copyright 2011 Piotr Caban for CodeWeavers
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "ieframe.h"
|
||||
#include <exdispid.h>
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
static inline ShellBrowser *impl_from_IShellBrowser(IShellBrowser *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ShellBrowser, IShellBrowser_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_QueryInterface(IShellBrowser* iface, REFIID riid, void **ppv)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = &This->IShellBrowser_iface;
|
||||
}else if(IsEqualGUID(&IID_IOleWindow, riid)) {
|
||||
TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
|
||||
*ppv = &This->IShellBrowser_iface;
|
||||
}else if(IsEqualGUID(&IID_IShellBrowser, riid)) {
|
||||
TRACE("(%p)->(IID_IShellBrowser %p)\n", This, ppv);
|
||||
*ppv = &This->IShellBrowser_iface;
|
||||
}else if(IsEqualGUID(&IID_IBrowserService, riid)) {
|
||||
TRACE("(%p)->(IID_IBrowserService %p)\n", This, ppv);
|
||||
*ppv = &This->IBrowserService_iface;
|
||||
}else if(IsEqualGUID(&IID_IDocObjectService, riid)) {
|
||||
TRACE("(%p)->(IID_IDocObjectService %p)\n", This, ppv);
|
||||
*ppv = &This->IDocObjectService_iface;
|
||||
}else {
|
||||
FIXME("%p %s %p\n", This, debugstr_guid(riid), ppv);
|
||||
*ppv = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ShellBrowser_AddRef(
|
||||
IShellBrowser* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ShellBrowser_Release(IShellBrowser* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
assert(!This->doc_host);
|
||||
heap_free(This);
|
||||
}
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_GetWindow(
|
||||
IShellBrowser* iface,
|
||||
HWND *phwnd)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %p\n", This, phwnd);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_ContextSensitiveHelp(
|
||||
IShellBrowser* iface,
|
||||
BOOL fEnterMode)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %d\n", This, fEnterMode);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_InsertMenusSB(
|
||||
IShellBrowser* iface,
|
||||
HMENU hmenuShared,
|
||||
LPOLEMENUGROUPWIDTHS lpMenuWidths)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %p %p\n", This, hmenuShared, lpMenuWidths);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_SetMenuSB(
|
||||
IShellBrowser* iface,
|
||||
HMENU hmenuShared,
|
||||
HOLEMENU holemenuReserved,
|
||||
HWND hwndActiveObject)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %p %p %p\n", This, hmenuShared, holemenuReserved, hwndActiveObject);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_RemoveMenusSB(
|
||||
IShellBrowser* iface,
|
||||
HMENU hmenuShared)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %p\n", This, hmenuShared);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_SetStatusTextSB(
|
||||
IShellBrowser* iface,
|
||||
LPCOLESTR pszStatusText)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %s\n", This, debugstr_w(pszStatusText));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_EnableModelessSB(
|
||||
IShellBrowser* iface,
|
||||
BOOL fEnable)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %d\n", This, fEnable);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_TranslateAcceleratorSB(
|
||||
IShellBrowser* iface,
|
||||
MSG *pmsg,
|
||||
WORD wID)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %p %d\n", This, pmsg, (int)wID);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_BrowseObject(
|
||||
IShellBrowser* iface,
|
||||
LPCITEMIDLIST pidl,
|
||||
UINT wFlags)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %p %u\n", This, pidl, wFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_GetViewStateStream(
|
||||
IShellBrowser* iface,
|
||||
DWORD grfMode,
|
||||
IStream **ppStrm)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %x %p\n", This, grfMode, ppStrm);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_GetControlWindow(
|
||||
IShellBrowser* iface,
|
||||
UINT id,
|
||||
HWND *phwnd)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %u %p\n", This, id, phwnd);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_SendControlMsg(
|
||||
IShellBrowser* iface,
|
||||
UINT id,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
LPARAM lParam,
|
||||
LRESULT *pret)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %u %u %p\n", This, id, uMsg, pret);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_QueryActiveShellView(
|
||||
IShellBrowser* iface,
|
||||
IShellView **ppshv)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %p\n", This, ppshv);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_OnViewWindowActive(
|
||||
IShellBrowser* iface,
|
||||
IShellView *pshv)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %p\n", This, pshv);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellBrowser_SetToolbarItems(
|
||||
IShellBrowser* iface,
|
||||
LPTBBUTTONSB lpButtons,
|
||||
UINT nButtons,
|
||||
UINT uFlags)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IShellBrowser(iface);
|
||||
FIXME("%p %p %u %u\n", This, lpButtons, nButtons, uFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IShellBrowserVtbl ShellBrowserVtbl = {
|
||||
ShellBrowser_QueryInterface,
|
||||
ShellBrowser_AddRef,
|
||||
ShellBrowser_Release,
|
||||
ShellBrowser_GetWindow,
|
||||
ShellBrowser_ContextSensitiveHelp,
|
||||
ShellBrowser_InsertMenusSB,
|
||||
ShellBrowser_SetMenuSB,
|
||||
ShellBrowser_RemoveMenusSB,
|
||||
ShellBrowser_SetStatusTextSB,
|
||||
ShellBrowser_EnableModelessSB,
|
||||
ShellBrowser_TranslateAcceleratorSB,
|
||||
ShellBrowser_BrowseObject,
|
||||
ShellBrowser_GetViewStateStream,
|
||||
ShellBrowser_GetControlWindow,
|
||||
ShellBrowser_SendControlMsg,
|
||||
ShellBrowser_QueryActiveShellView,
|
||||
ShellBrowser_OnViewWindowActive,
|
||||
ShellBrowser_SetToolbarItems
|
||||
};
|
||||
|
||||
static inline ShellBrowser *impl_from_IBrowserService(IBrowserService *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ShellBrowser, IBrowserService_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_QueryInterface(
|
||||
IBrowserService* iface,
|
||||
REFIID riid,
|
||||
void **ppvObject)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
return IShellBrowser_QueryInterface(&This->IShellBrowser_iface, riid, ppvObject);
|
||||
}
|
||||
|
||||
static ULONG WINAPI BrowserService_AddRef(
|
||||
IBrowserService *iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
return IShellBrowser_AddRef(&This->IShellBrowser_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI BrowserService_Release(
|
||||
IBrowserService* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
return IShellBrowser_Release(&This->IShellBrowser_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetParentSite(
|
||||
IBrowserService* iface,
|
||||
IOleInPlaceSite **ppipsite)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p\n", This, ppipsite);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_SetTitle(
|
||||
IBrowserService* iface,
|
||||
IShellView *psv,
|
||||
LPCWSTR pszName)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p %s\n", This, psv, debugstr_w(pszName));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetTitle(
|
||||
IBrowserService* iface,
|
||||
IShellView *psv,
|
||||
LPWSTR pszName,
|
||||
DWORD cchName)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p %p %d\n", This, psv, pszName, cchName);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetOleObject(
|
||||
IBrowserService* iface,
|
||||
IOleObject **ppobjv)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p\n", This, ppobjv);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetTravelLog(
|
||||
IBrowserService* iface,
|
||||
ITravelLog **pptl)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p\n", This, pptl);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_ShowControlWindow(
|
||||
IBrowserService* iface,
|
||||
UINT id,
|
||||
BOOL fShow)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %u %d\n", This, id, fShow);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_IsControlWindowShown(
|
||||
IBrowserService* iface,
|
||||
UINT id,
|
||||
BOOL *pfShown)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %u %p\n", This, id, pfShown);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_IEGetDisplayName(
|
||||
IBrowserService* iface,
|
||||
PCIDLIST_ABSOLUTE pidl,
|
||||
LPWSTR pwszName,
|
||||
UINT uFlags)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p %p %u\n", This, pidl, pwszName, uFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_IEParseDisplayName(
|
||||
IBrowserService* iface,
|
||||
UINT uiCP,
|
||||
LPCWSTR pwszPath,
|
||||
PIDLIST_ABSOLUTE *ppidlOut)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %u %s %p\n", This, uiCP, debugstr_w(pwszPath), ppidlOut);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_DisplayParseError(
|
||||
IBrowserService* iface,
|
||||
HRESULT hres,
|
||||
LPCWSTR pwszPath)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %x %s\n", This, hres, debugstr_w(pwszPath));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_NavigateToPidl(
|
||||
IBrowserService* iface,
|
||||
PCIDLIST_ABSOLUTE pidl,
|
||||
DWORD grfHLNF)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p %d\n", This, pidl, grfHLNF);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_SetNavigateState(
|
||||
IBrowserService* iface,
|
||||
BNSTATE bnstate)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %d\n", This, bnstate);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetNavigateState(
|
||||
IBrowserService* iface,
|
||||
BNSTATE *pbnstate)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p\n", This, pbnstate);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_NotifyRedirect(
|
||||
IBrowserService* iface,
|
||||
IShellView *psv,
|
||||
PCIDLIST_ABSOLUTE pidl,
|
||||
BOOL *pfDidBrowse)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p %p %p\n", This, psv, pidl, pfDidBrowse);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_UpdateWindowList(
|
||||
IBrowserService* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_UpdateBackForwardState(
|
||||
IBrowserService* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_SetFlags(
|
||||
IBrowserService* iface,
|
||||
DWORD dwFlags,
|
||||
DWORD dwFlagMask)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %x %x\n", This, dwFlags, dwFlagMask);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetFlags(
|
||||
IBrowserService* iface,
|
||||
DWORD *pdwFlags)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p\n", This, pdwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_CanNavigateNow(
|
||||
IBrowserService* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetPidl(
|
||||
IBrowserService* iface,
|
||||
PIDLIST_ABSOLUTE *ppidl)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p\n", This, ppidl);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_SetReferrer(
|
||||
IBrowserService* iface,
|
||||
PCIDLIST_ABSOLUTE pidl)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p\n", This, pidl);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static DWORD WINAPI BrowserService_GetBrowserIndex(
|
||||
IBrowserService* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetBrowserByIndex(
|
||||
IBrowserService* iface,
|
||||
DWORD dwID,
|
||||
IUnknown **ppunk)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %x %p\n", This, dwID, ppunk);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetHistoryObject(
|
||||
IBrowserService* iface,
|
||||
IOleObject **ppole,
|
||||
IStream **pstm,
|
||||
IBindCtx **ppbc)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p %p %p\n", This, ppole, pstm, ppbc);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_SetHistoryObject(
|
||||
IBrowserService* iface,
|
||||
IOleObject *pole,
|
||||
BOOL fIsLocalAnchor)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p %d\n", This, pole, fIsLocalAnchor);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_CacheOLEServer(
|
||||
IBrowserService* iface,
|
||||
IOleObject *pole)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p\n", This, pole);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetSetCodePage(
|
||||
IBrowserService* iface,
|
||||
VARIANT *pvarIn,
|
||||
VARIANT *pvarOut)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p %p\n", This, pvarIn, pvarOut);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_OnHttpEquiv(
|
||||
IBrowserService* iface,
|
||||
IShellView *psv,
|
||||
BOOL fDone,
|
||||
VARIANT *pvarargIn,
|
||||
VARIANT *pvarargOut)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p %d %p %p\n", This, psv, fDone, pvarargIn, pvarargOut);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_GetPalette(
|
||||
IBrowserService* iface,
|
||||
HPALETTE *hpal)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %p\n", This, hpal);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BrowserService_RegisterWindow(
|
||||
IBrowserService* iface,
|
||||
BOOL fForceRegister,
|
||||
int swc)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IBrowserService(iface);
|
||||
FIXME("%p %d %d\n", This, fForceRegister, swc);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IBrowserServiceVtbl BrowserServiceVtbl = {
|
||||
BrowserService_QueryInterface,
|
||||
BrowserService_AddRef,
|
||||
BrowserService_Release,
|
||||
BrowserService_GetParentSite,
|
||||
BrowserService_SetTitle,
|
||||
BrowserService_GetTitle,
|
||||
BrowserService_GetOleObject,
|
||||
BrowserService_GetTravelLog,
|
||||
BrowserService_ShowControlWindow,
|
||||
BrowserService_IsControlWindowShown,
|
||||
BrowserService_IEGetDisplayName,
|
||||
BrowserService_IEParseDisplayName,
|
||||
BrowserService_DisplayParseError,
|
||||
BrowserService_NavigateToPidl,
|
||||
BrowserService_SetNavigateState,
|
||||
BrowserService_GetNavigateState,
|
||||
BrowserService_NotifyRedirect,
|
||||
BrowserService_UpdateWindowList,
|
||||
BrowserService_UpdateBackForwardState,
|
||||
BrowserService_SetFlags,
|
||||
BrowserService_GetFlags,
|
||||
BrowserService_CanNavigateNow,
|
||||
BrowserService_GetPidl,
|
||||
BrowserService_SetReferrer,
|
||||
BrowserService_GetBrowserIndex,
|
||||
BrowserService_GetBrowserByIndex,
|
||||
BrowserService_GetHistoryObject,
|
||||
BrowserService_SetHistoryObject,
|
||||
BrowserService_CacheOLEServer,
|
||||
BrowserService_GetSetCodePage,
|
||||
BrowserService_OnHttpEquiv,
|
||||
BrowserService_GetPalette,
|
||||
BrowserService_RegisterWindow
|
||||
};
|
||||
|
||||
static inline ShellBrowser *impl_from_IDocObjectService(IDocObjectService *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ShellBrowser, IDocObjectService_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_QueryInterface(
|
||||
IDocObjectService* iface,
|
||||
REFIID riid,
|
||||
void **ppvObject)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
return IShellBrowser_QueryInterface(&This->IShellBrowser_iface, riid, ppvObject);
|
||||
}
|
||||
|
||||
static ULONG WINAPI DocObjectService_AddRef(
|
||||
IDocObjectService* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
return IShellBrowser_AddRef(&This->IShellBrowser_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI DocObjectService_Release(
|
||||
IDocObjectService* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
return IShellBrowser_Release(&This->IShellBrowser_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_FireBeforeNavigate2(
|
||||
IDocObjectService* iface,
|
||||
IDispatch *pDispatch,
|
||||
LPCWSTR lpszUrl,
|
||||
DWORD dwFlags,
|
||||
LPCWSTR lpszFrameName,
|
||||
BYTE *pPostData,
|
||||
DWORD cbPostData,
|
||||
LPCWSTR lpszHeaders,
|
||||
BOOL fPlayNavSound,
|
||||
BOOL *pfCancel)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
VARIANT var_url, var_flags, var_frame_name, var_post_data, var_post_data2, var_headers;
|
||||
VARIANTARG params[7];
|
||||
DISPPARAMS dp = {params, NULL, 7, 0};
|
||||
VARIANT_BOOL cancel = VARIANT_FALSE;
|
||||
SAFEARRAY *post_data;
|
||||
|
||||
TRACE("%p %p %s %x %s %p %d %s %d %p\n", This, pDispatch, debugstr_w(lpszUrl),
|
||||
dwFlags, debugstr_w(lpszFrameName), pPostData, cbPostData,
|
||||
debugstr_w(lpszHeaders), fPlayNavSound, pfCancel);
|
||||
|
||||
if(cbPostData) {
|
||||
post_data = SafeArrayCreateVector(VT_UI1, 0, cbPostData);
|
||||
if(!post_data)
|
||||
return E_OUTOFMEMORY;
|
||||
memcpy(post_data->pvData, pPostData, cbPostData);
|
||||
}else {
|
||||
post_data = NULL;
|
||||
}
|
||||
|
||||
V_VT(params) = VT_BOOL|VT_BYREF;
|
||||
V_BOOLREF(params) = &cancel;
|
||||
|
||||
V_VT(params+1) = (VT_BYREF|VT_VARIANT);
|
||||
V_VARIANTREF(params+1) = &var_headers;
|
||||
V_VT(&var_headers) = VT_BSTR;
|
||||
V_BSTR(&var_headers) = lpszHeaders ? SysAllocString(lpszHeaders) : NULL;
|
||||
|
||||
V_VT(params+2) = (VT_BYREF|VT_VARIANT);
|
||||
V_VARIANTREF(params+2) = &var_post_data2;
|
||||
V_VT(&var_post_data2) = (VT_BYREF|VT_VARIANT);
|
||||
V_VARIANTREF(&var_post_data2) = &var_post_data;
|
||||
|
||||
if(post_data) {
|
||||
V_VT(&var_post_data) = VT_UI1|VT_ARRAY;
|
||||
V_ARRAY(&var_post_data) = post_data;
|
||||
}else {
|
||||
V_VT(&var_post_data) = VT_EMPTY;
|
||||
}
|
||||
|
||||
V_VT(params+3) = (VT_BYREF|VT_VARIANT);
|
||||
V_VARIANTREF(params+3) = &var_frame_name;
|
||||
V_VT(&var_frame_name) = VT_BSTR;
|
||||
V_BSTR(&var_frame_name) = NULL;
|
||||
|
||||
V_VT(params+4) = (VT_BYREF|VT_VARIANT);
|
||||
V_VARIANTREF(params+4) = &var_flags;
|
||||
V_VT(&var_flags) = VT_I4;
|
||||
V_I4(&var_flags) = 0;
|
||||
|
||||
V_VT(params+5) = (VT_BYREF|VT_VARIANT);
|
||||
V_VARIANTREF(params+5) = &var_url;
|
||||
V_VT(&var_url) = VT_BSTR;
|
||||
V_BSTR(&var_url) = SysAllocString(lpszUrl);
|
||||
|
||||
V_VT(params+6) = (VT_DISPATCH);
|
||||
V_DISPATCH(params+6) = (IDispatch*)This->doc_host->wb;
|
||||
|
||||
TRACE(">>>\n");
|
||||
call_sink(This->doc_host->cps.wbe2, DISPID_BEFORENAVIGATE2, &dp);
|
||||
TRACE("<<<\n");
|
||||
|
||||
SysFreeString(V_BSTR(&var_url));
|
||||
SysFreeString(V_BSTR(&var_headers));
|
||||
SafeArrayDestroy(post_data);
|
||||
|
||||
*pfCancel = !!cancel;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_FireNavigateComplete2(
|
||||
IDocObjectService* iface,
|
||||
IHTMLWindow2 *pHTMLWindow2,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
IHTMLPrivateWindow *priv_window;
|
||||
VARIANTARG params[2];
|
||||
DISPPARAMS dp = {params, NULL, 2, 0};
|
||||
VARIANT url_var;
|
||||
BSTR url;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("%p %p %x\n", This, pHTMLWindow2, dwFlags);
|
||||
|
||||
hres = IHTMLWindow2_QueryInterface(pHTMLWindow2, &IID_IHTMLPrivateWindow, (void**)&priv_window);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = IHTMLPrivateWindow_GetAddressBarUrl(priv_window, &url);
|
||||
IHTMLPrivateWindow_Release(priv_window);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
TRACE("got URL %s\n", debugstr_w(url));
|
||||
set_dochost_url(This->doc_host, url);
|
||||
|
||||
V_VT(params) = (VT_BYREF|VT_VARIANT);
|
||||
V_VARIANTREF(params) = &url_var;
|
||||
|
||||
V_VT(params+1) = VT_DISPATCH;
|
||||
V_DISPATCH(params+1) = (IDispatch*)This->doc_host->wb;
|
||||
|
||||
V_VT(&url_var) = VT_BSTR;
|
||||
V_BSTR(&url_var) = url;
|
||||
|
||||
TRACE(">>>\n");
|
||||
call_sink(This->doc_host->cps.wbe2, DISPID_NAVIGATECOMPLETE2, &dp);
|
||||
TRACE("<<<\n");
|
||||
|
||||
SysFreeString(url);
|
||||
|
||||
This->doc_host->busy = VARIANT_FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_FireDownloadBegin(
|
||||
IDocObjectService* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_FireDownloadComplete(
|
||||
IDocObjectService* iface)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
FIXME("%p\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_FireDocumentComplete(
|
||||
IDocObjectService* iface,
|
||||
IHTMLWindow2 *pHTMLWindow,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
IHTMLPrivateWindow *priv_window;
|
||||
VARIANTARG params[2];
|
||||
DISPPARAMS dp = {params, NULL, 2, 0};
|
||||
VARIANT url_var;
|
||||
BSTR url;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("%p %p %x\n", This, pHTMLWindow, dwFlags);
|
||||
|
||||
hres = IHTMLWindow2_QueryInterface(pHTMLWindow, &IID_IHTMLPrivateWindow, (void**)&priv_window);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = IHTMLPrivateWindow_GetAddressBarUrl(priv_window, &url);
|
||||
IHTMLPrivateWindow_Release(priv_window);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
TRACE("got URL %s\n", debugstr_w(url));
|
||||
|
||||
V_VT(params) = (VT_BYREF|VT_VARIANT);
|
||||
V_VARIANTREF(params) = &url_var;
|
||||
|
||||
V_VT(params+1) = VT_DISPATCH;
|
||||
V_DISPATCH(params+1) = (IDispatch*)This->doc_host->wb;
|
||||
|
||||
V_VT(&url_var) = VT_BSTR;
|
||||
V_BSTR(&url_var) = url;
|
||||
|
||||
TRACE(">>>\n");
|
||||
call_sink(This->doc_host->cps.wbe2, DISPID_DOCUMENTCOMPLETE, &dp);
|
||||
TRACE("<<<\n");
|
||||
|
||||
SysFreeString(url);
|
||||
This->doc_host->busy = VARIANT_FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_UpdateDesktopComponent(
|
||||
IDocObjectService* iface,
|
||||
IHTMLWindow2 *pHTMLWindow)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
FIXME("%p %p\n", This, pHTMLWindow);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_GetPendingUrl(
|
||||
IDocObjectService* iface,
|
||||
BSTR *pbstrPendingUrl)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
FIXME("%p %p\n", This, pbstrPendingUrl);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_ActiveElementChanged(
|
||||
IDocObjectService* iface,
|
||||
IHTMLElement *pHTMLElement)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
FIXME("%p %p\n", This, pHTMLElement);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_GetUrlSearchComponent(
|
||||
IDocObjectService* iface,
|
||||
BSTR *pbstrSearch)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
FIXME("%p %p\n", This, pbstrSearch);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DocObjectService_IsErrorUrl(
|
||||
IDocObjectService* iface,
|
||||
LPCWSTR lpszUrl,
|
||||
BOOL *pfIsError)
|
||||
{
|
||||
ShellBrowser *This = impl_from_IDocObjectService(iface);
|
||||
FIXME("%p %s %p\n", This, debugstr_w(lpszUrl), pfIsError);
|
||||
|
||||
*pfIsError = FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IDocObjectServiceVtbl DocObjectServiceVtbl = {
|
||||
DocObjectService_QueryInterface,
|
||||
DocObjectService_AddRef,
|
||||
DocObjectService_Release,
|
||||
DocObjectService_FireBeforeNavigate2,
|
||||
DocObjectService_FireNavigateComplete2,
|
||||
DocObjectService_FireDownloadBegin,
|
||||
DocObjectService_FireDownloadComplete,
|
||||
DocObjectService_FireDocumentComplete,
|
||||
DocObjectService_UpdateDesktopComponent,
|
||||
DocObjectService_GetPendingUrl,
|
||||
DocObjectService_ActiveElementChanged,
|
||||
DocObjectService_GetUrlSearchComponent,
|
||||
DocObjectService_IsErrorUrl
|
||||
};
|
||||
|
||||
HRESULT create_browser_service(DocHost *doc_host, ShellBrowser **ret)
|
||||
{
|
||||
ShellBrowser *sb;
|
||||
|
||||
sb = heap_alloc(sizeof(ShellBrowser));
|
||||
if(!sb)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
sb->IShellBrowser_iface.lpVtbl = &ShellBrowserVtbl;
|
||||
sb->IBrowserService_iface.lpVtbl = &BrowserServiceVtbl;
|
||||
sb->IDocObjectService_iface.lpVtbl = &DocObjectServiceVtbl;
|
||||
|
||||
sb->ref = 1;
|
||||
sb->doc_host = doc_host;
|
||||
|
||||
*ret = sb;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void detach_browser_service(ShellBrowser *sb)
|
||||
{
|
||||
sb->doc_host = NULL;
|
||||
IShellBrowser_Release(&sb->IShellBrowser_iface);
|
||||
}
|
||||
|
||||
static inline NewWindowManager *impl_from_INewWindowManager(INewWindowManager *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, NewWindowManager, INewWindowManager_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI NewWindowManager_QueryInterface(INewWindowManager *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
NewWindowManager *This = impl_from_INewWindowManager(iface);
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = &This->INewWindowManager_iface;
|
||||
}else if(IsEqualGUID(&IID_INewWindowManager, riid)) {
|
||||
TRACE("(%p)->(IID_INewWindowManager %p)\n", This, ppv);
|
||||
*ppv = &This->INewWindowManager_iface;
|
||||
}else {
|
||||
WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
*ppv = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI NewWindowManager_AddRef(INewWindowManager *iface)
|
||||
{
|
||||
NewWindowManager *This = impl_from_INewWindowManager(iface);
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
return IOleClientSite_AddRef(&This->doc_host->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI NewWindowManager_Release(INewWindowManager *iface)
|
||||
{
|
||||
NewWindowManager *This = impl_from_INewWindowManager(iface);
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
return IOleClientSite_Release(&This->doc_host->IOleClientSite_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI NewWindowManager_EvaluateNewWindow(INewWindowManager *iface, LPCWSTR pszUrl,
|
||||
LPCWSTR pszName, LPCWSTR pszUrlContext, LPCWSTR pszFeatures, BOOL fReplace, DWORD dwFlags,
|
||||
DWORD dwUserActionTime)
|
||||
{
|
||||
NewWindowManager *This = impl_from_INewWindowManager(iface);
|
||||
FIXME("(%p)->(%s %s %s %s %x %x %d)\n", This, debugstr_w(pszUrl), debugstr_w(pszName), debugstr_w(pszUrlContext),
|
||||
debugstr_w(pszFeatures), fReplace, dwFlags, dwUserActionTime);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const INewWindowManagerVtbl NewWindowManagerVtbl = {
|
||||
NewWindowManager_QueryInterface,
|
||||
NewWindowManager_AddRef,
|
||||
NewWindowManager_Release,
|
||||
NewWindowManager_EvaluateNewWindow
|
||||
};
|
||||
|
||||
void NewWindowManager_Init(DocHost *doc_host)
|
||||
{
|
||||
doc_host->nwm.INewWindowManager_iface.lpVtbl = &NewWindowManagerVtbl;
|
||||
doc_host->nwm.doc_host = doc_host;
|
||||
}
|
378
reactos/dll/win32/ieframe/shelluihelper.c
Normal file
378
reactos/dll/win32/ieframe/shelluihelper.c
Normal file
|
@ -0,0 +1,378 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "ieframe.h"
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
struct ShellUIHelper {
|
||||
IShellUIHelper2 IShellUIHelper2_iface;
|
||||
LONG ref;
|
||||
};
|
||||
|
||||
static inline ShellUIHelper *impl_from_IShellUIHelper2(IShellUIHelper2 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ShellUIHelper, IShellUIHelper2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_QueryInterface(IShellUIHelper2 *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = &This->IShellUIHelper2_iface;
|
||||
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
||||
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
||||
*ppv = &This->IShellUIHelper2_iface;
|
||||
}else if(IsEqualGUID(&IID_IShellUIHelper, riid)) {
|
||||
TRACE("(%p)->(IID_IShellUIHelper %p)\n", This, ppv);
|
||||
*ppv = &This->IShellUIHelper2_iface;
|
||||
}else if(IsEqualGUID(&IID_IShellUIHelper, riid)) {
|
||||
TRACE("(%p)->(IID_IShellUIHelper2 %p)\n", This, ppv);
|
||||
*ppv = &This->IShellUIHelper2_iface;
|
||||
}else {
|
||||
WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
*ppv = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ShellUIHelper2_AddRef(IShellUIHelper2 *iface)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ShellUIHelper2_Release(IShellUIHelper2 *iface)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
||||
if(!ref)
|
||||
heap_free(This);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_GetTypeInfoCount(IShellUIHelper2 *iface, UINT *pctinfo)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pctinfo);
|
||||
|
||||
*pctinfo = 1;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_GetTypeInfo(IShellUIHelper2 *iface, UINT iTInfo, LCID lcid, LPTYPEINFO *ppTInfo)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_GetIDsOfNames(IShellUIHelper2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames,
|
||||
LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s %p %d %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
|
||||
lcid, rgDispId);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_Invoke(IShellUIHelper2 *iface, DISPID dispIdMember,
|
||||
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
|
||||
EXCEPINFO *pExepInfo, UINT *puArgErr)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%d %s %d %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
|
||||
lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_ResetFirstBootMode(IShellUIHelper2 *iface)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_ResetSafeMode(IShellUIHelper2 *iface)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_RefreshOfflineDesktop(IShellUIHelper2 *iface)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_AddFavourite(IShellUIHelper2 *iface, BSTR URL, VARIANT *Title)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s %s)\n", This, debugstr_w(URL), debugstr_variant(Title));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_AddChannel(IShellUIHelper2 *iface, BSTR URL)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(URL));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_AddDesktopComponent(IShellUIHelper2 *iface, BSTR URL, BSTR Type,
|
||||
VARIANT *Left, VARIANT *Top, VARIANT *Width, VARIANT *Height)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s %s %s %s %s %s)\n", This, debugstr_w(URL), debugstr_w(Type), debugstr_variant(Left),
|
||||
debugstr_variant(Top), debugstr_variant(Width), debugstr_variant(Height));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_IsSubscribed(IShellUIHelper2 *iface, BSTR URL, VARIANT_BOOL *pBool)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s %p)\n", This, debugstr_w(URL), pBool);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_NavigateAndFind(IShellUIHelper2 *iface, BSTR URL, BSTR strQuery, VARIANT *varTargetFrame)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(URL), debugstr_w(strQuery), debugstr_variant(varTargetFrame));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_ImportExportFavourites(IShellUIHelper2 *iface, VARIANT_BOOL fImport, BSTR strImpExpPath)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%x %s)\n", This, fImport, debugstr_w(strImpExpPath));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_AutoCompleteSaveForm(IShellUIHelper2 *iface, VARIANT *Form)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_variant(Form));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_AutoScan(IShellUIHelper2 *iface, BSTR strSearch, BSTR strFailureUrl, VARIANT *pvarTargetFrame)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s %s %s)\n", This, debugstr_w(strSearch), debugstr_w(strFailureUrl), debugstr_variant(pvarTargetFrame));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_AutoCompleteAttach(IShellUIHelper2 *iface, VARIANT *Reserved)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_variant(Reserved));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_ShowBrowserUI(IShellUIHelper2 *iface, BSTR bstrName, VARIANT *pvarIn, VARIANT *pvarOut)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s %s %p)\n", This, debugstr_w(bstrName), debugstr_variant(pvarIn), pvarOut);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_AddSearchProvider(IShellUIHelper2 *iface, BSTR URL)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(URL));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_RunOnceShown(IShellUIHelper2 *iface)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_SkipRunOnce(IShellUIHelper2 *iface)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_CustomizeSettings(IShellUIHelper2 *iface, VARIANT_BOOL fSQM,
|
||||
VARIANT_BOOL fPhishing, BSTR bstrLocale)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%x %x %s)\n", This, fSQM, fPhishing, debugstr_w(bstrLocale));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_SqmEnabled(IShellUIHelper2 *iface, VARIANT_BOOL *pfEnabled)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pfEnabled);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_PhishingEnabled(IShellUIHelper2 *iface, VARIANT_BOOL *pfEnabled)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pfEnabled);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_BrandImageUri(IShellUIHelper2 *iface, BSTR *pbstrUri)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pbstrUri);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_SkipTabsWelcome(IShellUIHelper2 *iface)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_DiagnoseConnection(IShellUIHelper2 *iface)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_CustomizeClearType(IShellUIHelper2 *iface, VARIANT_BOOL fSet)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, fSet);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_IsSearchProviderInstalled(IShellUIHelper2 *iface, BSTR URL, DWORD *pdwResult)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%s %p)\n", This, debugstr_w(URL), pdwResult);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_IsSearchMigrated(IShellUIHelper2 *iface, VARIANT_BOOL *pfMigrated)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pfMigrated);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_DefaultSearchProvider(IShellUIHelper2 *iface, BSTR *pbstrName)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pbstrName);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_RunOnceRequiredSettingsComplete(IShellUIHelper2 *iface, VARIANT_BOOL fComplete)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%x)\n", This, fComplete);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_RunOnceHasShown(IShellUIHelper2 *iface, VARIANT_BOOL *pfShown)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pfShown);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ShellUIHelper2_SearchGuideUrl(IShellUIHelper2 *iface, BSTR *pbstrUrl)
|
||||
{
|
||||
ShellUIHelper *This = impl_from_IShellUIHelper2(iface);
|
||||
FIXME("(%p)->(%p)\n", This, pbstrUrl);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IShellUIHelper2Vtbl ShellUIHelper2Vtbl = {
|
||||
ShellUIHelper2_QueryInterface,
|
||||
ShellUIHelper2_AddRef,
|
||||
ShellUIHelper2_Release,
|
||||
ShellUIHelper2_GetTypeInfoCount,
|
||||
ShellUIHelper2_GetTypeInfo,
|
||||
ShellUIHelper2_GetIDsOfNames,
|
||||
ShellUIHelper2_Invoke,
|
||||
ShellUIHelper2_ResetFirstBootMode,
|
||||
ShellUIHelper2_ResetSafeMode,
|
||||
ShellUIHelper2_RefreshOfflineDesktop,
|
||||
ShellUIHelper2_AddFavourite,
|
||||
ShellUIHelper2_AddChannel,
|
||||
ShellUIHelper2_AddDesktopComponent,
|
||||
ShellUIHelper2_IsSubscribed,
|
||||
ShellUIHelper2_NavigateAndFind,
|
||||
ShellUIHelper2_ImportExportFavourites,
|
||||
ShellUIHelper2_AutoCompleteSaveForm,
|
||||
ShellUIHelper2_AutoScan,
|
||||
ShellUIHelper2_AutoCompleteAttach,
|
||||
ShellUIHelper2_ShowBrowserUI,
|
||||
ShellUIHelper2_AddSearchProvider,
|
||||
ShellUIHelper2_RunOnceShown,
|
||||
ShellUIHelper2_SkipRunOnce,
|
||||
ShellUIHelper2_CustomizeSettings,
|
||||
ShellUIHelper2_SqmEnabled,
|
||||
ShellUIHelper2_PhishingEnabled,
|
||||
ShellUIHelper2_BrandImageUri,
|
||||
ShellUIHelper2_SkipTabsWelcome,
|
||||
ShellUIHelper2_DiagnoseConnection,
|
||||
ShellUIHelper2_CustomizeClearType,
|
||||
ShellUIHelper2_IsSearchProviderInstalled,
|
||||
ShellUIHelper2_IsSearchMigrated,
|
||||
ShellUIHelper2_DefaultSearchProvider,
|
||||
ShellUIHelper2_RunOnceRequiredSettingsComplete,
|
||||
ShellUIHelper2_RunOnceHasShown,
|
||||
ShellUIHelper2_SearchGuideUrl
|
||||
};
|
||||
|
||||
HRESULT create_shell_ui_helper(IShellUIHelper2 **_ret)
|
||||
{
|
||||
ShellUIHelper *ret;
|
||||
|
||||
ret = heap_alloc(sizeof(*ret));
|
||||
if(!ret)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
ret->IShellUIHelper2_iface.lpVtbl = &ShellUIHelper2Vtbl;
|
||||
ret->ref = 1;
|
||||
|
||||
*_ret = &ret->IShellUIHelper2_iface;
|
||||
return S_OK;
|
||||
}
|
132
reactos/dll/win32/ieframe/urlhist.c
Normal file
132
reactos/dll/win32/ieframe/urlhist.c
Normal file
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
* Copyright 2006 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
|
||||
*/
|
||||
|
||||
#include "ieframe.h"
|
||||
#include <urlhist.h>
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
static HRESULT WINAPI UrlHistoryStg_QueryInterface(IUrlHistoryStg2 *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
*ppv = NULL;
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(IID_IUnknown %p)\n", ppv);
|
||||
*ppv = iface;
|
||||
}else if(IsEqualGUID(&IID_IUrlHistoryStg, riid)) {
|
||||
TRACE("(IID_IUrlHistoryStg %p)\n", ppv);
|
||||
*ppv = iface;
|
||||
}else if(IsEqualGUID(&IID_IUrlHistoryStg2, riid)) {
|
||||
TRACE("(IID_IUrlHistoryStg2 %p)\n", ppv);
|
||||
*ppv = iface;
|
||||
}
|
||||
|
||||
if(*ppv) {
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%s %p)\n", debugstr_guid(riid), ppv);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI UrlHistoryStg_AddRef(IUrlHistoryStg2 *iface)
|
||||
{
|
||||
lock_module();
|
||||
return 2;
|
||||
}
|
||||
|
||||
static ULONG WINAPI UrlHistoryStg_Release(IUrlHistoryStg2 *iface)
|
||||
{
|
||||
unlock_module();
|
||||
return 1;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UrlHistoryStg_AddUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
|
||||
LPCOLESTR pocsTitle, DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%s %s %08x)\n", debugstr_w(lpcsUrl), debugstr_w(pocsTitle), dwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UrlHistoryStg_DeleteUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%s %08x)\n", debugstr_w(lpcsUrl), dwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UrlHistoryStg_QueryUrl(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
|
||||
DWORD dwFlags, LPSTATURL lpSTATURL)
|
||||
{
|
||||
FIXME("(%s %08x %p)\n", debugstr_w(lpcsUrl), dwFlags, lpSTATURL);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UrlHistoryStg_BindToObject(IUrlHistoryStg2 *iface, LPCOLESTR lpcsUrl,
|
||||
REFIID riid, void **ppv)
|
||||
{
|
||||
FIXME("(%s %s %p)\n", debugstr_w(lpcsUrl), debugstr_guid(riid), ppv);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UrlHistoryStg_EnumUrls(IUrlHistoryStg2 *iface, IEnumSTATURL **ppEnum)
|
||||
{
|
||||
FIXME("(%p)\n", ppEnum);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UrlHistoryStg_AddUrlAndNotify(IUrlHistoryStg2 *iface, LPCOLESTR pocsUrl,
|
||||
LPCOLESTR pocsTitle, DWORD dwFlags, BOOL fWriteHistory, IOleCommandTarget *poctNotify,
|
||||
IUnknown *punkISFolder)
|
||||
{
|
||||
FIXME("(%s %s %08x %x %p %p)\n", debugstr_w(pocsUrl), debugstr_w(pocsTitle),
|
||||
dwFlags, fWriteHistory, poctNotify, punkISFolder);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UrlHistoryStg_ClearHistory(IUrlHistoryStg2 *iface)
|
||||
{
|
||||
FIXME("()\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IUrlHistoryStg2Vtbl UrlHistoryStg2Vtbl = {
|
||||
UrlHistoryStg_QueryInterface,
|
||||
UrlHistoryStg_AddRef,
|
||||
UrlHistoryStg_Release,
|
||||
UrlHistoryStg_AddUrl,
|
||||
UrlHistoryStg_DeleteUrl,
|
||||
UrlHistoryStg_QueryUrl,
|
||||
UrlHistoryStg_BindToObject,
|
||||
UrlHistoryStg_EnumUrls,
|
||||
UrlHistoryStg_AddUrlAndNotify,
|
||||
UrlHistoryStg_ClearHistory
|
||||
};
|
||||
|
||||
static IUrlHistoryStg2 UrlHistoryStg2 = { &UrlHistoryStg2Vtbl };
|
||||
|
||||
HRESULT WINAPI CUrlHistory_Create(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
|
||||
{
|
||||
if(pOuter)
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
|
||||
return IUrlHistoryStg2_QueryInterface(&UrlHistoryStg2, riid, ppv);
|
||||
}
|
237
reactos/dll/win32/ieframe/view.c
Normal file
237
reactos/dll/win32/ieframe/view.c
Normal file
|
@ -0,0 +1,237 @@
|
|||
/*
|
||||
* Copyright 2005 Jacek Caban
|
||||
* Copyright 2010 Ilya Shpigor
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "ieframe.h"
|
||||
|
||||
#include <wine/debug.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IViewObject interface
|
||||
*/
|
||||
|
||||
static inline WebBrowser *impl_from_IViewObject2(IViewObject2 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IViewObject2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
WebBrowser *This = impl_from_IViewObject2(iface);
|
||||
return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ViewObject_AddRef(IViewObject2 *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IViewObject2(iface);
|
||||
return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI ViewObject_Release(IViewObject2 *iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IViewObject2(iface);
|
||||
return IWebBrowser2_Release(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ViewObject_Draw(IViewObject2 *iface, DWORD dwDrawAspect,
|
||||
LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev,
|
||||
HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds,
|
||||
BOOL (STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR),
|
||||
ULONG_PTR dwContinue)
|
||||
{
|
||||
WebBrowser *This = impl_from_IViewObject2(iface);
|
||||
FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %08lx)\n", This, dwDrawAspect, lindex,
|
||||
pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue,
|
||||
dwContinue);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwAspect,
|
||||
LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev,
|
||||
LOGPALETTE **ppColorSet)
|
||||
{
|
||||
WebBrowser *This = impl_from_IViewObject2(iface);
|
||||
FIXME("(%p)->(%d %d %p %p %p %p)\n", This, dwAspect, lindex, pvAspect, ptd,
|
||||
hicTargetDev, ppColorSet);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ViewObject_Freeze(IViewObject2 *iface, DWORD dwDrawAspect, LONG lindex,
|
||||
void *pvAspect, DWORD *pdwFreeze)
|
||||
{
|
||||
WebBrowser *This = impl_from_IViewObject2(iface);
|
||||
FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ViewObject_Unfreeze(IViewObject2 *iface, DWORD dwFreeze)
|
||||
{
|
||||
WebBrowser *This = impl_from_IViewObject2(iface);
|
||||
FIXME("(%p)->(%d)\n", This, dwFreeze);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ViewObject_SetAdvise(IViewObject2 *iface, DWORD aspects, DWORD advf,
|
||||
IAdviseSink *pAdvSink)
|
||||
{
|
||||
WebBrowser *This = impl_from_IViewObject2(iface);
|
||||
FIXME("(%p)->(%d %08x %p)\n", This, aspects, advf, pAdvSink);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ViewObject_GetAdvise(IViewObject2 *iface, DWORD *pAspects,
|
||||
DWORD *pAdvf, IAdviseSink **ppAdvSink)
|
||||
{
|
||||
WebBrowser *This = impl_from_IViewObject2(iface);
|
||||
FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ViewObject_GetExtent(IViewObject2 *iface, DWORD dwAspect, LONG lindex,
|
||||
DVTARGETDEVICE *ptd, LPSIZEL lpsizel)
|
||||
{
|
||||
WebBrowser *This = impl_from_IViewObject2(iface);
|
||||
FIXME("(%p)->(%d %d %p %p)\n", This, dwAspect, lindex, ptd, lpsizel);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IViewObject2Vtbl ViewObjectVtbl = {
|
||||
ViewObject_QueryInterface,
|
||||
ViewObject_AddRef,
|
||||
ViewObject_Release,
|
||||
ViewObject_Draw,
|
||||
ViewObject_GetColorSet,
|
||||
ViewObject_Freeze,
|
||||
ViewObject_Unfreeze,
|
||||
ViewObject_SetAdvise,
|
||||
ViewObject_GetAdvise,
|
||||
ViewObject_GetExtent
|
||||
};
|
||||
|
||||
/**********************************************************************
|
||||
* Implement the IDataObject interface
|
||||
*/
|
||||
|
||||
static inline WebBrowser *impl_from_IDataObject(IDataObject *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, WebBrowser, IDataObject_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_QueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID * ppvObj)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppvObj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI DataObject_AddRef(LPDATAOBJECT iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
return IWebBrowser2_AddRef(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI DataObject_Release(LPDATAOBJECT iface)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
return IWebBrowser2_Release(&This->IWebBrowser2_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_GetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn, STGMEDIUM *pmedium)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_GetDataHere(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_QueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_GetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_SetData(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_EnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_DAdvise(LPDATAOBJECT iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_DUnadvise(LPDATAOBJECT iface, DWORD dwConnection)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DataObject_EnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise)
|
||||
{
|
||||
WebBrowser *This = impl_from_IDataObject(iface);
|
||||
FIXME("(%p)->()\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IDataObjectVtbl DataObjectVtbl = {
|
||||
DataObject_QueryInterface,
|
||||
DataObject_AddRef,
|
||||
DataObject_Release,
|
||||
DataObject_GetData,
|
||||
DataObject_GetDataHere,
|
||||
DataObject_QueryGetData,
|
||||
DataObject_GetCanonicalFormatEtc,
|
||||
DataObject_SetData,
|
||||
DataObject_EnumFormatEtc,
|
||||
DataObject_DAdvise,
|
||||
DataObject_DUnadvise,
|
||||
DataObject_EnumDAdvise
|
||||
};
|
||||
|
||||
void WebBrowser_ViewObject_Init(WebBrowser *This)
|
||||
{
|
||||
This->IViewObject2_iface.lpVtbl = &ViewObjectVtbl;
|
||||
This->IDataObject_iface.lpVtbl = &DataObjectVtbl;
|
||||
}
|
1291
reactos/dll/win32/ieframe/webbrowser.c
Normal file
1291
reactos/dll/win32/ieframe/webbrowser.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -36,11 +36,13 @@ list(APPEND SOURCE
|
|||
dimm.idl
|
||||
dispex.idl
|
||||
docobj.idl
|
||||
docobjectservice.idl
|
||||
downloadmgr.idl
|
||||
# dyngraph.idl
|
||||
exdisp.idl
|
||||
fusion.idl
|
||||
hlink.idl
|
||||
htiface.idl
|
||||
htiframe.idl
|
||||
httprequest.idl
|
||||
iads.idl
|
||||
|
|
67
reactos/include/psdk/docobjectservice.idl
Normal file
67
reactos/include/psdk/docobjectservice.idl
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright 2011 Piotr 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 "mshtml.idl";
|
||||
|
||||
[
|
||||
local,
|
||||
object,
|
||||
uuid(3050f801-98b5-11cf-bb82-00aa00bdce0b)
|
||||
]
|
||||
interface IDocObjectService : IUnknown
|
||||
{
|
||||
HRESULT FireBeforeNavigate2(
|
||||
[in] IDispatch *pDispatch,
|
||||
[in] LPCWSTR lpszUrl,
|
||||
[in] DWORD dwFlags,
|
||||
[in] LPCWSTR lpszFrameName,
|
||||
[in] BYTE *pPostData,
|
||||
[in] DWORD cbPostData,
|
||||
[in] LPCWSTR lpszHeaders,
|
||||
[in] BOOL fPlayNavSound,
|
||||
[out] BOOL *pfCancel);
|
||||
|
||||
HRESULT FireNavigateComplete2(
|
||||
[in] IHTMLWindow2 *pHTMLWindow2,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT FireDownloadBegin(void);
|
||||
|
||||
HRESULT FireDownloadComplete(void);
|
||||
|
||||
HRESULT FireDocumentComplete(
|
||||
[in] IHTMLWindow2 *pHTMLWindow,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT UpdateDesktopComponent(
|
||||
[in] IHTMLWindow2 *pHTMLWindow);
|
||||
|
||||
HRESULT GetPendingUrl(
|
||||
[out] BSTR *pbstrPendingUrl);
|
||||
|
||||
HRESULT ActiveElementChanged(
|
||||
[in] IHTMLElement *pHTMLElement);
|
||||
|
||||
HRESULT GetUrlSearchComponent(
|
||||
[out] BSTR *pbstrSearch);
|
||||
|
||||
HRESULT IsErrorUrl(
|
||||
[in] LPCWSTR lpszUrl,
|
||||
[out] BOOL *pfIsError);
|
||||
};
|
128
reactos/include/psdk/htiface.idl
Normal file
128
reactos/include/psdk/htiface.idl
Normal file
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* Copyright 2006,2011 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 "urlmon.idl";
|
||||
|
||||
cpp_quote("#include <htiframe.h>")
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* ITargetFrame interface
|
||||
*/
|
||||
[
|
||||
object,
|
||||
uuid(d5f78c80-5252-11cf-90fa-00aa0042106e),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface ITargetFrame: IUnknown
|
||||
{
|
||||
typedef [unique] ITargetFrame *LPTARGETFRAME;
|
||||
|
||||
typedef enum {
|
||||
NAVIGATEFRAME_FL_RECORD = 0x01,
|
||||
NAVIGATEFRAME_FL_POST = 0x02,
|
||||
NAVIGATEFRAME_FL_NO_DOC_CACHE = 0x04,
|
||||
NAVIGATEFRAME_FL_NO_IMAGE_CACHE = 0x08,
|
||||
NAVIGATEFRAME_FL_AUTH_FAIL_CACHE_OK = 0x10,
|
||||
NAVIGATEFRAME_FL_SENDING_FROM_FORM = 0x20,
|
||||
NAVIGATEFRAME_FL_REALLY_SENDING_FROM_FORM = 0x40
|
||||
} NAVIGATEFRAME_FLAGS;
|
||||
|
||||
typedef struct tagNavigateData {
|
||||
ULONG ulTarget;
|
||||
ULONG ulURL;
|
||||
ULONG ulRefURL;
|
||||
ULONG ulPostData;
|
||||
DWORD dwFlags;
|
||||
} NAVIGATEDATA;
|
||||
|
||||
HRESULT SetFrameName([in] LPCWSTR pszFrameName);
|
||||
HRESULT GetFrameName([out] LPWSTR *ppszFrameName);
|
||||
HRESULT GetParentFrame([out] IUnknown **ppunkParent);
|
||||
|
||||
HRESULT FindFrame(
|
||||
[in] LPCWSTR pszTargetName,
|
||||
[in] IUnknown *ppunkContextFrame,
|
||||
[in] DWORD dwFlags,
|
||||
[out] IUnknown **ppunkTargetFrame);
|
||||
|
||||
HRESULT SetFrameSrc([in] LPCWSTR pszFrameSrc);
|
||||
HRESULT GetFrameSrc([out] LPWSTR *ppszFrameSrc);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* ITargetFramePriv interface
|
||||
*/
|
||||
[
|
||||
object,
|
||||
uuid(9216e421-2bf5-11d0-82b4-00a0c90c29c5),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface ITargetFramePriv : IUnknown
|
||||
{
|
||||
typedef [unique] ITargetFramePriv *LPTARGETFRAMEPRIV;
|
||||
|
||||
HRESULT FindFrameDownwards(
|
||||
[in] LPCWSTR pszTargetName,
|
||||
[in] DWORD dwFlags,
|
||||
[out] IUnknown **ppunkTargetFrame);
|
||||
|
||||
HRESULT FindFrameInContext(
|
||||
[in] LPCWSTR pszTargetName,
|
||||
[in] IUnknown *punkContextFrame,
|
||||
[in] DWORD dwFlags,
|
||||
[out] IUnknown **ppunkTargetFrame);
|
||||
|
||||
HRESULT OnChildFrameActivate([in] IUnknown *pUnkChildFrame);
|
||||
HRESULT OnChildFrameDeactivate([in] IUnknown *pUnkChildFrame);
|
||||
|
||||
HRESULT NavigateHack(
|
||||
[in] DWORD grfHLNF,
|
||||
[in, unique] LPBC pbc,
|
||||
[in, unique] IBindStatusCallback *pibsc,
|
||||
[in, unique] LPCWSTR pszTargetName,
|
||||
[in] LPCWSTR pszUrl,
|
||||
[in, unique] LPCWSTR pszLocation);
|
||||
|
||||
HRESULT FindBrowserByIndex(
|
||||
[in] DWORD dwID,
|
||||
[out] IUnknown **ppunkBrowser);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* ITargetFramePriv2 interface
|
||||
*/
|
||||
[
|
||||
object,
|
||||
uuid(b2c867e6-69d6-46f2-a611-ded9a4bd7fef),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface ITargetFramePriv2 : ITargetFramePriv
|
||||
{
|
||||
typedef [unique] ITargetFramePriv2 *LPTARGETFRAMEPRIV2;
|
||||
|
||||
HRESULT AggregatedNavigation2(
|
||||
[in] DWORD grfHLNF,
|
||||
[in, unique] LPBC pbc,
|
||||
[in, unique] IBindStatusCallback *pibsc,
|
||||
[in, unique] LPCWSTR pszTargetName,
|
||||
[in] IUri *pUri,
|
||||
[in, unique] LPCWSTR pszLocation);
|
||||
}
|
|
@ -1727,6 +1727,23 @@ BOOL WINAPI DAD_DragLeave(void);
|
|||
BOOL WINAPI DAD_AutoScroll(HWND,AUTO_SCROLL_DATA*,const POINT*);
|
||||
HRESULT WINAPI SHDoDragDrop(HWND,IDataObject*,IDropSource*,DWORD,LPDWORD);
|
||||
|
||||
/****************************************************************************
|
||||
* Internet shortcut properties
|
||||
*/
|
||||
|
||||
#define PID_IS_URL 2
|
||||
#define PID_IS_NAME 4
|
||||
#define PID_IS_WORKINGDIR 5
|
||||
#define PID_IS_HOTKEY 6
|
||||
#define PID_IS_SHOWCMD 7
|
||||
#define PID_IS_ICONINDEX 8
|
||||
#define PID_IS_ICONFILE 9
|
||||
#define PID_IS_WHATSNEW 10
|
||||
#define PID_IS_AUTHOR 11
|
||||
#define PID_IS_DESCRIPTION 12
|
||||
#define PID_IS_COMMENT 13
|
||||
|
||||
|
||||
LPITEMIDLIST WINAPI ILAppendID(LPITEMIDLIST,LPCSHITEMID,BOOL);
|
||||
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST);
|
||||
LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST);
|
||||
|
|
|
@ -46,7 +46,7 @@ list(APPEND IDL_SOURCES
|
|||
hlink.idl
|
||||
# hnetbcon.idl
|
||||
# hnetcfg.idl
|
||||
# htiface.idl
|
||||
htiface.idl
|
||||
htiframe.idl
|
||||
# htmlfilter.idl
|
||||
httprequest.idl
|
||||
|
@ -149,6 +149,7 @@ list(APPEND IDL_SOURCES
|
|||
bits.idl
|
||||
bits1_5.idl
|
||||
control.idl
|
||||
docobjectservice.idl
|
||||
downloadmgr.idl
|
||||
fusion.idl
|
||||
iads.idl
|
||||
|
|
|
@ -10,6 +10,7 @@ DEFINE_GUID(IID_IBindStatusCallbackHolder,0x79eac9cc,0xbaf9,0x11ce,0x8c,0x82,0x0
|
|||
DEFINE_GUID(CLSID_StdHlink, 0x79eac9d0, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa,0x00,0x4b,0xa9,0x0b);
|
||||
DEFINE_GUID(CLSID_StdHlinkBrowseContext, 0x79eac9d1, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa,0x00,0x4b,0xa9,0x0b);
|
||||
DEFINE_GUID(SID_SContainerDispatch, 0xb722be00,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa,0x00,0x40,0x47,0x70);
|
||||
DEFINE_GUID(CGID_DocHostCommandHandler,0xf38bc242,0xb950,0x11d1,0x89,0x18,0x00,0xc0,0x4f,0xc2,0xc8,0x36);
|
||||
|
||||
//SID_SVersionHost
|
||||
//CGID_InternetExplorer
|
||||
|
@ -35,7 +36,6 @@ DEFINE_GUID(SID_SContainerDispatch, 0xb722be00,0x4e68,0x101b,0xa2,0xbc,0x00,0xaa
|
|||
//BFID_RGB_4
|
||||
//BFID_MONOCHROME
|
||||
//SID_SHTMLEditServices
|
||||
//CGID_DocHostCommandHandler
|
||||
//CLSID_HTMLPluginDocument
|
||||
//CLSID_HTMLApplication
|
||||
//CLSID_HTADocument
|
||||
|
|
|
@ -70,6 +70,7 @@ reactos/dll/win32/hnetcfg # Synced to Wine-1.5.4
|
|||
reactos/dll/win32/httpapi # Synced to Wine-1.5.4
|
||||
reactos/dll/win32/iccvid # Synced to Wine-1.5.19
|
||||
reactos/dll/win32/icmp # Synced to Wine-0_9_10
|
||||
reactos/dll/win32/ieframe # Synced to Wine-1.5.26
|
||||
reactos/dll/win32/imaadp32.acm # Synced to Wine-1.5.4
|
||||
reactos/dll/win32/imagehlp # Synced to Wine-1.5.4
|
||||
reactos/dll/win32/imm32 # Synced to Wine-1.5.19
|
||||
|
|
Loading…
Reference in a new issue