ReactOS  0.4.14-dev-50-g13bb5e2
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 }
disp
Definition: i386-dis.c:3181
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
Definition: pluginhost.c:453
uint32_t entry
Definition: isohybrid.c:63
static sink_entry_t * find_sink_entry(PHEventSink *sink, DISPID id)
Definition: pluginhost.c:474
GLenum GLuint id
Definition: glext.h:5579

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;
763  HRESULT hres;
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 }
disp
Definition: i386-dis.c:3181
#define WARN(fmt,...)
Definition: debug.h:111
const GUID IID_IProvideClassInfo
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
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
HRESULT hres
Definition: protocol.c:465
static void add_sink_handler(PHEventSink *sink, DISPID id, IDispatch *disp)
Definition: pluginhost.c:486
LONG HRESULT
Definition: typedefs.h:77
IUnknown * plugin_unk
Definition: pluginhost.h:36
struct _cl_event * event
Definition: glext.h:7739
static VARIANTARG static DISPID
Definition: ordinal.c:49
static PHEventSink * create_event_sink(PluginHost *plugin_host, ITypeInfo *typeinfo)
Definition: pluginhost.c:650
GLenum GLuint id
Definition: glext.h:5579
PHEventSink * sink
Definition: pluginhost.h:49
ITypeInfo * typeinfo
Definition: pluginhost.c:464

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 
1926  list_add_tail(&install_list, &iter->entry);
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 }
Definition: pluginhost.c:1841
#define TRUE
Definition: types.h:120
HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, IUri **ppCombinedUri, DWORD_PTR dwReserved)
Definition: uri.c:6768
const char * uri
Definition: sec_mgr.c:1594
nsresult get_elem_attr_value(nsIDOMHTMLElement *nselem, const WCHAR *name, nsAString *val_str, const PRUnichar **val)
Definition: htmlelem.c:143
OLECHAR * BSTR
Definition: compat.h:1934
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define eq(received, expected, label, type)
Definition: locale.c:144
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static void install_codebase(const WCHAR *url)
Definition: pluginhost.c:1857
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
GLuint GLfloat * val
Definition: glext.h:7180
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static CRITICAL_SECTION cs_install_list
Definition: pluginhost.c:1848
#define NS_SUCCEEDED(res)
static struct list install_list
Definition: pluginhost.c:1846
uint32_t entry
Definition: isohybrid.c:63
static IHTMLWindow2 * window
Definition: events.c:77
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
struct list entry
Definition: pluginhost.c:1842
HRESULT nsresult
Definition: nsiface.idl:39
WCHAR PRUnichar
Definition: nsiface.idl:48
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
IUri * uri
Definition: pluginhost.c:1843
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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;
26  HRESULT hres;
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 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
char * host
Definition: whois.c:55
const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY
Definition: activex.c:31
uint32_t cs
Definition: isohybrid.c:75
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned char BYTE
Definition: mem.h:68

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;
50  HRESULT hres;
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 }
#define TRUE
Definition: types.h:120
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
char * host
Definition: whois.c:55
const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY
Definition: activex.c:31
#define DISPID_SECURITYCTX
Definition: mshtmdid.h:538
uint32_t cs
Definition: isohybrid.c:75
GLenum const GLfloat * params
Definition: glext.h:5645
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
#define IID_NULL
Definition: guiddef.h:98
#define V_VT(A)
Definition: oleauto.h:211
unsigned char BYTE
Definition: mem.h:68
#define err(...)
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
const GLdouble * v
Definition: gl.h:2040
struct stdole::DISPPARAMS DISPPARAMS
unsigned int ULONG
Definition: retypes.h:1
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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;
1948  IClassFactory *cf;
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);
1969  if(hres == REGDB_E_CLASSNOTREG)
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 }
static IClassFactory * cf
HTMLInnerWindow * window
#define WARN(fmt,...)
Definition: debug.h:111
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
static BOOL get_elem_clsid(nsIDOMHTMLElement *elem, CLSID *clsid)
Definition: pluginhost.c:1647
#define FIXME(fmt,...)
Definition: debug.h:110
IInternetHostSecurityManager IInternetHostSecurityManager_iface
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3012
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
unsigned long DWORD
Definition: ntddk_ex.h:95
REFCLSID clsid
Definition: msctf.c:84
unsigned char BYTE
Definition: mem.h:68
static void check_codebase(HTMLInnerWindow *window, nsIDOMHTMLElement *nselem)
Definition: pluginhost.c:1882
#define REGDB_E_CLASSNOTREG
Definition: winerror.h:2696
const GUID IID_IClassFactory
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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;
653  PHEventSink *ret;
655  TYPEATTR *typeattr;
656  TYPEKIND typekind;
657  GUID guid;
658  HRESULT hres;
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 WARN(fmt,...)
Definition: debug.h:111
const GUID IID_IConnectionPointContainer
const GUID * guid
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
IUnknown * plugin_unk
Definition: pluginhost.h:36
int ret
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:106
static const IDispatchVtbl PHCPDispatchVtbl
Definition: pluginhost.c:640
POINT cp
Definition: magnifier.c:59

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 {
2050  PluginHost *host;
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 }
struct list plugin_hosts
static const IBindHostVtbl BindHostVtbl
Definition: pluginhost.c:1557
char * host
Definition: whois.c:55
static const IDispatchVtbl DispatchVtbl
Definition: pluginhost.c:1185
#define assert(x)
Definition: debug.h:53
static IUnknown * create_activex_object(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, CLSID *clsid)
Definition: pluginhost.c:1945
static const IPropertyNotifySinkVtbl PropertyNotifySinkVtbl
Definition: pluginhost.c:1123
#define E_FAIL
Definition: ddrawi.h:102
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
struct container container
static const IOleInPlaceSiteExVtbl OleInPlaceSiteExVtbl
Definition: pluginhost.c:1398
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
REFCLSID clsid
Definition: msctf.c:84
static const IAdviseSinkExVtbl AdviseSinkExVtbl
Definition: pluginhost.c:1063
static const IOleClientSiteVtbl OleClientSiteVtbl
Definition: pluginhost.c:992
static void initialize_plugin_object(PluginHost *host)
Definition: pluginhost.c:163
#define S_OK
Definition: intsafe.h:59
static const IOleControlSiteVtbl OleControlSiteVtbl
Definition: pluginhost.c:1491
static const IServiceProviderVtbl ServiceProviderVtbl
Definition: pluginhost.c:1609

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 }
char * host
Definition: whois.c:55
const GUID IID_IConnectionPointContainer
#define assert(x)
Definition: debug.h:53
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IOleObject
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
POINT cp
Definition: magnifier.c:59
static void release_plugin_ifaces(PluginHost *This)
Definition: pluginhost.c:875
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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;
264  HRESULT hres;
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 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define WARN(fmt,...)
Definition: debug.h:111
char * host
Definition: whois.c:55
& rect
Definition: startmenu.cpp:1413
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IOleObject
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static void get_pos_rect(PluginHost *host, RECT *ret)
Definition: pluginhost.c:106
#define OLEIVERB_INPLACEACTIVATE
Definition: ole2.h:43
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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:1297
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
Definition: pluginhost.c:453
smooth NULL
Definition: ftsmooth.c:416
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)
1659  ret = parse_classid(val, clsid);
1660  nsAString_Finish(&val_str);
1661  }
1662 
1663  return ret;
1664 }
nsresult get_elem_attr_value(nsIDOMHTMLElement *nselem, const WCHAR *name, nsAString *val_str, const PRUnichar **val)
Definition: htmlelem.c:143
unsigned int BOOL
Definition: ntddk_ex.h:94
static size_t elem
Definition: string.c:68
GLuint GLfloat * val
Definition: glext.h:7180
#define NS_SUCCEEDED(res)
int ret
REFCLSID clsid
Definition: msctf.c:84
static BOOL parse_classid(const PRUnichar *classid, CLSID *clsid)
Definition: pluginhost.c:1616
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
HRESULT nsresult
Definition: nsiface.idl:39
WCHAR PRUnichar
Definition: nsiface.idl:48

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;
719  HRESULT hres;
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 }
#define WARN(fmt,...)
Definition: debug.h:111
Definition: send.c:47
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
GLenum GLint ref
Definition: glext.h:6028
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
int ret

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 {
354  PluginHost *host;
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 
367  if(!check_script_safety(host)) {
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 }
static BOOL check_script_safety(PluginHost *host)
Definition: pluginhost.c:42
char * host
Definition: whois.c:55
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
PluginHost * plugin_host
Definition: pluginhost.h:56
int ret
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
#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;
382  HRESULT hres;
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 DISP_E_UNKNOWNNAME
Definition: winerror.h:2515
disp
Definition: i386-dis.c:3181
#define MSHTML_DISPID_CUSTOM_MIN
#define WARN(fmt,...)
Definition: debug.h:111
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
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
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
PluginHost * plugin_host
Definition: pluginhost.h:56
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define IID_NULL
Definition: guiddef.h:98
#define S_OK
Definition: intsafe.h:59
static VARIANTARG static DISPID
Definition: ordinal.c:49
IDispatch * disp
Definition: pluginhost.h:40
Definition: name.c:36
GLenum GLuint id
Definition: glext.h:5579

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 }
char * host
Definition: whois.c:55
int ret

