ReactOS  0.4.13-dev-563-g0561610
activex.c File Reference
#include "precomp.h"
#include <test_tlb.h>
Include dependency graph for activex.c:

Go to the source code of this file.

Macros

#define DEFINE_EXPECT(func)   static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
 
#define SET_EXPECT(func)   do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0)
 
#define CHECK_EXPECT2(func)
 
#define CHECK_EXPECT(func)
 
#define CHECK_CALLED(func)
 
#define CLEAR_CALLED(func)   expect_ ## func = called_ ## func = FALSE
 
#define DISPID_SCRIPTPROP   1000
 
#define DISPID_SCRIPTCALL   1001
 
#define TESTACTIVEX_CLSID   "{178fc163-f585-4e24-9c13-4bb7f6680746}"
 
#define test_ifaces(i, ids)   _test_ifaces(__LINE__,i,ids)
 

Enumerations

enum  { TEST_FLASH, TEST_NOQUICKACT, TEST_DISPONLY }
 

Functions

 DEFINE_EXPECT (CreateInstance)
 
 DEFINE_EXPECT (FreezeEvents_TRUE)
 
 DEFINE_EXPECT (FreezeEvents_FALSE)
 
 DEFINE_EXPECT (QuickActivate)
 
 DEFINE_EXPECT (IPersistPropertyBag_InitNew)
 
 DEFINE_EXPECT (IPersistPropertyBag_Load)
 
 DEFINE_EXPECT (Invoke_READYSTATE)
 
 DEFINE_EXPECT (Invoke_ENABLED)
 
 DEFINE_EXPECT (Invoke_VALID)
 
 DEFINE_EXPECT (Invoke_SECURITYCTX)
 
 DEFINE_EXPECT (Invoke_SCRIPTPROP)
 
 DEFINE_EXPECT (Invoke_SCRIPTCALL)
 
 DEFINE_EXPECT (GetIDsOfNames_scriptprop)
 
 DEFINE_EXPECT (DoVerb)
 
 DEFINE_EXPECT (SetExtent)
 
 DEFINE_EXPECT (GetExtent)
 
 DEFINE_EXPECT (SetClientSite)
 
 DEFINE_EXPECT (SetClientSite_NULL)
 
 DEFINE_EXPECT (Close)
 
 DEFINE_EXPECT (InPlaceObject_GetWindow)
 
 DEFINE_EXPECT (SetObjectRects)
 
 DEFINE_EXPECT (InPlaceDeactivate)
 
 DEFINE_EXPECT (UIDeactivate)
 
 DEFINE_EXPECT (QueryService_TestActiveX)
 
 DEFINE_EXPECT (GetMiscStatus)
 
 DEFINE_EXPECT (SetAdvise)
 
 DEFINE_EXPECT (GetViewStatus)
 
 DEFINE_EXPECT (QI_ITestActiveX)
 
 DEFINE_EXPECT (wrapped_AddRef)
 
 DEFINE_EXPECT (wrapped_Release)
 
 DEFINE_EXPECT (wrapped_func)
 
 DEFINE_EXPECT (OnAmbientPropertyChange_UNKNOWN)
 
 DEFINE_EXPECT (GetTypeInfo)
 
 DEFINE_EXPECT (GetClassInfo)
 
 DEFINE_EXPECT (FindConnectionPoint)
 
 DEFINE_EXPECT (Advise)
 
 DEFINE_EXPECT (Unadvise)
 
static BOOL iface_cmp (IUnknown *iface1, IUnknown *iface2)
 
static void _test_ifaces (unsigned line, IUnknown *iface, REFIID *iids)
 
static int strcmp_wa (LPCWSTR strw, const char *stra)
 
static BSTR a2bstr (const char *str)
 
static void set_plugin_readystate (READYSTATE state)
 
static void test_mon_displayname (IMoniker *mon, const char *exname, const char *broken_name)
 
static LRESULT WINAPI plugin_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static void create_plugin_window (HWND parent, const RECT *rect)
 
