2001-01-11 22:32:44 +00:00
|
|
|
/*
|
2002-05-05 19:40:57 +00:00
|
|
|
* Header includes for shdocvw.dll
|
|
|
|
*
|
2002-03-09 23:29:33 +00:00
|
|
|
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
2006-01-25 12:14:57 +00:00
|
|
|
* Copyright 2005-2006 Jacek Caban for CodeWeavers
|
2002-03-09 23:29:33 +00:00
|
|
|
*
|
|
|
|
* 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
|
2006-05-18 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2001-01-11 22:32:44 +00:00
|
|
|
*/
|
|
|
|
|
2002-05-05 19:40:57 +00:00
|
|
|
#ifndef __WINE_SHDOCVW_H
|
|
|
|
#define __WINE_SHDOCVW_H
|
|
|
|
|
2005-09-06 11:41:14 +00:00
|
|
|
#define COBJMACROS
|
|
|
|
|
2003-09-05 23:08:26 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#include "windef.h"
|
2002-05-05 19:40:57 +00:00
|
|
|
#include "winbase.h"
|
2003-09-05 23:08:26 +00:00
|
|
|
#include "wingdi.h"
|
2002-05-05 19:40:57 +00:00
|
|
|
#include "winuser.h"
|
|
|
|
|
2002-12-05 20:33:07 +00:00
|
|
|
#include "ole2.h"
|
|
|
|
#include "olectl.h"
|
|
|
|
#include "shlobj.h"
|
2003-09-04 02:00:46 +00:00
|
|
|
#include "exdisp.h"
|
2005-11-17 11:03:53 +00:00
|
|
|
#include "mshtmhst.h"
|
2006-02-08 11:42:23 +00:00
|
|
|
#include "hlink.h"
|
2010-05-20 11:47:02 +00:00
|
|
|
#include "htiframe.h"
|
2002-05-05 19:40:57 +00:00
|
|
|
|
2008-01-18 20:53:06 +00:00
|
|
|
#include "wine/unicode.h"
|
2010-06-20 18:25:34 +00:00
|
|
|
#include "resource.h"
|
|
|
|
|
2008-01-18 20:53:06 +00:00
|
|
|
|
2010-07-27 12:23:14 +00:00
|
|
|
#define WM_UPDATEADDRBAR (WM_APP+1)
|
|
|
|
|
2005-11-08 16:12:06 +00:00
|
|
|
/**********************************************************************
|
|
|
|
* Shell Instance Objects
|
|
|
|
*/
|
|
|
|
extern HRESULT SHDOCVW_GetShellInstanceObjectClassObject(REFCLSID rclsid,
|
|
|
|
REFIID riid, LPVOID *ppvClassObj);
|
2002-05-05 19:40:57 +00:00
|
|
|
|
|
|
|
/**********************************************************************
|
2005-09-06 11:41:14 +00:00
|
|
|
* WebBrowser declaration for SHDOCVW.DLL
|
2002-05-05 19:40:57 +00:00
|
|
|
*/
|
2005-12-02 10:26:32 +00:00
|
|
|
|
|
|
|
typedef struct ConnectionPoint ConnectionPoint;
|
2008-01-18 20:53:25 +00:00
|
|
|
typedef struct DocHost DocHost;
|
2005-12-02 10:26:32 +00:00
|
|
|
|
2006-05-17 16:25:33 +00:00
|
|
|
typedef struct {
|
2006-05-17 16:26:30 +00:00
|
|
|
const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
|
|
|
|
|
2006-05-17 16:25:33 +00:00
|
|
|
ConnectionPoint *wbe2;
|
|
|
|
ConnectionPoint *wbe;
|
|
|
|
ConnectionPoint *pns;
|
2006-05-17 16:26:30 +00:00
|
|
|
|
|
|
|
IUnknown *impl;
|
2006-05-17 16:25:33 +00:00
|
|
|
} ConnectionPointContainer;
|
|
|
|
|
2010-07-27 16:14:54 +00:00
|
|
|
typedef struct {
|
2010-07-27 16:15:18 +00:00
|
|
|
const IHlinkFrameVtbl *lpIHlinkFrameVtbl;
|
|
|
|
const ITargetFrame2Vtbl *lpITargetFrame2Vtbl;
|
2010-07-27 16:14:54 +00:00
|
|
|
|
|
|
|
IUnknown *outer;
|
|
|
|
DocHost *doc_host;
|
|
|
|
} HlinkFrame;
|
|
|
|
|
2008-01-18 20:53:25 +00:00
|
|
|
struct _task_header_t;
|
|
|
|
|
|
|
|
typedef void (*task_proc_t)(DocHost*, struct _task_header_t*);
|
|
|
|
|
|
|
|
typedef struct _task_header_t {
|
|
|
|
task_proc_t proc;
|
|
|
|
} task_header_t;
|
|
|
|
|
2010-07-29 08:28:02 +00:00
|
|
|
typedef struct _IDocHostContainerVtbl
|
|
|
|
{
|
|
|
|
void (WINAPI* GetDocObjRect)(DocHost*,RECT*);
|
|
|
|
HRESULT (WINAPI* SetStatusText)(DocHost*,LPCWSTR);
|
|
|
|
void (WINAPI* SetURL)(DocHost*,LPCWSTR);
|
|
|
|
} IDocHostContainerVtbl;
|
|
|
|
|
2008-01-18 20:53:25 +00:00
|
|
|
struct DocHost {
|
2006-04-17 22:24:59 +00:00
|
|
|
const IOleClientSiteVtbl *lpOleClientSiteVtbl;
|
2006-04-17 22:26:47 +00:00
|
|
|
const IOleInPlaceSiteVtbl *lpOleInPlaceSiteVtbl;
|
2006-04-17 22:28:37 +00:00
|
|
|
const IDocHostUIHandler2Vtbl *lpDocHostUIHandlerVtbl;
|
2006-04-17 22:31:22 +00:00
|
|
|
const IOleDocumentSiteVtbl *lpOleDocumentSiteVtbl;
|
2006-04-17 22:32:43 +00:00
|
|
|
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
|
2006-04-17 22:34:21 +00:00
|
|
|
const IDispatchVtbl *lpDispatchVtbl;
|
2009-08-29 23:00:06 +00:00
|
|
|
const IPropertyNotifySinkVtbl *lpIPropertyNotifySinkVtbl;
|
2006-04-17 22:35:16 +00:00
|
|
|
const IServiceProviderVtbl *lpServiceProviderVtbl;
|
2006-04-17 22:24:59 +00:00
|
|
|
|
2006-04-17 22:36:09 +00:00
|
|
|
/* Interfaces of InPlaceFrame object */
|
|
|
|
const IOleInPlaceFrameVtbl *lpOleInPlaceFrameVtbl;
|
|
|
|
|
2006-04-17 22:24:59 +00:00
|
|
|
IDispatch *disp;
|
|
|
|
|
2007-03-09 15:50:01 +00:00
|
|
|
IDispatch *client_disp;
|
|
|
|
IDocHostUIHandler *hostui;
|
2007-03-09 15:56:02 +00:00
|
|
|
IOleInPlaceFrame *frame;
|
2007-03-09 15:50:01 +00:00
|
|
|
|
2006-04-17 22:31:22 +00:00
|
|
|
IUnknown *document;
|
|
|
|
IOleDocumentView *view;
|
2010-03-13 15:43:24 +00:00
|
|
|
IUnknown *doc_navigate;
|
2006-04-17 22:28:37 +00:00
|
|
|
|
2010-07-29 08:28:02 +00:00
|
|
|
const IDocHostContainerVtbl *container_vtbl;
|
|
|
|
|
2006-04-17 22:26:47 +00:00
|
|
|
HWND hwnd;
|
|
|
|
HWND frame_hwnd;
|
2006-04-17 22:41:43 +00:00
|
|
|
|
2006-04-17 22:42:45 +00:00
|
|
|
LPOLESTR url;
|
|
|
|
|
2007-03-09 15:52:16 +00:00
|
|
|
VARIANT_BOOL silent;
|
|
|
|
VARIANT_BOOL offline;
|
2008-03-13 12:16:41 +00:00
|
|
|
VARIANT_BOOL busy;
|
2007-03-09 15:52:16 +00:00
|
|
|
|
2009-08-29 23:02:03 +00:00
|
|
|
READYSTATE ready_state;
|
2010-03-13 15:43:48 +00:00
|
|
|
READYSTATE doc_state;
|
2009-08-29 23:02:03 +00:00
|
|
|
DWORD prop_notif_cookie;
|
|
|
|
BOOL is_prop_notif;
|
|
|
|
|
2006-05-17 16:25:33 +00:00
|
|
|
ConnectionPointContainer cps;
|
2008-01-18 20:53:25 +00:00
|
|
|
};
|
2006-04-17 22:24:59 +00:00
|
|
|
|
2006-08-03 00:36:15 +00:00
|
|
|
struct WebBrowser {
|
2005-11-15 12:03:25 +00:00
|
|
|
/* Interfaces available via WebBrowser object */
|
|
|
|
|
2005-09-12 21:17:57 +00:00
|
|
|
const IWebBrowser2Vtbl *lpWebBrowser2Vtbl;
|
2005-09-12 10:10:04 +00:00
|
|
|
const IOleObjectVtbl *lpOleObjectVtbl;
|
|
|
|
const IOleInPlaceObjectVtbl *lpOleInPlaceObjectVtbl;
|
|
|
|
const IOleControlVtbl *lpOleControlVtbl;
|
|
|
|
const IPersistStorageVtbl *lpPersistStorageVtbl;
|
2007-10-31 04:06:58 +00:00
|
|
|
const IPersistMemoryVtbl *lpPersistMemoryVtbl;
|
2005-09-12 10:10:04 +00:00
|
|
|
const IPersistStreamInitVtbl *lpPersistStreamInitVtbl;
|
|
|
|
const IProvideClassInfo2Vtbl *lpProvideClassInfoVtbl;
|
2008-11-11 18:57:49 +00:00
|
|
|
const IViewObject2Vtbl *lpViewObjectVtbl;
|
2005-12-01 10:36:52 +00:00
|
|
|
const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl;
|
2006-05-17 16:28:13 +00:00
|
|
|
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
|
2009-01-26 09:34:11 +00:00
|
|
|
const IServiceProviderVtbl *lpServiceProviderVtbl;
|
2010-05-18 13:17:29 +00:00
|
|
|
const IDataObjectVtbl *lpDataObjectVtbl;
|
2010-07-27 16:14:54 +00:00
|
|
|
HlinkFrame hlink_frame;
|
2002-05-05 19:40:57 +00:00
|
|
|
|
2005-07-13 11:59:15 +00:00
|
|
|
LONG ref;
|
2005-09-16 18:44:37 +00:00
|
|
|
|
2006-05-23 18:03:30 +00:00
|
|
|
INT version;
|
|
|
|
|
2005-09-16 18:44:37 +00:00
|
|
|
IOleClientSite *client;
|
2005-11-16 11:46:56 +00:00
|
|
|
IOleContainer *container;
|
2006-04-14 12:42:14 +00:00
|
|
|
IOleInPlaceSite *inplace;
|
2005-11-16 11:46:56 +00:00
|
|
|
|
|
|
|
/* window context */
|
|
|
|
|
|
|
|
HWND frame_hwnd;
|
|
|
|
IOleInPlaceUIWindow *uiwindow;
|
|
|
|
RECT pos_rect;
|
|
|
|
RECT clip_rect;
|
|
|
|
OLEINPLACEFRAMEINFO frameinfo;
|
2006-07-31 11:22:32 +00:00
|
|
|
SIZEL extent;
|
2005-11-17 11:40:55 +00:00
|
|
|
|
2005-11-22 11:59:57 +00:00
|
|
|
HWND shell_embedding_hwnd;
|
|
|
|
|
2008-05-12 14:22:10 +00:00
|
|
|
VARIANT_BOOL register_browser;
|
2006-04-28 18:29:07 +00:00
|
|
|
VARIANT_BOOL visible;
|
2006-04-28 21:45:36 +00:00
|
|
|
VARIANT_BOOL menu_bar;
|
2006-04-29 11:33:05 +00:00
|
|
|
VARIANT_BOOL address_bar;
|
2006-04-29 11:34:38 +00:00
|
|
|
VARIANT_BOOL status_bar;
|
2006-04-29 11:35:29 +00:00
|
|
|
VARIANT_BOOL tool_bar;
|
2007-09-23 20:37:01 +00:00
|
|
|
VARIANT_BOOL full_screen;
|
2008-02-22 10:34:06 +00:00
|
|
|
VARIANT_BOOL theater_mode;
|
2006-04-28 18:29:07 +00:00
|
|
|
|
2006-04-17 22:24:59 +00:00
|
|
|
DocHost doc_host;
|
2006-08-03 00:36:15 +00:00
|
|
|
};
|
2005-09-06 11:41:14 +00:00
|
|
|
|
2006-08-03 00:36:15 +00:00
|
|
|
struct InternetExplorer {
|
2006-04-19 18:33:32 +00:00
|
|
|
const IWebBrowser2Vtbl *lpWebBrowser2Vtbl;
|
2010-07-27 16:15:38 +00:00
|
|
|
HlinkFrame hlink_frame;
|
2006-04-19 18:33:32 +00:00
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
HWND frame_hwnd;
|
2010-07-29 09:35:42 +00:00
|
|
|
HWND status_hwnd;
|
2010-07-29 10:04:46 +00:00
|
|
|
HMENU menu;
|
2006-04-19 18:33:32 +00:00
|
|
|
|
|
|
|
DocHost doc_host;
|
2006-08-03 00:36:15 +00:00
|
|
|
};
|
2006-04-19 18:33:32 +00:00
|
|
|
|
2005-09-12 21:17:57 +00:00
|
|
|
#define WEBBROWSER(x) ((IWebBrowser*) &(x)->lpWebBrowser2Vtbl)
|
|
|
|
#define WEBBROWSER2(x) ((IWebBrowser2*) &(x)->lpWebBrowser2Vtbl)
|
2005-09-12 10:10:04 +00:00
|
|
|
#define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
|
|
|
|
#define INPLACEOBJ(x) ((IOleInPlaceObject*) &(x)->lpOleInPlaceObjectVtbl)
|
|
|
|
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
|
|
|
|
#define PERSTORAGE(x) ((IPersistStorage*) &(x)->lpPersistStorageVtbl)
|
2007-10-31 04:06:58 +00:00
|
|
|
#define PERMEMORY(x) ((IPersistMemory*) &(x)->lpPersistMemoryVtbl)
|
2005-09-12 10:10:04 +00:00
|
|
|
#define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
|
|
|
|
#define CLASSINFO(x) ((IProvideClassInfo2*) &(x)->lpProvideClassInfoVtbl)
|
|
|
|
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
|
2005-11-12 19:09:46 +00:00
|
|
|
#define VIEWOBJ(x) ((IViewObject*) &(x)->lpViewObjectVtbl);
|
|
|
|
#define VIEWOBJ2(x) ((IViewObject2*) &(x)->lpViewObjectVtbl);
|
2005-12-01 10:36:52 +00:00
|
|
|
#define ACTIVEOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl)
|
2006-05-17 16:28:13 +00:00
|
|
|
#define OLECMD(x) ((IOleCommandTarget*) &(x)->lpOleCommandTargetVtbl)
|
2010-05-18 13:17:29 +00:00
|
|
|
#define DATAOBJECT(x) ((IDataObject*) &(x)->lpDataObjectVtbl)
|
2002-05-05 19:40:57 +00:00
|
|
|
|
2005-11-15 12:03:25 +00:00
|
|
|
#define CLIENTSITE(x) ((IOleClientSite*) &(x)->lpOleClientSiteVtbl)
|
2005-11-16 11:21:00 +00:00
|
|
|
#define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl)
|
2005-11-17 11:03:53 +00:00
|
|
|
#define DOCHOSTUI(x) ((IDocHostUIHandler*) &(x)->lpDocHostUIHandlerVtbl)
|
|
|
|
#define DOCHOSTUI2(x) ((IDocHostUIHandler2*) &(x)->lpDocHostUIHandlerVtbl)
|
2005-11-28 10:24:49 +00:00
|
|
|
#define DOCSITE(x) ((IOleDocumentSite*) &(x)->lpOleDocumentSiteVtbl)
|
2006-01-26 12:30:04 +00:00
|
|
|
#define CLDISP(x) ((IDispatch*) &(x)->lpDispatchVtbl)
|
2009-08-29 23:00:06 +00:00
|
|
|
#define PROPNOTIF(x) ((IPropertyNotifySink*) &(x)->lpIPropertyNotifySinkVtbl)
|
2006-04-17 22:35:16 +00:00
|
|
|
#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
|
2005-11-15 12:03:25 +00:00
|
|
|
|
2005-11-28 10:01:17 +00:00
|
|
|
#define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl)
|
|
|
|
|
2010-07-27 16:14:54 +00:00
|
|
|
#define HLINKFRAME(x) ((IHlinkFrame*) &(x)->lpIHlinkFrameVtbl)
|
2010-07-27 16:15:18 +00:00
|
|
|
#define TARGETFRAME2(x) ((ITargetFrame2*) &(x)->lpITargetFrame2Vtbl)
|
2010-07-27 16:14:54 +00:00
|
|
|
|
2005-09-06 11:41:14 +00:00
|
|
|
void WebBrowser_OleObject_Init(WebBrowser*);
|
2005-11-12 19:09:46 +00:00
|
|
|
void WebBrowser_ViewObject_Init(WebBrowser*);
|
2010-05-18 13:17:29 +00:00
|
|
|
void WebBrowser_DataObject_Init(WebBrowser*);
|
2005-09-08 11:01:57 +00:00
|
|
|
void WebBrowser_Persist_Init(WebBrowser*);
|
2005-09-08 18:55:50 +00:00
|
|
|
void WebBrowser_ClassInfo_Init(WebBrowser*);
|
2002-05-05 19:40:57 +00:00
|
|
|
|
2006-04-17 22:41:43 +00:00
|
|
|
void WebBrowser_OleObject_Destroy(WebBrowser*);
|
|
|
|
|
2010-07-29 08:28:02 +00:00
|
|
|
void DocHost_Init(DocHost*,IDispatch*,const IDocHostContainerVtbl*);
|
2006-04-17 22:38:06 +00:00
|
|
|
void DocHost_ClientSite_Init(DocHost*);
|
|
|
|
void DocHost_Frame_Init(DocHost*);
|
2010-01-22 16:12:26 +00:00
|
|
|
void release_dochost_client(DocHost*);
|
2005-11-28 10:01:17 +00:00
|
|
|
|
2006-04-17 22:41:43 +00:00
|
|
|
void DocHost_Release(DocHost*);
|
|
|
|
void DocHost_ClientSite_Release(DocHost*);
|
2006-05-17 16:26:30 +00:00
|
|
|
|
|
|
|
void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*);
|
|
|
|
void ConnectionPointContainer_Destroy(ConnectionPointContainer*);
|
2005-11-16 11:46:56 +00:00
|
|
|
|
2010-07-27 16:14:54 +00:00
|
|
|
void HlinkFrame_Init(HlinkFrame*,IUnknown*,DocHost*);
|
|
|
|
BOOL HlinkFrame_QI(HlinkFrame*,REFIID,void**);
|
|
|
|
|
2006-05-23 18:03:30 +00:00
|
|
|
HRESULT WebBrowserV1_Create(IUnknown*,REFIID,void**);
|
|
|
|
HRESULT WebBrowserV2_Create(IUnknown*,REFIID,void**);
|
2002-05-05 19:40:57 +00:00
|
|
|
|
2006-04-17 22:42:45 +00:00
|
|
|
void create_doc_view_hwnd(DocHost*);
|
2006-04-17 22:39:15 +00:00
|
|
|
void deactivate_document(DocHost*);
|
2009-08-29 23:00:53 +00:00
|
|
|
HRESULT dochost_object_available(DocHost*,IUnknown*);
|
2005-12-02 10:26:32 +00:00
|
|
|
void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*);
|
2007-09-09 18:12:39 +00:00
|
|
|
HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*);
|
2007-09-09 18:13:31 +00:00
|
|
|
HRESULT go_home(DocHost*);
|
2010-03-13 15:43:48 +00:00
|
|
|
void set_doc_state(DocHost*,READYSTATE);
|
2005-11-28 10:17:28 +00:00
|
|
|
|
2008-01-18 20:53:25 +00:00
|
|
|
#define WM_DOCHOSTTASK (WM_USER+0x300)
|
|
|
|
void push_dochost_task(DocHost*,task_header_t*,task_proc_t,BOOL);
|
|
|
|
LRESULT process_dochost_task(DocHost*,LPARAM);
|
|
|
|
|
2006-04-19 18:33:32 +00:00
|
|
|
HRESULT InternetExplorer_Create(IUnknown*,REFIID,void**);
|
|
|
|
void InternetExplorer_WebBrowser_Init(InternetExplorer*);
|
|
|
|
|
2006-10-25 21:06:35 +00:00
|
|
|
HRESULT CUrlHistory_Create(IUnknown*,REFIID,void**);
|
|
|
|
|
2008-08-03 09:18:26 +00:00
|
|
|
HRESULT InternetShortcut_Create(IUnknown*,REFIID,void**);
|
|
|
|
|
2009-03-24 09:09:25 +00:00
|
|
|
HRESULT TaskbarList_Create(IUnknown*,REFIID,void**);
|
|
|
|
|
2010-07-29 11:45:17 +00:00
|
|
|
#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
|
|
|
|
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
|
2005-09-06 11:41:14 +00:00
|
|
|
|
2005-01-27 10:43:53 +00:00
|
|
|
/**********************************************************************
|
|
|
|
* Dll lifetime tracking declaration for shdocvw.dll
|
|
|
|
*/
|
|
|
|
extern LONG SHDOCVW_refCount;
|
2005-06-20 14:18:03 +00:00
|
|
|
static inline void SHDOCVW_LockModule(void) { InterlockedIncrement( &SHDOCVW_refCount ); }
|
|
|
|
static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_refCount ); }
|
2005-01-27 10:43:53 +00:00
|
|
|
|
2005-11-22 11:59:57 +00:00
|
|
|
extern HINSTANCE shdocvw_hinstance;
|
2006-04-07 08:52:00 +00:00
|
|
|
extern void register_iewindow_class(void);
|
|
|
|
extern void unregister_iewindow_class(void);
|
2010-07-27 11:09:47 +00:00
|
|
|
extern void adjust_ie_docobj_rect(HWND, RECT*);
|
2010-07-29 11:45:17 +00:00
|
|
|
extern HRESULT update_ie_statustext(InternetExplorer*, LPCWSTR);
|
2005-11-22 11:59:57 +00:00
|
|
|
|
2006-04-19 18:37:57 +00:00
|
|
|
HRESULT register_class_object(BOOL);
|
2006-07-31 11:27:22 +00:00
|
|
|
HRESULT get_typeinfo(ITypeInfo**);
|
2007-11-02 18:51:53 +00:00
|
|
|
DWORD register_iexplore(BOOL);
|
2006-04-19 18:37:57 +00:00
|
|
|
|
2009-10-11 19:24:51 +00:00
|
|
|
const char *debugstr_variant(const VARIANT*);
|
|
|
|
|
2006-05-11 04:45:43 +00:00
|
|
|
/* memory allocation functions */
|
|
|
|
|
2007-11-27 23:09:35 +00:00
|
|
|
static inline void *heap_alloc(size_t len)
|
2006-05-11 04:45:43 +00:00
|
|
|
{
|
|
|
|
return HeapAlloc(GetProcessHeap(), 0, len);
|
|
|
|
}
|
|
|
|
|
2010-03-13 15:43:06 +00:00
|
|
|
static inline void *heap_alloc_zero(size_t len)
|
|
|
|
{
|
|
|
|
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
|
|
|
}
|
|
|
|
|
2007-11-27 23:09:35 +00:00
|
|
|
static inline void *heap_realloc(void *mem, size_t len)
|
2006-05-11 04:45:43 +00:00
|
|
|
{
|
|
|
|
return HeapReAlloc(GetProcessHeap(), 0, mem, len);
|
|
|
|
}
|
|
|
|
|
2007-11-27 23:09:35 +00:00
|
|
|
static inline BOOL heap_free(void *mem)
|
2006-05-11 04:45:43 +00:00
|
|
|
{
|
|
|
|
return HeapFree(GetProcessHeap(), 0, mem);
|
|
|
|
}
|
|
|
|
|
2008-01-18 20:53:06 +00:00
|
|
|
static inline LPWSTR heap_strdupW(LPCWSTR str)
|
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
|
|
|
|
if(str) {
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
size = (strlenW(str)+1)*sizeof(WCHAR);
|
|
|
|
ret = heap_alloc(size);
|
|
|
|
memcpy(ret, str, size);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2008-08-03 09:18:26 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2002-05-05 19:40:57 +00:00
|
|
|
#endif /* __WINE_SHDOCVW_H */
|