Referenced by embed_plugin_object().

◆ impl_from_IAdviseSinkEx()

static PluginHost* impl_from_IAdviseSinkEx ( IAdviseSinkEx iface)
inlinestatic

Definition at line 1004 of file pluginhost.c.

1005 {
1006  return CONTAINING_RECORD(iface, PluginHost, IAdviseSinkEx_iface);
1007 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by PHAdviseSinkEx_AddRef(), PHAdviseSinkEx_OnClose(), PHAdviseSinkEx_OnDataChange(), PHAdviseSinkEx_OnRename(), PHAdviseSinkEx_OnSave(), PHAdviseSinkEx_OnViewChange(), PHAdviseSinkEx_OnViewStatusChange(), PHAdviseSinkEx_QueryInterface(), and PHAdviseSinkEx_Release().

◆ impl_from_IBindHost()

static PluginHost* impl_from_IBindHost ( IBindHost iface)
inlinestatic

Definition at line 1504 of file pluginhost.c.

1505 {
1506  return CONTAINING_RECORD(iface, PluginHost, IBindHost_iface);
1507 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by PHBindHost_AddRef(), PHBindHost_CreateMoniker(), PHBindHost_MonikerBindToObject(), PHBindHost_MonikerBindToStorage(), PHBindHost_QueryInterface(), and PHBindHost_Release().

◆ impl_from_IBindStatusCallback()

static InstallCallback* impl_from_IBindStatusCallback ( IBindStatusCallback iface)
inlinestatic

Definition at line 1672 of file pluginhost.c.

1673 {
1674  return CONTAINING_RECORD(iface, InstallCallback, IBindStatusCallback_iface);
1675 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by InstallCallback_AddRef(), InstallCallback_GetBindInfo(), InstallCallback_GetPriority(), InstallCallback_OnDataAvailable(), InstallCallback_OnLowResource(), InstallCallback_OnObjectAvailable(), InstallCallback_OnProgress(), InstallCallback_OnStartBinding(), InstallCallback_OnStopBinding(), InstallCallback_QueryInterface(), and InstallCallback_Release().

◆ impl_from_IDispatch()

static PluginHost* impl_from_IDispatch ( IDispatch iface)
inlinestatic

Definition at line 1131 of file pluginhost.c.

1132 {
1133  return CONTAINING_RECORD(iface, PluginHost, IDispatch_iface);
1134 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by PHDispatch_AddRef(), PHDispatch_GetIDsOfNames(), PHDispatch_GetTypeInfo(), PHDispatch_GetTypeInfoCount(), PHDispatch_Invoke(), PHDispatch_QueryInterface(), and PHDispatch_Release().

◆ impl_from_IOleClientSite()

static PluginHost* impl_from_IOleClientSite ( IOleClientSite iface)
inlinestatic

Definition at line 810 of file pluginhost.c.

811 {
812  return CONTAINING_RECORD(iface, PluginHost, IOleClientSite_iface);
813 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by PHClientSite_AddRef(), PHClientSite_GetContainer(), PHClientSite_GetMoniker(), PHClientSite_OnShowWindow(), PHClientSite_QueryInterface(), PHClientSite_Release(), PHClientSite_RequestNewObjectLayout(), PHClientSite_SaveObject(), and PHClientSite_ShowObject().

◆ impl_from_IOleControlSite()

static PluginHost* impl_from_IOleControlSite ( IOleControlSite iface)
inlinestatic

Definition at line 1419 of file pluginhost.c.

1420 {
1421  return CONTAINING_RECORD(iface, PluginHost, IOleControlSite_iface);
1422 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by PHControlSite_AddRef(), PHControlSite_GetExtendedControl(), PHControlSite_LockInPlaceActive(), PHControlSite_OnControlInfoChanged(), PHControlSite_OnFocus(), PHControlSite_QueryInterface(), PHControlSite_Release(), PHControlSite_ShowPropertyFrame(), PHControlSite_TransformCoords(), and PHControlSite_TranslateAccelerator().

◆ impl_from_IOleInPlaceSiteEx()

◆ impl_from_IPropertyNotifySink()

static PluginHost* impl_from_IPropertyNotifySink ( IPropertyNotifySink iface)
inlinestatic

Definition at line 1075 of file pluginhost.c.

1076 {
1077  return CONTAINING_RECORD(iface, PluginHost, IPropertyNotifySink_iface);
1078 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by PHPropertyNotifySink_AddRef(), PHPropertyNotifySink_OnChanged(), PHPropertyNotifySink_OnRequestEdit(), PHPropertyNotifySink_QueryInterface(), and PHPropertyNotifySink_Release().

◆ 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 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

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 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

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;
172  HRESULT hres;
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 
220  load_plugin(host);
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 }
disp
Definition: i386-dis.c:3181
#define WARN(fmt,...)
Definition: debug.h:111
char * host
Definition: whois.c:55
static void load_plugin(PluginHost *host)
Definition: pluginhost.c:140
struct container container
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
static void update_readystate(PluginHost *host)
Definition: pluginhost.c:77
const GUID IID_IOleObject
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
const GUID IID_IDispatch
IClientSecurity client_security
Definition: services.c:136
#define SUCCEEDED(hr)
Definition: intsafe.h:57
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 }
#define WARN(fmt,...)
Definition: debug.h:111
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 void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR url[]
Definition: encode.c:1432
static IBindStatusCallbackVtbl InstallCallbackVtbl
Definition: pluginhost.c:1789
static const IWindowForBindingUIVtbl WindowForBindingUIVtbl
Definition: pluginhost.c:1834
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 {
1704  LONG ref = InterlockedIncrement(&This->ref);
1705 
1706  TRACE("(%p) ref=%d\n", This, ref);
1707 
1708  return ref;
1709 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#define InterlockedIncrement
Definition: armddk.h:53

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#define S_OK
Definition: intsafe.h:59

◆ 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 TRACE(s)
Definition: solgame.cpp:4
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#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 }
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#define ERR(fmt,...)
Definition: debug.h:109
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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:90
#define TRACE(s)
Definition: solgame.cpp:4
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#define S_OK
Definition: intsafe.h:59

◆ 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 }
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#define ERR(fmt,...)
Definition: debug.h:109
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#define S_OK
Definition: intsafe.h:59

◆ 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 }
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
#define TRACE(s)
Definition: solgame.cpp:4
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#define S_OK
Definition: intsafe.h:59

◆ 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 }
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#define S_OK
Definition: intsafe.h:59

◆ InstallCallback_QueryInterface()

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

Definition at line 1677 of file pluginhost.c.

1679 {
1681 
1682  if(IsEqualGUID(&IID_IUnknown, riid)) {
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 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ InstallCallback_Release()

static ULONG WINAPI InstallCallback_Release ( IBindStatusCallback iface)
static

Definition at line 1711 of file pluginhost.c.

1712 {
1714  LONG ref = InterlockedIncrement(&This->ref);
1715 
1716  TRACE("(%p) ref=%d\n", This, ref);
1717 
1718  if(!ref)
1719  heap_free(This);
1720 
1721  return ref;
1722 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static InstallCallback * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
Definition: pluginhost.c:1672
#define InterlockedIncrement
Definition: armddk.h:53
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ 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 {
431  PluginHost *host;
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 
439  if(!check_script_safety(host)) {
440  FIXME("Insecure object\n");
441  return E_FAIL;
442  }
443 
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 }
static BOOL check_script_safety(PluginHost *host)
Definition: pluginhost.c:42
#define MSHTML_DISPID_CUSTOM_MIN
char * host
Definition: whois.c:55
#define E_FAIL
Definition: ddrawi.h:102
GLenum const GLfloat * params
Definition: glext.h:5645
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
PluginHost * plugin_host
Definition: pluginhost.h:56
GLbitfield flags
Definition: glext.h:7161
#define IID_NULL
Definition: guiddef.h:98
#define ERR(fmt,...)
Definition: debug.h:109
#define E_UNEXPECTED
Definition: winerror.h:2456
GLuint res
Definition: glext.h:9613
GLenum GLuint id
Definition: glext.h:5579

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;
144  HRESULT hres;
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 }
char * host
Definition: whois.c:55
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11
#define FIXME(fmt,...)
Definition: debug.h:110
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static void load_prop_bag(PluginHost *host, IPersistPropertyBag *persist_prop_bag)
Definition: pluginhost.c:114
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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;
117  HRESULT hres;
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 }
#define WARN(fmt,...)
Definition: debug.h:111
char * host
Definition: whois.c:55
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
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;
338  HRESULT hres;
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 }
static void notif_enabled(PluginHost *plugin_host)
Definition: pluginhost.c:312
PluginHost * plugin_host
Definition: pluginhost.h:56
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
IUnknown * plugin_unk
Definition: pluginhost.h:36
const GUID IID_IOleControl
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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;
318  HRESULT hres;
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));
331  VariantClear(&res);
332  }
333 }
disp
Definition: i386-dis.c:3181
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
Definition: match.c:390
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define DISPID_ENABLED
Definition: olectl.h:362
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IDispatch
IUnknown * plugin_unk
Definition: pluginhost.h:36
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:651
#define IID_NULL
Definition: guiddef.h:98
#define V_VT(A)
Definition: oleauto.h:211
#define err(...)
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
GLuint res
Definition: glext.h:9613
struct stdole::DISPPARAMS DISPPARAMS
unsigned int ULONG
Definition: retypes.h:1
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define strncmpiW(s1, s2, n)
Definition: unicode.h:40
static PVOID ptr
Definition: dispmode.c:27
HRESULT hres
Definition: protocol.c:465
static const WCHAR clsidW[]
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
REFCLSID clsid
Definition: msctf.c:84
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2247
WCHAR PRUnichar
Definition: nsiface.idl:48
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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 }
static PluginHost * impl_from_IAdviseSinkEx(IAdviseSinkEx *iface)
Definition: pluginhost.c:1004
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
static PluginHost * impl_from_IAdviseSinkEx(IAdviseSinkEx *iface)
Definition: pluginhost.c:1004
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
static PluginHost * impl_from_IAdviseSinkEx(IAdviseSinkEx *iface)
Definition: pluginhost.c:1004
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
static PluginHost * impl_from_IAdviseSinkEx(IAdviseSinkEx *iface)
Definition: pluginhost.c:1004
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
static PluginHost * impl_from_IAdviseSinkEx(IAdviseSinkEx *iface)
Definition: pluginhost.c:1004
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
static PluginHost * impl_from_IAdviseSinkEx(IAdviseSinkEx *iface)
Definition: pluginhost.c:1004
#define FIXME(fmt,...)
Definition: debug.h:110

