ReactOS 0.4.15-dev-7953-g1f49173
pluginhost.c File Reference
#include "mshtml_private.h"
Include dependency graph for pluginhost.c:

Go to the source code of this file.

Classes

struct  sink_entry_t
 
struct  PHEventSink
 
struct  InstallCallback
 
struct  install_entry_t
 

Functions

static BOOL check_load_safety (PluginHost *host)
 
static BOOL check_script_safety (PluginHost *host)
 
static void update_readystate (PluginHost *host)
 
static void get_pos_rect (PluginHost *host, RECT *ret)
 
static void load_prop_bag (PluginHost *host, IPersistPropertyBag *persist_prop_bag)
 
static void load_plugin (PluginHost *host)
 
static void initialize_plugin_object (PluginHost *host)
 
static void embed_plugin_object (PluginHost *host)
 
void update_plugin_window (PluginHost *host, HWND hwnd, const RECT *rect)
 
static void notif_enabled (PluginHost *plugin_host)
 
void notif_container_change (HTMLPluginContainer *plugin_container, DISPID dispid)
 
HRESULT get_plugin_disp (HTMLPluginContainer *plugin_container, IDispatch **ret)
 
HRESULT get_plugin_dispid (HTMLPluginContainer *plugin_container, WCHAR *name, DISPID *ret)
 
HRESULT invoke_plugin_prop (HTMLPluginContainer *plugin_container, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei)
 
static sink_entry_tfind_sink_entry (PHEventSink *sink, DISPID id)
 
static void add_sink_handler (PHEventSink *sink, DISPID id, IDispatch *disp)
 
static PHEventSinkPHEventSink_from_IDispatch (IDispatch *iface)
 