static HRESULT WINAPI ConnectionPoint_QueryInterface (IConnectionPoint *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ConnectionPoint_AddRef (IConnectionPoint *iface)
 
static ULONG WINAPI ConnectionPoint_Release (IConnectionPoint *iface)
 
static HRESULT WINAPI ConnectionPoint_GetConnectionInterface (IConnectionPoint *iface, IID *pIID)
 
static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer (IConnectionPoint *iface, IConnectionPointContainer **ppCPC)
 
static HRESULT WINAPI ConnectionPoint_Advise (IConnectionPoint *iface, IUnknown *pUnkSink, DWORD *pdwCookie)
 
static HRESULT WINAPI ConnectionPoint_Unadvise (IConnectionPoint *iface, DWORD dwCookie)
 
static HRESULT WINAPI ConnectionPoint_EnumConnections (IConnectionPoint *iface, IEnumConnections **ppEnum)
 
static HRESULT ax_qi (REFIID, void **)
 
static HRESULT WINAPI OleControl_QueryInterface (IOleControl *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI OleControl_AddRef (IOleControl *iface)
 
static ULONG WINAPI OleControl_Release (IOleControl *iface)
 
static HRESULT WINAPI OleControl_GetControlInfo (IOleControl *iface, CONTROLINFO *pCI)
 
static HRESULT WINAPI OleControl_OnMnemonic (IOleControl *iface, MSG *mMsg)
 
static HRESULT WINAPI OleControl_OnAmbientPropertyChange (IOleControl *iface, DISPID dispID)
 
static HRESULT WINAPI OleControl_FreezeEvents (IOleControl *iface, BOOL bFreeze)
 
static HRESULT WINAPI QuickActivate_QueryInterface (IQuickActivate *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI QuickActivate_AddRef (IQuickActivate *iface)
 
static ULONG WINAPI QuickActivate_Release (IQuickActivate *iface)
 
static HRESULT WINAPI QuickActivate_QuickActivate (IQuickActivate *iface, QACONTAINER *container, QACONTROL *control)
 
static HRESULT WINAPI QuickActivate_SetContentExtent (IQuickActivate *iface, LPSIZEL pSizel)
 
static HRESULT WINAPI QuickActivate_GetContentExtent (IQuickActivate *iface, LPSIZEL pSizel)
 
static HRESULT WINAPI PersistPropertyBag_QueryInterface (IPersistPropertyBag *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PersistPropertyBag_AddRef (IPersistPropertyBag *iface)
 
static ULONG WINAPI PersistPropertyBag_Release (IPersistPropertyBag *iface)
 
static HRESULT WINAPI PersistPropertyBag_GetClassID (IPersistPropertyBag *face, CLSID *pClassID)
 
static HRESULT WINAPI PersistPropertyBag_InitNew (IPersistPropertyBag *face)
 
static HRESULT WINAPI PersistPropertyBag_Load (IPersistPropertyBag *face, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
 
static HRESULT WINAPI PersistPropertyBag_Save (IPersistPropertyBag *face, IPropertyBag *pPropBag, BOOL fClearDisrty, BOOL fSaveAllProperties)
 
static HRESULT WINAPI Dispatch_QueryInterface (IDispatch *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI Dispatch_AddRef (IDispatch *iface)
 
static ULONG WINAPI Dispatch_Release (IDispatch *iface)
 
static HRESULT WINAPI Dispatch_GetTypeInfoCount (IDispatch *iface, UINT *pctinfo)
 
static HRESULT WINAPI Dispatch_GetTypeInfo (IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI Dispatch_GetIDsOfNames (IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI Dispatch_Invoke (IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI ProvideClassInfo_QueryInterface (IProvideClassInfo *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ProvideClassInfo_AddRef (IProvideClassInfo *iface)
 
static ULONG WINAPI ProvideClassInfo_Release (IProvideClassInfo *iface)
 
static HRESULT WINAPI ProvideClassInfo_GetClassInfo (IProvideClassInfo *iface, ITypeInfo **ppTI)
 
static HRESULT WINAPI ConnectionPointContainer_QueryInterface (IConnectionPointContainer *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ConnectionPointContainer_AddRef (IConnectionPointContainer *iface)
 
static ULONG WINAPI ConnectionPointContainer_Release (IConnectionPointContainer *iface)
 
static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints (IConnectionPointContainer *iface, IEnumConnectionPoints **ppEnum)
 
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint (IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **ppCP)
 
static HRESULT WINAPI ViewObjectEx_QueryInterface (IViewObjectEx *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ViewObjectEx_AddRef (IViewObjectEx *iface)
 
static ULONG WINAPI ViewObjectEx_Release (IViewObjectEx *iface)
 
static HRESULT WINAPI ViewObjectEx_Draw (IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBoungs, BOOL(WINAPI *pfnContinue)(ULONG_PTR), ULONG_PTR dwContinue)
 
static HRESULT WINAPI ViewObjectEx_GetColorSet (IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
 
static HRESULT WINAPI ViewObjectEx_Freeze (IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze)
 
static HRESULT WINAPI ViewObjectEx_Unfreeze (IViewObjectEx *iface, DWORD dwFreeze)
 
static HRESULT WINAPI ViewObjectEx_SetAdvise (IViewObjectEx *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
 
static HRESULT WINAPI ViewObjectEx_GetAdvise (IViewObjectEx *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
 
static HRESULT WINAPI ViewObjectEx_GetExtent (IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, DVTARGETDEVICE *ptd, LPSIZEL lpsizel)
 
static HRESULT WINAPI ViewObjectEx_GetRect (IViewObjectEx *iface, DWORD dwAspect, LPRECTL pRect)
 
static HRESULT WINAPI ViewObjectEx_GetViewStatus (IViewObjectEx *iface, DWORD *pdwStatus)
 
static HRESULT WINAPI ViewObjectEx_QueryHitPoint (IViewObjectEx *iface, DWORD dwAspect, LPCRECT pRectBounds, POINT ptlLoc, LONG lCloseHint, DWORD *pHitResult)
 
static HRESULT WINAPI ViewObjectEx_QueryHitRect (IViewObjectEx *iface, DWORD dwAspect, LPCRECT pRectBounds, LPCRECT pRectLoc, LONG lCloseHint, DWORD *pHitResult)
 
static HRESULT WINAPI ViewObjectEx_GetNaturalExtent (IViewObjectEx *iface, DWORD dwAspect, LONG lindex, DVTARGETDEVICE *ptd, HDC hicTargetDev, DVEXTENTINFO *pExtentIngo, LPSIZEL pSizel)
 
static HRESULT WINAPI OleObject_QueryInterface (IOleObject *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI OleObject_AddRef (IOleObject *iface)
 
static ULONG WINAPI OleObject_Release (IOleObject *iface)
 
static HRESULT WINAPI OleObject_SetClientSite (IOleObject *iface, IOleClientSite *pClientSite)
 
static HRESULT WINAPI OleObject_GetClientSite (IOleObject *iface, IOleClientSite **ppClientSite)
 
static HRESULT WINAPI OleObject_SetHostNames (IOleObject *iface, LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
 
static HRESULT WINAPI OleObject_Close (IOleObject *iface, DWORD dwSaveOption)
 
static HRESULT WINAPI OleObject_SetMoniker (IOleObject *iface, DWORD dwWhichMoniker, IMoniker *pmk)
 
static HRESULT WINAPI OleObject_GetMoniker (IOleObject *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
 
static HRESULT WINAPI OleObject_InitFromData (IOleObject *iface, IDataObject *pDataObject, BOOL fCreation, DWORD dwReserved)
 
static HRESULT WINAPI OleObject_GetClipboardData (IOleObject *iface, DWORD dwReserved, IDataObject **ppDataObject)
 
static HRESULT WINAPI OleObject_DoVerb (IOleObject *iface, LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
 
static HRESULT WINAPI OleObject_EnumVerbs (IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb)
 
static HRESULT WINAPI OleObject_Update (IOleObject *iface)
 
static HRESULT WINAPI OleObject_IsUpToDate (IOleObject *iface)
 
static HRESULT WINAPI OleObject_GetUserClassID (IOleObject *iface, CLSID *pClsid)
 
static HRESULT WINAPI OleObject_GetUserType (IOleObject *iface, DWORD dwFormOfType, LPOLESTR *pszUserType)
 
static HRESULT WINAPI OleObject_SetExtent (IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
 
static HRESULT WINAPI OleObject_GetExtent (IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
 
static HRESULT WINAPI OleObject_Advise (IOleObject *iface, IAdviseSink *pAdvSink, DWORD *pdwConnection)
 
static HRESULT WINAPI OleObject_Unadvise (IOleObject *iface, DWORD dwConnection)
 
static HRESULT WINAPI OleObject_EnumAdvise (IOleObject *iface, IEnumSTATDATA **ppenumAdvise)
 
static HRESULT WINAPI OleObject_GetMiscStatus (IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
 
static HRESULT WINAPI OleObject_SetColorScheme (IOleObject *iface, LOGPALETTE *pLogpal)
 
static HRESULT WINAPI OleInPlaceObject_QueryInterface (IOleInPlaceObjectWindowless *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI OleInPlaceObject_AddRef (IOleInPlaceObjectWindowless *iface)
 
static ULONG WINAPI OleInPlaceObject_Release (IOleInPlaceObjectWindowless *iface)
 
static HRESULT WINAPI OleInPlaceObject_GetWindow (IOleInPlaceObjectWindowless *iface, HWND *phwnd)
 
static HRESULT WINAPI OleInPlaceObject_ContextSensitiveHelp (IOleInPlaceObjectWindowless *iface, BOOL fEnterMode)
 
static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate (IOleInPlaceObjectWindowless *iface)
 
static HRESULT WINAPI OleInPlaceObject_UIDeactivate (IOleInPlaceObjectWindowless *iface)
 
static HRESULT WINAPI OleInPlaceObject_SetObjectRects (IOleInPlaceObjectWindowless *iface, LPCRECT lprcPosRect, LPCRECT lprcClipRect)
 
static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo (IOleInPlaceObjectWindowless *iface)
 
static HRESULT WINAPI OleInPlaceObjectWindowless_OnWindowMessage (IOleInPlaceObjectWindowless *iface, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *lpResult)
 
static HRESULT WINAPI OleInPlaceObjectWindowless_GetDropTarget (IOleInPlaceObjectWindowless *iface, IDropTarget **ppDropTarget)
 
static HRESULT WINAPI wrapped_QueryInterface (IUnknown *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI wrapped_AddRef (IUnknown *iface)
 
static ULONG WINAPI wrapped_Release (IUnknown *iface)
 
static HRESULT WINAPI wrapped_func_nocall (IUnknown *iface, int i, double d)
 
static HRESULT WINAPI wrapped_func (IUnknown *iface, int i, double d)
 
static void init_wrapped_iface (void)
 
static HRESULT WINAPI ClassFactory_QueryInterface (IClassFactory *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ClassFactory_AddRef (IClassFactory *iface)
 
static ULONG WINAPI ClassFactory_Release (IClassFactory *iface)
 
static HRESULT WINAPI ClassFactory_CreateInstance (IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
 
static HRESULT WINAPI ClassFactory_LockServer (IClassFactory *iface, BOOL dolock)
 
static void test_elem_dispex (IDispatchEx *dispex)
 
static void test_iface_wrapping (IHTMLObjectElement *elem)
 
static void test_object_elem (IHTMLDocument2 *doc)
 
static void test_container (IHTMLDocument2 *doc_obj)
 
static void test_ui_activate (void)
 
static HRESULT cs_qi (REFIID, void **)
 
static HRESULT WINAPI InPlaceFrame_QueryInterface (IOleInPlaceFrame *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI InPlaceFrame_AddRef (IOleInPlaceFrame *iface)
 
static ULONG WINAPI InPlaceFrame_Release (IOleInPlaceFrame *iface)
 
static HRESULT WINAPI InPlaceFrame_GetWindow (IOleInPlaceFrame *iface, HWND *phwnd)
 
static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp (IOleInPlaceFrame *iface, BOOL fEnterMode)
 
static HRESULT WINAPI InPlaceFrame_GetBorder (IOleInPlaceFrame *iface, LPRECT lprectBorder)
 
static HRESULT WINAPI InPlaceFrame_RequestBorderSpace (IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
 
static HRESULT WINAPI InPlaceFrame_SetBorderSpace (IOleInPlaceFrame *iface, LPCBORDERWIDTHS pborderwidths)
 
static HRESULT WINAPI InPlaceUIWindow_SetActiveObject (IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
 
static HRESULT WINAPI InPlaceFrame_SetActiveObject (IOleInPlaceFrame *iface, IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName)
 
static HRESULT WINAPI InPlaceFrame_InsertMenus (IOleInPlaceFrame *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
 
static HRESULT WINAPI InPlaceFrame_SetMenu (IOleInPlaceFrame *iface, HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject)
 
static HRESULT WINAPI InPlaceFrame_RemoveMenus (IOleInPlaceFrame *iface, HMENU hmenuShared)
 
static HRESULT WINAPI InPlaceFrame_SetStatusText (IOleInPlaceFrame *iface, LPCOLESTR pszStatusText)
 
static HRESULT WINAPI InPlaceFrame_EnableModeless (IOleInPlaceFrame *iface, BOOL fEnable)
 
static HRESULT WINAPI InPlaceFrame_TranslateAccelerator (IOleInPlaceFrame *iface, LPMSG lpmsg, WORD wID)
 
static HRESULT WINAPI InPlaceSite_QueryInterface (IOleInPlaceSite *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI InPlaceSite_AddRef (IOleInPlaceSite *iface)
 
static ULONG WINAPI InPlaceSite_Release (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_GetWindow (IOleInPlaceSite *iface, HWND *phwnd)
 
static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp (IOleInPlaceSite *iface, BOOL fEnterMode)
 
static HRESULT WINAPI InPlaceSite_CanInPlaceActivate (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_OnInPlaceActivate (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_OnUIActivate (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_GetWindowContext (IOleInPlaceSite *iface, IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
 
static HRESULT WINAPI InPlaceSite_Scroll (IOleInPlaceSite *iface, SIZE scrollExtant)
 
static HRESULT WINAPI InPlaceSite_OnUIDeactivate (IOleInPlaceSite *iface, BOOL fUndoable)
 
static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_DiscardUndoState (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_DeactivateAndUndo (IOleInPlaceSite *iface)
 
static HRESULT WINAPI InPlaceSite_OnPosRectChange (IOleInPlaceSite *iface, LPCRECT lprcPosRect)
 
static HRESULT WINAPI ClientSite_QueryInterface (IOleClientSite *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ClientSite_AddRef (IOleClientSite *iface)
 
static ULONG WINAPI ClientSite_Release (IOleClientSite *iface)
 
static HRESULT WINAPI ClientSite_SaveObject (IOleClientSite *iface)
 
static HRESULT WINAPI ClientSite_GetMoniker (IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmon)
 
static HRESULT WINAPI ClientSite_GetContainer (IOleClientSite *iface, IOleContainer **ppContainer)
 
static HRESULT WINAPI ClientSite_ShowObject (IOleClientSite *iface)
 
static HRESULT WINAPI ClientSite_OnShowWindow (IOleClientSite *iface, BOOL fShow)
 
static HRESULT WINAPI ClientSite_RequestNewObjectLayout (IOleClientSite *iface)
 
static HRESULT WINAPI DocumentSite_QueryInterface (IOleDocumentSite *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI DocumentSite_AddRef (IOleDocumentSite *iface)
 
static ULONG WINAPI DocumentSite_Release (IOleDocumentSite *iface)
 
static HRESULT WINAPI DocumentSite_ActivateMe (IOleDocumentSite *iface, IOleDocumentView *pViewToActivate)
 
static HRESULT WINAPI ServiceProvider_QueryInterface (IServiceProvider *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ServiceProvider_AddRef (IServiceProvider *iface)
 
static ULONG WINAPI ServiceProvider_Release (IServiceProvider *iface)
 
static HRESULT WINAPI ServiceProvider_QueryService (IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
 
static HRESULT WINAPI PropertyNotifySink_QueryInterface (IPropertyNotifySink *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PropertyNotifySink_AddRef (IPropertyNotifySink *iface)
 
static ULONG WINAPI PropertyNotifySink_Release (IPropertyNotifySink *iface)
 
static HRESULT WINAPI PropertyNotifySink_OnChanged (IPropertyNotifySink *iface, DISPID dispID)
 
static HRESULT WINAPI PropertyNotifySink_OnRequestEdit (IPropertyNotifySink *iface, DISPID dispID)
 
static void doc_load_string (IHTMLDocument2 *doc, const char *str)
 
static void do_advise (IUnknown *unk, REFIID riid, IUnknown *unk_advise)
 
static void set_client_site (IHTMLDocument2 *doc, BOOL set)
 
static IHTMLDocument2 * create_document (void)
 
static IHTMLDocument2 * create_doc (const char *str)
 
static void release_doc (IHTMLDocument2 *doc)
 
static void init_test (int behavior)
 
static void test_event_call (void)
 
static void test_flash_ax (void)
 
static void test_noquickact_ax (void)
 
static void test_event_binding (void)
 
static void test_nooleobj_ax (void)
 
static void test_exec_script (IHTMLDocument2 *doc, const char *codea, const char *langa)
 
static void test_create_element (void)
 
static LRESULT WINAPI wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static HWND create_container_window (void)
 
static void load_typelib (void)
 
static BOOL init_key (const char *key_name, const char *def_value, BOOL init)
 
static BOOL init_registry (BOOL init)
 
static BOOL register_activex (void)
 
static BOOL check_ie (void)
 
 START_TEST (activex)
 

Variables

static ITypeInfoactxtest_typeinfo
 
static ITypeInfoclass_typeinfo
 
static HWND container_hwnd
 
static HWND plugin_hwnd
 
static int plugin_behavior
 
static BOOL no_quickact
 
static LONG activex_refcnt
 
static const GUID CLSID_TestActiveX
 
static const GUID IID_ITestActiveX
 
static const char object_ax_str []
 
static const char event_binding_str []
 
static REFIID pluginhost_iids []
 
static IOleClientSiteclient_site
 
static IDispatchsink_disp
 
static READYSTATE plugin_readystate = READYSTATE_UNINITIALIZED
 
static BOOL have_container
 
static const IConnectionPointVtbl ConnectionPointVtbl
 
static IConnectionPoint ConnectionPoint = { &ConnectionPointVtbl }
 
static const IOleControlVtbl OleControlVtbl
 
static IOleControl OleControl = { &OleControlVtbl }
 
static const IQuickActivateVtbl QuickActivateVtbl
 
static IQuickActivate QuickActivate = { &QuickActivateVtbl }
 
static const IPersistPropertyBagVtbl PersistPropertyBagVtbl
 
static IPersistPropertyBag PersistPropertyBag = { &PersistPropertyBagVtbl }
 
static const IDispatchVtbl DispatchVtbl
 
static IDispatch Dispatch = { &DispatchVtbl }
 
static const IProvideClassInfoVtbl ProvideClassInfoVtbl
 
static IProvideClassInfo ProvideClassInfo = { &ProvideClassInfoVtbl }
 
static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl
 
static IConnectionPointContainer ConnectionPointContainer = { &ConnectionPointContainerVtbl }
 
static const IViewObjectExVtbl ViewObjectExVtbl
 
static IViewObjectEx ViewObjectEx = { &ViewObjectExVtbl }
 
static const IOleObjectVtbl OleObjectVtbl
 
static IOleObject OleObject = { &OleObjectVtbl }
 
static const IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl
 
static IOleInPlaceObjectWindowless OleInPlaceObjectWindowless = { &OleInPlaceObjectWindowlessVtbl }
 
static voidwrapped_iface_vtbl [100]
 
static IUnknown wrapped_iface = { (IUnknownVtbl*)wrapped_iface_vtbl }
 
static const IClassFactoryVtbl ClassFactoryVtbl
 
static IClassFactory activex_cf = { &ClassFactoryVtbl }
 
static IOleDocumentViewview
 
static const IOleInPlaceFrameVtbl InPlaceFrameVtbl
 
static IOleInPlaceFrame InPlaceFrame = { &InPlaceFrameVtbl }
 
static const IOleInPlaceFrameVtbl InPlaceUIWindowVtbl
 
static IOleInPlaceFrame InPlaceUIWindow = { &InPlaceUIWindowVtbl }
 
static const IOleInPlaceSiteVtbl InPlaceSiteVtbl
 
static IOleInPlaceSite InPlaceSite = { &InPlaceSiteVtbl }
 
static const IOleClientSiteVtbl ClientSiteVtbl
 
static IOleClientSite ClientSite = { &ClientSiteVtbl }
 
static const IOleDocumentSiteVtbl DocumentSiteVtbl
 
static IOleDocumentSite DocumentSite = { &DocumentSiteVtbl }
 
static const IServiceProviderVtbl ServiceProviderVtbl
 
static IServiceProvider ServiceProvider = { &ServiceProviderVtbl }
 
static IHTMLDocument2 * notif_doc
 
static BOOL doc_complete
 
static IPropertyNotifySinkVtbl PropertyNotifySinkVtbl
 
static IPropertyNotifySink PropertyNotifySink = { &PropertyNotifySinkVtbl }
 

Macro Definition Documentation

◆ CHECK_CALLED

#define CHECK_CALLED (   func)
Value:
do { \
ok(called_ ## func, "expected " #func "\n"); \
expect_ ## func = called_ ## func = FALSE; \
}while(0)
GLenum func
Definition: glext.h:6028

Definition at line 41 of file activex.c.

◆ CHECK_EXPECT

#define CHECK_EXPECT (   func)
Value:
do { \
CHECK_EXPECT2(func); \
expect_ ## func = FALSE; \
}while(0)
GLenum func
Definition: glext.h:6028

Definition at line 35 of file activex.c.

◆ CHECK_EXPECT2

#define CHECK_EXPECT2 (   func)
Value:
do { \
ok(expect_ ##func, "unexpected call " #func "\n"); \
called_ ## func = TRUE; \
}while(0)
GLenum func
Definition: glext.h:6028
#define TRUE
Definition: types.h:120
#define expect_(expected, got, precision)
Definition: font.c:29

Definition at line 29 of file activex.c.

◆ CLEAR_CALLED

#define CLEAR_CALLED (   func)    expect_ ## func = called_ ## func = FALSE

Definition at line 47 of file activex.c.

◆ DEFINE_EXPECT

#define DEFINE_EXPECT (   func)    static BOOL expect_ ## func = FALSE, called_ ## func = FALSE

Definition at line 23 of file activex.c.

◆ DISPID_SCRIPTCALL

#define DISPID_SCRIPTCALL   1001

Definition at line 91 of file activex.c.

◆ DISPID_SCRIPTPROP

#define DISPID_SCRIPTPROP   1000

Definition at line 90 of file activex.c.

◆ SET_EXPECT

#define SET_EXPECT (   func)    do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0)

Definition at line 26 of file activex.c.

◆ test_ifaces

#define test_ifaces (   i,
  ids 
)    _test_ifaces(__LINE__,i,ids)

Definition at line 164 of file activex.c.

◆ TESTACTIVEX_CLSID

#define TESTACTIVEX_CLSID   "{178fc163-f585-4e24-9c13-4bb7f6680746}"

Definition at line 105 of file activex.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TEST_FLASH 
TEST_NOQUICKACT 
TEST_DISPONLY 

Definition at line 93 of file activex.c.

Function Documentation

◆ _test_ifaces()

static void _test_ifaces ( unsigned  line,
IUnknown iface,
REFIID iids 
)
static

Definition at line 165 of file activex.c.

166 {
167  const IID * const *piid;
168  IUnknown *unk;
169  HRESULT hres;
170 
171  for(piid = iids; *piid; piid++) {
172  hres = IUnknown_QueryInterface(iface, *piid, (void**)&unk);
173  ok_(__FILE__,line) (hres == S_OK, "Could not get %s interface: %08x\n", wine_dbgstr_guid(*piid), hres);
174  if(SUCCEEDED(hres))
175  IUnknown_Release(unk);
176  }
177 }
#define ok_(x1, x2)
const char * wine_dbgstr_guid(const GUID *guid)
Definition: parser.c:48
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ a2bstr()

static BSTR a2bstr ( const char str)
static

Definition at line 186 of file activex.c.

187 {
188  BSTR ret;
189  int len;
190 
191  len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
193  MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
194 
195  return ret;
196 }
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
#define CP_ACP
Definition: compat.h:99
OLECHAR * BSTR
Definition: compat.h:1934
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
int ret
GLenum GLsizei len
Definition: glext.h:6722
#define MultiByteToWideChar
Definition: compat.h:100

Referenced by test_elem_dispex(), test_exec_script(), and test_object_elem().

◆ ax_qi()

static HRESULT ax_qi ( REFIID  riid,
void **  ppv 
)
static

Definition at line 1413 of file activex.c.

1414 {
1417  }else if(IsEqualGUID(riid, &IID_IQuickActivate)) {
1421  }else if(IsEqualGUID(riid, &IID_IDispatch)) {
1422  *ppv = &Dispatch;
1423  }else if(IsEqualGUID(riid, &IID_IProvideClassInfo)) {
1424  *ppv = &ProvideClassInfo;
1428  || IsEqualGUID(riid, &IID_IViewObjectEx)) {
1430  }else if(IsEqualGUID(riid, &IID_IOleObject)) {
1432  }else if(IsEqualGUID(riid, &IID_ITestActiveX)) {
1433  CHECK_EXPECT(QI_ITestActiveX);
1434  *ppv = &wrapped_iface;
1435  return S_OK;
1437  || IsEqualGUID(&IID_IOleInPlaceObjectWindowless, riid)) {
1439  }else {
1440  trace("QI %s\n", wine_dbgstr_guid(riid));
1441  *ppv = NULL;
1442  }
1443 
1444  if(!*ppv)
1445  return E_NOINTERFACE;
1446 
1447  IUnknown_AddRef((IUnknown*)*ppv);
1448  return S_OK;
1449 }
#define trace(...)
Definition: kmt_test.h:217
const GUID IID_IViewObject
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static IOleInPlaceObjectWindowless OleInPlaceObjectWindowless
Definition: activex.c:1360
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IConnectionPointContainer
static IDispatch Dispatch
Definition: activex.c:801
const char * wine_dbgstr_guid(const GUID *guid)
static IOleObject OleObject
Definition: activex.c:1260
static IConnectionPointContainer ConnectionPointContainer
Definition: activex.c:883
static IPersistPropertyBag PersistPropertyBag
Definition: activex.c:658
static const GUID IID_ITestActiveX
Definition: activex.c:110
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11
const GUID IID_IProvideClassInfo
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IOleInPlaceObject
const GUID IID_IOleObject
static BOOL no_quickact
Definition: activex.c:102
const GUID IID_IUnknown
static IOleControl OleControl
Definition: activex.c:424
const GUID IID_IDispatch
const GUID IID_IOleControl
static IViewObjectEx ViewObjectEx
Definition: activex.c:1002
#define CHECK_EXPECT(func)
Definition: activex.c:35
static IUnknown wrapped_iface
Definition: activex.c:1363
#define S_OK
Definition: intsafe.h:59
const GUID IID_IViewObject2
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static IQuickActivate QuickActivate
Definition: activex.c:516
const GUID IID_IOleWindow
static IProvideClassInfo ProvideClassInfo
Definition: activex.c:834
static int plugin_behavior
Definition: activex.c:101

Referenced by ConnectionPointContainer_QueryInterface(), Dispatch_QueryInterface(), OleControl_QueryInterface(), OleInPlaceObject_QueryInterface(), OleObject_QueryInterface(), PersistPropertyBag_QueryInterface(), ProvideClassInfo_QueryInterface(), QuickActivate_QueryInterface(), and ViewObjectEx_QueryInterface().

◆ check_ie()

static BOOL check_ie ( void  )
static

Definition at line 2754 of file activex.c.

2755 {
2756  IHTMLDocument5 *doc;
2757  HRESULT hres;
2758 
2759  hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
2760  &IID_IHTMLDocument5, (void**)&doc);
2761  if(FAILED(hres))
2762  return FALSE;
2763 
2764  IHTMLDocument5_Release(doc);
2765  return TRUE;
2766 }
#define TRUE
Definition: types.h:120
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234

Referenced by START_TEST().

◆ ClassFactory_AddRef()

static ULONG WINAPI ClassFactory_AddRef ( IClassFactory iface)
static

Definition at line 1471 of file activex.c.

1472 {
1473  return 2;
1474 }

◆ ClassFactory_CreateInstance()

static HRESULT WINAPI ClassFactory_CreateInstance ( IClassFactory iface,
IUnknown outer,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1481 of file activex.c.

1482 {
1483  CHECK_EXPECT(CreateInstance);
1484 
1485  ok(!outer, "outer = %p\n", outer);
1486  ok(IsEqualGUID(riid, &IID_IUnknown), "riid = %s\n", wine_dbgstr_guid(riid));
1487 
1488  activex_refcnt++;
1489  *ppv = &OleControl;
1490  return S_OK;
1491 }
static LONG activex_refcnt
Definition: activex.c:103
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
const char * wine_dbgstr_guid(const GUID *guid)
#define ok(value,...)
const GUID IID_IUnknown
static IOleControl OleControl
Definition: activex.c:424
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ ClassFactory_LockServer()

static HRESULT WINAPI ClassFactory_LockServer ( IClassFactory iface,
BOOL  dolock 
)
static

Definition at line 1493 of file activex.c.

1494 {
1495  ok(0, "unexpected call\n");
1496  return S_OK;
1497 }
#define ok(value,...)
#define S_OK
Definition: intsafe.h:59

◆ ClassFactory_QueryInterface()

static HRESULT WINAPI ClassFactory_QueryInterface ( IClassFactory iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1451 of file activex.c.

1452 {
1453  *ppv = NULL;
1454 
1456  *ppv = iface;
1457  return S_OK;
1458  }
1459 
1460  if(IsEqualGUID(&IID_IMarshal, riid))
1461  return E_NOINTERFACE;
1463  return E_NOINTERFACE;
1464  if(IsEqualGUID(&IID_IClassFactoryEx, riid))
1465  return E_NOINTERFACE; /* TODO */
1466 
1467  ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
1468  return E_NOTIMPL;
1469 }
const CLSID CLSID_IdentityUnmarshal
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
const char * wine_dbgstr_guid(const GUID *guid)
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
const GUID IID_IClassFactory

◆ ClassFactory_Release()

static ULONG WINAPI ClassFactory_Release ( IClassFactory iface)
static

Definition at line 1476 of file activex.c.

1477 {
1478  return 1;
1479 }

◆ ClientSite_AddRef()

static ULONG WINAPI ClientSite_AddRef ( IOleClientSite iface)
static

Definition at line 1996 of file activex.c.

1997 {
1998  return 2;
1999 }

◆ ClientSite_GetContainer()

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

Definition at line 2019 of file activex.c.

2020 {
2021  return E_NOTIMPL;
2022 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ClientSite_GetMoniker()

static HRESULT WINAPI ClientSite_GetMoniker ( IOleClientSite iface,
DWORD  dwAssign,
DWORD  dwWhichMoniker,
IMoniker **  ppmon 
)
static

Definition at line 2012 of file activex.c.

2014 {
2015  ok(0, "unexpected call\n");
2016  return E_NOTIMPL;
2017 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ClientSite_OnShowWindow()

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

Definition at line 2030 of file activex.c.

2031 {
2032  ok(0, "unexpected call\n");
2033  return E_NOTIMPL;
2034 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ClientSite_QueryInterface()

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

Definition at line 1991 of file activex.c.

1992 {
1993  return cs_qi(riid, ppv);
1994 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT cs_qi(REFIID, void **)
Definition: activex.c:2147

◆ ClientSite_Release()

static ULONG WINAPI ClientSite_Release ( IOleClientSite iface)
static

Definition at line 2001 of file activex.c.

2002 {
2003  return 1;
2004 }

◆ ClientSite_RequestNewObjectLayout()

static HRESULT WINAPI ClientSite_RequestNewObjectLayout ( IOleClientSite iface)
static

Definition at line 2036 of file activex.c.

2037 {
2038  ok(0, "unexpected call\n");
2039  return E_NOTIMPL;
2040 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ClientSite_SaveObject()

static HRESULT WINAPI ClientSite_SaveObject ( IOleClientSite iface)
static

Definition at line 2006 of file activex.c.

2007 {
2008  ok(0, "unexpected call\n");
2009  return E_NOTIMPL;
2010 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ClientSite_ShowObject()

static HRESULT WINAPI ClientSite_ShowObject ( IOleClientSite iface)
static

Definition at line 2024 of file activex.c.

2025 {
2026  ok(0, "unexpected call\n");
2027  return E_NOTIMPL;
2028 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ConnectionPoint_AddRef()

static ULONG WINAPI ConnectionPoint_AddRef ( IConnectionPoint iface)
static

Definition at line 285 of file activex.c.

286 {
287  return 2;
288 }

◆ ConnectionPoint_Advise()

static HRESULT WINAPI ConnectionPoint_Advise ( IConnectionPoint iface,
IUnknown pUnkSink,
DWORD pdwCookie 
)
static

Definition at line 308 of file activex.c.

309 {
310  DispActiveXTest *ax_test;
311  IDispatchEx *dispex;
312  HRESULT hres;
313 
314  CHECK_EXPECT(Advise);
315 
316  hres = IUnknown_QueryInterface(pUnkSink, &IID_IDispatch, (void**)&sink_disp);
317  ok(hres == S_OK, "Could not get IDispatch iface: %08x\n", hres);
318 
319  hres = IUnknown_QueryInterface(pUnkSink, &IID_IDispatchEx, (void**)&dispex);
320  ok(hres == E_NOINTERFACE, "QueryInterface(IID_IDispatchEx) returned: %08x\n", hres);
321 
322  hres = IUnknown_QueryInterface(pUnkSink, &DIID_DispActiveXTest, (void**)&ax_test);
323  ok(hres == S_OK, "Could not get DispActiveXTest iface: %08x\n", hres);
324  DispActiveXTest_Release(ax_test);
325 
326  *pdwCookie = 0xdeadbeef;
327  return S_OK;
328 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define ok(value,...)
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IDispatch
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define S_OK
Definition: intsafe.h:59
static IDispatch * sink_disp
Definition: activex.c:199

◆ ConnectionPoint_EnumConnections()

static HRESULT WINAPI ConnectionPoint_EnumConnections ( IConnectionPoint iface,
IEnumConnections **  ppEnum 
)
static

Definition at line 344 of file activex.c.

345 {
346  ok(0, "unexpected call\n");
347  return E_NOTIMPL;
348 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ConnectionPoint_GetConnectionInterface()

static HRESULT WINAPI ConnectionPoint_GetConnectionInterface ( IConnectionPoint iface,
IID pIID 
)
static

Definition at line 295 of file activex.c.

296 {
297  ok(0, "unexpected call\n");
298  return E_NOTIMPL;
299 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ConnectionPoint_GetConnectionPointContainer()

static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer ( IConnectionPoint iface,
IConnectionPointContainer **  ppCPC 
)
static

Definition at line 301 of file activex.c.

303 {
304  ok(0, "unexpected call\n");
305  return E_NOTIMPL;
306 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ConnectionPoint_QueryInterface()

static HRESULT WINAPI ConnectionPoint_QueryInterface ( IConnectionPoint iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 279 of file activex.c.

280 {
281  ok(0, "unexpected QI call %s\n", wine_dbgstr_guid(riid));
282  return E_NOINTERFACE;
283 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const char * wine_dbgstr_guid(const GUID *guid)
#define ok(value,...)

◆ ConnectionPoint_Release()

static ULONG WINAPI ConnectionPoint_Release ( IConnectionPoint iface)
static

Definition at line 290 of file activex.c.

291 {
292  return 1;
293 }

◆ ConnectionPoint_Unadvise()

static HRESULT WINAPI ConnectionPoint_Unadvise ( IConnectionPoint iface,
DWORD  dwCookie 
)
static

Definition at line 330 of file activex.c.

331 {
332  CHECK_EXPECT(Unadvise);
333 
334  ok(dwCookie == 0xdeadbeef, "dwCookie = %x\n", dwCookie);
335 
336  if(sink_disp) {
337  IDispatch_Release(sink_disp);
338  sink_disp = NULL;
339  }
340 
341  return S_OK;
342 }
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define S_OK
Definition: intsafe.h:59
static IDispatch * sink_disp
Definition: activex.c:199

◆ ConnectionPointContainer_AddRef()

static ULONG WINAPI ConnectionPointContainer_AddRef ( IConnectionPointContainer iface)
static

Definition at line 841 of file activex.c.

842 {
843  return ++activex_refcnt;
844 }
static LONG activex_refcnt
Definition: activex.c:103

◆ ConnectionPointContainer_EnumConnectionPoints()

static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints ( IConnectionPointContainer iface,
IEnumConnectionPoints **  ppEnum 
)
static

Definition at line 851 of file activex.c.

853 {
854  ok(0, "unexpected call\n");
855  return E_NOTIMPL;
856 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ConnectionPointContainer_FindConnectionPoint()

static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint ( IConnectionPointContainer iface,
REFIID  riid,
IConnectionPoint **  ppCP 
)
static

Definition at line 858 of file activex.c.

860 {
862  /* TODO */
863  trace("FindConnectionPoint(IID_IPropertyNotifySink)\n");
864  return CONNECT_E_NOCONNECTION;
865  }
866 
867  CHECK_EXPECT(FindConnectionPoint);
868  ok(IsEqualGUID(riid, &DIID_DispActiveXTest), "riid = %s\n", wine_dbgstr_guid(riid));
869 
870  IConnectionPoint_AddRef(&ConnectionPoint);
871  *ppCP = &ConnectionPoint;
872  return S_OK;
873 }
#define trace(...)
Definition: kmt_test.h:217
REFIID riid
Definition: precomp.h:44
#define CONNECT_E_NOCONNECTION
Definition: olectl.h:251
const char * wine_dbgstr_guid(const GUID *guid)
#define ok(value,...)
#define CHECK_EXPECT(func)
Definition: activex.c:35
static IConnectionPoint ConnectionPoint
Definition: activex.c:361
#define S_OK
Definition: intsafe.h:59
const GUID IID_IPropertyNotifySink
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ ConnectionPointContainer_QueryInterface()

static HRESULT WINAPI ConnectionPointContainer_QueryInterface ( IConnectionPointContainer iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 836 of file activex.c.

837 {
838  return ax_qi(riid, ppv);
839 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT ax_qi(REFIID, void **)
Definition: activex.c:1413

◆ ConnectionPointContainer_Release()

static ULONG WINAPI ConnectionPointContainer_Release ( IConnectionPointContainer iface)
static

Definition at line 846 of file activex.c.

847 {
848  return --activex_refcnt;
849 }
static LONG activex_refcnt
Definition: activex.c:103

◆ create_container_window()

static HWND create_container_window ( void  )
static

Definition at line 2667 of file activex.c.

2668 {
2669  static const WCHAR html_document_testW[] =
2670  {'H','T','M','L','D','o','c','u','m','e','n','t','T','e','s','t',0};
2671  static WNDCLASSEXW wndclass = {
2672  sizeof(WNDCLASSEXW),
2673  0,
2674  wnd_proc,
2675  0, 0, NULL, NULL, NULL, NULL, NULL,
2676  html_document_testW,
2677  NULL
2678  };
2679 
2680  RegisterClassExW(&wndclass);
2681  return CreateWindowW(html_document_testW, html_document_testW,
2683  515, 530, NULL, NULL, NULL, NULL);
2684 }
struct _WNDCLASSEXW WNDCLASSEXW
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4185
static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: activex.c:2662
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637

Referenced by START_TEST().

◆ create_doc()

static IHTMLDocument2* create_doc ( const char str)
static

Definition at line 2310 of file activex.c.

2311 {
2312  IHTMLDocument2 *doc;
2313  MSG msg;
2314 
2315  doc = create_document();
2316  set_client_site(doc, TRUE);
2317  doc_load_string(doc, str);
2319 
2320  while(!doc_complete && GetMessageW(&msg, NULL, 0, 0)) {
2323  }
2324 
2325  return doc;
2326 }
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define TRUE
Definition: types.h:120
static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise)
Definition: activex.c:2246
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
static void set_client_site(IHTMLDocument2 *doc, BOOL set)
Definition: activex.c:2265
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
static void doc_load_string(IHTMLDocument2 *doc, const char *str)
Definition: activex.c:2224
static BOOL doc_complete
Definition: activex.c:2164
const GUID IID_IPropertyNotifySink
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define msg(x)
Definition: auth_time.c:54
static IHTMLDocument2 * create_document(void)
Definition: activex.c:2298
static IPropertyNotifySink PropertyNotifySink
Definition: activex.c:2222

Referenced by test_create_element(), test_event_binding(), test_flash_ax(), test_nooleobj_ax(), and test_noquickact_ax().

◆ create_document()

static IHTMLDocument2* create_document ( void  )
static

Definition at line 2298 of file activex.c.

2299 {
2300  IHTMLDocument2 *doc;
2301  HRESULT hres;
2302 
2303  hres = CoCreateInstance(&CLSID_HTMLDocument, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
2304  &IID_IHTMLDocument2, (void**)&doc);
2305  ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
2306 
2307  return doc;
2308 }
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define S_OK
Definition: intsafe.h:59

Referenced by create_doc().

◆ create_plugin_window()

static void create_plugin_window ( HWND  parent,
const RECT rect 
)
static

Definition at line 260 of file activex.c.

261 {
262  static const WCHAR plugin_testW[] =
263  {'p','l','u','g','i','n',' ','t','e','s','t',0};
264  static WNDCLASSEXW wndclass = {
265  sizeof(WNDCLASSEXW),
266  0,
267  plugin_proc,
268  0, 0, NULL, NULL, NULL, NULL, NULL,
269  plugin_testW,
270  NULL
271  };
272 
273  RegisterClassExW(&wndclass);
274  plugin_hwnd = CreateWindowW(plugin_testW, plugin_testW,
276  rect->right-rect->left, rect->bottom-rect->top, parent, NULL, NULL, NULL);
277 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
static HWND plugin_hwnd
Definition: activex.c:100
#define WS_CHILD
Definition: pedump.c:617
struct _WNDCLASSEXW WNDCLASSEXW
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4185
& rect
Definition: startmenu.cpp:1413
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
smooth NULL
Definition: ftsmooth.c:416
r parent
Definition: btrfs.c:2708
__wchar_t WCHAR
Definition: xmlstorage.h:180
static LRESULT WINAPI plugin_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: activex.c:236
#define WS_VISIBLE
Definition: pedump.c:620

Referenced by OleObject_DoVerb().

◆ cs_qi()

static HRESULT cs_qi ( REFIID  riid,
void **  ppv 
)
static

Definition at line 2147 of file activex.c.

2148 {
2149  *ppv = NULL;
2150 
2152  *ppv = &ClientSite;
2153  else if(IsEqualGUID(&IID_IOleDocumentSite, riid))
2154  *ppv = &DocumentSite;
2156  *ppv = &InPlaceSite;
2157  else if(IsEqualGUID(riid, &IID_IServiceProvider))
2158  *ppv = &ServiceProvider;
2159 
2160  return *ppv ? S_OK : E_NOINTERFACE;
2161 }
static IServiceProvider ServiceProvider
Definition: activex.c:2145
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IOleInPlaceSite
const GUID IID_IOleClientSite
REFIID LPVOID * ppv
Definition: atlbase.h:39
static IOleClientSite ClientSite
Definition: activex.c:2054
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IUnknown
static IOleInPlaceSite InPlaceSite
Definition: activex.c:1989
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static IOleDocumentSite DocumentSite
Definition: activex.c:2106
const GUID IID_IOleWindow

Referenced by ClientSite_QueryInterface(), DocumentSite_QueryInterface(), InPlaceSite_QueryInterface(), and ServiceProvider_QueryInterface().

◆ DEFINE_EXPECT() [1/37]

DEFINE_EXPECT ( CreateInstance  )

◆ DEFINE_EXPECT() [2/37]

DEFINE_EXPECT ( FreezeEvents_TRUE  )

◆ DEFINE_EXPECT() [3/37]

DEFINE_EXPECT ( FreezeEvents_FALSE  )

◆ DEFINE_EXPECT() [4/37]

DEFINE_EXPECT ( QuickActivate  )

◆ DEFINE_EXPECT() [5/37]

DEFINE_EXPECT ( IPersistPropertyBag_InitNew  )

◆ DEFINE_EXPECT() [6/37]

DEFINE_EXPECT ( IPersistPropertyBag_Load  )

◆ DEFINE_EXPECT() [7/37]

DEFINE_EXPECT ( Invoke_READYSTATE  )

◆ DEFINE_EXPECT() [8/37]

DEFINE_EXPECT ( Invoke_ENABLED  )

◆ DEFINE_EXPECT() [9/37]

DEFINE_EXPECT ( Invoke_VALID  )

◆ DEFINE_EXPECT() [10/37]

DEFINE_EXPECT ( Invoke_SECURITYCTX  )

◆ DEFINE_EXPECT() [11/37]

DEFINE_EXPECT ( Invoke_SCRIPTPROP  )

◆ DEFINE_EXPECT() [12/37]

DEFINE_EXPECT ( Invoke_SCRIPTCALL  )

◆ DEFINE_EXPECT() [13/37]

DEFINE_EXPECT ( GetIDsOfNames_scriptprop  )

◆ DEFINE_EXPECT() [14/37]

DEFINE_EXPECT ( DoVerb  )

◆ DEFINE_EXPECT() [15/37]

DEFINE_EXPECT ( SetExtent  )

◆ DEFINE_EXPECT() [16/37]

DEFINE_EXPECT ( GetExtent  )

◆ DEFINE_EXPECT() [17/37]

DEFINE_EXPECT ( SetClientSite  )

◆ DEFINE_EXPECT() [18/37]

DEFINE_EXPECT ( SetClientSite_NULL  )

◆ DEFINE_EXPECT() [19/37]

DEFINE_EXPECT ( Close  )

◆ DEFINE_EXPECT() [20/37]

DEFINE_EXPECT ( InPlaceObject_GetWindow  )

◆ DEFINE_EXPECT() [21/37]

DEFINE_EXPECT ( SetObjectRects  )

◆ DEFINE_EXPECT() [22/37]

DEFINE_EXPECT ( InPlaceDeactivate  )

◆ DEFINE_EXPECT() [23/37]

DEFINE_EXPECT ( UIDeactivate  )

◆ DEFINE_EXPECT() [24/37]

DEFINE_EXPECT ( QueryService_TestActiveX  )

◆ DEFINE_EXPECT() [25/37]

DEFINE_EXPECT ( GetMiscStatus  )

◆ DEFINE_EXPECT() [26/37]

DEFINE_EXPECT ( SetAdvise  )

◆ DEFINE_EXPECT() [27/37]

DEFINE_EXPECT ( GetViewStatus  )

◆ DEFINE_EXPECT() [28/37]

DEFINE_EXPECT ( QI_ITestActiveX  )

◆ DEFINE_EXPECT() [29/37]

DEFINE_EXPECT ( wrapped_AddRef  )

◆ DEFINE_EXPECT() [30/37]

DEFINE_EXPECT ( wrapped_Release  )

◆ DEFINE_EXPECT() [31/37]

DEFINE_EXPECT ( wrapped_func  )

◆ DEFINE_EXPECT() [32/37]

DEFINE_EXPECT ( OnAmbientPropertyChange_UNKNOWN  )

◆ DEFINE_EXPECT() [33/37]

DEFINE_EXPECT ( GetTypeInfo  )

◆ DEFINE_EXPECT() [34/37]

DEFINE_EXPECT ( GetClassInfo  )

◆ DEFINE_EXPECT() [35/37]

DEFINE_EXPECT ( FindConnectionPoint  )

◆ DEFINE_EXPECT() [36/37]

DEFINE_EXPECT ( Advise  )

◆ DEFINE_EXPECT() [37/37]

DEFINE_EXPECT ( Unadvise  )

◆ Dispatch_AddRef()

static ULONG WINAPI Dispatch_AddRef ( IDispatch iface)
static

Definition at line 665 of file activex.c.

666 {
667  return ++activex_refcnt;
668 }
static LONG activex_refcnt
Definition: activex.c:103

◆ Dispatch_GetIDsOfNames()

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

Definition at line 691 of file activex.c.

693 {
694  ok(IsEqualGUID(riid, &IID_NULL), "riid = %s\n", wine_dbgstr_guid(riid));
695  ok(cNames == 1, "cNames = %d\n", cNames);
696  ok(rgszNames != NULL, "rgszNames == NULL\n");
697  ok(rgDispId != NULL, "rgDispId == NULL\n");
698 
699  if(!strcmp_wa(rgszNames[0], "scriptprop")) {
700  CHECK_EXPECT(GetIDsOfNames_scriptprop);
701  *rgDispId = DISPID_SCRIPTPROP;
702  }else if(!strcmp_wa(rgszNames[0], "scriptCall")) {
703  *rgDispId = DISPID_SCRIPTCALL;
704  }else {
705  ok(0, "rgszNames[0] = %s\n", wine_dbgstr_w(rgszNames[0]));
706  }
707 
708  return S_OK;
709 }
static int strcmp_wa(LPCWSTR strw, const char *stra)
Definition: activex.c:179
REFIID riid
Definition: precomp.h:44
#define wine_dbgstr_w
Definition: kernel32.h:34
const char * wine_dbgstr_guid(const GUID *guid)
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define IID_NULL
Definition: guiddef.h:93
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define DISPID_SCRIPTPROP
Definition: activex.c:90
#define S_OK
Definition: intsafe.h:59
#define DISPID_SCRIPTCALL
Definition: activex.c:91
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ Dispatch_GetTypeInfo()

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

Definition at line 681 of file activex.c.

683 {
684  CHECK_EXPECT(GetTypeInfo);
685 
686  ITypeInfo_AddRef(actxtest_typeinfo);
687  *ppTInfo = actxtest_typeinfo;
688  return S_OK;
689 }
static ITypeInfo * actxtest_typeinfo
Definition: activex.c:99
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define S_OK
Definition: intsafe.h:59

◆ Dispatch_GetTypeInfoCount()

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

Definition at line 675 of file activex.c.

676 {
677  ok(0, "unexpected call\n");
678  return E_NOTIMPL;
679 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Dispatch_Invoke()

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

Definition at line 711 of file activex.c.

714 {
715  ok(IsEqualGUID(riid, &IID_NULL), "riid = %s\n", wine_dbgstr_guid(riid));
716  ok(pDispParams != NULL, "pDispParams == NULL\n");
717  ok(!pDispParams->cNamedArgs, "pDispParams->cNamedArgs = %d\n", pDispParams->cNamedArgs);
718  ok(!pDispParams->rgdispidNamedArgs, "pDispParams->rgdispidNamedArgs != NULL\n");
719 
720  switch(dispIdMember) {
721  case DISPID_READYSTATE:
722  CHECK_EXPECT2(Invoke_READYSTATE);
723  ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
724  ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
725  ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n");
726  ok(!pExcepInfo, "pExcepInfo != NULL\n");
727  ok(puArgErr != NULL, "puArgErr == NULL\n");
728  ok(pVarResult != NULL, "pVarResult == NULL\n");
729 
730  V_VT(pVarResult) = VT_I4;
731  V_I4(pVarResult) = plugin_readystate;
732  return S_OK;
733  case DISPID_ENABLED:
734  CHECK_EXPECT2(Invoke_ENABLED);
735  ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
736  ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
737  ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n");
738  ok(!pExcepInfo, "pExcepInfo != NULL\n");
739  ok(puArgErr != NULL, "puArgErr == NULL\n");
740  ok(pVarResult != NULL, "pVarResult == NULL\n");
741  return DISP_E_MEMBERNOTFOUND;
742  case DISPID_VALID:
743  CHECK_EXPECT(Invoke_VALID);
744  ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
745  ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
746  ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n");
747  ok(!pExcepInfo, "pExcepInfo != NULL\n");
748  ok(puArgErr != NULL, "puArgErr == NULL\n");
749  ok(pVarResult != NULL, "pVarResult == NULL\n");
750  return DISP_E_MEMBERNOTFOUND;
751  case DISPID_SECURITYCTX:
752  CHECK_EXPECT(Invoke_SECURITYCTX);
753  ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
754  ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
755  ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n");
756  ok(!pExcepInfo, "pExcepInfo != NULL\n");
757  ok(puArgErr != NULL, "puArgErr == NULL\n");
758  ok(pVarResult != NULL, "pVarResult == NULL\n");
759  return DISP_E_MEMBERNOTFOUND;
760  case DISPID_SCRIPTPROP:
761  CHECK_EXPECT(Invoke_SCRIPTPROP);
762  ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags);
763  ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
764  ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n");
765  ok(pExcepInfo != NULL, "pExcepInfo == NULL\n");
766  ok(!puArgErr, "puArgErr != NULL\n");
767  ok(pVarResult != NULL, "pVarResult == NULL\n");
768 
769  V_VT(pVarResult) = VT_I4;
770  V_I4(pVarResult) = 4;
771  return S_OK;
772  case DISPID_SCRIPTCALL:
773  CHECK_EXPECT(Invoke_SCRIPTCALL);
774  ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags);
775  ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs);
776  ok(pExcepInfo != NULL, "pExcepInfo == NULL\n");
777  ok(!puArgErr, "puArgErr != NULL\n");
778  ok(!pVarResult, "pVarResult != NULL\n");
779  /*
780  V_VT(pVarResult) = VT_I4;
781  V_I4(pVarResult) = 4;
782  */
783  return S_OK;
784  default:
785  ok(0, "unexpected call %d\n", dispIdMember);
786  }
787 
788  return E_NOTIMPL;
789 }
Definition: compat.h:1939
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define DISPID_VALID
Definition: olectl.h:372
REFIID riid
Definition: precomp.h:44
static READYSTATE plugin_readystate
Definition: activex.c:200
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512
const char * wine_dbgstr_guid(const GUID *guid)
#define V_I4(A)
Definition: oleauto.h:247
#define DISPID_SECURITYCTX
Definition: mshtmdid.h:538
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define DISPID_ENABLED
Definition: olectl.h:362
#define IID_NULL
Definition: guiddef.h:93
#define V_VT(A)
Definition: oleauto.h:211
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define CHECK_EXPECT2(func)
Definition: activex.c:29
#define DISPID_SCRIPTPROP
Definition: activex.c:90
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
#define DISPID_SCRIPTCALL
Definition: activex.c:91
#define DISPID_READYSTATE
Definition: idispids.h:22
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ Dispatch_QueryInterface()

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

Definition at line 660 of file activex.c.

661 {
662  return ax_qi(riid, ppv);
663 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT ax_qi(REFIID, void **)
Definition: activex.c:1413

◆ Dispatch_Release()

static ULONG WINAPI Dispatch_Release ( IDispatch iface)
static

Definition at line 670 of file activex.c.

671 {
672  return --activex_refcnt;
673 }
static LONG activex_refcnt
Definition: activex.c:103

◆ do_advise()

static void do_advise ( IUnknown unk,
REFIID  riid,
IUnknown unk_advise 
)
static

Definition at line 2246 of file activex.c.

2247 {
2250  DWORD cookie;
2251  HRESULT hres;
2252 
2253  hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container);
2254  ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08x\n", hres);
2255 
2256  hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp);
2257  IConnectionPointContainer_Release(container);
2258  ok(hres == S_OK, "FindConnectionPoint failed: %08x\n", hres);
2259 
2260  hres = IConnectionPoint_Advise(cp, unk_advise, &cookie);
2261  IConnectionPoint_Release(cp);
2262  ok(hres == S_OK, "Advise failed: %08x\n", hres);
2263 }
REFIID riid
Definition: precomp.h:44
const GUID IID_IConnectionPointContainer
struct container container
#define ok(value,...)
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:59
POINT cp
Definition: magnifier.c:59

Referenced by create_doc().

◆ doc_load_string()

static void doc_load_string ( IHTMLDocument2 *  doc,
const char str 
)
static

Definition at line 2224 of file activex.c.

2225 {
2227  IStream *stream;
2228  HGLOBAL mem;
2229  SIZE_T len;
2230 
2231  notif_doc = doc;
2232 
2233  doc_complete = FALSE;
2234  len = strlen(str);
2235  mem = GlobalAlloc(0, len);
2236  memcpy(mem, str, len);
2238 
2239  IHTMLDocument2_QueryInterface(doc, &IID_IPersistStreamInit, (void**)&init);
2240 
2241  IPersistStreamInit_Load(init, stream);
2242  IPersistStreamInit_Release(init);
2243  IStream_Release(stream);
2244 }
#define TRUE
Definition: types.h:120
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
static int init
Definition: wintirpc.c:33
const WCHAR * str
Definition: parse.h:22
const GUID IID_IPersistStreamInit
GLuint GLuint stream
Definition: glext.h:7522
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
ULONG_PTR SIZE_T
Definition: typedefs.h:78
static BOOL doc_complete
Definition: activex.c:2164
static IHTMLDocument2 * notif_doc
Definition: activex.c:2163
Definition: mem.c:156

Referenced by create_doc().

◆ DocumentSite_ActivateMe()

static HRESULT WINAPI DocumentSite_ActivateMe ( IOleDocumentSite iface,
IOleDocumentView pViewToActivate 
)
static

Definition at line 2071 of file activex.c.

2072 {
2073  RECT rect = {0,0,400,500};
2074  IOleDocument *document;
2075  HRESULT hres;
2076 
2077  hres = IOleDocumentView_QueryInterface(pViewToActivate, &IID_IOleDocument, (void**)&document);
2078  ok(hres == S_OK, "could not get IOleDocument: %08x\n", hres);
2079 
2080  hres = IOleDocument_CreateView(document, &InPlaceSite, NULL, 0, &view);
2081  IOleDocument_Release(document);
2082  ok(hres == S_OK, "CreateView failed: %08x\n", hres);
2083 
2084  hres = IOleDocumentView_SetInPlaceSite(view, &InPlaceSite);
2085  ok(hres == S_OK, "SetInPlaceSite failed: %08x\n", hres);
2086 
2087  hres = IOleDocumentView_UIActivate(view, TRUE);
2088  ok(hres == S_OK, "UIActivate failed: %08x\n", hres);
2089 
2090  hres = IOleDocumentView_SetRect(view, &rect);
2091  ok(hres == S_OK, "SetRect failed: %08x\n", hres);
2092 
2093  hres = IOleDocumentView_Show(view, TRUE);
2094  ok(hres == S_OK, "Show failed: %08x\n", hres);
2095 
2096  return S_OK;
2097 }
#define TRUE
Definition: types.h:120
& rect
Definition: startmenu.cpp:1413
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
static IOleInPlaceSite InPlaceSite
Definition: activex.c:1989
#define S_OK
Definition: intsafe.h:59

◆ DocumentSite_AddRef()

static ULONG WINAPI DocumentSite_AddRef ( IOleDocumentSite iface)
static

Definition at line 2061 of file activex.c.

2062 {
2063  return 2;
2064 }

◆ DocumentSite_QueryInterface()

static HRESULT WINAPI DocumentSite_QueryInterface ( IOleDocumentSite iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2056 of file activex.c.

2057 {
2058  return cs_qi(riid, ppv);
2059 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT cs_qi(REFIID, void **)
Definition: activex.c:2147

◆ DocumentSite_Release()

static ULONG WINAPI DocumentSite_Release ( IOleDocumentSite iface)
static

Definition at line 2066 of file activex.c.

2067 {
2068  return 1;
2069 }

◆ iface_cmp()

static BOOL iface_cmp ( IUnknown iface1,
IUnknown iface2 
)
static

Definition at line 149 of file activex.c.

150 {
151  IUnknown *unk1, *unk2;
152 
153  if(iface1 == iface2)
154  return TRUE;
155 
156  IUnknown_QueryInterface(iface1, &IID_IUnknown, (void**)&unk1);
157  IUnknown_Release(unk1);
158  IUnknown_QueryInterface(iface2, &IID_IUnknown, (void**)&unk2);
159  IUnknown_Release(unk2);
160 
161  return unk1 == unk2;
162 }
#define TRUE
Definition: types.h:120
static DWORD unk1
Definition: cursoricon.c:1521
const GUID IID_IUnknown

Referenced by PersistPropertyBag_Load(), QuickActivate_QuickActivate(), test_container(), and test_iface_wrapping().

◆ init_key()

static BOOL init_key ( const char key_name,
const char def_value,
BOOL  init 
)
static

Definition at line 2706 of file activex.c.

2707 {
2708  HKEY hkey;
2709  DWORD res;
2710 
2711  if(!init) {
2713  return TRUE;
2714  }
2715 
2717  if(res != ERROR_SUCCESS)
2718  return FALSE;
2719 
2720  if(def_value)
2721  res = RegSetValueA(hkey, NULL, REG_SZ, def_value, strlen(def_value));
2722 
2723  RegCloseKey(hkey);
2724 
2725  return res == ERROR_SUCCESS;
2726 }
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
LONG WINAPI RegSetValueA(HKEY hKeyOriginal, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData)
Definition: reg.c:4968
static int init
Definition: wintirpc.c:33
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
smooth NULL
Definition: ftsmooth.c:416
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1177
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
Definition: reg.c:1222
GLuint res
Definition: glext.h:9613
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define REG_SZ
Definition: layer.c:22

Referenced by init_registry().

◆ init_registry()

static BOOL init_registry ( BOOL  init)
static

Definition at line 2728 of file activex.c.

2729 {
2730  return init_key("TestActiveX\\CLSID", TESTACTIVEX_CLSID, init)
2731  && init_key("CLSID\\"TESTACTIVEX_CLSID"\\Implemented Categories\\{7dd95801-9882-11cf-9fa9-00aa006c42c4}",
2732  NULL, init)
2733  && init_key("CLSID\\"TESTACTIVEX_CLSID"\\Implemented Categories\\{7dd95802-9882-11cf-9fa9-00aa006c42c4}",
2734  NULL, init);
2735 }
static int init
Definition: wintirpc.c:33
static BOOL init_key(const char *key_name, const char *def_value, BOOL init)
Definition: activex.c:2706
smooth NULL
Definition: ftsmooth.c:416
#define TESTACTIVEX_CLSID
Definition: activex.c:105

Referenced by register_activex(), and START_TEST().

◆ init_test()

static void init_test ( int  behavior)
static

Definition at line 2349 of file activex.c.

2350 {
2351  plugin_behavior = behavior;
2352 
2353  activex_refcnt = 0;
2354  no_quickact = behavior == TEST_NOQUICKACT || behavior == TEST_DISPONLY;
2355  have_container = TRUE;
2356 }
#define TRUE
Definition: types.h:120
static LONG activex_refcnt
Definition: activex.c:103
static BOOL have_container
Definition: activex.c:201
static BOOL no_quickact
Definition: activex.c:102
static int plugin_behavior
Definition: activex.c:101

Referenced by test_create_element(), test_event_binding(), test_flash_ax(), test_nooleobj_ax(), and test_noquickact_ax().

◆ init_wrapped_iface()

static void init_wrapped_iface ( void  )
static

Definition at line 1399 of file activex.c.

1400 {
1401  unsigned i;
1402 
1406 
1407  for(i=3; i<100; i++)
1409 
1411 }
static ULONG WINAPI wrapped_Release(IUnknown *iface)
Definition: activex.c:1378
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
static ULONG WINAPI wrapped_AddRef(IUnknown *iface)
Definition: activex.c:1372
static void * wrapped_iface_vtbl[100]
Definition: activex.c:1362
static HRESULT WINAPI wrapped_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
Definition: activex.c:1365
static HRESULT WINAPI wrapped_func_nocall(IUnknown *iface, int i, double d)
Definition: activex.c:1384
static HRESULT WINAPI wrapped_func(IUnknown *iface, int i, double d)
Definition: activex.c:1390

Referenced by START_TEST().

◆ InPlaceFrame_AddRef()

static ULONG WINAPI InPlaceFrame_AddRef ( IOleInPlaceFrame iface)
static

Definition at line 1762 of file activex.c.

1763 {
1764  return 2;
1765 }

◆ InPlaceFrame_ContextSensitiveHelp()

static HRESULT WINAPI InPlaceFrame_ContextSensitiveHelp ( IOleInPlaceFrame iface,
BOOL  fEnterMode 
)
static

Definition at line 1777 of file activex.c.

1778 {
1779  return E_NOTIMPL;
1780 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceFrame_EnableModeless()

static HRESULT WINAPI InPlaceFrame_EnableModeless ( IOleInPlaceFrame iface,
BOOL  fEnable 
)
static

Definition at line 1835 of file activex.c.

1836 {
1837  return E_NOTIMPL;
1838 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceFrame_GetBorder()

static HRESULT WINAPI InPlaceFrame_GetBorder ( IOleInPlaceFrame iface,
LPRECT  lprectBorder 
)
static

Definition at line 1782 of file activex.c.

1783 {
1784  return E_NOTIMPL;
1785 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceFrame_GetWindow()

static HRESULT WINAPI InPlaceFrame_GetWindow ( IOleInPlaceFrame iface,
HWND phwnd 
)
static

Definition at line 1772 of file activex.c.

1773 {
1774  return E_NOTIMPL;
1775 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceFrame_InsertMenus()

static HRESULT WINAPI InPlaceFrame_InsertMenus ( IOleInPlaceFrame iface,
HMENU  hmenuShared,
LPOLEMENUGROUPWIDTHS  lpMenuWidths 
)
static

Definition at line 1811 of file activex.c.

1813 {
1814  return E_NOTIMPL;
1815 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceFrame_QueryInterface()

static HRESULT WINAPI InPlaceFrame_QueryInterface ( IOleInPlaceFrame iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1751 of file activex.c.

1752 {
1753  static const GUID undocumented_frame_iid = {0xfbece6c9,0x48d7,0x4a37,{0x8f,0xe3,0x6a,0xd4,0x27,0x2f,0xdd,0xac}};
1754 
1755  if(!IsEqualGUID(&undocumented_frame_iid, riid))
1756  ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
1757 
1758  *ppv = NULL;
1759  return E_NOINTERFACE;
1760 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
const char * wine_dbgstr_guid(const GUID *guid)
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ InPlaceFrame_Release()

static ULONG WINAPI InPlaceFrame_Release ( IOleInPlaceFrame iface)
static

Definition at line 1767 of file activex.c.

1768 {
1769  return 1;
1770 }

◆ InPlaceFrame_RemoveMenus()

static HRESULT WINAPI InPlaceFrame_RemoveMenus ( IOleInPlaceFrame iface,
HMENU  hmenuShared 
)
static

Definition at line 1824 of file activex.c.

1825 {
1826  ok(0, "unexpected call\n");
1827  return E_NOTIMPL;
1828 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceFrame_RequestBorderSpace()

static HRESULT WINAPI InPlaceFrame_RequestBorderSpace ( IOleInPlaceFrame iface,
LPCBORDERWIDTHS  pborderwidths 
)
static

Definition at line 1787 of file activex.c.

1789 {
1790  return E_NOTIMPL;
1791 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceFrame_SetActiveObject()

static HRESULT WINAPI InPlaceFrame_SetActiveObject ( IOleInPlaceFrame iface,
IOleInPlaceActiveObject pActiveObject,
LPCOLESTR  pszObjName 
)
static

Definition at line 1805 of file activex.c.

1807 {
1808  return S_OK;
1809 }
#define S_OK
Definition: intsafe.h:59

◆ InPlaceFrame_SetBorderSpace()

static HRESULT WINAPI InPlaceFrame_SetBorderSpace ( IOleInPlaceFrame iface,
LPCBORDERWIDTHS  pborderwidths 
)
static

Definition at line 1793 of file activex.c.

1795 {
1796  return S_OK;
1797 }
#define S_OK
Definition: intsafe.h:59

◆ InPlaceFrame_SetMenu()

static HRESULT WINAPI InPlaceFrame_SetMenu ( IOleInPlaceFrame iface,
HMENU  hmenuShared,
HOLEMENU  holemenu,
HWND  hwndActiveObject 
)
static

Definition at line 1817 of file activex.c.

1819 {
1820  ok(0, "unexpected call\n");
1821  return E_NOTIMPL;
1822 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceFrame_SetStatusText()

static HRESULT WINAPI InPlaceFrame_SetStatusText ( IOleInPlaceFrame iface,
LPCOLESTR  pszStatusText 
)
static

Definition at line 1830 of file activex.c.

1831 {
1832  return S_OK;
1833 }
#define S_OK
Definition: intsafe.h:59

◆ InPlaceFrame_TranslateAccelerator()

static HRESULT WINAPI InPlaceFrame_TranslateAccelerator ( IOleInPlaceFrame iface,
LPMSG  lpmsg,
WORD  wID 
)
static

Definition at line 1840 of file activex.c.

1841 {
1842  ok(0, "unexpected call\n");
1843  return E_NOTIMPL;
1844 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceSite_AddRef()

static ULONG WINAPI InPlaceSite_AddRef ( IOleInPlaceSite iface)
static

Definition at line 1885 of file activex.c.

1886 {
1887  return 2;
1888 }

◆ InPlaceSite_CanInPlaceActivate()

static HRESULT WINAPI InPlaceSite_CanInPlaceActivate ( IOleInPlaceSite iface)
static

Definition at line 1907 of file activex.c.

1908 {
1909  return S_OK;
1910 }
#define S_OK
Definition: intsafe.h:59

◆ InPlaceSite_ContextSensitiveHelp()

static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp ( IOleInPlaceSite iface,
BOOL  fEnterMode 
)
static

Definition at line 1901 of file activex.c.

1902 {
1903  ok(0, "unexpected call\n");
1904  return E_NOTIMPL;
1905 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceSite_DeactivateAndUndo()

static HRESULT WINAPI InPlaceSite_DeactivateAndUndo ( IOleInPlaceSite iface)
static

Definition at line 1961 of file activex.c.

1962 {
1963  return E_NOTIMPL;
1964 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceSite_DiscardUndoState()

static HRESULT WINAPI InPlaceSite_DiscardUndoState ( IOleInPlaceSite iface)
static

Definition at line 1956 of file activex.c.

1957 {
1958  return E_NOTIMPL;
1959 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceSite_GetWindow()

static HRESULT WINAPI InPlaceSite_GetWindow ( IOleInPlaceSite iface,
HWND phwnd 
)
static

Definition at line 1895 of file activex.c.

1896 {
1897  *phwnd = container_hwnd;
1898  return S_OK;
1899 }
static HWND container_hwnd
Definition: activex.c:100
#define S_OK
Definition: intsafe.h:59

◆ InPlaceSite_GetWindowContext()

static HRESULT WINAPI InPlaceSite_GetWindowContext ( IOleInPlaceSite iface,
IOleInPlaceFrame **  ppFrame,
IOleInPlaceUIWindow **  ppDoc,
LPRECT  lprcPosRect,
LPRECT  lprcClipRect,
LPOLEINPLACEFRAMEINFO  lpFrameInfo 
)
static

Definition at line 1922 of file activex.c.

1925 {
1926  static const RECT rect = {0,0,500,500};
1927 
1928  *ppFrame = &InPlaceFrame;
1930  *lprcPosRect = rect;
1931  *lprcClipRect = rect;
1932 
1933  lpFrameInfo->fMDIApp = FALSE;
1934  lpFrameInfo->hwndFrame = container_hwnd;
1935  lpFrameInfo->haccel = NULL;
1936  lpFrameInfo->cAccelEntries = 0;
1937 
1938  return S_OK;
1939 }
static IOleInPlaceFrame InPlaceFrame
Definition: activex.c:1864
& rect
Definition: startmenu.cpp:1413
static HWND container_hwnd
Definition: activex.c:100
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59

◆ InPlaceSite_OnInPlaceActivate()

static HRESULT WINAPI InPlaceSite_OnInPlaceActivate ( IOleInPlaceSite iface)
static

Definition at line 1912 of file activex.c.

1913 {
1914  return S_OK;
1915 }
#define S_OK
Definition: intsafe.h:59

◆ InPlaceSite_OnInPlaceDeactivate()

static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate ( IOleInPlaceSite iface)
static

Definition at line 1951 of file activex.c.

1952 {
1953  return S_OK;
1954 }
#define S_OK
Definition: intsafe.h:59

◆ InPlaceSite_OnPosRectChange()

static HRESULT WINAPI InPlaceSite_OnPosRectChange ( IOleInPlaceSite iface,
LPCRECT  lprcPosRect 
)
static

Definition at line 1966 of file activex.c.

1967 {
1968  return E_NOTIMPL;
1969 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceSite_OnUIActivate()

static HRESULT WINAPI InPlaceSite_OnUIActivate ( IOleInPlaceSite iface)
static

Definition at line 1917 of file activex.c.

1918 {
1919  return S_OK;
1920 }
#define S_OK
Definition: intsafe.h:59

◆ InPlaceSite_OnUIDeactivate()

static HRESULT WINAPI InPlaceSite_OnUIDeactivate ( IOleInPlaceSite iface,
BOOL  fUndoable 
)
static

Definition at line 1946 of file activex.c.

1947 {
1948  return S_OK;
1949 }
#define S_OK
Definition: intsafe.h:59

◆ InPlaceSite_QueryInterface()

static HRESULT WINAPI InPlaceSite_QueryInterface ( IOleInPlaceSite iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1880 of file activex.c.

1881 {
1882  return cs_qi(riid, ppv);
1883 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT cs_qi(REFIID, void **)
Definition: activex.c:2147

◆ InPlaceSite_Release()

static ULONG WINAPI InPlaceSite_Release ( IOleInPlaceSite iface)
static

Definition at line 1890 of file activex.c.

1891 {
1892  return 1;
1893 }

◆ InPlaceSite_Scroll()

static HRESULT WINAPI InPlaceSite_Scroll ( IOleInPlaceSite iface,
SIZE  scrollExtant 
)
static

Definition at line 1941 of file activex.c.

1942 {
1943  return E_NOTIMPL;
1944 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InPlaceUIWindow_SetActiveObject()

static HRESULT WINAPI InPlaceUIWindow_SetActiveObject ( IOleInPlaceFrame iface,
IOleInPlaceActiveObject pActiveObject,
LPCOLESTR  pszObjName 
)
static

Definition at line 1799 of file activex.c.

1801 {
1802  return S_OK;
1803 }
#define S_OK
Definition: intsafe.h:59

◆ load_typelib()

static void load_typelib ( void  )
static

Definition at line 2686 of file activex.c.

2687 {
2688  WCHAR path[MAX_PATH];
2689  ITypeLib *typelib;
2690  HRESULT hres;
2691 
2693 
2695  ok(hres == S_OK, "LoadTypeLib failed: %08x\n", hres);
2696 
2697  hres = ITypeLib_GetTypeInfoOfGuid(typelib, &DIID_DispActiveXTest, &actxtest_typeinfo);
2698  ok(hres == S_OK, "GetTypeInfoOfGuid(DIID_DispActiveXTest) failed: %08x\n", hres);
2699 
2700  hres = ITypeLib_GetTypeInfoOfGuid(typelib, &CLSID_ActiveXTest, &class_typeinfo);
2701  ok(hres == S_OK, "GetTypeInfoOfGuid(CLSID_ActiveXTest) failed: %08x\n", hres);
2702 
2703  ITypeLib_Release(typelib);
2704 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:607
static ITypeLib * typelib
Definition: apps.c:105
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
Definition: typelib.c:461
static ITypeInfo * actxtest_typeinfo
Definition: activex.c:99
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
static ITypeInfo * class_typeinfo
Definition: activex.c:99
#define S_OK
Definition: intsafe.h:59
Definition: services.c:325

Referenced by START_TEST().

◆ OleControl_AddRef()

static ULONG WINAPI OleControl_AddRef ( IOleControl iface)
static

Definition at line 370 of file activex.c.

371 {
372  return ++activex_refcnt;
373 }
static LONG activex_refcnt
Definition: activex.c:103

◆ OleControl_FreezeEvents()

static HRESULT WINAPI OleControl_FreezeEvents ( IOleControl iface,
BOOL  bFreeze 
)
static

Definition at line 405 of file activex.c.

406 {
407  if(bFreeze)
408  CHECK_EXPECT2(FreezeEvents_TRUE);
409  else
410  CHECK_EXPECT2(FreezeEvents_FALSE);
411  return S_OK;
412 }
#define CHECK_EXPECT2(func)
Definition: activex.c:29
#define S_OK
Definition: intsafe.h:59

◆ OleControl_GetControlInfo()

static HRESULT WINAPI OleControl_GetControlInfo ( IOleControl iface,
CONTROLINFO *  pCI 
)
static

Definition at line 380 of file activex.c.

381 {
382  ok(0, "unexpected call\n");
383  return E_NOTIMPL;
384 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleControl_OnAmbientPropertyChange()

static HRESULT WINAPI OleControl_OnAmbientPropertyChange ( IOleControl iface,
DISPID  dispID 
)
static

Definition at line 392 of file activex.c.

393 {
394  switch(dispID) {
395  case DISPID_UNKNOWN:
396  CHECK_EXPECT2(OnAmbientPropertyChange_UNKNOWN);
397  break;
398  default:
399  ok(0, "unexpected call %d\n", dispID);
400  }
401 
402  return S_OK;
403 }
#define ok(value,...)
#define CHECK_EXPECT2(func)
Definition: activex.c:29
#define S_OK
Definition: intsafe.h:59

◆ OleControl_OnMnemonic()

static HRESULT WINAPI OleControl_OnMnemonic ( IOleControl iface,
MSG mMsg 
)
static

Definition at line 386 of file activex.c.

387 {
388  ok(0, "unexpected call\n");
389  return E_NOTIMPL;
390 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleControl_QueryInterface()

static HRESULT WINAPI OleControl_QueryInterface ( IOleControl iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 365 of file activex.c.

366 {
367  return ax_qi(riid, ppv);
368 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT ax_qi(REFIID, void **)
Definition: activex.c:1413

◆ OleControl_Release()

static ULONG WINAPI OleControl_Release ( IOleControl iface)
static

Definition at line 375 of file activex.c.

376 {
377  return --activex_refcnt;
378 }
static LONG activex_refcnt
Definition: activex.c:103

◆ OleInPlaceObject_AddRef()

static ULONG WINAPI OleInPlaceObject_AddRef ( IOleInPlaceObjectWindowless iface)
static

Definition at line 1268 of file activex.c.

1269 {
1270  return ++activex_refcnt;
1271 }
static LONG activex_refcnt
Definition: activex.c:103

◆ OleInPlaceObject_ContextSensitiveHelp()

static HRESULT WINAPI OleInPlaceObject_ContextSensitiveHelp ( IOleInPlaceObjectWindowless iface,
BOOL  fEnterMode 
)
static

Definition at line 1289 of file activex.c.

1291 {
1292  ok(0, "unexpected call\n");
1293  return E_NOTIMPL;
1294 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleInPlaceObject_GetWindow()

static HRESULT WINAPI OleInPlaceObject_GetWindow ( IOleInPlaceObjectWindowless iface,
HWND phwnd 
)
static

Definition at line 1278 of file activex.c.

1280 {
1281  CHECK_EXPECT2(InPlaceObject_GetWindow);
1282 
1283  ok(phwnd != NULL, "phwnd == NULL\n");
1284 
1285  *phwnd = plugin_hwnd;
1286  return *phwnd ? S_OK : E_UNEXPECTED;
1287 }
static HWND plugin_hwnd
Definition: activex.c:100
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define CHECK_EXPECT2(func)
Definition: activex.c:29
#define S_OK
Definition: intsafe.h:59
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ OleInPlaceObject_InPlaceDeactivate()

static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate ( IOleInPlaceObjectWindowless iface)
static

Definition at line 1296 of file activex.c.

1297 {
1298  IOleInPlaceSite *ip_site;
1299  HRESULT hres;
1300 
1301  CHECK_EXPECT(InPlaceDeactivate);
1302 
1303  hres = IOleClientSite_QueryInterface(client_site, &IID_IOleInPlaceSite, (void**)&ip_site);
1304  ok(hres == S_OK, "Could not get IOleInPlaceSite iface: %08x\n", hres);
1305 
1306  hres = IOleInPlaceSite_OnInPlaceDeactivate(ip_site);
1307  ok(hres == S_OK, "OnInPlaceDeactivate failed: %08x\n", hres);
1308 
1309  IOleInPlaceSite_Release(ip_site);
1310  return S_OK;
1311 }
static IOleClientSite * client_site
Definition: activex.c:198
const GUID IID_IOleInPlaceSite
#define ok(value,...)
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define S_OK
Definition: intsafe.h:59

◆ OleInPlaceObject_QueryInterface()

static HRESULT WINAPI OleInPlaceObject_QueryInterface ( IOleInPlaceObjectWindowless iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1262 of file activex.c.

1264 {
1265  return ax_qi(riid, ppv);
1266 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT ax_qi(REFIID, void **)
Definition: activex.c:1413

◆ OleInPlaceObject_Release()

static ULONG WINAPI OleInPlaceObject_Release ( IOleInPlaceObjectWindowless iface)
static

Definition at line 1273 of file activex.c.

1274 {
1275  return --activex_refcnt;
1276 }
static LONG activex_refcnt
Definition: activex.c:103

◆ OleInPlaceObject_SetObjectRects()

static HRESULT WINAPI OleInPlaceObject_SetObjectRects ( IOleInPlaceObjectWindowless iface,
LPCRECT  lprcPosRect,
LPCRECT  lprcClipRect 
)
static

Definition at line 1319 of file activex.c.

1321 {
1322  CHECK_EXPECT2(SetObjectRects);
1323  return S_OK;
1324 }
#define CHECK_EXPECT2(func)
Definition: activex.c:29
#define S_OK
Definition: intsafe.h:59

◆ OleInPlaceObject_UIDeactivate()

static HRESULT WINAPI OleInPlaceObject_UIDeactivate ( IOleInPlaceObjectWindowless iface)
static

Definition at line 1313 of file activex.c.

1314 {
1315  CHECK_EXPECT2(UIDeactivate);
1316  return S_OK;
1317 }
#define CHECK_EXPECT2(func)
Definition: activex.c:29
#define S_OK
Definition: intsafe.h:59

◆ OleInPlaceObjectWindowless_GetDropTarget()

static HRESULT WINAPI OleInPlaceObjectWindowless_GetDropTarget ( IOleInPlaceObjectWindowless iface,
IDropTarget **  ppDropTarget 
)
static

Definition at line 1339 of file activex.c.

1341 {
1342  ok(0, "unexpected call\n");
1343  return E_NOTIMPL;
1344 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleInPlaceObjectWindowless_OnWindowMessage()

static HRESULT WINAPI OleInPlaceObjectWindowless_OnWindowMessage ( IOleInPlaceObjectWindowless iface,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT lpResult 
)
static

Definition at line 1332 of file activex.c.

1334 {
1335  ok(0, "unexpected call\n");
1336  return E_NOTIMPL;
1337 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleInPlaceObjectWindowless_ReactivateAndUndo()

static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo ( IOleInPlaceObjectWindowless iface)
static

Definition at line 1326 of file activex.c.

1327 {
1328  ok(0, "unexpected call\n");
1329  return E_NOTIMPL;
1330 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_AddRef()

static ULONG WINAPI OleObject_AddRef ( IOleObject iface)
static

Definition at line 1009 of file activex.c.

1010 {
1011  return ++activex_refcnt;
1012 }
static LONG activex_refcnt
Definition: activex.c:103

◆ OleObject_Advise()

static HRESULT WINAPI OleObject_Advise ( IOleObject iface,
IAdviseSink pAdvSink,
DWORD pdwConnection 
)
static

Definition at line 1199 of file activex.c.

1200 {
1201  ok(0, "unexpected call\n");
1202  return E_NOTIMPL;
1203 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_Close()

static HRESULT WINAPI OleObject_Close ( IOleObject iface,
DWORD  dwSaveOption 
)
static

Definition at line 1045 of file activex.c.

1046 {
1048 
1049  ok(dwSaveOption == OLECLOSE_NOSAVE, "dwSaveOption = %d\n", dwSaveOption);
1050  return S_OK;
1051 }
#define ok(value,...)
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define S_OK
Definition: intsafe.h:59
Definition: sacdrv.h:267

◆ OleObject_DoVerb()

static HRESULT WINAPI OleObject_DoVerb ( IOleObject iface,
LONG  iVerb,
LPMSG  lpmsg,
IOleClientSite pActiveSite,
LONG  lindex,
HWND  hwndParent,
LPCRECT  lprcPosRect 
)
static

Definition at line 1078 of file activex.c.

1080 {
1081  OLEINPLACEFRAMEINFO frame_info = {0xdeadbeef};
1082  IOleInPlaceUIWindow *ip_uiwindow;
1083  IOleInPlaceFrame *ip_frame;
1084  IOleInPlaceSiteEx *ip_site;
1085  RECT pos_rect, clip_rect;
1086  BOOL no_redraw;
1087  HWND hwnd;
1088  HRESULT hres;
1089 
1090  CHECK_EXPECT(DoVerb);
1091 
1092  ok(iVerb == OLEIVERB_INPLACEACTIVATE, "iVerb = %d\n", iVerb);
1093  ok(!lpmsg, "lpmsg != NULL\n");
1094  ok(pActiveSite != NULL, "pActiveSite == NULL\n");
1095  ok(!lindex, "lindex = %d\n", lindex);
1096  ok(hwndParent != NULL, "hwndParent == NULL\n");
1097  ok(lprcPosRect != NULL, "lprcPosRect == NULL\n");
1098 
1099  hres = IOleClientSite_QueryInterface(pActiveSite, &IID_IOleInPlaceSiteEx, (void**)&ip_site);
1100  ok(hres == S_OK, "Could not get IOleInPlaceSiteEx iface: %08x\n", hres);
1101 
1102  hres = IOleInPlaceSiteEx_CanInPlaceActivate(ip_site);
1103  ok(hres == S_OK, "CanInPlaceActivate failed: %08x\n", hres);
1104 
1105  SET_EXPECT(InPlaceObject_GetWindow);
1106  no_redraw = 0xdeadbeef;
1107  hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ip_site, &no_redraw, 0);
1108  ok(hres == S_OK, "InPlaceActivateEx failed: %08x\n", hres);
1109  ok(!no_redraw, "no_redraw = %x\n", no_redraw);
1110  CHECK_CALLED(InPlaceObject_GetWindow);
1111 
1112  no_redraw = 0xdeadbeef;
1113  hres = IOleInPlaceSiteEx_OnInPlaceActivateEx(ip_site, &no_redraw, 0);
1114  ok(hres == S_OK, "InPlaceActivateEx failed: %08x\n", hres);
1115  ok(no_redraw == 0xdeadbeef, "no_redraw = %x\n", no_redraw);
1116 
1117  hwnd = NULL;
1118  hres = IOleInPlaceSiteEx_GetWindow(ip_site, &hwnd);
1119  ok(hres == S_OK, "GetWindow failed: %08x\n", hres);
1120  ok(hwnd != NULL, "hwnd == NULL\n");
1121  ok(hwnd == hwndParent, "hwnd != hwndParent\n");
1122 
1123  create_plugin_window(hwnd, lprcPosRect);
1124 
1125  ip_frame = NULL;
1126  ip_uiwindow = NULL;
1127  frame_info.cb = sizeof(OLEINPLACEFRAMEINFO);
1128  hres = IOleInPlaceSiteEx_GetWindowContext(ip_site, &ip_frame, &ip_uiwindow, &pos_rect, &clip_rect, &frame_info);
1129  ok(hres == S_OK, "GetWindowContext failed: %08x\n", hres);
1130  ok(ip_frame != NULL, "ip_frame == NULL\n");
1131  ok(ip_uiwindow != NULL, "ip_uiwindow == NULL\n");
1132  ok((IOleInPlaceUIWindow*)ip_frame != ip_uiwindow, "ip_frame == ip_uiwindow\n");
1133  ok(!memcmp(&pos_rect, lprcPosRect, sizeof(RECT)), "pos_rect != lpecPosRect\n");
1134  ok(!memcmp(&clip_rect, lprcPosRect, sizeof(RECT)), "clip_rect != lpecPosRect\n");
1135  ok(frame_info.cb == sizeof(frame_info), "frame_info.cb = %d\n", frame_info.cb);
1136  ok(!frame_info.fMDIApp, "frame_info.fMDIApp = %x\n", frame_info.fMDIApp);
1137  ok(frame_info.hwndFrame != NULL, "frame_info.hwnd == NULL\n");
1138  ok(frame_info.hwndFrame == container_hwnd, "frame_info.hwnd != container_hwnd\n");
1139  ok(!frame_info.haccel, "frame_info.haccel != 0\n");
1140  ok(!frame_info.cAccelEntries, "frame_info.cAccelEntried != 0\n");
1141 
1142  IOleInPlaceFrame_Release(ip_frame);
1143  IOleInPlaceUIWindow_Release(ip_uiwindow);
1144 
1145 
1146  IOleInPlaceSiteEx_Release(ip_site);
1147 
1148  hres = IOleClientSite_ShowObject(client_site);
1149  ok(hres == S_OK, "ShowObject failed: %08x\n", hres);
1150 
1151  SET_EXPECT(InPlaceObject_GetWindow);
1152  SET_EXPECT(SetObjectRects);
1153 
1154  return S_OK;
1155 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static IOleClientSite * client_site
Definition: activex.c:198
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define SET_EXPECT(func)
Definition: activex.c:26
static HWND container_hwnd
Definition: activex.c:100
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
static HWND hwndParent
Definition: cryptui.c:300
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define S_OK
Definition: intsafe.h:59
#define OLEIVERB_INPLACEACTIVATE
Definition: ole2.h:43
static void create_plugin_window(HWND parent, const RECT *rect)
Definition: activex.c:260
#define CHECK_CALLED(func)
Definition: activex.c:41

◆ OleObject_EnumAdvise()

static HRESULT WINAPI OleObject_EnumAdvise ( IOleObject iface,
IEnumSTATDATA **  ppenumAdvise 
)
static

Definition at line 1211 of file activex.c.

1212 {
1213  ok(0, "unexpected call\n");
1214  return E_NOTIMPL;
1215 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_EnumVerbs()

static HRESULT WINAPI OleObject_EnumVerbs ( IOleObject iface,
IEnumOLEVERB **  ppEnumOleVerb 
)
static

Definition at line 1157 of file activex.c.

1158 {
1159  ok(0, "unexpected call\n");
1160  return E_NOTIMPL;
1161 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_GetClientSite()

static HRESULT WINAPI OleObject_GetClientSite ( IOleObject iface,
IOleClientSite **  ppClientSite 
)
static

Definition at line 1033 of file activex.c.

1034 {
1035  ok(0, "unexpected call\n");
1036  return E_NOTIMPL;
1037 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_GetClipboardData()

static HRESULT WINAPI OleObject_GetClipboardData ( IOleObject iface,
DWORD  dwReserved,
IDataObject **  ppDataObject 
)
static

Definition at line 1072 of file activex.c.

1073 {
1074  ok(0, "unexpected call\n");
1075  return E_NOTIMPL;
1076 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_GetExtent()

static HRESULT WINAPI OleObject_GetExtent ( IOleObject iface,
DWORD  dwDrawAspect,
SIZEL psizel 
)
static

Definition at line 1193 of file activex.c.

1194 {
1195  CHECK_EXPECT(GetExtent);
1196  return E_NOTIMPL;
1197 }
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_GetMiscStatus()

static HRESULT WINAPI OleObject_GetMiscStatus ( IOleObject iface,
DWORD  dwAspect,
DWORD pdwStatus 
)
static

Definition at line 1217 of file activex.c.

1218 {
1219  CHECK_EXPECT(GetMiscStatus);
1220  ok(dwAspect == DVASPECT_CONTENT, "dwAspect = %d\n", dwAspect);
1221  ok(pdwStatus != NULL, "pdwStatus == NULL\n");
1222  *pdwStatus = OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE
1223  |OLEMISC_INSIDEOUT|OLEMISC_CANTLINKINSIDE|OLEMISC_RECOMPOSEONRESIZE;
1224  return S_OK;
1225 }
#define ok(value,...)
smooth NULL
Definition: ftsmooth.c:416
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define S_OK
Definition: intsafe.h:59

◆ OleObject_GetMoniker()

static HRESULT WINAPI OleObject_GetMoniker ( IOleObject iface,
DWORD  dwAssign,
DWORD  dwWhichMoniker,
IMoniker **  ppmk 
)
static

Definition at line 1059 of file activex.c.

1060 {
1061  ok(0, "unexpected call\n");
1062  return E_NOTIMPL;
1063 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_GetUserClassID()

static HRESULT WINAPI OleObject_GetUserClassID ( IOleObject iface,
CLSID pClsid 
)
static

Definition at line 1175 of file activex.c.

1176 {
1177  ok(0, "unexpected call\n");
1178  return E_NOTIMPL;
1179 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_GetUserType()

static HRESULT WINAPI OleObject_GetUserType ( IOleObject iface,
DWORD  dwFormOfType,
LPOLESTR pszUserType 
)
static

Definition at line 1181 of file activex.c.

1182 {
1183  ok(0, "unexpected call\n");
1184  return E_NOTIMPL;
1185 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_InitFromData()

static HRESULT WINAPI OleObject_InitFromData ( IOleObject iface,
IDataObject pDataObject,
BOOL  fCreation,
DWORD  dwReserved 
)
static

Definition at line 1065 of file activex.c.

1067 {
1068  ok(0, "unexpected call\n");
1069  return E_NOTIMPL;
1070 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_IsUpToDate()

static HRESULT WINAPI OleObject_IsUpToDate ( IOleObject iface)
static

Definition at line 1169 of file activex.c.

1170 {
1171  ok(0, "unexpected call\n");
1172  return E_NOTIMPL;
1173 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_QueryInterface()

static HRESULT WINAPI OleObject_QueryInterface ( IOleObject iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1004 of file activex.c.

1005 {
1006  return ax_qi(riid, ppv);
1007 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT ax_qi(REFIID, void **)
Definition: activex.c:1413

◆ OleObject_Release()

static ULONG WINAPI OleObject_Release ( IOleObject iface)
static

Definition at line 1014 of file activex.c.

1015 {
1016  return --activex_refcnt;
1017 }
static LONG activex_refcnt
Definition: activex.c:103

◆ OleObject_SetClientSite()

static HRESULT WINAPI OleObject_SetClientSite ( IOleObject iface,
IOleClientSite pClientSite 
)
static

Definition at line 1019 of file activex.c.

1020 {
1021  if(!pClientSite) {
1022  CHECK_EXPECT(SetClientSite_NULL);
1023  return S_OK;
1024  }
1025 
1026  CHECK_EXPECT(SetClientSite);
1027 
1028  IOleClientSite_AddRef(pClientSite);
1029  client_site = pClientSite;
1030  return S_OK;
1031 }
static IOleClientSite * client_site
Definition: activex.c:198
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define S_OK
Definition: intsafe.h:59

◆ OleObject_SetColorScheme()

static HRESULT WINAPI OleObject_SetColorScheme ( IOleObject iface,
LOGPALETTE pLogpal 
)
static

Definition at line 1227 of file activex.c.

1228 {
1229  ok(0, "unexpected call\n");
1230  return E_NOTIMPL;
1231 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_SetExtent()

static HRESULT WINAPI OleObject_SetExtent ( IOleObject iface,
DWORD  dwDrawAspect,
SIZEL psizel 
)
static

Definition at line 1187 of file activex.c.

1188 {
1189  CHECK_EXPECT(SetExtent);
1190  return E_NOTIMPL;
1191 }
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_SetHostNames()

static HRESULT WINAPI OleObject_SetHostNames ( IOleObject iface,
LPCOLESTR  szContainerApp,
LPCOLESTR  szContainerObj 
)
static

Definition at line 1039 of file activex.c.

1040 {
1041  ok(0, "unexpected call\n");
1042  return E_NOTIMPL;
1043 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_SetMoniker()

static HRESULT WINAPI OleObject_SetMoniker ( IOleObject iface,
DWORD  dwWhichMoniker,
IMoniker pmk 
)
static

Definition at line 1053 of file activex.c.

1054 {
1055  ok(0, "unexpected call\n");
1056  return E_NOTIMPL;
1057 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_Unadvise()

static HRESULT WINAPI OleObject_Unadvise ( IOleObject iface,
DWORD  dwConnection 
)
static

Definition at line 1205 of file activex.c.

1206 {
1207  ok(0, "unexpected call\n");
1208  return E_NOTIMPL;
1209 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OleObject_Update()

static HRESULT WINAPI OleObject_Update ( IOleObject iface)
static

Definition at line 1163 of file activex.c.

1164 {
1165  ok(0, "unexpected call\n");
1166  return E_NOTIMPL;
1167 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PersistPropertyBag_AddRef()

static ULONG WINAPI PersistPropertyBag_AddRef ( IPersistPropertyBag iface)
static

Definition at line 523 of file activex.c.

524 {
525  return ++activex_refcnt;
526 }
static LONG activex_refcnt
Definition: activex.c:103

◆ PersistPropertyBag_GetClassID()

static HRESULT WINAPI PersistPropertyBag_GetClassID ( IPersistPropertyBag face,
CLSID pClassID 
)
static

Definition at line 533 of file activex.c.

534 {
535  ok(0, "unexpected call\n");
536  return E_NOTIMPL;
537 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PersistPropertyBag_InitNew()

static HRESULT WINAPI PersistPropertyBag_InitNew ( IPersistPropertyBag face)
static

Definition at line 539 of file activex.c.

540 {
541  CHECK_EXPECT(IPersistPropertyBag_InitNew);
542  return S_OK;
543 }
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define S_OK
Definition: intsafe.h:59

◆ PersistPropertyBag_Load()

static HRESULT WINAPI PersistPropertyBag_Load ( IPersistPropertyBag face,
IPropertyBag pPropBag,
IErrorLog pErrorLog 
)
static

Definition at line 545 of file activex.c.

546 {
547  IBindHost *bind_host, *bind_host2;
549  IMoniker *mon;
550  VARIANT v;
551  HRESULT hres;
552 
553  static const WCHAR param_nameW[] = {'p','a','r','a','m','_','n','a','m','e',0};
554  static const WCHAR num_paramW[] = {'n','u','m','_','p','a','r','a','m',0};
555  static const WCHAR no_paramW[] = {'n','o','_','p','a','r','a','m',0};
556  static WCHAR test_swfW[] = {'t','e','s','t','.','s','w','f',0};
557 
558  static const IID *propbag_ifaces[] = {
560  &IID_IPropertyBag2,
561  NULL
562  };
563 
564  CHECK_EXPECT(IPersistPropertyBag_Load);
565 
566  ok(pPropBag != NULL, "pPropBag == NULL\n");
567  ok(!pErrorLog, "pErrorLog != NULL\n");
568 
569  test_ifaces((IUnknown*)pPropBag, propbag_ifaces);
570 
571  V_VT(&v) = VT_BSTR;
572  hres = IPropertyBag_Read(pPropBag, param_nameW, &v, NULL);
573  ok(hres == S_OK, "Read failed: %08x\n", hres);
574  ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
575  ok(!strcmp_wa(V_BSTR(&v), "param_value"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
576 
577  V_VT(&v) = VT_I4;
578  V_I4(&v) = 0xdeadbeef;
579  hres = IPropertyBag_Read(pPropBag, param_nameW, &v, NULL);
580  ok(hres == DISP_E_TYPEMISMATCH, "Read failed: %08x, expected DISP_E_TYPEMISMATCH\n", hres);
581  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
582  ok(V_I4(&v) == 0xdeadbeef, "V_I4(v) = %x\n", V_I4(&v));
583 
584  V_VT(&v) = VT_BSTR;
585  hres = IPropertyBag_Read(pPropBag, num_paramW, &v, NULL);
586  ok(hres == S_OK, "Read failed: %08x\n", hres);
587  ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
588  ok(!strcmp_wa(V_BSTR(&v), "3"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
590 
591  V_VT(&v) = VT_I4;
592  V_I4(&v) = 0xdeadbeef;
593  hres = IPropertyBag_Read(pPropBag, num_paramW, &v, NULL);
594  ok(hres == S_OK, "Read failed: %08x\n", hres);
595  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
596  ok(V_I4(&v) == 3, "V_I4(v) = %x\n", V_I4(&v));
597 
598  V_VT(&v) = VT_BSTR;
599  V_BSTR(&v) = (BSTR)0xdeadbeef;
600  hres = IPropertyBag_Read(pPropBag, no_paramW, &v, NULL);
601  ok(hres == E_INVALIDARG, "Read failed: %08x\n", hres);
602  ok(V_VT(&v) == VT_BSTR, "V_VT(&v) = %d\n", V_VT(&v));
603  ok(V_BSTR(&v) == (BSTR)0xdeadbeef, "V_BSTR(v) = %p\n", V_BSTR(&v));
604 
605  set_plugin_readystate(READYSTATE_INTERACTIVE);
606 
607  hres = IOleClientSite_QueryInterface(client_site, &IID_IBindHost, (void**)&bind_host);
608  ok(hres == S_OK, "Could not get IBindHost iface: %08x\n", hres);
609 
610  hres = IOleClientSite_QueryInterface(client_site, &IID_IServiceProvider, (void**)&sp);
611  ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
612 
613  hres = IServiceProvider_QueryService(sp, &SID_SBindHost, &IID_IBindHost, (void**)&bind_host2);
614  ok(hres == S_OK, "QueryService(SID_SBindHost) failed: %08x\n", hres);
615  IServiceProvider_Release(sp);
616 
617  ok(iface_cmp((IUnknown*)bind_host, (IUnknown*)bind_host2), "bind_host != bind_host2\n");
618  IBindHost_Release(bind_host2);
619 
620  mon = NULL;
621  hres = IBindHost_CreateMoniker(bind_host, test_swfW, NULL, &mon, 0);
622  ok(hres == S_OK, "CreateMoniker failed: %08x\n", hres);
623  ok(mon != NULL, "mon == NULL\n");
624  test_mon_displayname(mon, "about:test.swf", "about:blanktest.swf");
625  IMoniker_Release(mon);
626 
627  IBindHost_Release(bind_host);
628 
629  mon = NULL;
630  hres = IOleClientSite_GetMoniker(client_site, OLEGETMONIKER_ONLYIFTHERE, OLEWHICHMK_CONTAINER, &mon);
631  ok(hres == S_OK, "GetMoniker failed: %08x\n", hres);
632  ok(mon != NULL, "mon == NULL\n");
633  test_mon_displayname(mon, "about:blank", NULL);
634  IMoniker_Release(mon);
635 
636  set_plugin_readystate(READYSTATE_COMPLETE);
637 
638  return S_OK;
639 }
static BOOL iface_cmp(IUnknown *iface1, IUnknown *iface2)
Definition: activex.c:149
static IOleClientSite * client_site
Definition: activex.c:198
Definition: compat.h:1939
static int strcmp_wa(LPCWSTR strw, const char *stra)
Definition: activex.c:179
static void set_plugin_readystate(READYSTATE state)
Definition: activex.c:203
#define wine_dbgstr_w
Definition: kernel32.h:34
OLECHAR * BSTR
Definition: compat.h:1934
#define V_I4(A)
Definition: oleauto.h:247
#define ok(value,...)
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IPropertyBag
#define test_ifaces(i, ids)
Definition: activex.c:164
#define DISP_E_TYPEMISMATCH
Definition: winerror.h:2514
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define V_VT(A)
Definition: oleauto.h:211
#define CHECK_EXPECT(func)
Definition: activex.c:35
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:59
const GLdouble * v
Definition: gl.h:2040
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
static void test_mon_displayname(IMoniker *mon, const char *exname, const char *broken_name)
Definition: activex.c:219
static const WCHAR sp[]
Definition: suminfo.c:288

◆ PersistPropertyBag_QueryInterface()

static HRESULT WINAPI PersistPropertyBag_QueryInterface ( IPersistPropertyBag iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 518 of file activex.c.

519 {
520  return ax_qi(riid, ppv);
521 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT ax_qi(REFIID, void **)
Definition: activex.c:1413

◆ PersistPropertyBag_Release()

static ULONG WINAPI PersistPropertyBag_Release ( IPersistPropertyBag iface)
static

Definition at line 528 of file activex.c.

529 {
530  return --activex_refcnt;
531 }
static LONG activex_refcnt
Definition: activex.c:103

◆ PersistPropertyBag_Save()

static HRESULT WINAPI PersistPropertyBag_Save ( IPersistPropertyBag face,
IPropertyBag pPropBag,
BOOL  fClearDisrty,
BOOL  fSaveAllProperties 
)
static

Definition at line 641 of file activex.c.

642 {
643  ok(0, "unexpected call\n");
644  return E_NOTIMPL;
645 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ plugin_proc()

static LRESULT WINAPI plugin_proc ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 236 of file activex.c.

237 {
238  switch(msg) {
239  case WM_PAINT: {
240  PAINTSTRUCT ps;
241  HBRUSH brush;
242  RECT rect;
243  HDC dc;
244 
246 
247  dc = BeginPaint(hwnd, &ps);
248  brush = CreateSolidBrush(RGB(255,0,0));
249  SelectObject(dc, brush);
250  Rectangle(dc, rect.left, rect.top, rect.right, rect.bottom);
251  DeleteObject(brush);
252  EndPaint(hwnd, &ps);
253  break;
254  }
255  }
256 
257  return DefWindowProcW(hwnd, msg, wParam, lParam);
258 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HDC dc
Definition: cylfrac.c:34
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define RGB(r, g, b)
Definition: wingdi.h:2918
#define WM_PAINT
Definition: winuser.h:1602
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define msg(x)
Definition: auth_time.c:54
LPARAM lParam
Definition: combotst.c:139

Referenced by create_plugin_window().

◆ PropertyNotifySink_AddRef()

static ULONG WINAPI PropertyNotifySink_AddRef ( IPropertyNotifySink iface)
static

Definition at line 2178 of file activex.c.

2179 {
2180  return 2;
2181 }

◆ PropertyNotifySink_OnChanged()

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

Definition at line 2188 of file activex.c.

2189 {
2190  if(dispID == DISPID_READYSTATE){
2191  BSTR state;
2192  HRESULT hres;
2193 
2194  static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0};
2195 
2196  hres = IHTMLDocument2_get_readyState(notif_doc, &state);
2197  ok(hres == S_OK, "get_readyState failed: %08x\n", hres);
2198 
2199  if(!lstrcmpW(state, completeW))
2200  doc_complete = TRUE;
2201 
2203  }
2204 
2205  return S_OK;
2206 }
#define TRUE
Definition: types.h:120
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
OLECHAR * BSTR
Definition: compat.h:1934
#define ok(value,...)
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
static int state
Definition: maze.c:121
#define S_OK
Definition: intsafe.h:59
static BOOL doc_complete
Definition: activex.c:2164
#define DISPID_READYSTATE
Definition: idispids.h:22
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
static IHTMLDocument2 * notif_doc
Definition: activex.c:2163

◆ PropertyNotifySink_OnRequestEdit()

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

Definition at line 2208 of file activex.c.

2209 {
2210  ok(0, "unexpected call\n");
2211  return E_NOTIMPL;
2212 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PropertyNotifySink_QueryInterface()

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

Definition at line 2166 of file activex.c.

2168 {
2170  *ppv = iface;
2171  return S_OK;
2172  }
2173 
2174  ok(0, "unexpected call\n");
2175  return E_NOINTERFACE;
2176 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define ok(value,...)
#define S_OK
Definition: intsafe.h:59
const GUID IID_IPropertyNotifySink
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ PropertyNotifySink_Release()

static ULONG WINAPI PropertyNotifySink_Release ( IPropertyNotifySink iface)
static

Definition at line 2183 of file activex.c.

2184 {
2185  return 1;
2186 }

◆ ProvideClassInfo_AddRef()

static ULONG WINAPI ProvideClassInfo_AddRef ( IProvideClassInfo iface)
static

Definition at line 808 of file activex.c.

809 {
810  return ++activex_refcnt;
811 }
static LONG activex_refcnt
Definition: activex.c:103

◆ ProvideClassInfo_GetClassInfo()

static HRESULT WINAPI ProvideClassInfo_GetClassInfo ( IProvideClassInfo iface,
ITypeInfo **  ppTI 
)
static

Definition at line 818 of file activex.c.

819 {
821 
822  ITypeInfo_AddRef(class_typeinfo);
823  *ppTI = class_typeinfo;
824  return S_OK;
825 }
#define GetClassInfo
Definition: winuser.h:5645
#define CHECK_EXPECT(func)
Definition: activex.c:35
static ITypeInfo * class_typeinfo
Definition: activex.c:99
#define S_OK
Definition: intsafe.h:59

◆ ProvideClassInfo_QueryInterface()

static HRESULT WINAPI ProvideClassInfo_QueryInterface ( IProvideClassInfo iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 803 of file activex.c.

804 {
805  return ax_qi(riid, ppv);
806 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT ax_qi(REFIID, void **)
Definition: activex.c:1413

◆ ProvideClassInfo_Release()

static ULONG WINAPI ProvideClassInfo_Release ( IProvideClassInfo iface)
static

Definition at line 813 of file activex.c.

814 {
815  return --activex_refcnt;
816 }
static LONG activex_refcnt
Definition: activex.c:103

◆ QuickActivate_AddRef()

static ULONG WINAPI QuickActivate_AddRef ( IQuickActivate iface)
static

Definition at line 431 of file activex.c.

432 {
433  return ++activex_refcnt;
434 }
static LONG activex_refcnt
Definition: activex.c:103

◆ QuickActivate_GetContentExtent()

static HRESULT WINAPI QuickActivate_GetContentExtent ( IQuickActivate iface,
LPSIZEL  pSizel 
)
static

Definition at line 501 of file activex.c.

502 {
503  ok(0, "unexpected call\n");
504  return E_NOTIMPL;
505 }
#define ok(value,...)
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ QuickActivate_QueryInterface()

static HRESULT WINAPI QuickActivate_QueryInterface ( IQuickActivate iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 426 of file activex.c.

427 {
428  return ax_qi(riid, ppv);
429 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT ax_qi(REFIID, void **)
Definition: activex.c:1413

◆ QuickActivate_QuickActivate()

static HRESULT WINAPI QuickActivate_QuickActivate ( IQuickActivate iface,
QACONTAINER *  container,
QACONTROL *  control 
)
static

Definition at line 441 of file activex.c.

442 {
444 
445  ok(container != NULL, "container == NULL\n");
446  ok(container->cbSize == sizeof(*conta