◆ 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 }
REFIID riid
Definition: precomp.h:44
static PluginHost * impl_from_IAdviseSinkEx(IAdviseSinkEx *iface)
Definition: pluginhost.c:1004
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ 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 }
static PluginHost * impl_from_IAdviseSinkEx(IAdviseSinkEx *iface)
Definition: pluginhost.c:1004

◆ 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 }
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
static PluginHost * impl_from_IBindHost(IBindHost *iface)
Definition: pluginhost.c:1504
#define E_UNEXPECTED
Definition: winerror.h:2456
static const WCHAR szName[]
Definition: msipriv.h:1194
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 }
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
static PluginHost * impl_from_IBindHost(IBindHost *iface)
Definition: pluginhost.c:1504
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
static PluginHost * impl_from_IBindHost(IBindHost *iface)
Definition: pluginhost.c:1504
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static PluginHost * impl_from_IBindHost(IBindHost *iface)
Definition: pluginhost.c:1504

◆ 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 }
static PluginHost * impl_from_IBindHost(IBindHost *iface)
Definition: pluginhost.c:1504

◆ 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 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static PluginHost * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: pluginhost.c:810
#define InterlockedIncrement
Definition: armddk.h:53

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
static PluginHost * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: pluginhost.c:810
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
static PluginHost * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: pluginhost.c:810
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
static PluginHost * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: pluginhost.c:810
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PHClientSite_QueryInterface()

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