static HRESULT WINAPI PHEventSink_QueryInterface (IDispatch *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PHEventSink_AddRef (IDispatch *iface)
 
static ULONG WINAPI PHEventSink_Release (IDispatch *iface)
 
static HRESULT WINAPI PHEventSink_GetTypeInfoCount (IDispatch *iface, UINT *pctinfo)
 
static HRESULT WINAPI PHEventSink_GetTypeInfo (IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI PHEventSink_GetIDsOfNames (IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI PHEventSink_Invoke (IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static PHEventSinkcreate_event_sink (PluginHost *plugin_host, ITypeInfo *typeinfo)
 
static ITypeInfoget_eventiface_info (HTMLPluginContainer *plugin_container, ITypeInfo *class_info)
 
void bind_activex_event (HTMLDocumentNode *doc, HTMLPluginContainer *plugin_container, WCHAR *event, IDispatch *disp)
 
static PluginHostimpl_from_IOleClientSite (IOleClientSite *iface)
 
static HRESULT WINAPI PHClientSite_QueryInterface (IOleClientSite *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PHClientSite_AddRef (IOleClientSite *iface)
 
static void release_plugin_ifaces (PluginHost *This)
 
static ULONG WINAPI PHClientSite_Release (IOleClientSite *iface)
 
static HRESULT WINAPI PHClientSite_SaveObject (IOleClientSite *iface)
 
static HRESULT WINAPI PHClientSite_GetMoniker (IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
 
static HRESULT WINAPI PHClientSite_GetContainer (IOleClientSite *iface, IOleContainer **ppContainer)
 
static HRESULT WINAPI PHClientSite_ShowObject (IOleClientSite *iface)
 
static HRESULT WINAPI PHClientSite_OnShowWindow (IOleClientSite *iface, BOOL fShow)
 
static HRESULT WINAPI PHClientSite_RequestNewObjectLayout (IOleClientSite *iface)
 
static PluginHostimpl_from_IAdviseSinkEx (IAdviseSinkEx *iface)
 
static HRESULT WINAPI PHAdviseSinkEx_QueryInterface (IAdviseSinkEx *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PHAdviseSinkEx_AddRef (IAdviseSinkEx *iface)
 
static ULONG WINAPI PHAdviseSinkEx_Release (IAdviseSinkEx *iface)
 
static void WINAPI PHAdviseSinkEx_OnDataChange (IAdviseSinkEx *iface, FORMATETC *pFormatetc, STGMEDIUM *pStgMedium)
 
static void WINAPI PHAdviseSinkEx_OnViewChange (IAdviseSinkEx *iface, DWORD dwAspect, LONG lindex)
 
static void WINAPI PHAdviseSinkEx_OnRename (IAdviseSinkEx *iface, IMoniker *pmk)
 
static void WINAPI PHAdviseSinkEx_OnSave (IAdviseSinkEx *iface)
 
static void WINAPI PHAdviseSinkEx_OnClose (IAdviseSinkEx *iface)
 
static void WINAPI PHAdviseSinkEx_OnViewStatusChange (IAdviseSinkEx *iface, DWORD dwViewStatus)
 
static PluginHostimpl_from_IPropertyNotifySink (IPropertyNotifySink *iface)
 
static HRESULT WINAPI PHPropertyNotifySink_QueryInterface (IPropertyNotifySink *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PHPropertyNotifySink_AddRef (IPropertyNotifySink *iface)
 
static ULONG WINAPI PHPropertyNotifySink_Release (IPropertyNotifySink *iface)
 
static HRESULT WINAPI PHPropertyNotifySink_OnChanged (IPropertyNotifySink *iface, DISPID dispID)
 
static HRESULT WINAPI PHPropertyNotifySink_OnRequestEdit (IPropertyNotifySink *iface, DISPID dispID)
 
static PluginHostimpl_from_IDispatch (IDispatch *iface)
 
static HRESULT WINAPI PHDispatch_QueryInterface (IDispatch *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PHDispatch_AddRef (IDispatch *iface)
 
static ULONG WINAPI PHDispatch_Release (IDispatch *iface)
 
static HRESULT WINAPI PHDispatch_GetTypeInfoCount (IDispatch *iface, UINT *pctinfo)
 
static HRESULT WINAPI PHDispatch_GetTypeInfo (IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI PHDispatch_GetIDsOfNames (IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI PHDispatch_Invoke (IDispatch *iface, DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static PluginHostimpl_from_IOleInPlaceSiteEx (IOleInPlaceSiteEx *iface)
 
static HRESULT WINAPI PHInPlaceSite_QueryInterface (IOleInPlaceSiteEx *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PHInPlaceSite_AddRef (IOleInPlaceSiteEx *iface)
 
static ULONG WINAPI PHInPlaceSite_Release (IOleInPlaceSiteEx *iface)
 
static HRESULT WINAPI PHInPlaceSite_GetWindow (IOleInPlaceSiteEx *iface, HWND *phwnd)
 
static HRESULT WINAPI PHInPlaceSite_ContextSensitiveHelp (IOleInPlaceSiteEx *iface, BOOL fEnterMode)
 
static HRESULT WINAPI PHInPlaceSite_CanInPlaceActivate (IOleInPlaceSiteEx *iface)
 
static HRESULT WINAPI PHInPlaceSite_OnInPlaceActivate (IOleInPlaceSiteEx *iface)
 
static HRESULT WINAPI PHInPlaceSite_OnUIActivate (IOleInPlaceSiteEx *iface)
 
static HRESULT WINAPI PHInPlaceSite_GetWindowContext (IOleInPlaceSiteEx *iface, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, RECT *lprcPosRect, RECT *lprcClipRect, OLEINPLACEFRAMEINFO *frame_info)
 
static HRESULT WINAPI PHInPlaceSite_Scroll (IOleInPlaceSiteEx *iface, SIZE scrollExtent)
 
static HRESULT WINAPI PHInPlaceSite_OnUIDeactivate (IOleInPlaceSiteEx *iface, BOOL fUndoable)
 
static HRESULT WINAPI PHInPlaceSite_OnInPlaceDeactivate (IOleInPlaceSiteEx *iface)
 
static HRESULT WINAPI PHInPlaceSite_DiscardUndoState (IOleInPlaceSiteEx *iface)
 
static HRESULT WINAPI PHInPlaceSite_DeactivateAndUndo (IOleInPlaceSiteEx *iface)
 
static HRESULT WINAPI PHInPlaceSite_OnPosRectChange (IOleInPlaceSiteEx *iface, LPCRECT lprcPosRect)
 
static HRESULT WINAPI PHInPlaceSiteEx_OnInPlaceActivateEx (IOleInPlaceSiteEx *iface, BOOL *pfNoRedraw, DWORD dwFlags)
 
static HRESULT WINAPI PHInPlaceSiteEx_OnInPlaceDeactivateEx (IOleInPlaceSiteEx *iface, BOOL fNoRedraw)
 
static HRESULT WINAPI PHInPlaceSiteEx_RequestUIActivate (IOleInPlaceSiteEx *iface)
 
static PluginHostimpl_from_IOleControlSite (IOleControlSite *iface)
 
static HRESULT WINAPI PHControlSite_QueryInterface (IOleControlSite *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PHControlSite_AddRef (IOleControlSite *iface)
 
static ULONG WINAPI PHControlSite_Release (IOleControlSite *iface)
 
static HRESULT WINAPI PHControlSite_OnControlInfoChanged (IOleControlSite *iface)
 
static HRESULT WINAPI PHControlSite_LockInPlaceActive (IOleControlSite *iface, BOOL fLock)
 
static HRESULT WINAPI PHControlSite_GetExtendedControl (IOleControlSite *iface, IDispatch **ppDisp)
 
static HRESULT WINAPI PHControlSite_TransformCoords (IOleControlSite *iface, POINTL *pPtlHimetric, POINTF *pPtfContainer, DWORD dwFlags)
 
static HRESULT WINAPI PHControlSite_TranslateAccelerator (IOleControlSite *iface, MSG *pMsg, DWORD grfModifiers)
 
static HRESULT WINAPI PHControlSite_OnFocus (IOleControlSite *iface, BOOL fGotFocus)
 
static HRESULT WINAPI PHControlSite_ShowPropertyFrame (IOleControlSite *iface)
 
static PluginHostimpl_from_IBindHost (IBindHost *iface)
 
static HRESULT WINAPI PHBindHost_QueryInterface (IBindHost *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PHBindHost_AddRef (IBindHost *iface)
 
static ULONG WINAPI PHBindHost_Release (IBindHost *iface)
 
static HRESULT WINAPI PHBindHost_CreateMoniker (IBindHost *iface, LPOLESTR szName, IBindCtx *pBC, IMoniker **ppmk, DWORD dwReserved)
 
static HRESULT WINAPI PHBindHost_MonikerBindToStorage (IBindHost *iface, IMoniker *pMk, IBindCtx *pBC, IBindStatusCallback *pBSC, REFIID riid, void **ppvObj)
 
static HRESULT WINAPI PHBindHost_MonikerBindToObject (IBindHost *iface, IMoniker *pMk, IBindCtx *pBC, IBindStatusCallback *pBSC, REFIID riid, void **ppvObj)
 
static PluginHostimpl_from_IServiceProvider (IServiceProvider *iface)
 
static HRESULT WINAPI PHServiceProvider_QueryInterface (IServiceProvider *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PHServiceProvider_AddRef (IServiceProvider *iface)
 
static ULONG WINAPI PHServiceProvider_Release (IServiceProvider *iface)
 
static HRESULT WINAPI PHServiceProvider_QueryService (IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
 
static BOOL parse_classid (const PRUnichar *classid, CLSID *clsid)
 
static BOOL get_elem_clsid (nsIDOMHTMLElement *elem, CLSID *clsid)
 
static InstallCallbackimpl_from_IBindStatusCallback (IBindStatusCallback *iface)
 
static HRESULT WINAPI InstallCallback_QueryInterface (IBindStatusCallback *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI InstallCallback_AddRef (IBindStatusCallback *iface)
 
static ULONG WINAPI InstallCallback_Release (IBindStatusCallback *iface)
 
static HRESULT WINAPI InstallCallback_OnStartBinding (IBindStatusCallback *iface, DWORD dwReserved, IBinding *pib)
 
static HRESULT WINAPI InstallCallback_GetPriority (IBindStatusCallback *iface, LONG *pnPriority)
 
static HRESULT WINAPI InstallCallback_OnLowResource (IBindStatusCallback *iface, DWORD dwReserved)
 
static HRESULT WINAPI InstallCallback_OnProgress (IBindStatusCallback *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
 
static HRESULT WINAPI InstallCallback_OnStopBinding (IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError)
 
static HRESULT WINAPI InstallCallback_GetBindInfo (IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
 
static HRESULT WINAPI InstallCallback_OnDataAvailable (IBindStatusCallback *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
 
static HRESULT WINAPI InstallCallback_OnObjectAvailable (IBindStatusCallback *iface, REFIID riid, IUnknown *punk)
 
static InstallCallbackimpl_from_IWindowForBindingUI (IWindowForBindingUI *iface)
 
static HRESULT WINAPI WindowForBindingUI_QueryInterface (IWindowForBindingUI *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI WindowForBindingUI_AddRef (IWindowForBindingUI *iface)
 
static ULONG WINAPI WindowForBindingUI_Release (IWindowForBindingUI *iface)
 
static HRESULT WINAPI WindowForBindingUI_GetWindow (IWindowForBindingUI *iface, REFGUID rguidReason, HWND *phwnd)
 
static void install_codebase (const WCHAR *url)
 
static void check_codebase (HTMLInnerWindow *window, nsIDOMHTMLElement *nselem)
 
static IUnknowncreate_activex_object (HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, CLSID *clsid)
 
void detach_plugin_host (PluginHost *host)
 
HRESULT create_plugin_host (HTMLDocumentNode *doc, HTMLPluginContainer *container)
 

Variables

static const IDispatchVtbl PHCPDispatchVtbl
 
static const IOleClientSiteVtbl OleClientSiteVtbl
 
static const IAdviseSinkExVtbl AdviseSinkExVtbl
 
static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl
 
static const IDispatchVtbl DispatchVtbl
 
static const IOleInPlaceSiteExVtbl OleInPlaceSiteExVtbl
 
static const IOleControlSiteVtbl OleControlSiteVtbl
 
static const IBindHostVtbl BindHostVtbl
 
static const IServiceProviderVtbl ServiceProviderVtbl
 
static IBindStatusCallbackVtbl InstallCallbackVtbl
 
static const IWindowForBindingUIVtbl WindowForBindingUIVtbl
 
static struct list install_list = LIST_INIT(install_list)
 
static CRITICAL_SECTION cs_install_list = { &cs_install_list_dbg, -1, 0, 0, 0, 0 }
 
static CRITICAL_SECTION_DEBUG cs_install_list_dbg
 

Function Documentation

◆ add_sink_handler()

static void add_sink_handler ( PHEventSink sink,
DISPID  id,
IDispatch disp 
)
static

Definition at line 486 of file pluginhost.c.

487{
489
490 if(entry) {
491 if(entry->disp)
492 IDispatch_Release(entry->disp);
493 }else {
494 if(!sink->handlers_size) {
495 sink->handlers = heap_alloc(4*sizeof(*sink->handlers));
496 if(!sink->handlers)
497 return;
498 sink->handlers_size = 4;
499 }else if(sink->handlers_cnt == sink->handlers_size) {
500 sink_entry_t *new_handlers;
501
502 new_handlers = heap_realloc(sink->handlers, 2*sink->handlers_size*sizeof(*sink->handlers));
503 if(!new_handlers)
504 return;
505 sink->handlers = new_handlers;
506 sink->handlers_size *= 2;
507 }
508 entry = sink->handlers + sink->handlers_cnt++;
509 entry->id = id;
510 }
511
512 IDispatch_AddRef(disp);
513 entry->disp = disp;
514}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:71
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
GLuint id
Definition: glext.h:5910
uint32_t entry
Definition: isohybrid.c:63
static sink_entry_t * find_sink_entry(PHEventSink *sink, DISPID id)
Definition: pluginhost.c:474
Definition: pluginhost.c:453

Referenced by bind_activex_event().

◆ bind_activex_event()

void bind_activex_event ( HTMLDocumentNode doc,
HTMLPluginContainer plugin_container,
WCHAR event,
IDispatch disp 
)

Definition at line 758 of file pluginhost.c.

759{
760 PluginHost *plugin_host = plugin_container->plugin_host;
761 ITypeInfo *class_info, *source_info;
762 DISPID id;
764
765 TRACE("(%p %p %s %p)\n", doc, plugin_host, debugstr_w(event), disp);
766
767 if(!plugin_host || !plugin_host->plugin_unk) {
768 WARN("detached element %p\n", plugin_host);
769 return;
770 }
771
772 if(plugin_host->sink) {
773 source_info = plugin_host->sink->typeinfo;
774 ITypeInfo_AddRef(source_info);
775 }else {
776 IProvideClassInfo *provide_ci;
777
778 hres = IUnknown_QueryInterface(plugin_host->plugin_unk, &IID_IProvideClassInfo, (void**)&provide_ci);
779 if(FAILED(hres)) {
780 FIXME("No IProvideClassInfo, try GetTypeInfo?\n");
781 return;
782 }
783
784 hres = IProvideClassInfo_GetClassInfo(provide_ci, &class_info);
785 IProvideClassInfo_Release(provide_ci);
786 if(FAILED(hres) || !class_info) {
787 WARN("GetClassInfo failed: %08x\n", hres);
788 return;
789 }
790
791 source_info = get_eventiface_info(plugin_container, class_info);
792 ITypeInfo_Release(class_info);
793 if(!source_info)
794 return;
795 }
796
797 hres = ITypeInfo_GetIDsOfNames(source_info, &event, 1, &id);
798 if(FAILED(hres))
799 WARN("Could not get disp id: %08x\n", hres);
800 else if(!plugin_host->sink)
801 plugin_host->sink = create_event_sink(plugin_host, source_info);
802
803 ITypeInfo_Release(source_info);
804 if(FAILED(hres) || !plugin_host->sink)
805 return;
806
807 add_sink_handler(plugin_host->sink, id, disp);
808}
#define FIXME(fmt,...)
Definition: debug.h:111
#define WARN(fmt,...)
Definition: debug.h:112
struct _cl_event * event
Definition: glext.h:7739
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_w
Definition: kernel32.h:32
HRESULT hres
Definition: protocol.c:465
static VARIANTARG static DISPID
Definition: ordinal.c:52
const GUID IID_IProvideClassInfo
static void add_sink_handler(PHEventSink *sink, DISPID id, IDispatch *disp)
Definition: pluginhost.c:486
static PHEventSink * create_event_sink(PluginHost *plugin_host, ITypeInfo *typeinfo)
Definition: pluginhost.c:650
static ITypeInfo * get_eventiface_info(HTMLPluginContainer *plugin_container, ITypeInfo *class_info)
Definition: pluginhost.c:713
#define TRACE(s)
Definition: solgame.cpp:4
PluginHost * plugin_host
Definition: pluginhost.h:56
ITypeInfo * typeinfo
Definition: pluginhost.c:464
PHEventSink * sink
Definition: pluginhost.h:49
IUnknown * plugin_unk
Definition: pluginhost.h:36

Referenced by bind_event_scripts().

◆ check_codebase()

static void check_codebase ( HTMLInnerWindow window,
nsIDOMHTMLElement nselem 
)
static

Definition at line 1882 of file pluginhost.c.

1883{
1884 BOOL is_on_list = FALSE;
1885 install_entry_t *iter;
1886 const PRUnichar *val;
1887 nsAString val_str;
1888 IUri *uri = NULL;
1889 nsresult nsres;
1890 HRESULT hres;
1891
1892 static const PRUnichar codebaseW[] = {'c','o','d','e','b','a','s','e',0};
1893
1894 nsres = get_elem_attr_value(nselem, codebaseW, &val_str, &val);
1895 if(NS_SUCCEEDED(nsres)) {
1896 if(*val) {
1897 hres = CoInternetCombineUrlEx(window->base.outer_window->uri, val, 0, &uri, 0);
1898 if(FAILED(hres))
1899 uri = NULL;
1900 }
1901 nsAString_Finish(&val_str);
1902 }
1903
1904 if(!uri)
1905 return;
1906
1908
1910 BOOL eq;
1911
1912 hres = IUri_IsEqual(uri, iter->uri, &eq);
1913 if(SUCCEEDED(hres) && eq) {
1914 TRACE("already proceeded\n");
1915 is_on_list = TRUE;
1916 break;
1917 }
1918 }
1919
1920 if(!is_on_list) {
1921 iter = heap_alloc(sizeof(*iter));
1922 if(iter) {
1923 IUri_AddRef(uri);
1924 iter->uri = uri;
1925
1927 }
1928 }
1929
1931
1932 if(!is_on_list) {
1933 BSTR display_uri;
1934
1935 hres = IUri_GetDisplayUri(uri, &display_uri);
1936 if(SUCCEEDED(hres)) {
1937 install_codebase(display_uri);
1938 SysFreeString(display_uri);
1939 }
1940 }
1941
1942 IUri_Release(uri);
1943}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
OLECHAR * BSTR
Definition: compat.h:2293
HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
Definition: uri.c:6762
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint GLfloat * val
Definition: glext.h:7180
nsresult get_elem_attr_value(nsIDOMHTMLElement *nselem, const WCHAR *name, nsAString *val_str, const PRUnichar **val)
Definition: htmlelem.c:143
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define eq(received, expected, label, type)
Definition: locale.c:144
static IHTMLWindow2 * window
Definition: events.c:77
const char * uri
Definition: sec_mgr.c:1588
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
#define NS_SUCCEEDED(res)
WCHAR PRUnichar
Definition: nsiface.idl:48
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
static struct list install_list
Definition: pluginhost.c:1846
static CRITICAL_SECTION cs_install_list
Definition: pluginhost.c:1848
static void install_codebase(const WCHAR *url)
Definition: pluginhost.c:1857
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
Definition: pluginhost.c:1841
IUri * uri
Definition: pluginhost.c:1843
struct list entry
Definition: pluginhost.c:1842
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by create_activex_object().

◆ check_load_safety()

static BOOL check_load_safety ( PluginHost host)
static

Definition at line 21 of file pluginhost.c.

22{
23 DWORD policy_size, policy;
24 struct CONFIRMSAFETY cs;
25 BYTE *ppolicy;
27
28 cs.clsid = host->clsid;
29 cs.pUnk = host->plugin_unk;
30 cs.dwFlags = CONFIRMSAFETYACTION_LOADOBJECT;
31
32 hres = IInternetHostSecurityManager_QueryCustomPolicy(&host->doc->IInternetHostSecurityManager_iface,
33 &GUID_CUSTOM_CONFIRMOBJECTSAFETY, &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0);
34 if(FAILED(hres))
35 return FALSE;
36
37 policy = *(DWORD*)ppolicy;
38 CoTaskMemFree(ppolicy);
39 return policy == URLPOLICY_ALLOW;
40}
const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY
Definition: activex.c:29
unsigned long DWORD
Definition: ntddk_ex.h:95
WDF_INTERRUPT_POLICY policy
#define cs
Definition: i386-dis.c:442
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
char * host
Definition: whois.c:55
unsigned char BYTE
Definition: xxhash.c:193

Referenced by load_prop_bag().

◆ check_script_safety()

static BOOL check_script_safety ( PluginHost host)
static

Definition at line 42 of file pluginhost.c.

43{
44 DISPPARAMS params = {NULL,NULL,0,0};
45 DWORD policy_size, policy;
46 struct CONFIRMSAFETY cs;
47 BYTE *ppolicy;
48 ULONG err = 0;
49 VARIANT v;
51
52 cs.clsid = host->clsid;
53 cs.pUnk = host->plugin_unk;
54 cs.dwFlags = 0;
55
56 hres = IInternetHostSecurityManager_QueryCustomPolicy(&host->doc->IInternetHostSecurityManager_iface,
57 &GUID_CUSTOM_CONFIRMOBJECTSAFETY, &ppolicy, &policy_size, (BYTE*)&cs, sizeof(cs), 0);
58 if(FAILED(hres))
59 return FALSE;
60
61 policy = *(DWORD*)ppolicy;
62 CoTaskMemFree(ppolicy);
63
64 if(policy != URLPOLICY_ALLOW)
65 return FALSE;
66
67 V_VT(&v) = VT_EMPTY;
68 hres = IDispatch_Invoke(host->disp, DISPID_SECURITYCTX, &IID_NULL, 0, DISPATCH_PROPERTYGET, &params, &v, NULL, &err);
69 if(SUCCEEDED(hres)) {
70 FIXME("Handle security ctx %s\n", debugstr_variant(&v));
71 return FALSE;
72 }
73
74 return TRUE;
75}
@ VT_EMPTY
Definition: compat.h:2295
const GLdouble * v
Definition: gl.h:2040
GLenum const GLfloat * params
Definition: glext.h:5645
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define DISPID_SECURITYCTX
Definition: mshtmdid.h:538
struct stdole::DISPPARAMS DISPPARAMS
#define V_VT(A)
Definition: oleauto.h:211
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define IID_NULL
Definition: guiddef.h:98
#define err(...)
uint32_t ULONG
Definition: typedefs.h:59

Referenced by get_plugin_disp(), and invoke_plugin_prop().

◆ create_activex_object()

static IUnknown * create_activex_object ( HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
CLSID clsid 
)
static

Definition at line 1945 of file pluginhost.c.

1946{
1947 IClassFactoryEx *cfex;
1949 IUnknown *obj;
1950 DWORD policy;
1951 HRESULT hres;
1952
1953 if(!get_elem_clsid(nselem, clsid)) {
1954 WARN("Could not determine element CLSID\n");
1955 return NULL;
1956 }
1957
1958 TRACE("clsid %s\n", debugstr_guid(clsid));
1959
1960 policy = 0;
1961 hres = IInternetHostSecurityManager_ProcessUrlAction(&doc->IInternetHostSecurityManager_iface,
1962 URLACTION_ACTIVEX_RUN, (BYTE*)&policy, sizeof(policy), (BYTE*)clsid, sizeof(GUID), 0, 0);
1963 if(FAILED(hres) || policy != URLPOLICY_ALLOW) {
1964 WARN("ProcessUrlAction returned %08x %x\n", hres, policy);
1965 return NULL;
1966 }
1967
1968 hres = CoGetClassObject(clsid, CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER, NULL, &IID_IClassFactory, (void**)&cf);
1970 check_codebase(doc->window, nselem);
1971 if(FAILED(hres))
1972 return NULL;
1973
1974 hres = IClassFactory_QueryInterface(cf, &IID_IClassFactoryEx, (void**)&cfex);
1975 if(SUCCEEDED(hres)) {
1976 FIXME("Use IClassFactoryEx\n");
1977 IClassFactoryEx_Release(cfex);
1978 }
1979
1980 hres = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void**)&obj);
1981 IClassFactory_Release(cf);
1982 if(FAILED(hres))
1983 return NULL;
1984
1985 return obj;
1986}
const GUID IID_IUnknown
const GUID IID_IClassFactory
HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3103
#define debugstr_guid
Definition: kernel32.h:35
REFCLSID clsid
Definition: msctf.c:82
static void check_codebase(HTMLInnerWindow *window, nsIDOMHTMLElement *nselem)
Definition: pluginhost.c:1882
static BOOL get_elem_clsid(nsIDOMHTMLElement *elem, CLSID *clsid)
Definition: pluginhost.c:1647
IInternetHostSecurityManager IInternetHostSecurityManager_iface
HTMLInnerWindow * window
#define REGDB_E_CLASSNOTREG
Definition: winerror.h:2696

Referenced by create_plugin_host().

◆ create_event_sink()

static PHEventSink * create_event_sink ( PluginHost plugin_host,
ITypeInfo typeinfo 
)
static

Definition at line 650 of file pluginhost.c.

651{
652 IConnectionPointContainer *cp_container;
655 TYPEATTR *typeattr;
656 TYPEKIND typekind;
657 GUID guid;
659
660 hres = ITypeInfo_GetTypeAttr(typeinfo, &typeattr);
661 if(FAILED(hres))
662 return NULL;
663
664 typekind = typeattr->typekind;
665 guid = typeattr->guid;
666 ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr);
667
668 TRACE("guid %s typekind %d\n", debugstr_guid(&guid), typekind);
669
670 if(typekind != TKIND_INTERFACE && typekind != TKIND_DISPATCH) {
671 WARN("invalid typekind %d\n", typekind);
672 return NULL;
673 }
674
675 hres = IUnknown_QueryInterface(plugin_host->plugin_unk, &IID_IConnectionPointContainer, (void**)&cp_container);
676 if(FAILED(hres)) {
677 WARN("Could not get IConnectionPointContainer iface: %08x\n", hres);
678 return NULL;
679 }
680
681 hres = IConnectionPointContainer_FindConnectionPoint(cp_container, &guid, &cp);
682 IConnectionPointContainer_Release(cp_container);
683 if(FAILED(hres)) {
684 WARN("Could not find %s connection point\n", debugstr_guid(&guid));
685 return NULL;
686 }
687
688 ret = heap_alloc_zero(sizeof(*ret));
689 if(ret) {
690 ret->IDispatch_iface.lpVtbl = &PHCPDispatchVtbl;
691 ret->ref = 1;
692 ret->host = plugin_host;
693 ret->iid = guid;
694 ret->is_dispiface = typekind == TKIND_DISPATCH;
695
696 ITypeInfo_AddRef(typeinfo);
697 ret->typeinfo = typeinfo;
698
699 hres = IConnectionPoint_Advise(cp, (IUnknown*)&ret->IDispatch_iface, &ret->cookie);
700 }else {
702 }
703
704 IConnectionPoint_Release(cp);
705 if(FAILED(hres)) {
706 WARN("Advise failed: %08x\n", hres);
707 return NULL;
708 }
709
710 return ret;
711}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
POINT cp
Definition: magnifier.c:59
const GUID * guid
const GUID IID_IConnectionPointContainer
static const IDispatchVtbl PHCPDispatchVtbl
Definition: pluginhost.c:640
int ret
@ TKIND_DISPATCH
Definition: widltypes.h:223
@ TKIND_INTERFACE
Definition: widltypes.h:222

Referenced by bind_activex_event().

◆ create_plugin_host()

HRESULT create_plugin_host ( HTMLDocumentNode doc,
HTMLPluginContainer container 
)

Definition at line 2048 of file pluginhost.c.

2049{
2051 IUnknown *unk;
2052 CLSID clsid;
2053
2054 assert(!container->plugin_host);
2055
2056 unk = create_activex_object(doc, container->element.nselem, &clsid);
2057 if(!unk)
2058 return E_FAIL;
2059
2060 host = heap_alloc_zero(sizeof(*host));
2061 if(!host) {
2062 IUnknown_Release(unk);
2063 return E_OUTOFMEMORY;
2064 }
2065
2066 host->IOleClientSite_iface.lpVtbl = &OleClientSiteVtbl;
2067 host->IAdviseSinkEx_iface.lpVtbl = &AdviseSinkExVtbl;
2068 host->IPropertyNotifySink_iface.lpVtbl = &PropertyNotifySinkVtbl;
2069 host->IDispatch_iface.lpVtbl = &DispatchVtbl;
2070 host->IOleInPlaceSiteEx_iface.lpVtbl = &OleInPlaceSiteExVtbl;
2071 host->IOleControlSite_iface.lpVtbl = &OleControlSiteVtbl;
2072 host->IBindHost_iface.lpVtbl = &BindHostVtbl;
2073 host->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
2074
2075 host->ref = 1;
2076
2077 host->plugin_unk = unk;
2078 host->clsid = clsid;
2079
2080 host->doc = doc;
2081 list_add_tail(&doc->plugin_hosts, &host->entry);
2082
2083 container->plugin_host = host;
2084 host->element = container;
2085
2087
2088 return S_OK;
2089}
#define E_FAIL
Definition: ddrawi.h:102
#define assert(x)
Definition: debug.h:53
#define S_OK
Definition: intsafe.h:52
static const IOleClientSiteVtbl OleClientSiteVtbl
Definition: pluginhost.c:992
static const IOleInPlaceSiteExVtbl OleInPlaceSiteExVtbl
Definition: pluginhost.c:1398
static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl
Definition: pluginhost.c:1123
static const IOleControlSiteVtbl OleControlSiteVtbl
Definition: pluginhost.c:1491
static const IAdviseSinkExVtbl AdviseSinkExVtbl
Definition: pluginhost.c:1063
static const IBindHostVtbl BindHostVtbl
Definition: pluginhost.c:1557
static const IDispatchVtbl DispatchVtbl
Definition: pluginhost.c:1185
static IUnknown * create_activex_object(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, CLSID *clsid)
Definition: pluginhost.c:1945
static const IServiceProviderVtbl ServiceProviderVtbl
Definition: pluginhost.c:1609
static void initialize_plugin_object(PluginHost *host)
Definition: pluginhost.c:163
struct list plugin_hosts

Referenced by HTMLObjectElement2_put_classid(), and NPP_New().

◆ detach_plugin_host()

void detach_plugin_host ( PluginHost host)

Definition at line 1988 of file pluginhost.c.

1989{
1990 HRESULT hres;
1991
1992 TRACE("%p\n", host);
1993
1994 if(!host->doc)
1995 return;
1996
1997 if(host->ip_object) {
1998 if(host->ui_active)
1999 IOleInPlaceObject_UIDeactivate(host->ip_object);
2000 IOleInPlaceObject_InPlaceDeactivate(host->ip_object);
2001 }
2002
2003 if(host->plugin_unk) {
2004 IOleObject *ole_obj;
2005
2006 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IOleObject, (void**)&ole_obj);
2007 if(SUCCEEDED(hres)) {
2008 if(!host->ip_object)
2009 IOleObject_Close(ole_obj, OLECLOSE_NOSAVE);
2010 IOleObject_SetClientSite(ole_obj, NULL);
2011 IOleObject_Release(ole_obj);
2012 }
2013 }
2014
2015 if(host->sink) {
2016 IConnectionPointContainer *cp_container;
2018
2019 assert(host->plugin_unk != NULL);
2020
2021 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IConnectionPointContainer, (void**)&cp_container);
2022 if(SUCCEEDED(hres)) {
2023 hres = IConnectionPointContainer_FindConnectionPoint(cp_container, &host->sink->iid, &cp);
2024 IConnectionPointContainer_Release(cp_container);
2025 if(SUCCEEDED(hres)) {
2026 IConnectionPoint_Unadvise(cp, host->sink->cookie);
2027 IConnectionPoint_Release(cp);
2028 }
2029 }
2030
2031 host->sink->host = NULL;
2032 IDispatch_Release(&host->sink->IDispatch_iface);
2033 host->sink = NULL;
2034 }
2035
2037
2038 if(host->element) {
2039 host->element->plugin_host = NULL;
2040 host->element = NULL;
2041 }
2042
2043 list_remove(&host->entry);
2044 list_init(&host->entry);
2045 host->doc = NULL;
2046}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static void list_init(struct list_entry *head)
Definition: list.h:51
const GUID IID_IOleObject
static void release_plugin_ifaces(PluginHost *This)
Definition: pluginhost.c:875

Referenced by detach_inner_window(), HTMLDocumentNode_destructor(), HTMLObjectElement_destructor(), and NPP_Destroy().

◆ embed_plugin_object()

static void embed_plugin_object ( PluginHost host)
static

Definition at line 260 of file pluginhost.c.

261{
262 IOleObject *ole_obj;
263 RECT rect;
265
266 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IOleObject, (void**)&ole_obj);
267 if(FAILED(hres)) {
268 FIXME("Plugin does not support IOleObject\n");
269 return;
270 }
271
273 hres = IOleObject_DoVerb(ole_obj, OLEIVERB_INPLACEACTIVATE, NULL, &host->IOleClientSite_iface, 0, host->hwnd, &rect);
274 IOleObject_Release(ole_obj);
275 if(FAILED(hres))
276 WARN("DoVerb failed: %08x\n", hres);
277
278 if(host->ip_object) {
279 HWND hwnd;
280
281 hres = IOleInPlaceObject_GetWindow(host->ip_object, &hwnd);
282 if(SUCCEEDED(hres))
283 TRACE("hwnd %p\n", hwnd);
284 }
285}
#define OLEIVERB_INPLACEACTIVATE
Definition: ole2.h:43
static void get_pos_rect(PluginHost *host, RECT *ret)
Definition: pluginhost.c:106
& rect
Definition: startmenu.cpp:1413
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by update_plugin_window().

◆ find_sink_entry()

static sink_entry_t * find_sink_entry ( PHEventSink sink,
DISPID  id 
)
static

Definition at line 474 of file pluginhost.c.

475{
476 sink_entry_t *iter;
477
478 for(iter = sink->handlers; iter < sink->handlers+sink->handlers_cnt; iter++) {
479 if(iter->id == id)
480 return iter;
481 }
482
483 return NULL;
484}
static xmlCharEncodingHandlerPtr * handlers
Definition: encoding.c:1317
DISPID id
Definition: pluginhost.c:454

Referenced by add_sink_handler(), and PHEventSink_Invoke().

◆ get_elem_clsid()

static BOOL get_elem_clsid ( nsIDOMHTMLElement elem,
CLSID clsid 
)
static

Definition at line 1647 of file pluginhost.c.

1648{
1649 const PRUnichar *val;
1650 nsAString val_str;
1651 nsresult nsres;
1652 BOOL ret = FALSE;
1653
1654 static const PRUnichar classidW[] = {'c','l','a','s','s','i','d',0};
1655
1656 nsres = get_elem_attr_value(elem, classidW, &val_str, &val);
1657 if(NS_SUCCEEDED(nsres)) {
1658 if(*val)
1660 nsAString_Finish(&val_str);
1661 }
1662
1663 return ret;
1664}
static size_t elem
Definition: string.c:68
static BOOL parse_classid(const PRUnichar *classid, CLSID *clsid)
Definition: pluginhost.c:1616

Referenced by create_activex_object().

◆ get_eventiface_info()

static ITypeInfo * get_eventiface_info ( HTMLPluginContainer plugin_container,
ITypeInfo class_info 
)
static

Definition at line 713 of file pluginhost.c.

714{
715 int impl_types, i, impl_flags;
716 ITypeInfo *ret = NULL;
717 TYPEATTR *typeattr;
718 HREFTYPE ref;
720
721 hres = ITypeInfo_GetTypeAttr(class_info, &typeattr);
722 if(FAILED(hres))
723 return NULL;
724
725 if(typeattr->typekind != TKIND_COCLASS) {
726 WARN("not coclass\n");
727 ITypeInfo_ReleaseTypeAttr(class_info, typeattr);
728 return NULL;
729 }
730
731 impl_types = typeattr->cImplTypes;
732 ITypeInfo_ReleaseTypeAttr(class_info, typeattr);
733
734 for(i=0; i<impl_types; i++) {
735 hres = ITypeInfo_GetImplTypeFlags(class_info, i, &impl_flags);
736 if(FAILED(hres))
737 continue;
738
739 if((impl_flags & IMPLTYPEFLAG_FSOURCE)) {
740 if(!(impl_flags & IMPLTYPEFLAG_FDEFAULT)) {
741 FIXME("Handle non-default source iface\n");
742 continue;
743 }
744
745 hres = ITypeInfo_GetRefTypeOfImplType(class_info, i, &ref);
746 if(FAILED(hres))
747 continue;
748
749 hres = ITypeInfo_GetRefTypeInfo(class_info, ref, &ret);
750 if(FAILED(hres))
751 ret = NULL;
752 }
753 }
754
755 return ret;
756}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Definition: send.c:48
@ TKIND_COCLASS
Definition: widltypes.h:224

Referenced by bind_activex_event().

◆ get_plugin_disp()

HRESULT get_plugin_disp ( HTMLPluginContainer plugin_container,
IDispatch **  ret 
)

Definition at line 352 of file pluginhost.c.

353{
355
356 host = plugin_container->plugin_host;
357 if(!host) {
358 ERR("No plugin host\n");
359 return E_UNEXPECTED;
360 }
361
362 if(!host->disp) {
363 *ret = NULL;
364 return S_OK;
365 }
366
368 FIXME("Insecure object\n");
369 return E_FAIL;
370 }
371
372 IDispatch_AddRef(host->disp);
373 *ret = host->disp;
374 return S_OK;
375}
#define ERR(fmt,...)
Definition: debug.h:110
static BOOL check_script_safety(PluginHost *host)
Definition: pluginhost.c:42
#define E_UNEXPECTED
Definition: winerror.h:2456

Referenced by HTMLObjectElement_get_object().

◆ get_plugin_dispid()

HRESULT get_plugin_dispid ( HTMLPluginContainer plugin_container,
WCHAR name,
DISPID ret 
)

Definition at line 377 of file pluginhost.c.

378{
379 IDispatch *disp;
380 DISPID id;
381 DWORD i;
383
384 if(!plugin_container->plugin_host) {
385 WARN("no plugin host\n");
386 return DISP_E_UNKNOWNNAME;
387 }
388
389 disp = plugin_container->plugin_host->disp;
390 if(!disp)
391 return DISP_E_UNKNOWNNAME;
392
393 hres = IDispatch_GetIDsOfNames(disp, &IID_NULL, &name, 1, 0, &id);
394 if(FAILED(hres)) {
395 TRACE("no prop %s\n", debugstr_w(name));
396 return DISP_E_UNKNOWNNAME;
397 }
398
399 for(i=0; i < plugin_container->props_len; i++) {
400 if(id == plugin_container->props[i]) {
402 return S_OK;
403 }
404 }
405
406 if(!plugin_container->props) {
407 plugin_container->props = heap_alloc(8*sizeof(DISPID));
408 if(!plugin_container->props)
409 return E_OUTOFMEMORY;
410 plugin_container->props_size = 8;
411 }else if(plugin_container->props_len == plugin_container->props_size) {
412 DISPID *new_props;
413
414 new_props = heap_realloc(plugin_container->props, plugin_container->props_size*2*sizeof(DISPID));
415 if(!new_props)
416 return E_OUTOFMEMORY;
417
418 plugin_container->props = new_props;
419 plugin_container->props_size *= 2;
420 }
421
422 plugin_container->props[plugin_container->props_len] = id;
423 *ret = MSHTML_DISPID_CUSTOM_MIN+plugin_container->props_len;
424 plugin_container->props_len++;
425 return S_OK;
426}
#define MSHTML_DISPID_CUSTOM_MIN
IDispatch * disp
Definition: pluginhost.h:40
Definition: name.c:39
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515

Referenced by HTMLObjectElement_get_dispid().

◆ get_pos_rect()

static void get_pos_rect ( PluginHost host,
RECT ret 
)
static

Definition at line 106 of file pluginhost.c.

107{
108 ret->top = 0;
109 ret->left = 0;
110 ret->bottom = host->rect.bottom - host->rect.top;
111 ret->right = host->rect.right - host->rect.left;
112}

Referenced by embed_plugin_object().

◆ impl_from_IAdviseSinkEx()

static PluginHost * impl_from_IAdviseSinkEx ( IAdviseSinkEx iface)
inlinestatic

◆ impl_from_IBindHost()

static PluginHost * impl_from_IBindHost ( IBindHost iface)
inlinestatic

◆ impl_from_IBindStatusCallback()

◆ impl_from_IDispatch()

static PluginHost * impl_from_IDispatch ( IDispatch iface)
inlinestatic

◆ impl_from_IOleClientSite()

◆ impl_from_IOleControlSite()

◆ impl_from_IOleInPlaceSiteEx()

◆ impl_from_IPropertyNotifySink()

static PluginHost * impl_from_IPropertyNotifySink ( IPropertyNotifySink iface)
inlinestatic

◆ impl_from_IServiceProvider()

static PluginHost * impl_from_IServiceProvider ( IServiceProvider iface)
inlinestatic

Definition at line 1566 of file pluginhost.c.

1567{
1568 return CONTAINING_RECORD(iface, PluginHost, IServiceProvider_iface);
1569}

Referenced by PHServiceProvider_AddRef(), PHServiceProvider_QueryInterface(), PHServiceProvider_QueryService(), and PHServiceProvider_Release().

◆ impl_from_IWindowForBindingUI()

static InstallCallback * impl_from_IWindowForBindingUI ( IWindowForBindingUI iface)
inlinestatic

Definition at line 1803 of file pluginhost.c.

1804{
1805 return CONTAINING_RECORD(iface, InstallCallback, IWindowForBindingUI_iface);
1806}

Referenced by WindowForBindingUI_AddRef(), WindowForBindingUI_GetWindow(), WindowForBindingUI_QueryInterface(), and WindowForBindingUI_Release().

◆ initialize_plugin_object()

static void initialize_plugin_object ( PluginHost host)
static

Definition at line 163 of file pluginhost.c.

164{
166 IQuickActivate *quick_activate;
167 IOleObject *ole_obj = NULL;
168 IOleCommandTarget *cmdtrg;
169 IViewObjectEx *view_obj;
170 IDispatchEx *dispex;
171 IDispatch *disp;
173
174 /* Note native calls QI on plugin for an undocumented IID and CLSID_HTMLDocument */
175
176 /* FIXME: call FreezeEvents(TRUE) */
177
178 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IClientSecurity, (void**)&client_security);
179 if(SUCCEEDED(hres)) {
180 FIXME("Handle IClientSecurity\n");
181 IClientSecurity_Release(client_security);
182 return;
183 }
184
185 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IQuickActivate, (void**)&quick_activate);
186 if(SUCCEEDED(hres)) {
187 QACONTAINER container = {sizeof(container)};
188 QACONTROL control = {sizeof(control)};
189
190 TRACE("Using IQuickActivate\n");
191
192 container.pClientSite = &host->IOleClientSite_iface;
193 container.dwAmbientFlags = QACONTAINER_SUPPORTSMNEMONICS|QACONTAINER_MESSAGEREFLECT|QACONTAINER_USERMODE;
194 container.pAdviseSink = &host->IAdviseSinkEx_iface;
195 container.pPropertyNotifySink = &host->IPropertyNotifySink_iface;
196
197 hres = IQuickActivate_QuickActivate(quick_activate, &container, &control);
198 IQuickActivate_Release(quick_activate);
199 if(FAILED(hres))
200 FIXME("QuickActivate failed: %08x\n", hres);
201 }else {
202 DWORD status = 0;
203
204 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IOleObject, (void**)&ole_obj);
205 if(SUCCEEDED(hres)) {
206 hres = IOleObject_GetMiscStatus(ole_obj, DVASPECT_CONTENT, &status);
207 TRACE("GetMiscStatus returned %08x %x\n", hres, status);
208
209 hres = IOleObject_SetClientSite(ole_obj, &host->IOleClientSite_iface);
210 IOleObject_Release(ole_obj);
211 if(FAILED(hres)) {
212 FIXME("SetClientSite failed: %08x\n", hres);
213 return;
214 }
215 }else {
216 TRACE("Plugin does not support IOleObject\n");
217 }
218 }
219
221
222 if(ole_obj) {
223 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IViewObjectEx, (void**)&view_obj);
224 if(SUCCEEDED(hres)) {
225 DWORD view_status = 0;
226
227 hres = IViewObjectEx_SetAdvise(view_obj, DVASPECT_CONTENT, 0, (IAdviseSink*)&host->IAdviseSinkEx_iface);
228 if(FAILED(hres))
229 WARN("SetAdvise failed: %08x\n", hres);
230
231 hres = IViewObjectEx_GetViewStatus(view_obj, &view_status);
232 IViewObjectEx_Release(view_obj);
233 TRACE("GetViewStatus returned %08x %x\n", hres, view_status);
234 }
235 }
236
238
239 /* NOTE: Native QIs for IActiveScript, an undocumented IID, IOleControl and IRunnableObject */
240
241 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IDispatchEx, (void**)&dispex);
242 if(SUCCEEDED(hres)) {
243 FIXME("Use IDispatchEx\n");
244 host->disp = (IDispatch*)dispex;
245 }else {
246 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IDispatch, (void**)&disp);
247 if(SUCCEEDED(hres))
248 host->disp = disp;
249 else
250 TRACE("no IDispatch iface\n");
251 }
252
253 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IOleCommandTarget, (void**)&cmdtrg);
254 if(SUCCEEDED(hres)) {
255 FIXME("Use IOleCommandTarget\n");
256 IOleCommandTarget_Release(cmdtrg);
257 }
258}
const GUID IID_IDispatch
static void update_readystate(PluginHost *host)
Definition: pluginhost.c:77
static void load_plugin(PluginHost *host)
Definition: pluginhost.c:140
Definition: ps.c:97

Referenced by create_plugin_host().

◆ install_codebase()

static void install_codebase ( const WCHAR url)
static

Definition at line 1857 of file pluginhost.c.

1858{
1860 IBindCtx *bctx;
1861 HRESULT hres;
1862
1863 callback = heap_alloc(sizeof(*callback));
1864 if(!callback)
1865 return;
1866
1867 callback->IBindStatusCallback_iface.lpVtbl = &InstallCallbackVtbl;
1868 callback->IWindowForBindingUI_iface.lpVtbl = &WindowForBindingUIVtbl;
1869 callback->ref = 1;
1870
1871 hres = CreateAsyncBindCtx(0, &callback->IBindStatusCallback_iface, NULL, &bctx);
1872 IBindStatusCallback_Release(&callback->IBindStatusCallback_iface);
1873 if(FAILED(hres))
1874 return;
1875
1876 hres = AsyncInstallDistributionUnit(NULL, NULL, NULL, 0, 0, url, bctx, NULL, 0);
1877 IBindCtx_Release(bctx);
1878 if(FAILED(hres))
1879 WARN("FAILED: %08x\n", hres);
1880}
HRESULT WINAPI AsyncInstallDistributionUnit(const WCHAR *szDistUnit, const WCHAR *szTYPE, const WCHAR *szExt, DWORD dwFileVersionMS, DWORD dwFileVersionLS, const WCHAR *szURL, IBindCtx *pbc, void *pvReserved, DWORD flags)
Definition: axinstall.c:636
static IPrintDialogCallback callback
Definition: printdlg.c:326
static const WCHAR url[]
Definition: encode.c:1432
static const IWindowForBindingUIVtbl WindowForBindingUIVtbl
Definition: pluginhost.c:1834
static IBindStatusCallbackVtbl InstallCallbackVtbl
Definition: pluginhost.c:1789
HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx **pbind)
Definition: bindctx.c:899

Referenced by check_codebase().

◆ InstallCallback_AddRef()

static ULONG WINAPI InstallCallback_AddRef ( IBindStatusCallback iface)
static

Definition at line 1701 of file pluginhost.c.

1702{
1705
1706 TRACE("(%p) ref=%d\n", This, ref);
1707
1708 return ref;
1709}
#define InterlockedIncrement
Definition: armddk.h:53
long LONG
Definition: pedump.c:60
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672

◆ InstallCallback_GetBindInfo()

static HRESULT WINAPI InstallCallback_GetBindInfo ( IBindStatusCallback iface,
DWORD grfBINDF,
BINDINFO *  pbindinfo 
)
static

Definition at line 1762 of file pluginhost.c.

1764{
1766
1767 TRACE("(%p)->(%p %p)\n", This, grfBINDF, pbindinfo);
1768
1769 *grfBINDF = BINDF_ASYNCHRONOUS;
1770 return S_OK;
1771}

◆ InstallCallback_GetPriority()

static HRESULT WINAPI InstallCallback_GetPriority ( IBindStatusCallback iface,
LONG pnPriority 
)
static

Definition at line 1732 of file pluginhost.c.

1733{
1735 TRACE("(%p)->(%p)\n", This, pnPriority);
1736 return E_NOTIMPL;
1737}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InstallCallback_OnDataAvailable()

static HRESULT WINAPI InstallCallback_OnDataAvailable ( IBindStatusCallback iface,
DWORD  grfBSCF,
DWORD  dwSize,
FORMATETC *  pformatetc,
STGMEDIUM *  pstgmed 
)
static

Definition at line 1773 of file pluginhost.c.

1775{
1777 ERR("(%p)\n", This);
1778 return E_NOTIMPL;
1779}

◆ InstallCallback_OnLowResource()

static HRESULT WINAPI InstallCallback_OnLowResource ( IBindStatusCallback iface,
DWORD  dwReserved 
)
static

Definition at line 1739 of file pluginhost.c.

1740{
1742 TRACE("(%p)->(%x)\n", This, dwReserved);
1743 return S_OK;
1744}
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95

◆ InstallCallback_OnObjectAvailable()

static HRESULT WINAPI InstallCallback_OnObjectAvailable ( IBindStatusCallback iface,
REFIID  riid,
IUnknown punk 
)
static

Definition at line 1781 of file pluginhost.c.

1783{
1785 ERR("(%p)\n", This);
1786 return E_NOTIMPL;
1787}

◆ InstallCallback_OnProgress()

static HRESULT WINAPI InstallCallback_OnProgress ( IBindStatusCallback iface,
ULONG  ulProgress,
ULONG  ulProgressMax,
ULONG  ulStatusCode,
LPCWSTR  szStatusText 
)
static

Definition at line 1746 of file pluginhost.c.

1748{
1750 TRACE("(%p)->(%u %u %u %s)\n", This, ulProgress, ulProgressMax, ulStatusCode, debugstr_w(szStatusText));
1751 return S_OK;
1752}

◆ InstallCallback_OnStartBinding()

static HRESULT WINAPI InstallCallback_OnStartBinding ( IBindStatusCallback iface,
DWORD  dwReserved,
IBinding pib 
)
static

Definition at line 1724 of file pluginhost.c.

1726{
1728 TRACE("(%p)->(%x %p)\n", This, dwReserved, pib);
1729 return S_OK;
1730}

◆ InstallCallback_OnStopBinding()

static HRESULT WINAPI InstallCallback_OnStopBinding ( IBindStatusCallback iface,
HRESULT  hresult,
LPCWSTR  szError 
)
static

Definition at line 1754 of file pluginhost.c.

1756{
1758 TRACE("(%p)->(%08x %s)\n", This, hresult, debugstr_w(szError));
1759 return S_OK;
1760}

◆ InstallCallback_QueryInterface()

static HRESULT WINAPI InstallCallback_QueryInterface ( IBindStatusCallback iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1677 of file pluginhost.c.

1679{
1681
1683 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
1684 *ppv = &This->IBindStatusCallback_iface;
1685 }else if(IsEqualGUID(&IID_IBindStatusCallback, riid)) {
1686 TRACE("(%p)->(IID_IBindStatusCallback %p)\n", This, ppv);
1687 *ppv = &This->IBindStatusCallback_iface;
1688 }else if(IsEqualGUID(&IID_IWindowForBindingUI, riid)) {
1689 TRACE("(%p)->(IID_IWindowForBindingUI %p)\n", This, ppv);
1690 *ppv = &This->IWindowForBindingUI_iface;
1691 }else {
1692 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
1693 *ppv = NULL;
1694 return E_NOINTERFACE;
1695 }
1696
1697 IUnknown_AddRef((IUnknown*)*ppv);
1698 return S_OK;
1699}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ InstallCallback_Release()

static ULONG WINAPI InstallCallback_Release ( IBindStatusCallback iface)
static

Definition at line 1711 of file pluginhost.c.

1712{
1715
1716 TRACE("(%p) ref=%d\n", This, ref);
1717
1718 if(!ref)
1719 heap_free(This);
1720
1721 return ref;
1722}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76

◆ invoke_plugin_prop()

HRESULT invoke_plugin_prop ( HTMLPluginContainer plugin_container,
DISPID  id,
LCID  lcid,
WORD  flags,
DISPPARAMS *  params,
VARIANT res,
EXCEPINFO *  ei 
)

Definition at line 428 of file pluginhost.c.

430{
432
433 host = plugin_container->plugin_host;
434 if(!host || !host->disp) {
435 FIXME("Called with no disp\n");
436 return E_UNEXPECTED;
437 }
438
440 FIXME("Insecure object\n");
441 return E_FAIL;
442 }
443
444 if(id < MSHTML_DISPID_CUSTOM_MIN || id > MSHTML_DISPID_CUSTOM_MIN + plugin_container->props_len) {
445 ERR("Invalid id\n");
446 return E_FAIL;
447 }
448
449 return IDispatch_Invoke(host->disp, plugin_container->props[id-MSHTML_DISPID_CUSTOM_MIN], &IID_NULL,
450 lcid, flags, params, res, ei, NULL);
451}
GLuint res
Definition: glext.h:9613
GLbitfield flags
Definition: glext.h:7161

Referenced by HTMLObjectElement_invoke().

◆ load_plugin()

static void load_plugin ( PluginHost host)
static

Definition at line 140 of file pluginhost.c.

141{
142 IPersistPropertyBag2 *persist_prop_bag2;
143 IPersistPropertyBag *persist_prop_bag;
145
146 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IPersistPropertyBag2, (void**)&persist_prop_bag2);
147 if(SUCCEEDED(hres)) {
148 FIXME("Use IPersistPropertyBag2 iface\n");
149 IPersistPropertyBag2_Release(persist_prop_bag2);
150 return;
151 }
152
153 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IPersistPropertyBag, (void**)&persist_prop_bag);
154 if(SUCCEEDED(hres)) {
155 load_prop_bag(host, persist_prop_bag);
156 IPersistPropertyBag_Release(persist_prop_bag);
157 return;
158 }
159
160 FIXME("No IPersistPropertyBag iface\n");
161}
static void load_prop_bag(PluginHost *host, IPersistPropertyBag *persist_prop_bag)
Definition: pluginhost.c:114
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11

Referenced by initialize_plugin_object().

◆ load_prop_bag()

static void load_prop_bag ( PluginHost host,
IPersistPropertyBag persist_prop_bag 
)
static

Definition at line 114 of file pluginhost.c.

115{
116 IPropertyBag *prop_bag;
118
119 hres = create_param_prop_bag(host->element->element.nselem, &prop_bag);
120 if(FAILED(hres))
121 return;
122
123 if(prop_bag && !check_load_safety(host)) {
124 IPropertyBag_Release(prop_bag);
125 prop_bag = NULL;
126 }
127
128 if(prop_bag) {
129 hres = IPersistPropertyBag_Load(persist_prop_bag, prop_bag, NULL);
130 IPropertyBag_Release(prop_bag);
131 if(FAILED(hres))
132 WARN("Load failed: %08x\n", hres);
133 }else {
134 hres = IPersistPropertyBag_InitNew(persist_prop_bag);
135 if(FAILED(hres))
136 WARN("InitNew failed: %08x\n", hres);
137 }
138}
static BOOL check_load_safety(PluginHost *host)
Definition: pluginhost.c:21
HRESULT create_param_prop_bag(nsIDOMHTMLElement *, IPropertyBag **) DECLSPEC_HIDDEN
Definition: propbag.c:317

Referenced by load_plugin().

◆ notif_container_change()

void notif_container_change ( HTMLPluginContainer plugin_container,
DISPID  dispid 
)

Definition at line 335 of file pluginhost.c.

336{
337 IOleControl *ole_control;
339
340 if(!plugin_container->plugin_host || !plugin_container->plugin_host->plugin_unk)
341 return;
342
343 notif_enabled(plugin_container->plugin_host);
344
345 hres = IUnknown_QueryInterface(plugin_container->plugin_host->plugin_unk, &IID_IOleControl, (void**)&ole_control);
346 if(SUCCEEDED(hres)) {
347 IOleControl_OnAmbientPropertyChange(ole_control, dispid);
348 IOleControl_Release(ole_control);
349 }
350}
const GUID IID_IOleControl
static void notif_enabled(PluginHost *plugin_host)
Definition: pluginhost.c:312

Referenced by HTMLObjectElement_put_height(), and HTMLObjectElement_put_width().

◆ notif_enabled()

static void notif_enabled ( PluginHost plugin_host)
static

Definition at line 312 of file pluginhost.c.

313{
314 DISPPARAMS args = {NULL, NULL, 0, 0};
315 IDispatch *disp;
316 ULONG err = 0;
317 VARIANT res;
319
320 hres = IUnknown_QueryInterface(plugin_host->plugin_unk, &IID_IDispatch, (void**)&disp);
321 if(FAILED(hres)) {
322 FIXME("Could not get IDispatch iface: %08x\n", hres);
323 return;
324 }
325
326 V_VT(&res) = VT_EMPTY;
327 hres = IDispatch_Invoke(disp, DISPID_ENABLED, &IID_NULL, 0/*FIXME*/, DISPATCH_PROPERTYGET, &args, &res, NULL, &err);
328 IDispatch_Release(disp);
329 if(SUCCEEDED(hres)) {
330 FIXME("Got enabled %s\n", debugstr_variant(&res));
332 }
333}
#define DISPID_ENABLED
Definition: olectl.h:362
Definition: match.c:390
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648

Referenced by notif_container_change(), and PHInPlaceSite_OnUIActivate().

◆ parse_classid()

static BOOL parse_classid ( const PRUnichar classid,
CLSID clsid 
)
static

Definition at line 1616 of file pluginhost.c.

1617{
1618 const WCHAR *ptr;
1619 unsigned len;
1620 HRESULT hres;
1621
1622 static const PRUnichar clsidW[] = {'c','l','s','i','d',':'};
1623
1624 if(strncmpiW(classid, clsidW, sizeof(clsidW)/sizeof(WCHAR)))
1625 return FALSE;
1626
1627 ptr = classid + sizeof(clsidW)/sizeof(WCHAR);
1628 len = strlenW(ptr);
1629
1630 if(len == 38) {
1632 }else if(len == 36) {
1633 WCHAR buf[39];
1634
1635 buf[0] = '{';
1636 memcpy(buf+1, ptr, len*sizeof(WCHAR));
1637 buf[37] = '}';
1638 buf[38] = 0;
1640 }else {
1641 return FALSE;
1642 }
1643
1644 return SUCCEEDED(hres);
1645}
static const WCHAR clsidW[]
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2338
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
#define strncmpiW(s1, s2, n)
Definition: unicode.h:40
#define strlenW(s)
Definition: unicode.h:28
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by get_elem_clsid().

◆ PHAdviseSinkEx_AddRef()

static ULONG WINAPI PHAdviseSinkEx_AddRef ( IAdviseSinkEx iface)
static

Definition at line 1015 of file pluginhost.c.

1016{
1018 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
1019}
static PluginHost * impl_from_IAdviseSinkEx(IAdviseSinkEx *iface)
Definition: pluginhost.c:1004

◆ PHAdviseSinkEx_OnClose()

static void WINAPI PHAdviseSinkEx_OnClose ( IAdviseSinkEx iface)
static

Definition at line 1051 of file pluginhost.c.

1052{
1054 FIXME("(%p)\n", This);
1055}

◆ PHAdviseSinkEx_OnDataChange()

static void WINAPI PHAdviseSinkEx_OnDataChange ( IAdviseSinkEx iface,
FORMATETC *  pFormatetc,
STGMEDIUM *  pStgMedium 
)
static

Definition at line 1027 of file pluginhost.c.

1028{
1030 FIXME("(%p)->(%p %p)\n", This, pFormatetc, pStgMedium);
1031}

◆ PHAdviseSinkEx_OnRename()

static void WINAPI PHAdviseSinkEx_OnRename ( IAdviseSinkEx iface,
IMoniker pmk 
)
static

Definition at line 1039 of file pluginhost.c.

1040{
1042 FIXME("(%p)->(%p)\n", This, pmk);
1043}

◆ PHAdviseSinkEx_OnSave()

static void WINAPI PHAdviseSinkEx_OnSave ( IAdviseSinkEx iface)
static

Definition at line 1045 of file pluginhost.c.

1046{
1048 FIXME("(%p)\n", This);
1049}

◆ PHAdviseSinkEx_OnViewChange()

static void WINAPI PHAdviseSinkEx_OnViewChange ( IAdviseSinkEx iface,
DWORD  dwAspect,
LONG  lindex 
)
static

Definition at line 1033 of file pluginhost.c.

1034{
1036 FIXME("(%p)->(%d %d)\n", This, dwAspect, lindex);
1037}

◆ PHAdviseSinkEx_OnViewStatusChange()

static void WINAPI PHAdviseSinkEx_OnViewStatusChange ( IAdviseSinkEx iface,
DWORD  dwViewStatus 
)
static

Definition at line 1057 of file pluginhost.c.

1058{
1060 FIXME("(%p)->(%d)\n", This, dwViewStatus);
1061}

◆ PHAdviseSinkEx_QueryInterface()

static HRESULT WINAPI PHAdviseSinkEx_QueryInterface ( IAdviseSinkEx iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1009 of file pluginhost.c.

1010{
1012 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
1013}

◆ PHAdviseSinkEx_Release()

static ULONG WINAPI PHAdviseSinkEx_Release ( IAdviseSinkEx iface)
static

Definition at line 1021 of file pluginhost.c.

1022{
1024 return IOleClientSite_Release(&This->IOleClientSite_iface);
1025}

◆ PHBindHost_AddRef()

static ULONG WINAPI PHBindHost_AddRef ( IBindHost iface)
static

Definition at line 1515 of file pluginhost.c.

1516{
1518 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
1519}
static PluginHost * impl_from_IBindHost(IBindHost *iface)
Definition: pluginhost.c:1504

◆ PHBindHost_CreateMoniker()

static HRESULT WINAPI PHBindHost_CreateMoniker ( IBindHost iface,
LPOLESTR  szName,
IBindCtx pBC,
IMoniker **  ppmk,
DWORD  dwReserved 
)
static

Definition at line 1527 of file pluginhost.c.

1528{
1530
1531 TRACE("(%p)->(%s %p %p %x)\n", This, debugstr_w(szName), pBC, ppmk, dwReserved);
1532
1533 if(!This->doc || !This->doc->window || !This->doc->window->mon) {
1534 FIXME("no moniker\n");
1535 return E_UNEXPECTED;
1536 }
1537
1538 return CreateURLMoniker(This->doc->window->mon, szName, ppmk);
1539}
static const WCHAR szName[]
Definition: powrprof.c:45
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
Definition: umon.c:732

◆ PHBindHost_MonikerBindToObject()

static HRESULT WINAPI PHBindHost_MonikerBindToObject ( IBindHost iface,
IMoniker pMk,
IBindCtx pBC,
IBindStatusCallback pBSC,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 1549 of file pluginhost.c.

1551{
1553 FIXME("(%p)->(%p %p %p %s %p)\n", This, pMk, pBC, pBSC, debugstr_guid(riid), ppvObj);
1554 return E_NOTIMPL;
1555}

◆ PHBindHost_MonikerBindToStorage()

static HRESULT WINAPI PHBindHost_MonikerBindToStorage ( IBindHost iface,
IMoniker pMk,
IBindCtx pBC,
IBindStatusCallback pBSC,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 1541 of file pluginhost.c.

1543{
1545 FIXME("(%p)->(%p %p %p %s %p)\n", This, pMk, pBC, pBSC, debugstr_guid(riid), ppvObj);
1546 return E_NOTIMPL;
1547}

◆ PHBindHost_QueryInterface()

static HRESULT WINAPI PHBindHost_QueryInterface ( IBindHost iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1509 of file pluginhost.c.

1510{
1512 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
1513}

◆ PHBindHost_Release()

static ULONG WINAPI PHBindHost_Release ( IBindHost iface)
static

Definition at line 1521 of file pluginhost.c.

1522{
1524 return IOleClientSite_Release(&This->IOleClientSite_iface);
1525}

◆ PHClientSite_AddRef()

static ULONG WINAPI PHClientSite_AddRef ( IOleClientSite iface)
static

Definition at line 865 of file pluginhost.c.

866{
869
870 TRACE("(%p) ref=%d\n", This, ref);
871
872 return ref;
873}
static PluginHost * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: pluginhost.c:810

◆ PHClientSite_GetContainer()

static HRESULT WINAPI PHClientSite_GetContainer ( IOleClientSite iface,
IOleContainer **  ppContainer 
)
static

Definition at line 953 of file pluginhost.c.

954{
956
957 TRACE("(%p)->(%p)\n", This, ppContainer);
958
959 if(!This->doc) {
960 ERR("Called on detached object\n");
961 return E_UNEXPECTED;
962 }
963
964 *ppContainer = &This->doc->basedoc.IOleContainer_iface;
965 IOleContainer_AddRef(*ppContainer);
966 return S_OK;
967}

◆ PHClientSite_GetMoniker()

static HRESULT WINAPI PHClientSite_GetMoniker ( IOleClientSite iface,
DWORD  dwAssign,
DWORD  dwWhichMoniker,
IMoniker **  ppmk 
)
static

Definition at line 928 of file pluginhost.c.

930{
932
933 TRACE("(%p)->(%d %d %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
934
935 switch(dwWhichMoniker) {
936 case OLEWHICHMK_CONTAINER:
937 if(!This->doc || !This->doc->window || !This->doc->window->mon) {
938 FIXME("no moniker\n");
939 return E_UNEXPECTED;
940 }
941
942 *ppmk = This->doc->window->mon;
943 IMoniker_AddRef(*ppmk);
944 break;
945 default:
946 FIXME("which %d\n", dwWhichMoniker);
947 return E_NOTIMPL;
948 }
949
950 return S_OK;
951}

◆ PHClientSite_OnShowWindow()

static HRESULT WINAPI PHClientSite_OnShowWindow ( IOleClientSite iface,
BOOL  fShow 
)
static

Definition at line 978 of file pluginhost.c.

979{
981 FIXME("(%p)->(%x)\n", This, fShow);
982 return E_NOTIMPL;
983}

◆ PHClientSite_QueryInterface()

static HRESULT WINAPI PHClientSite_QueryInterface ( IOleClientSite iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 815 of file pluginhost.c.

816{
818
820 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
821 *ppv = &This->IOleClientSite_iface;
822 }else if(IsEqualGUID(&IID_IOleClientSite, riid)) {
823 TRACE("(%p)->(IID_IOleClientSite %p)\n", This, ppv);
824 *ppv = &This->IOleClientSite_iface;
825 }else if(IsEqualGUID(&IID_IAdviseSink, riid)) {
826 TRACE("(%p)->(IID_IAdviseSink %p)\n", This, ppv);
827 *ppv = &This->IAdviseSinkEx_iface;
828 }else if(IsEqualGUID(&IID_IAdviseSinkEx, riid)) {
829 TRACE("(%p)->(IID_IAdviseSinkEx %p)\n", This, ppv);
830 *ppv = &This->IAdviseSinkEx_iface;
832 TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppv);
833 *ppv = &This->IPropertyNotifySink_iface;
834 }else if(IsEqualGUID(&IID_IDispatch, riid)) {
835 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
836 *ppv = &This->IDispatch_iface;
837 }else if(IsEqualGUID(&IID_IOleWindow, riid)) {
838 TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
839 *ppv = &This->IOleInPlaceSiteEx_iface;
841 TRACE("(%p)->(IID_IOleInPlaceSite %p)\n", This, ppv);
842 *ppv = &This->IOleInPlaceSiteEx_iface;
843 }else if(IsEqualGUID(&IID_IOleInPlaceSiteEx, riid)) {
844 TRACE("(%p)->(IID_IOleInPlaceSiteEx %p)\n", This, ppv);
845 *ppv = &This->IOleInPlaceSiteEx_iface;
847 TRACE("(%p)->(IID_IOleControlSite %p)\n", This, ppv);
848 *ppv = &This->IOleControlSite_iface;
849 }else if(IsEqualGUID(&IID_IBindHost, riid)) {
850 TRACE("(%p)->(IID_IBindHost %p)\n", This, ppv);
851 *ppv = &This->IBindHost_iface;
852 }else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
853 TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
854 *ppv = &This->IServiceProvider_iface;
855 }else {
856 WARN("Unsupported interface %s\n", debugstr_guid(riid));
857 *ppv = NULL;
858 return E_NOINTERFACE;
859 }
860
861 IUnknown_AddRef((IUnknown*)*ppv);
862 return S_OK;
863}
const GUID IID_IOleInPlaceSite
const GUID IID_IPropertyNotifySink
const GUID IID_IAdviseSink
const GUID IID_IOleWindow
const GUID IID_IOleControlSite
const GUID IID_IOleClientSite

◆ PHClientSite_Release()

static ULONG WINAPI PHClientSite_Release ( IOleClientSite iface)
static

Definition at line 898 of file pluginhost.c.

899{
902
903 TRACE("(%p) ref=%d\n", This, ref);
904
905 if(!ref) {
907 if(This->sink) {
908 This->sink->host = NULL;
909 IDispatch_Release(&This->sink->IDispatch_iface);
910 This->sink = NULL;
911 }
912 list_remove(&This->entry);
913 if(This->element)
914 This->element->plugin_host = NULL;
916 }
917
918 return ref;
919}
#define InterlockedDecrement
Definition: armddk.h:52

◆ PHClientSite_RequestNewObjectLayout()

static HRESULT WINAPI PHClientSite_RequestNewObjectLayout ( IOleClientSite iface)
static

Definition at line 985 of file pluginhost.c.

986{
988 FIXME("(%p)\n", This);
989 return E_NOTIMPL;
990}

◆ PHClientSite_SaveObject()

static HRESULT WINAPI PHClientSite_SaveObject ( IOleClientSite iface)
static

Definition at line 921 of file pluginhost.c.

922{
924 FIXME("(%p)\n", This);
925 return E_NOTIMPL;
926}

◆ PHClientSite_ShowObject()

static HRESULT WINAPI PHClientSite_ShowObject ( IOleClientSite iface)
static

Definition at line 969 of file pluginhost.c.

970{
972
973 TRACE("(%p)\n", This);
974
975 return S_OK;
976}

◆ PHControlSite_AddRef()

static ULONG WINAPI PHControlSite_AddRef ( IOleControlSite iface)
static

Definition at line 1430 of file pluginhost.c.

1431{
1433 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
1434}
static PluginHost * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: pluginhost.c:1419

◆ PHControlSite_GetExtendedControl()

static HRESULT WINAPI PHControlSite_GetExtendedControl ( IOleControlSite iface,
IDispatch **  ppDisp 
)
static

Definition at line 1456 of file pluginhost.c.

1457{
1459 FIXME("(%p)->(%p)\n", This, ppDisp);
1460 return E_NOTIMPL;
1461}

◆ PHControlSite_LockInPlaceActive()

static HRESULT WINAPI PHControlSite_LockInPlaceActive ( IOleControlSite iface,
BOOL  fLock 
)
static

Definition at line 1449 of file pluginhost.c.

1450{
1452 FIXME("(%p)->(%x)\n", This, fLock);
1453 return E_NOTIMPL;
1454}

◆ PHControlSite_OnControlInfoChanged()

static HRESULT WINAPI PHControlSite_OnControlInfoChanged ( IOleControlSite iface)
static

Definition at line 1442 of file pluginhost.c.

1443{
1445 FIXME("(%p)\n", This);
1446 return E_NOTIMPL;
1447}

◆ PHControlSite_OnFocus()

static HRESULT WINAPI PHControlSite_OnFocus ( IOleControlSite iface,
BOOL  fGotFocus 
)
static

Definition at line 1477 of file pluginhost.c.

1478{
1480 FIXME("(%p)->(%x)\n", This, fGotFocus);
1481 return E_NOTIMPL;
1482}

◆ PHControlSite_QueryInterface()

static HRESULT WINAPI PHControlSite_QueryInterface ( IOleControlSite iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1424 of file pluginhost.c.

1425{
1427 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
1428}

◆ PHControlSite_Release()

static ULONG WINAPI PHControlSite_Release ( IOleControlSite iface)
static

Definition at line 1436 of file pluginhost.c.

1437{
1439 return IOleClientSite_Release(&This->IOleClientSite_iface);
1440}

◆ PHControlSite_ShowPropertyFrame()

static HRESULT WINAPI PHControlSite_ShowPropertyFrame ( IOleControlSite iface)
static

Definition at line 1484 of file pluginhost.c.

1485{
1487 FIXME("(%p)\n", This);
1488 return E_NOTIMPL;
1489}

◆ PHControlSite_TransformCoords()

static HRESULT WINAPI PHControlSite_TransformCoords ( IOleControlSite iface,
POINTL pPtlHimetric,
POINTF *  pPtfContainer,
DWORD  dwFlags 
)
static

Definition at line 1463 of file pluginhost.c.

1464{
1466 FIXME("(%p)->(%p %p %x)\n", This, pPtlHimetric, pPtfContainer, dwFlags);
1467 return E_NOTIMPL;
1468}
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ PHControlSite_TranslateAccelerator()

static HRESULT WINAPI PHControlSite_TranslateAccelerator ( IOleControlSite iface,
MSG pMsg,
DWORD  grfModifiers 
)
static

Definition at line 1470 of file pluginhost.c.

1471{
1473 FIXME("(%p)->(%x)\n", This, grfModifiers);
1474 return E_NOTIMPL;
1475}

◆ PHDispatch_AddRef()

static ULONG WINAPI PHDispatch_AddRef ( IDispatch iface)
static

Definition at line 1142 of file pluginhost.c.

1143{
1145 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
1146}
static PluginHost * impl_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:1131

◆ PHDispatch_GetIDsOfNames()

static HRESULT WINAPI PHDispatch_GetIDsOfNames ( IDispatch iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 1169 of file pluginhost.c.

1171{
1173 FIXME("(%p)->(%s %p %d %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
1174 return E_NOTIMPL;
1175}

◆ PHDispatch_GetTypeInfo()

static HRESULT WINAPI PHDispatch_GetTypeInfo ( IDispatch iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 1161 of file pluginhost.c.

1163{
1165 FIXME("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
1166 return E_NOTIMPL;
1167}

◆ PHDispatch_GetTypeInfoCount()

static HRESULT WINAPI PHDispatch_GetTypeInfoCount ( IDispatch iface,
UINT pctinfo 
)
static

Definition at line 1154 of file pluginhost.c.

1155{
1157 FIXME("(%p)->(%p)\n", This, pctinfo);
1158 return E_NOTIMPL;
1159}

◆ PHDispatch_Invoke()

static HRESULT WINAPI PHDispatch_Invoke ( IDispatch iface,
DISPID  dispid,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 1177 of file pluginhost.c.

1179{
1181 FIXME("(%p)->(%d %x %p %p)\n", This, dispid, wFlags, pDispParams, pVarResult);
1182 return E_NOTIMPL;
1183}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ PHDispatch_QueryInterface()

static HRESULT WINAPI PHDispatch_QueryInterface ( IDispatch iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1136 of file pluginhost.c.

1137{
1139 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
1140}

◆ PHDispatch_Release()

static ULONG WINAPI PHDispatch_Release ( IDispatch iface)
static

Definition at line 1148 of file pluginhost.c.

1149{
1151 return IOleClientSite_Release(&This->IOleClientSite_iface);
1152}

◆ PHEventSink_AddRef()

static ULONG WINAPI PHEventSink_AddRef ( IDispatch iface)
static

Definition at line 544 of file pluginhost.c.

545{
548
549 TRACE("(%p)\n", This);
550
551 return ref;
552}
static PHEventSink * PHEventSink_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:516

◆ PHEventSink_from_IDispatch()

static PHEventSink * PHEventSink_from_IDispatch ( IDispatch iface)
inlinestatic

◆ PHEventSink_GetIDsOfNames()

static HRESULT WINAPI PHEventSink_GetIDsOfNames ( IDispatch iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 592 of file pluginhost.c.

594{
596 FIXME("(%p)->(%s %p %u %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
597 return E_NOTIMPL;
598}

◆ PHEventSink_GetTypeInfo()

static HRESULT WINAPI PHEventSink_GetTypeInfo ( IDispatch iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 584 of file pluginhost.c.

586{
588 FIXME("(%p)->(%d %d %p)\n", This, iTInfo, lcid, ppTInfo);
589 return E_NOTIMPL;
590}

◆ PHEventSink_GetTypeInfoCount()

static HRESULT WINAPI PHEventSink_GetTypeInfoCount ( IDispatch iface,
UINT pctinfo 
)
static

Definition at line 577 of file pluginhost.c.

578{
580 FIXME("(%p)->(%p)\n", This, pctinfo);
581 return E_NOTIMPL;
582}

◆ PHEventSink_Invoke()

static HRESULT WINAPI PHEventSink_Invoke ( IDispatch iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 600 of file pluginhost.c.

602{
604 IDispatchEx *dispex;
607
608 TRACE("(%p)->(%d %s %d %x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags,
609 pDispParams, pVarResult, pExcepInfo, puArgErr);
610
611 if(!This->host) {
612 WARN("No host\n");
613 return E_UNEXPECTED;
614 }
615
616 entry = find_sink_entry(This, dispIdMember);
617 if(!entry || !entry->disp) {
618 WARN("No handler %d\n", dispIdMember);
619 if(pVarResult)
620 V_VT(pVarResult) = VT_EMPTY;
621 return S_OK;
622 }
623
624 hres = IDispatch_QueryInterface(entry->disp, &IID_IDispatchEx, (void**)&dispex);
625
626 TRACE("(%p) %d >>>\n", This, entry->id);
627 if(SUCCEEDED(hres)) {
628 hres = IDispatchEx_InvokeEx(dispex, DISPID_VALUE, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, NULL);
629 IDispatchEx_Release(dispex);
630 }else {
631 hres = IDispatch_Invoke(entry->disp, DISPID_VALUE, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
632 }
633 if(SUCCEEDED(hres))
634 TRACE("(%p) %d <<<\n", This, entry->id);
635 else
636 WARN("(%p) %d <<< %08x\n", This, entry->id, hres);
637 return hres;
638}

◆ PHEventSink_QueryInterface()

static HRESULT WINAPI PHEventSink_QueryInterface ( IDispatch iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 521 of file pluginhost.c.

522{
524
526 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
527 *ppv = &This->IDispatch_iface;
528 }else if(IsEqualGUID(riid, &IID_IDispatch)) {
529 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
530 *ppv = &This->IDispatch_iface;
531 }else if(This->is_dispiface && IsEqualGUID(riid, &This->iid)) {
532 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
533 *ppv = &This->IDispatch_iface;
534 }else {
535 WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
536 *ppv = NULL;
537 return E_NOINTERFACE;
538 }
539
540 IUnknown_AddRef((IUnknown*)*ppv);
541 return S_OK;
542}

◆ PHEventSink_Release()

static ULONG WINAPI PHEventSink_Release ( IDispatch iface)
static

Definition at line 554 of file pluginhost.c.

555{
558
559 TRACE("(%p)\n", This);
560
561 if(!ref) {
562 unsigned i;
563
564 assert(!This->host);
565
566 for(i=0; i < This->handlers_cnt; i++) {
567 if(This->handlers[i].disp)
568 IDispatch_Release(This->handlers[i].disp);
569 }
570 heap_free(This->handlers);
572 }
573
574 return ref;
575}

◆ PHInPlaceSite_AddRef()

static ULONG WINAPI PHInPlaceSite_AddRef ( IOleInPlaceSiteEx iface)
static

Definition at line 1206 of file pluginhost.c.

1207{
1209 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
1210}
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ PHInPlaceSite_CanInPlaceActivate()

static HRESULT WINAPI PHInPlaceSite_CanInPlaceActivate ( IOleInPlaceSiteEx iface)
static

Definition at line 1235 of file pluginhost.c.

1236{
1238
1239 TRACE("(%p)\n", This);
1240
1241 return S_OK;
1242}

◆ PHInPlaceSite_ContextSensitiveHelp()

static HRESULT WINAPI PHInPlaceSite_ContextSensitiveHelp ( IOleInPlaceSiteEx iface,
BOOL  fEnterMode 
)
static

Definition at line 1228 of file pluginhost.c.

1229{
1231 FIXME("(%p)->(%x)\n", This, fEnterMode);
1232 return E_NOTIMPL;
1233}

◆ PHInPlaceSite_DeactivateAndUndo()

static HRESULT WINAPI PHInPlaceSite_DeactivateAndUndo ( IOleInPlaceSiteEx iface)
static

Definition at line 1347 of file pluginhost.c.

1348{
1350 FIXME("(%p)\n", This);
1351 return E_NOTIMPL;
1352}

◆ PHInPlaceSite_DiscardUndoState()

static HRESULT WINAPI PHInPlaceSite_DiscardUndoState ( IOleInPlaceSiteEx iface)
static

Definition at line 1340 of file pluginhost.c.

1341{
1343 FIXME("(%p)\n", This);
1344 return E_NOTIMPL;
1345}

◆ PHInPlaceSite_GetWindow()

static HRESULT WINAPI PHInPlaceSite_GetWindow ( IOleInPlaceSiteEx iface,
HWND phwnd 
)
static

Definition at line 1218 of file pluginhost.c.

1219{
1221
1222 TRACE("(%p)->(%p)\n", This, phwnd);
1223
1224 *phwnd = This->hwnd;
1225 return S_OK;
1226}

◆ PHInPlaceSite_GetWindowContext()

static HRESULT WINAPI PHInPlaceSite_GetWindowContext ( IOleInPlaceSiteEx iface,
IOleInPlaceFrame **  ppFrame,
IOleInPlaceUIWindow **  ppDoc,
RECT lprcPosRect,
RECT lprcClipRect,
OLEINPLACEFRAMEINFO *  frame_info 
)
static

Definition at line 1268 of file pluginhost.c.

1271{
1273 IOleInPlaceUIWindow *ip_window;
1274 IOleInPlaceFrame *ip_frame;
1275 RECT pr, cr;
1276 HRESULT hres;
1277
1278 TRACE("(%p)->(%p %p %p %p %p)\n", This, ppFrame, ppDoc, lprcPosRect, lprcClipRect, frame_info);
1279
1280 if(!This->doc || !This->doc->basedoc.doc_obj || !This->doc->basedoc.doc_obj->ipsite) {
1281 FIXME("No ipsite\n");
1282 return E_UNEXPECTED;
1283 }
1284
1285 hres = IOleInPlaceSite_GetWindowContext(This->doc->basedoc.doc_obj->ipsite, &ip_frame, &ip_window, &pr, &cr, frame_info);
1286 if(FAILED(hres)) {
1287 WARN("GetWindowContext failed: %08x\n", hres);
1288 return hres;
1289 }
1290
1291 if(ip_window)
1292 IOleInPlaceUIWindow_Release(ip_window);
1293 if(ip_frame)
1294 IOleInPlaceFrame_Release(ip_frame);
1295
1296 hres = create_ip_frame(&ip_frame);
1297 if(FAILED(hres))
1298 return hres;
1299
1300 hres = create_ip_window(ppDoc);
1301 if(FAILED(hres)) {
1302 IOleInPlaceFrame_Release(ip_frame);
1303 return hres;
1304 }
1305
1306 *ppFrame = ip_frame;
1307 *lprcPosRect = This->rect;
1308 *lprcClipRect = This->rect;
1309 return S_OK;
1310}
HRESULT create_ip_window(IOleInPlaceUIWindow **ret)
Definition: ipwindow.c:317
HRESULT create_ip_frame(IOleInPlaceFrame **ret)
Definition: ipwindow.c:189

◆ PHInPlaceSite_OnInPlaceActivate()

static HRESULT WINAPI PHInPlaceSite_OnInPlaceActivate ( IOleInPlaceSiteEx iface)
static

Definition at line 1244 of file pluginhost.c.

1245{
1247 FIXME("(%p)\n", This);
1248 return E_NOTIMPL;
1249}

◆ PHInPlaceSite_OnInPlaceDeactivate()

static HRESULT WINAPI PHInPlaceSite_OnInPlaceDeactivate ( IOleInPlaceSiteEx iface)
static

Definition at line 1326 of file pluginhost.c.

1327{
1329
1330 TRACE("(%p)\n", This);
1331
1332 if(This->ip_object) {
1333 IOleInPlaceObject_Release(This->ip_object);
1334 This->ip_object = NULL;
1335 }
1336
1337 return S_OK;
1338}

◆ PHInPlaceSite_OnPosRectChange()

static HRESULT WINAPI PHInPlaceSite_OnPosRectChange ( IOleInPlaceSiteEx iface,
LPCRECT  lprcPosRect 
)
static

Definition at line 1354 of file pluginhost.c.

1355{
1357 FIXME("(%p)->(%p)\n", This, lprcPosRect);
1358 return E_NOTIMPL;
1359}

◆ PHInPlaceSite_OnUIActivate()

static HRESULT WINAPI PHInPlaceSite_OnUIActivate ( IOleInPlaceSiteEx iface)
static

Definition at line 1251 of file pluginhost.c.

1252{
1254
1255 TRACE("(%p)\n", This);
1256
1257 if(!This->plugin_unk) {
1258 ERR("No plugin object\n");
1259 return E_UNEXPECTED;
1260 }
1261
1262 This->ui_active = TRUE;
1263
1265 return S_OK;
1266}

◆ PHInPlaceSite_OnUIDeactivate()

static HRESULT WINAPI PHInPlaceSite_OnUIDeactivate ( IOleInPlaceSiteEx iface,
BOOL  fUndoable 
)
static

Definition at line 1319 of file pluginhost.c.

1320{
1322 FIXME("(%p)->(%x)\n", This, fUndoable);
1323 return E_NOTIMPL;
1324}

◆ PHInPlaceSite_QueryInterface()

static HRESULT WINAPI PHInPlaceSite_QueryInterface ( IOleInPlaceSiteEx iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1200 of file pluginhost.c.

1201{
1203 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
1204}

◆ PHInPlaceSite_Release()

static ULONG WINAPI PHInPlaceSite_Release ( IOleInPlaceSiteEx iface)
static

Definition at line 1212 of file pluginhost.c.

1213{
1215 return IOleClientSite_Release(&This->IOleClientSite_iface);
1216}

◆ PHInPlaceSite_Scroll()

static HRESULT WINAPI PHInPlaceSite_Scroll ( IOleInPlaceSiteEx iface,
SIZE  scrollExtent 
)
static

Definition at line 1312 of file pluginhost.c.

1313{
1315 FIXME("(%p)->({%d %d})\n", This, scrollExtent.cx, scrollExtent.cy);
1316 return E_NOTIMPL;
1317}
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28

◆ PHInPlaceSiteEx_OnInPlaceActivateEx()

static HRESULT WINAPI PHInPlaceSiteEx_OnInPlaceActivateEx ( IOleInPlaceSiteEx iface,
BOOL pfNoRedraw,
DWORD  dwFlags 
)
static

Definition at line 1361 of file pluginhost.c.

1362{
1364 HWND hwnd;
1365 HRESULT hres;
1366
1367 TRACE("(%p)->(%p %x)\n", This, pfNoRedraw, dwFlags);
1368
1369 if(This->ip_object)
1370 return S_OK;
1371
1372 hres = IUnknown_QueryInterface(This->plugin_unk, &IID_IOleInPlaceObject, (void**)&This->ip_object);
1373 if(FAILED(hres))
1374 return hres;
1375
1376 hres = IOleInPlaceObject_GetWindow(This->ip_object, &hwnd);
1377 if(SUCCEEDED(hres))
1378 FIXME("Use hwnd %p\n", hwnd);
1379
1380 *pfNoRedraw = FALSE;
1381 return S_OK;
1382}
const GUID IID_IOleInPlaceObject

◆ PHInPlaceSiteEx_OnInPlaceDeactivateEx()

static HRESULT WINAPI PHInPlaceSiteEx_OnInPlaceDeactivateEx ( IOleInPlaceSiteEx iface,
BOOL  fNoRedraw 
)
static

Definition at line 1384 of file pluginhost.c.

1385{
1387 FIXME("(%p)->(%x)\n", This, fNoRedraw);
1388 return E_NOTIMPL;
1389}

◆ PHInPlaceSiteEx_RequestUIActivate()

static HRESULT WINAPI PHInPlaceSiteEx_RequestUIActivate ( IOleInPlaceSiteEx iface)
static

Definition at line 1391 of file pluginhost.c.

1392{
1394 FIXME("(%p)\n", This);
1395 return E_NOTIMPL;
1396}

◆ PHPropertyNotifySink_AddRef()

static ULONG WINAPI PHPropertyNotifySink_AddRef ( IPropertyNotifySink iface)
static

Definition at line 1086 of file pluginhost.c.

1087{
1089 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
1090}
static PluginHost * impl_from_IPropertyNotifySink(IPropertyNotifySink *iface)
Definition: pluginhost.c:1075

◆ PHPropertyNotifySink_OnChanged()

static HRESULT WINAPI PHPropertyNotifySink_OnChanged ( IPropertyNotifySink iface,
DISPID  dispID 
)
static

Definition at line 1098 of file pluginhost.c.

1099{
1101
1102 TRACE("(%p)->(%d)\n", This, dispID);
1103
1104 switch(dispID) {
1105 case DISPID_READYSTATE:
1107 break;
1108 default :
1109 FIXME("Unimplemented dispID %d\n", dispID);
1110 return E_NOTIMPL;
1111 }
1112
1113 return S_OK;
1114}
#define DISPID_READYSTATE
Definition: idispids.h:22

◆ PHPropertyNotifySink_OnRequestEdit()

static HRESULT WINAPI PHPropertyNotifySink_OnRequestEdit ( IPropertyNotifySink iface,
DISPID  dispID 
)
static

Definition at line 1116 of file pluginhost.c.

1117{
1119 FIXME("(%p)->(%d)\n", This, dispID);
1120 return E_NOTIMPL;
1121}

◆ PHPropertyNotifySink_QueryInterface()

static HRESULT WINAPI PHPropertyNotifySink_QueryInterface ( IPropertyNotifySink iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1080 of file pluginhost.c.

1081{
1083 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
1084}

◆ PHPropertyNotifySink_Release()

static ULONG WINAPI PHPropertyNotifySink_Release ( IPropertyNotifySink iface)
static

Definition at line 1092 of file pluginhost.c.

1093{
1095 return IOleClientSite_Release(&This->IOleClientSite_iface);
1096}

◆ PHServiceProvider_AddRef()

static ULONG WINAPI PHServiceProvider_AddRef ( IServiceProvider iface)
static

Definition at line 1577 of file pluginhost.c.

1578{
1580 return IOleClientSite_AddRef(&This->IOleClientSite_iface);
1581}
static PluginHost * impl_from_IServiceProvider(IServiceProvider *iface)
Definition: pluginhost.c:1566

◆ PHServiceProvider_QueryInterface()

static HRESULT WINAPI PHServiceProvider_QueryInterface ( IServiceProvider iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1571 of file pluginhost.c.

1572{
1574 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
1575}

◆ PHServiceProvider_QueryService()

static HRESULT WINAPI PHServiceProvider_QueryService ( IServiceProvider iface,
REFGUID  guidService,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1589 of file pluginhost.c.

1590{
1592
1593 if(IsEqualGUID(guidService, &SID_SBindHost)) {
1594 TRACE("SID_SBindHost service\n");
1595 return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
1596 }
1597
1598 TRACE("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
1599
1600 if(!This->doc || !This->doc->basedoc.window) {
1601 *ppv = NULL;
1602 return E_NOINTERFACE;
1603 }
1604
1605 return IServiceProvider_QueryService(&This->doc->basedoc.window->base.IServiceProvider_iface,
1606 guidService, riid, ppv);
1607}

◆ PHServiceProvider_Release()

static ULONG WINAPI PHServiceProvider_Release ( IServiceProvider iface)
static

Definition at line 1583 of file pluginhost.c.

1584{
1586 return IOleClientSite_Release(&This->IOleClientSite_iface);
1587}

◆ release_plugin_ifaces()

static void release_plugin_ifaces ( PluginHost This)
static

Definition at line 875 of file pluginhost.c.

876{
877 if(This->disp) {
878 IDispatch_Release(This->disp);
879 This->disp = NULL;
880 }
881
882 if(This->ip_object) {
883 IOleInPlaceObject_Release(This->ip_object);
884 This->ip_object = NULL;
885 }
886
887 if(This->plugin_unk) {
888 IUnknown *unk = This->plugin_unk;
889 LONG ref;
890
891 This->plugin_unk = NULL;
892 ref = IUnknown_Release(unk);
893
894 TRACE("plugin ref = %d\n", ref);
895 }
896}

Referenced by detach_plugin_host(), and PHClientSite_Release().

◆ update_plugin_window()

void update_plugin_window ( PluginHost host,
HWND  hwnd,
const RECT rect 
)

Definition at line 287 of file pluginhost.c.

288{
289 BOOL rect_changed = FALSE;
290
291 if(!hwnd || (host->hwnd && host->hwnd != hwnd)) {
292 FIXME("unhandled hwnd\n");
293 return;
294 }
295
296 TRACE("%p %s\n", hwnd, wine_dbgstr_rect(rect));
297
298 if(memcmp(rect, &host->rect, sizeof(RECT))) {
299 host->rect = *rect;
300 rect_changed = TRUE;
301 }
302
303 if(!host->hwnd) {
304 host->hwnd = hwnd;
306 }
307
308 if(rect_changed && host->ip_object)
309 IOleInPlaceObject_SetObjectRects(host->ip_object, &host->rect, &host->rect);
310}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
static void embed_plugin_object(PluginHost *host)
Definition: pluginhost.c:260

Referenced by NPP_SetWindow().

◆ update_readystate()

static void update_readystate ( PluginHost host)
static

Definition at line 77 of file pluginhost.c.

78{
79 DISPPARAMS params = {NULL,NULL,0,0};
80 IDispatchEx *dispex;
81 IDispatch *disp;
82 ULONG err = 0;
83 VARIANT v;
85
86 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IDispatchEx, (void**)&dispex);
87 if(SUCCEEDED(hres)) {
88 FIXME("Use IDispatchEx\n");
89 IDispatchEx_Release(dispex);
90 }
91
92 hres = IUnknown_QueryInterface(host->plugin_unk, &IID_IDispatch, (void**)&disp);
93 if(FAILED(hres))
94 return;
95
96 hres = IDispatch_Invoke(disp, DISPID_READYSTATE, &IID_NULL, 0, DISPATCH_PROPERTYGET, &params, &v, NULL, &err);
97 IDispatch_Release(disp);
98 if(SUCCEEDED(hres)) {
99 /* FIXME: make plugin readystate affect document readystate */
100 TRACE("readystate = %s\n", debugstr_variant(&v));
101 VariantClear(&v);
102 }
103}

Referenced by initialize_plugin_object(), and PHPropertyNotifySink_OnChanged().

◆ WindowForBindingUI_AddRef()

static ULONG WINAPI WindowForBindingUI_AddRef ( IWindowForBindingUI iface)
static

Definition at line 1814 of file pluginhost.c.

1815{
1817 return IBindStatusCallback_AddRef(&This->IBindStatusCallback_iface);
1818}
static InstallCallback * impl_from_IWindowForBindingUI(IWindowForBindingUI *iface)
Definition: pluginhost.c:1803

◆ WindowForBindingUI_GetWindow()

static HRESULT WINAPI WindowForBindingUI_GetWindow ( IWindowForBindingUI iface,
REFGUID  rguidReason,
HWND phwnd 
)
static

Definition at line 1826 of file pluginhost.c.

1827{
1829 FIXME("(%p)->(%s %p)\n", This, debugstr_guid(rguidReason), phwnd);
1830 *phwnd = NULL;
1831 return S_OK;
1832}

◆ WindowForBindingUI_QueryInterface()

static HRESULT WINAPI WindowForBindingUI_QueryInterface ( IWindowForBindingUI iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1808 of file pluginhost.c.

1809{
1811 return IBindStatusCallback_QueryInterface(&This->IBindStatusCallback_iface, riid, ppv);
1812}

◆ WindowForBindingUI_Release()

static ULONG WINAPI WindowForBindingUI_Release ( IWindowForBindingUI iface)
static

Definition at line 1820 of file pluginhost.c.

1821{
1823 return IBindStatusCallback_Release(&This->IBindStatusCallback_iface);
1824}

Variable Documentation

◆ AdviseSinkExVtbl

const IAdviseSinkExVtbl AdviseSinkExVtbl
static
Initial value:
= {
}
static ULONG WINAPI PHAdviseSinkEx_AddRef(IAdviseSinkEx *iface)
Definition: pluginhost.c:1015
static void WINAPI PHAdviseSinkEx_OnSave(IAdviseSinkEx *iface)
Definition: pluginhost.c:1045
static void WINAPI PHAdviseSinkEx_OnDataChange(IAdviseSinkEx *iface, FORMATETC *pFormatetc, STGMEDIUM *pStgMedium)
Definition: pluginhost.c:1027
static void WINAPI PHAdviseSinkEx_OnViewStatusChange(IAdviseSinkEx *iface, DWORD dwViewStatus)
Definition: pluginhost.c:1057
static ULONG WINAPI PHAdviseSinkEx_Release(IAdviseSinkEx *iface)
Definition: pluginhost.c:1021
static HRESULT WINAPI PHAdviseSinkEx_QueryInterface(IAdviseSinkEx *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:1009
static void WINAPI PHAdviseSinkEx_OnRename(IAdviseSinkEx *iface, IMoniker *pmk)
Definition: pluginhost.c:1039
static void WINAPI PHAdviseSinkEx_OnClose(IAdviseSinkEx *iface)
Definition: pluginhost.c:1051
static void WINAPI PHAdviseSinkEx_OnViewChange(IAdviseSinkEx *iface, DWORD dwAspect, LONG lindex)
Definition: pluginhost.c:1033

Definition at line 1063 of file pluginhost.c.

Referenced by create_plugin_host().

◆ BindHostVtbl

const IBindHostVtbl BindHostVtbl
static
Initial value:
= {
}
static HRESULT WINAPI PHBindHost_QueryInterface(IBindHost *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:1509
static HRESULT WINAPI PHBindHost_MonikerBindToObject(IBindHost *iface, IMoniker *pMk, IBindCtx *pBC, IBindStatusCallback *pBSC, REFIID riid, void **ppvObj)
Definition: pluginhost.c:1549
static HRESULT WINAPI PHBindHost_CreateMoniker(IBindHost *iface, LPOLESTR szName, IBindCtx *pBC, IMoniker **ppmk, DWORD dwReserved)
Definition: pluginhost.c:1527
static HRESULT WINAPI PHBindHost_MonikerBindToStorage(IBindHost *iface, IMoniker *pMk, IBindCtx *pBC, IBindStatusCallback *pBSC, REFIID riid, void **ppvObj)
Definition: pluginhost.c:1541
static ULONG WINAPI PHBindHost_AddRef(IBindHost *iface)
Definition: pluginhost.c:1515
static ULONG WINAPI PHBindHost_Release(IBindHost *iface)
Definition: pluginhost.c:1521

Definition at line 1557 of file pluginhost.c.

Referenced by create_plugin_host().

◆ cs_install_list

static CRITICAL_SECTION cs_install_list = { &cs_install_list_dbg, -1, 0, 0, 0, 0 }
static

Definition at line 1848 of file pluginhost.c.

Referenced by check_codebase().

◆ cs_install_list_dbg

CRITICAL_SECTION_DEBUG cs_install_list_dbg
static
Initial value:
=
{
0, 0, { (DWORD_PTR)(__FILE__ ": install_list") }
}
static CRITICAL_SECTION_DEBUG cs_install_list_dbg
Definition: pluginhost.c:1849
LIST_ENTRY ProcessLocksList
Definition: winbase.h:883
#define DWORD_PTR
Definition: treelist.c:76

Definition at line 1849 of file pluginhost.c.

◆ DispatchVtbl

const IDispatchVtbl DispatchVtbl
static
Initial value:
= {
}
static HRESULT WINAPI PHDispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: pluginhost.c:1169
static HRESULT WINAPI PHDispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:1136
static HRESULT WINAPI PHDispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo)
Definition: pluginhost.c:1154
static ULONG WINAPI PHDispatch_Release(IDispatch *iface)
Definition: pluginhost.c:1148
static ULONG WINAPI PHDispatch_AddRef(IDispatch *iface)
Definition: pluginhost.c:1142
static HRESULT WINAPI PHDispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: pluginhost.c:1161
static HRESULT WINAPI PHDispatch_Invoke(IDispatch *iface, DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: pluginhost.c:1177

Definition at line 1185 of file pluginhost.c.

Referenced by create_plugin_host().

◆ install_list

struct list install_list = LIST_INIT(install_list)
static

Definition at line 1846 of file pluginhost.c.

Referenced by check_codebase().

◆ InstallCallbackVtbl

IBindStatusCallbackVtbl InstallCallbackVtbl
static
Initial value:
= {
}
static ULONG WINAPI InstallCallback_Release(IBindStatusCallback *iface)
Definition: pluginhost.c:1711
static HRESULT WINAPI InstallCallback_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, IBinding *pib)
Definition: pluginhost.c:1724
static HRESULT WINAPI InstallCallback_OnLowResource(IBindStatusCallback *iface, DWORD dwReserved)
Definition: pluginhost.c:1739
static HRESULT WINAPI InstallCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
Definition: pluginhost.c:1762
static HRESULT WINAPI InstallCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
Definition: pluginhost.c:1773
static HRESULT WINAPI InstallCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
Definition: pluginhost.c:1746
static HRESULT WINAPI InstallCallback_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:1677
static HRESULT WINAPI InstallCallback_GetPriority(IBindStatusCallback *iface, LONG *pnPriority)
Definition: pluginhost.c:1732
static ULONG WINAPI InstallCallback_AddRef(IBindStatusCallback *iface)
Definition: pluginhost.c:1701
static HRESULT WINAPI InstallCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk)
Definition: pluginhost.c:1781
static HRESULT WINAPI InstallCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError)
Definition: pluginhost.c:1754

Definition at line 1789 of file pluginhost.c.

Referenced by install_codebase().

◆ OleClientSiteVtbl

const IOleClientSiteVtbl OleClientSiteVtbl
static
Initial value:
= {
}
static HRESULT WINAPI PHClientSite_ShowObject(IOleClientSite *iface)
Definition: pluginhost.c:969
static HRESULT WINAPI PHClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
Definition: pluginhost.c:928
static ULONG WINAPI PHClientSite_Release(IOleClientSite *iface)
Definition: pluginhost.c:898
static HRESULT WINAPI PHClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow)
Definition: pluginhost.c:978
static HRESULT WINAPI PHClientSite_SaveObject(IOleClientSite *iface)
Definition: pluginhost.c:921
static ULONG WINAPI PHClientSite_AddRef(IOleClientSite *iface)
Definition: pluginhost.c:865
static HRESULT WINAPI PHClientSite_RequestNewObjectLayout(IOleClientSite *iface)
Definition: pluginhost.c:985
static HRESULT WINAPI PHClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:815
static HRESULT WINAPI PHClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer)
Definition: pluginhost.c:953

Definition at line 992 of file pluginhost.c.

Referenced by create_plugin_host().

◆ OleControlSiteVtbl

const IOleControlSiteVtbl OleControlSiteVtbl
static
Initial value:
= {
}
static HRESULT WINAPI PHControlSite_GetExtendedControl(IOleControlSite *iface, IDispatch **ppDisp)
Definition: pluginhost.c:1456
static HRESULT WINAPI PHControlSite_LockInPlaceActive(IOleControlSite *iface, BOOL fLock)
Definition: pluginhost.c:1449
static HRESULT WINAPI PHControlSite_TransformCoords(IOleControlSite *iface, POINTL *pPtlHimetric, POINTF *pPtfContainer, DWORD dwFlags)
Definition: pluginhost.c:1463
static HRESULT WINAPI PHControlSite_ShowPropertyFrame(IOleControlSite *iface)
Definition: pluginhost.c:1484
static HRESULT WINAPI PHControlSite_OnControlInfoChanged(IOleControlSite *iface)
Definition: pluginhost.c:1442
static HRESULT WINAPI PHControlSite_OnFocus(IOleControlSite *iface, BOOL fGotFocus)
Definition: pluginhost.c:1477
static ULONG WINAPI PHControlSite_AddRef(IOleControlSite *iface)
Definition: pluginhost.c:1430
static HRESULT WINAPI PHControlSite_TranslateAccelerator(IOleControlSite *iface, MSG *pMsg, DWORD grfModifiers)
Definition: pluginhost.c:1470
static ULONG WINAPI PHControlSite_Release(IOleControlSite *iface)
Definition: pluginhost.c:1436
static HRESULT WINAPI PHControlSite_QueryInterface(IOleControlSite *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:1424

Definition at line 1491 of file pluginhost.c.

Referenced by create_plugin_host().

◆ OleInPlaceSiteExVtbl

const IOleInPlaceSiteExVtbl OleInPlaceSiteExVtbl
static
Initial value:
= {
}
static HRESULT WINAPI PHInPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, RECT *lprcPosRect, RECT *lprcClipRect, OLEINPLACEFRAMEINFO *frame_info)
Definition: pluginhost.c:1268
static HRESULT WINAPI PHInPlaceSite_DiscardUndoState(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1340
static HRESULT WINAPI PHInPlaceSite_GetWindow(IOleInPlaceSiteEx *iface, HWND *phwnd)
Definition: pluginhost.c:1218
static HRESULT WINAPI PHInPlaceSite_OnInPlaceActivate(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1244
static HRESULT WINAPI PHInPlaceSiteEx_OnInPlaceActivateEx(IOleInPlaceSiteEx *iface, BOOL *pfNoRedraw, DWORD dwFlags)
Definition: pluginhost.c:1361
static HRESULT WINAPI PHInPlaceSite_OnInPlaceDeactivate(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1326
static ULONG WINAPI PHInPlaceSite_Release(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1212
static HRESULT WINAPI PHInPlaceSite_ContextSensitiveHelp(IOleInPlaceSiteEx *iface, BOOL fEnterMode)
Definition: pluginhost.c:1228
static HRESULT WINAPI PHInPlaceSite_CanInPlaceActivate(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1235
static HRESULT WINAPI PHInPlaceSiteEx_OnInPlaceDeactivateEx(IOleInPlaceSiteEx *iface, BOOL fNoRedraw)
Definition: pluginhost.c:1384
static HRESULT WINAPI PHInPlaceSite_OnPosRectChange(IOleInPlaceSiteEx *iface, LPCRECT lprcPosRect)
Definition: pluginhost.c:1354
static HRESULT WINAPI PHInPlaceSite_Scroll(IOleInPlaceSiteEx *iface, SIZE scrollExtent)
Definition: pluginhost.c:1312
static HRESULT WINAPI PHInPlaceSiteEx_RequestUIActivate(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1391
static HRESULT WINAPI PHInPlaceSite_OnUIActivate(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1251
static HRESULT WINAPI PHInPlaceSite_OnUIDeactivate(IOleInPlaceSiteEx *iface, BOOL fUndoable)
Definition: pluginhost.c:1319
static HRESULT WINAPI PHInPlaceSite_QueryInterface(IOleInPlaceSiteEx *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:1200
static ULONG WINAPI PHInPlaceSite_AddRef(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1206
static HRESULT WINAPI PHInPlaceSite_DeactivateAndUndo(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1347

Definition at line 1398 of file pluginhost.c.

Referenced by create_plugin_host().

◆ PHCPDispatchVtbl

const IDispatchVtbl PHCPDispatchVtbl
static
Initial value:
= {
}
static HRESULT WINAPI PHEventSink_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo)
Definition: pluginhost.c:577
static ULONG WINAPI PHEventSink_AddRef(IDispatch *iface)
Definition: pluginhost.c:544
static HRESULT WINAPI PHEventSink_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: pluginhost.c:600
static HRESULT WINAPI PHEventSink_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: pluginhost.c:592
static HRESULT WINAPI PHEventSink_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: pluginhost.c:584
static HRESULT WINAPI PHEventSink_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:521
static ULONG WINAPI PHEventSink_Release(IDispatch *iface)
Definition: pluginhost.c:554

Definition at line 640 of file pluginhost.c.

Referenced by create_event_sink().

◆ PropertyNotifySinkVtbl

const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl
static
Initial value:
= {
}
static HRESULT WINAPI PHPropertyNotifySink_OnRequestEdit(IPropertyNotifySink *iface, DISPID dispID)
Definition: pluginhost.c:1116
static HRESULT WINAPI PHPropertyNotifySink_QueryInterface(IPropertyNotifySink *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:1080
static ULONG WINAPI PHPropertyNotifySink_AddRef(IPropertyNotifySink *iface)
Definition: pluginhost.c:1086
static HRESULT WINAPI PHPropertyNotifySink_OnChanged(IPropertyNotifySink *iface, DISPID dispID)
Definition: pluginhost.c:1098
static ULONG WINAPI PHPropertyNotifySink_Release(IPropertyNotifySink *iface)
Definition: pluginhost.c:1092

Definition at line 1123 of file pluginhost.c.

Referenced by create_plugin_host().

◆ ServiceProviderVtbl

const IServiceProviderVtbl ServiceProviderVtbl
static
Initial value:
= {
}
static ULONG WINAPI PHServiceProvider_Release(IServiceProvider *iface)
Definition: pluginhost.c:1583
static ULONG WINAPI PHServiceProvider_AddRef(IServiceProvider *iface)
Definition: pluginhost.c:1577
static HRESULT WINAPI PHServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
Definition: pluginhost.c:1589
static HRESULT WINAPI PHServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:1571

Definition at line 1609 of file pluginhost.c.

Referenced by create_plugin_host().

◆ WindowForBindingUIVtbl

const IWindowForBindingUIVtbl WindowForBindingUIVtbl
static
Initial value:
= {
}
static ULONG WINAPI WindowForBindingUI_AddRef(IWindowForBindingUI *iface)
Definition: pluginhost.c:1814
static ULONG WINAPI WindowForBindingUI_Release(IWindowForBindingUI *iface)
Definition: pluginhost.c:1820
static HRESULT WINAPI WindowForBindingUI_GetWindow(IWindowForBindingUI *iface, REFGUID rguidReason, HWND *phwnd)
Definition: pluginhost.c:1826
static HRESULT WINAPI WindowForBindingUI_QueryInterface(IWindowForBindingUI *iface, REFIID riid, void **ppv)
Definition: pluginhost.c:1808

Definition at line 1834 of file pluginhost.c.

Referenced by install_codebase().