Definition at line 815 of file pluginhost.c.

816 {
818 
819  if(IsEqualGUID(&IID_IUnknown, riid)) {
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;
840  }else if(IsEqualGUID(&IID_IOleInPlaceSite, riid)) {
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;
846  }else if(IsEqualGUID(&IID_IOleControlSite, riid)) {
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 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IOleInPlaceSite
const GUID IID_IOleClientSite
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IAdviseSink
const GUID IID_IOleControlSite
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
static PluginHost * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: pluginhost.c:810
#define S_OK
Definition: intsafe.h:59
const GUID IID_IPropertyNotifySink
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
const GUID IID_IOleWindow

◆ 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;
915  heap_free(This);
916  }
917 
918  return ref;
919 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
smooth NULL
Definition: ftsmooth.c:416
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
static PluginHost * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: pluginhost.c:810
#define InterlockedDecrement
Definition: armddk.h:52
static void release_plugin_ifaces(PluginHost *This)
Definition: pluginhost.c:875
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
static PluginHost * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: pluginhost.c:810
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
static PluginHost * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: pluginhost.c:810
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
static PluginHost * impl_from_IOleClientSite(IOleClientSite *iface)
Definition: pluginhost.c:810
#define S_OK
Definition: intsafe.h:59

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
static PluginHost * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: pluginhost.c:1419
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
static PluginHost * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: pluginhost.c:1419
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
static PluginHost * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: pluginhost.c:1419
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
static PluginHost * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: pluginhost.c:1419
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static PluginHost * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: pluginhost.c:1419

◆ 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 }
static PluginHost * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: pluginhost.c:1419

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
static PluginHost * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: pluginhost.c:1419
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
static PluginHost * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: pluginhost.c:1419
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
static PluginHost * impl_from_IOleControlSite(IOleControlSite *iface)
Definition: pluginhost.c:1419
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:1131

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:1131

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:1131

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:1131

◆ 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 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static PluginHost * impl_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:1131

◆ 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 }
static PluginHost * impl_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:1131

◆ 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
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

◆ PHEventSink_from_IDispatch()

static PHEventSink* PHEventSink_from_IDispatch ( IDispatch iface)
inlinestatic

Definition at line 516 of file pluginhost.c.

517 {
518  return CONTAINING_RECORD(iface, PHEventSink, IDispatch_iface);
519 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by PHEventSink_AddRef(), PHEventSink_GetIDsOfNames(), PHEventSink_GetTypeInfo(), PHEventSink_GetTypeInfoCount(), PHEventSink_Invoke(), PHEventSink_QueryInterface(), and PHEventSink_Release().

◆ 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 }
static PHEventSink * PHEventSink_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:516
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
static PHEventSink * PHEventSink_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:516
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
static PHEventSink * PHEventSink_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:516
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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;
606  HRESULT hres;
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 }
static PHEventSink * PHEventSink_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:516
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
Definition: pluginhost.c:453
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define V_VT(A)
Definition: oleauto.h:211
uint32_t entry
Definition: isohybrid.c:63
static sink_entry_t * find_sink_entry(PHEventSink *sink, DISPID id)
Definition: pluginhost.c:474
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define S_OK
Definition: intsafe.h:59
#define E_UNEXPECTED
Definition: winerror.h:2456
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ PHEventSink_QueryInterface()

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

Definition at line 521 of file pluginhost.c.

522 {
524 
525  if(IsEqualGUID(riid, &IID_IUnknown)) {
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 }
static PHEventSink * PHEventSink_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:516
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ 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);
571  heap_free(This);
572  }
573 
574  return ref;
575 }
static PHEventSink * PHEventSink_from_IDispatch(IDispatch *iface)
Definition: pluginhost.c:516
#define assert(x)
Definition: debug.h:53
Definition: send.c:47
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
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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_frame(IOleInPlaceFrame **ret)
Definition: ipwindow.c:189
#define WARN(fmt,...)
Definition: debug.h:111
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
HRESULT create_ip_window(IOleInPlaceUIWindow **ret)
Definition: ipwindow.c:317
#define E_UNEXPECTED
Definition: winerror.h:2456
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
#define TRUE
Definition: types.h:120
static void notif_enabled(PluginHost *plugin_host)
Definition: pluginhost.c:312
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
#define E_UNEXPECTED
Definition: winerror.h:2456
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
LONG cx
Definition: windef.h:319
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195
LONG cy
Definition: windef.h:320

◆ 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 DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define FIXME(fmt,...)
Definition: debug.h:110
const GUID IID_IOleInPlaceObject
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
Definition: pluginhost.c:1195

◆ 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 FIXME(fmt,...)
Definition: debug.h:110
static void update_readystate(PluginHost *host)
Definition: pluginhost.c:77
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
#define DISPID_READYSTATE
Definition: idispids.h:22
static PluginHost * impl_from_IPropertyNotifySink(IPropertyNotifySink *iface)
Definition: pluginhost.c:1075

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PluginHost * impl_from_IPropertyNotifySink(IPropertyNotifySink *iface)
Definition: pluginhost.c:1075

◆ 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 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static PluginHost * impl_from_IPropertyNotifySink(IPropertyNotifySink *iface)
Definition: pluginhost.c:1075

◆ 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 }
static PluginHost * impl_from_IPropertyNotifySink(IPropertyNotifySink *iface)
Definition: pluginhost.c:1075

◆ 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 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static PluginHost * impl_from_IServiceProvider(IServiceProvider *iface)
Definition: pluginhost.c:1566

◆ 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 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static PluginHost * impl_from_IServiceProvider(IServiceProvider *iface)
Definition: pluginhost.c:1566

◆ 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 }
static PluginHost * impl_from_IServiceProvider(IServiceProvider *iface)
Definition: pluginhost.c:1566

◆ 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 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4

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 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
char * host
Definition: whois.c:55
& rect
Definition: startmenu.cpp:1413
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
const char * wine_dbgstr_rect(const RECT *rect)
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