ReactOS 0.4.15-dev-7918-g2a2556c
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)
#define FALSE
Definition: types.h:117
GLenum func
Definition: glext.h:6028
#define expect_(expected, got, precision)
Definition: font.c:29

Definition at line 41 of file activex.c.

◆ CHECK_EXPECT

#define CHECK_EXPECT (   func)
Value:
do { \
CHECK_EXPECT2(func); \
expect_ ## func = FALSE; \
}while(0)

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)
#define TRUE
Definition: types.h:120

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.

93 {
97};
@ TEST_FLASH
Definition: activex.c:94
@ TEST_NOQUICKACT
Definition: activex.c:95
@ TEST_DISPONLY
Definition: activex.c:96

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;
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)
Definition: atltest.h:61
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hres
Definition: protocol.c:465
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
Definition: parser.c:49

◆ 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);
194
195 return ret;
196}
#define NULL
Definition: types.h:112
#define CP_ACP
Definition: compat.h:109
OLECHAR * BSTR
Definition: compat.h:2293
#define MultiByteToWideChar
Definition: compat.h:110
GLenum GLsizei len
Definition: glext.h:6722
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
const WCHAR * str
int ret

◆ 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;
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: atltest.h:70
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define CHECK_EXPECT(func)
Definition: activex.c:72
static int plugin_behavior
Definition: activex.c:101
static BOOL no_quickact
Definition: activex.c:102
static IQuickActivate QuickActivate
Definition: activex.c:516
static IOleObject OleObject
Definition: activex.c:1260
static IProvideClassInfo ProvideClassInfo
Definition: activex.c:834
static IPersistPropertyBag PersistPropertyBag
Definition: activex.c:658
static IDispatch Dispatch
Definition: activex.c:801
static const GUID IID_ITestActiveX
Definition: activex.c:110
static IOleControl OleControl
Definition: activex.c:424
static IOleInPlaceObjectWindowless OleInPlaceObjectWindowless
Definition: activex.c:1360
static IUnknown wrapped_iface
Definition: activex.c:1363
static IConnectionPointContainer ConnectionPointContainer
Definition: activex.c:883
static IViewObjectEx ViewObjectEx
Definition: activex.c:1002
const GUID IID_IViewObject
const GUID IID_IConnectionPointContainer
const GUID IID_IProvideClassInfo
const GUID IID_IOleWindow
const GUID IID_IViewObject2
const GUID IID_IDispatch
const GUID IID_IOleInPlaceObject
const GUID IID_IOleObject
const GUID IID_IOleControl
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

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}
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define FAILED(hr)
Definition: intsafe.h:51

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
1489 *ppv = &OleControl;
1490 return S_OK;
1491}
#define ok(value,...)
Definition: atltest.h:57
static LONG activex_refcnt
Definition: activex.c:103

◆ 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}

◆ 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 GUID IID_IClassFactory
const CLSID CLSID_IdentityUnmarshal
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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}

◆ 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}

◆ 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}

◆ 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}
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}

◆ 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}

◆ 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}

◆ 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;
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}
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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ ConnectionPointContainer_AddRef()

static ULONG WINAPI ConnectionPointContainer_AddRef ( IConnectionPointContainer iface)
static

Definition at line 841 of file activex.c.

842{
843 return ++activex_refcnt;
844}

◆ 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}

◆ 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");
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}
static IConnectionPoint ConnectionPoint
Definition: activex.c:361
#define CONNECT_E_NOCONNECTION
Definition: olectl.h:251
const GUID IID_IPropertyNotifySink

◆ 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}
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}

◆ 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}
static LRESULT WINAPI wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: activex.c:2662
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4316
#define CW_USEDEFAULT
Definition: winuser.h:225
struct _WNDCLASSEXW WNDCLASSEXW
__wchar_t WCHAR
Definition: xmlstorage.h:180

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}
#define msg(x)
Definition: auth_time.c:54
static IHTMLDocument2 * create_document(void)
Definition: activex.c:2298
static void do_advise(IUnknown *unk, REFIID riid, IUnknown *unk_advise)
Definition: activex.c:2246
static BOOL doc_complete
Definition: activex.c:2164
static void doc_load_string(IHTMLDocument2 *doc, const char *str)
Definition: activex.c:2224
static void set_client_site(IHTMLDocument2 *doc, BOOL set)
Definition: activex.c:2265
static IPropertyNotifySink PropertyNotifySink
Definition: activex.c:2222
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)

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}

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,
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}
r parent
Definition: btrfs.c:3010
static HWND plugin_hwnd
Definition: activex.c:100
static LRESULT WINAPI plugin_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: activex.c:236
#define WS_CHILD
Definition: pedump.c:617
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
& rect
Definition: startmenu.cpp:1413

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:533
static IOleDocumentSite DocumentSite
Definition: activex.c:2106
static IOleClientSite ClientSite
Definition: activex.c:2054
static IOleInPlaceSite InPlaceSite
Definition: activex.c:1989
const GUID IID_IOleInPlaceSite
const GUID IID_IOleClientSite

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

◆ DEFINE_EXPECT() [1/37]

DEFINE_EXPECT ( Advise  )

◆ DEFINE_EXPECT() [2/37]

DEFINE_EXPECT ( Close  )

◆ DEFINE_EXPECT() [3/37]

DEFINE_EXPECT ( CreateInstance  )

◆ DEFINE_EXPECT() [4/37]

DEFINE_EXPECT ( DoVerb  )

◆ DEFINE_EXPECT() [5/37]

DEFINE_EXPECT ( FindConnectionPoint  )

◆ DEFINE_EXPECT() [6/37]

DEFINE_EXPECT ( FreezeEvents_FALSE  )

◆ DEFINE_EXPECT() [7/37]

DEFINE_EXPECT ( FreezeEvents_TRUE  )

◆ DEFINE_EXPECT() [8/37]

DEFINE_EXPECT ( GetClassInfo  )

◆ DEFINE_EXPECT() [9/37]

DEFINE_EXPECT ( GetExtent  )

◆ DEFINE_EXPECT() [10/37]

DEFINE_EXPECT ( GetIDsOfNames_scriptprop  )

◆ DEFINE_EXPECT() [11/37]

DEFINE_EXPECT ( GetMiscStatus  )

◆ DEFINE_EXPECT() [12/37]

DEFINE_EXPECT ( GetTypeInfo  )

◆ DEFINE_EXPECT() [13/37]

DEFINE_EXPECT ( GetViewStatus  )

◆ DEFINE_EXPECT() [14/37]

DEFINE_EXPECT ( InPlaceDeactivate  )

◆ DEFINE_EXPECT() [15/37]

DEFINE_EXPECT ( InPlaceObject_GetWindow  )

◆ DEFINE_EXPECT() [16/37]

DEFINE_EXPECT ( Invoke_ENABLED  )

◆ DEFINE_EXPECT() [17/37]

DEFINE_EXPECT ( Invoke_READYSTATE  )

◆ DEFINE_EXPECT() [18/37]

DEFINE_EXPECT ( Invoke_SCRIPTCALL  )

◆ DEFINE_EXPECT() [19/37]

DEFINE_EXPECT ( Invoke_SCRIPTPROP  )

◆ DEFINE_EXPECT() [20/37]

DEFINE_EXPECT ( Invoke_SECURITYCTX  )

◆ DEFINE_EXPECT() [21/37]

DEFINE_EXPECT ( Invoke_VALID  )

◆ DEFINE_EXPECT() [22/37]

DEFINE_EXPECT ( IPersistPropertyBag_InitNew  )

◆ DEFINE_EXPECT() [23/37]

DEFINE_EXPECT ( IPersistPropertyBag_Load  )

◆ DEFINE_EXPECT() [24/37]

DEFINE_EXPECT ( OnAmbientPropertyChange_UNKNOWN  )

◆ DEFINE_EXPECT() [25/37]

DEFINE_EXPECT ( QI_ITestActiveX  )

◆ DEFINE_EXPECT() [26/37]

DEFINE_EXPECT ( QueryService_TestActiveX  )

◆ DEFINE_EXPECT() [27/37]

DEFINE_EXPECT ( QuickActivate  )

◆ DEFINE_EXPECT() [28/37]

DEFINE_EXPECT ( SetAdvise  )

◆ DEFINE_EXPECT() [29/37]

DEFINE_EXPECT ( SetClientSite  )

◆ DEFINE_EXPECT() [30/37]

DEFINE_EXPECT ( SetClientSite_NULL  )

◆ DEFINE_EXPECT() [31/37]

DEFINE_EXPECT ( SetExtent  )

◆ DEFINE_EXPECT() [32/37]

DEFINE_EXPECT ( SetObjectRects  )

◆ DEFINE_EXPECT() [33/37]

DEFINE_EXPECT ( UIDeactivate  )

◆ DEFINE_EXPECT() [34/37]

DEFINE_EXPECT ( Unadvise  )

◆ DEFINE_EXPECT() [35/37]

DEFINE_EXPECT ( wrapped_AddRef  )

◆ DEFINE_EXPECT() [36/37]

DEFINE_EXPECT ( wrapped_func  )

◆ DEFINE_EXPECT() [37/37]

DEFINE_EXPECT ( wrapped_Release  )

◆ Dispatch_AddRef()

static ULONG WINAPI Dispatch_AddRef ( IDispatch iface)
static

Definition at line 665 of file activex.c.

666{
667 return ++activex_refcnt;
668}

◆ 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}
#define wine_dbgstr_w
Definition: kernel32.h:34
static int strcmp_wa(LPCWSTR strw, const char *stra)
Definition: activex.c:131
#define DISPID_SCRIPTPROP
Definition: activex.c:90
#define DISPID_SCRIPTCALL
Definition: activex.c:91
#define IID_NULL
Definition: guiddef.h:98

◆ 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

◆ 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}

◆ 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) {
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");
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");
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");
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;
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}
@ VT_I4
Definition: compat.h:2298
#define DISPID_READYSTATE
Definition: idispids.h:22
static READYSTATE plugin_readystate
Definition: activex.c:200
#define CHECK_EXPECT2(func)
Definition: activex.c:29
#define DISPID_SECURITYCTX
Definition: mshtmdid.h:538
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define DISPID_ENABLED
Definition: olectl.h:362
#define DISPID_VALID
Definition: olectl.h:372
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512

◆ 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}

◆ Dispatch_Release()

static ULONG WINAPI Dispatch_Release ( IDispatch iface)
static

Definition at line 670 of file activex.c.

671{
672 return --activex_refcnt;
673}

◆ 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}
unsigned long DWORD
Definition: ntddk_ex.h:95
POINT cp
Definition: magnifier.c:59
Definition: cookie.c:34

Referenced by create_doc(), and run_domtest().

◆ 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
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}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static IHTMLDocument2 * notif_doc
Definition: activex.c:2163
const GUID IID_IPersistStreamInit
Definition: mem.c:156
Definition: parse.h:23
ULONG_PTR SIZE_T
Definition: typedefs.h:80
static int init
Definition: wintirpc.c:33

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}

◆ 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}

◆ 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}
static DWORD unk1
Definition: cursoricon.c:1638

Referenced by _test_form_elements(), PersistPropertyBag_Load(), QuickActivate_QuickActivate(), test_attr(), test_container(), test_create_stylesheet(), test_doc_elem(), test_docfrag(), test_elems(), test_elems2(), test_form_item(), test_frame_doc(), test_history(), test_iface_wrapping(), test_iframe_elem(), test_mime_types_col(), test_option_form(), test_plugins_col(), test_screen(), test_select_elem(), and test_select_form().

◆ 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 RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1179
LONG WINAPI RegSetValueA(HKEY hKeyOriginal, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData)
Definition: reg.c:4954
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
Definition: reg.c:1224
GLuint res
Definition: glext.h:9613
#define REG_SZ
Definition: layer.c:22
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10

◆ 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 BOOL init_key(const char *key_name, const char *def_value, BOOL init)
Definition: activex.c:1073
#define TESTACTIVEX_CLSID
Definition: activex.c:105

◆ 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;
2356}
static BOOL have_container
Definition: activex.c:201

◆ 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}
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 HRESULT WINAPI wrapped_func_nocall(IUnknown *iface, int i, double d)
Definition: activex.c:1384
static HRESULT WINAPI wrapped_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
Definition: activex.c:1365
static ULONG WINAPI wrapped_Release(IUnknown *iface)
Definition: activex.c:1378
static void * wrapped_iface_vtbl[100]
Definition: activex.c:1362
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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ InPlaceSite_DeactivateAndUndo()

static HRESULT WINAPI InPlaceSite_DeactivateAndUndo ( IOleInPlaceSite iface)
static

Definition at line 1961 of file activex.c.

1962{
1963 return E_NOTIMPL;
1964}

◆ InPlaceSite_DiscardUndoState()

static HRESULT WINAPI InPlaceSite_DiscardUndoState ( IOleInPlaceSite iface)
static

Definition at line 1956 of file activex.c.

1957{
1958 return E_NOTIMPL;
1959}

◆ 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

◆ 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

◆ InPlaceSite_OnInPlaceActivate()

static HRESULT WINAPI InPlaceSite_OnInPlaceActivate ( IOleInPlaceSite iface)
static

Definition at line 1912 of file activex.c.

1913{
1914 return S_OK;
1915}

◆ InPlaceSite_OnInPlaceDeactivate()

static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate ( IOleInPlaceSite iface)
static

Definition at line 1951 of file activex.c.

1952{
1953 return S_OK;
1954}

◆ 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}

◆ InPlaceSite_OnUIActivate()

static HRESULT WINAPI InPlaceSite_OnUIActivate ( IOleInPlaceSite iface)
static

Definition at line 1917 of file activex.c.

1918{
1919 return S_OK;
1920}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ load_typelib()

static void load_typelib ( void  )
static

Definition at line 2686 of file activex.c.

2687{
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}
static ITypeLib * typelib
Definition: apps.c:108
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
Definition: typelib.c:458
static ITypeInfo * class_typeinfo
Definition: activex.c:99

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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ OleControl_Release()

static ULONG WINAPI OleControl_Release ( IOleControl iface)
static

Definition at line 375 of file activex.c.

376{
377 return --activex_refcnt;
378}

◆ OleInPlaceObject_AddRef()

static ULONG WINAPI OleInPlaceObject_AddRef ( IOleInPlaceObjectWindowless iface)
static

Definition at line 1268 of file activex.c.

1269{
1270 return ++activex_refcnt;
1271}

◆ 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}

◆ 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}
#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

◆ 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}

◆ OleInPlaceObject_Release()

static ULONG WINAPI OleInPlaceObject_Release ( IOleInPlaceObjectWindowless iface)
static

Definition at line 1273 of file activex.c.

1274{
1275 return --activex_refcnt;
1276}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ OleObject_AddRef()

static ULONG WINAPI OleObject_AddRef ( IOleObject iface)
static

Definition at line 1009 of file activex.c.

1010{
1011 return ++activex_refcnt;
1012}

◆ 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}

◆ 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}
@ Close
Definition: sacdrv.h:268

◆ 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}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static HWND hwndParent
Definition: cryptui.c:300
unsigned int BOOL
Definition: ntddk_ex.h:94
#define SET_EXPECT(func)
Definition: activex.c:63
#define CHECK_CALLED(func)
Definition: activex.c:78
static void create_plugin_window(HWND parent, const RECT *rect)
Definition: activex.c:260
#define OLEIVERB_INPLACEACTIVATE
Definition: ole2.h:43
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ OleObject_Release()

static ULONG WINAPI OleObject_Release ( IOleObject iface)
static

Definition at line 1014 of file activex.c.

1015{
1016 return --activex_refcnt;
1017}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ 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}

◆ PersistPropertyBag_AddRef()

static ULONG WINAPI PersistPropertyBag_AddRef ( IPersistPropertyBag iface)
static

Definition at line 523 of file activex.c.

524{
525 return ++activex_refcnt;
526}

◆ 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}

◆ 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}

◆ 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;
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}
#define E_INVALIDARG
Definition: ddrawi.h:101
@ VT_BSTR
Definition: compat.h:2303
const GLdouble * v
Definition: gl.h:2040
static BOOL iface_cmp(IUnknown *iface1, IUnknown *iface2)
Definition: activex.c:149
static void set_plugin_readystate(READYSTATE state)
Definition: activex.c:203
static void test_mon_displayname(IMoniker *mon, const char *exname, const char *broken_name)
Definition: activex.c:219
#define test_ifaces(i, ids)
Definition: activex.c:164
static const WCHAR sp[]
Definition: suminfo.c:287
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define V_BSTR(A)
Definition: oleauto.h:226
const GUID IID_IPropertyBag
#define DISP_E_TYPEMISMATCH
Definition: winerror.h:2514

◆ 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}

◆ PersistPropertyBag_Release()

static ULONG WINAPI PersistPropertyBag_Release ( IPersistPropertyBag iface)
static

Definition at line 528 of file activex.c.

529{
530 return --activex_refcnt;
531}

◆ 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}

◆ 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
258}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define RGB(r, g, b)
Definition: precomp.h:71
pKey DeleteObject()
static const WCHAR dc[]
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define WM_PAINT
Definition: winuser.h:1620
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)

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))
2201
2203 }
2204
2205 return S_OK;
2206}
static int state
Definition: maze.c:121
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170

◆ 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}

◆ 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}

◆ 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}

◆ 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:5779

◆ 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}

◆ ProvideClassInfo_Release()

static ULONG WINAPI ProvideClassInfo_Release ( IProvideClassInfo iface)
static

Definition at line 813 of file activex.c.

814{
815 return --activex_refcnt;
816}

◆ QuickActivate_AddRef()

static ULONG WINAPI QuickActivate_AddRef ( IQuickActivate iface)
static

Definition at line 431 of file activex.c.

432{
433 return ++activex_refcnt;
434}

◆ 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}

◆ 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}

◆ 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(*container), "container->cbSize = %d\n", container->cbSize);
447 ok(container->pClientSite != NULL, "container->pClientSite == NULL\n");
448 ok(container->pAdviseSink != NULL, "container->pAdviseSink == NULL\n");
449 ok(container->pPropertyNotifySink != NULL, "container->pPropertyNotifySink == NULL\n");
450 ok(!container->pUnkEventSink, "container->pUnkEventSink != NULL\n");
451 ok(container->dwAmbientFlags == (QACONTAINER_SUPPORTSMNEMONICS|QACONTAINER_MESSAGEREFLECT|QACONTAINER_USERMODE),
452 "container->dwAmbientFlags = %x\n", container->dwAmbientFlags);
454 ok(!container->colorFore, "container->colorFore = %d\n", container->colorFore); /* FIXME */
456 ok(container->colorBack, "container->colorBack == 0\n"); /* FIXME */
458 todo_wine ok(container->pFont != NULL, "container->pFont == NULL\n");
459 else
460 ok(!container->pFont, "container->pFont = %p\n", container->pFont);
462 ok(container->pUndoMgr != NULL, "container->pUndoMgr == NULL\n");
463 ok(!container->dwAppearance, "container->dwAppearance = %x\n", container->dwAppearance);
465 ok(!container->lcid, "container->lcid = %x\n", container->lcid);
466 ok(!container->hpal, "container->hpal = %p\n", container->hpal);
467 ok(!container->pBindHost, "container->pBindHost != NULL\n");
468 ok(!container->pOleControlSite, "container->pOleControlSite != NULL\n");
469 ok(!container->pServiceProvider, "container->pServiceProvider != NULL\n");
470
471 ok(control->cbSize == sizeof(*control), "control->cbSize = %d\n", control->cbSize);
472 ok(!control->dwMiscStatus, "control->dwMiscStatus = %x\n", control->dwMiscStatus);
473 ok(!control->dwViewStatus, "control->dwViewStatus = %x\n", control->dwViewStatus);
474 ok(!control->dwEventCookie, "control->dwEventCookie = %x\n", control->dwEventCookie);
475 ok(!control->dwPropNotifyCookie, "control->dwPropNotifyCookie = %x\n", control->dwPropNotifyCookie);
476 ok(!control->dwPointerActivationPolicy, "control->dwPointerActivationPolicy = %x\n", control->dwPointerActivationPolicy);
477
478 ok(iface_cmp((IUnknown*)container->pClientSite, (IUnknown*)container->pAdviseSink),
479 "container->pClientSite != container->pAdviseSink\n");
480 ok(iface_cmp((IUnknown*)container->pClientSite, (IUnknown*)container->pPropertyNotifySink),
481 "container->pClientSite != container->pPropertyNotifySink\n");
483
484 IOleClientSite_AddRef(container->pClientSite);
485 client_site = container->pClientSite;
486
487 control->dwMiscStatus = OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE|OLEMISC_INSIDEOUT
488 |OLEMISC_CANTLINKINSIDE|OLEMISC_RECOMPOSEONRESIZE;
489 control->dwViewStatus = 0x18;
490 control->dwPropNotifyCookie = 1;
491
492 return S_OK;
493}
static REFIID pluginhost_iids[]
Definition: activex.c:134
#define todo_wine
Definition: custom.c:79

◆ QuickActivate_Release()

static ULONG WINAPI QuickActivate_Release ( IQuickActivate iface)
static

Definition at line 436 of file activex.c.

437{
438 return --activex_refcnt;
439}

◆ QuickActivate_SetContentExtent()

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

Definition at line 495 of file activex.c.

496{
497 ok(0, "unexpected call\n");
498 return E_NOTIMPL;
499}

◆ register_activex()

static BOOL register_activex ( void  )
static

Definition at line 2737 of file activex.c.

2738{
2739 DWORD regid;
2740 HRESULT hres;
2741
2742 if(!init_registry(TRUE)) {
2744 return FALSE;
2745 }
2746
2748 CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &regid);
2749 ok(hres == S_OK, "Could not register control: %08x\n", hres);
2750
2751 return TRUE;
2752}
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
Definition: compobj.c:2897
#define regid
Definition: ecma_167.h:64
static IClassFactory activex_cf
Definition: activex.c:445
static BOOL init_registry(BOOL init)
Definition: activex.c:1095
static const GUID CLSID_TestActiveX
Definition: activex.c:107
@ REGCLS_MULTIPLEUSE
Definition: objbase.h:393

◆ release_doc()

static void release_doc ( IHTMLDocument2 *  doc)
static

Definition at line 2328 of file activex.c.

2329{
2330 ULONG ref;
2331
2332 set_client_site(doc, FALSE);
2333 ref = IHTMLDocument2_Release(doc);
2334 ok(!ref || broken(ref == 1) /* Vista */, "ref = %d\n", ref);
2335
2336 if(client_site) {
2337 IOleClientSite_Release(client_site);
2338 client_site = NULL;
2339 }
2340
2341 if(plugin_hwnd) {
2343 plugin_hwnd = NULL;
2344 }
2345
2346 ok(!activex_refcnt, "activex_refcnt = %d\n", activex_refcnt);
2347}
#define broken(x)
Definition: _sntprintf.h:21
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59
BOOL WINAPI DestroyWindow(_In_ HWND)

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

◆ ServiceProvider_AddRef()

static ULONG WINAPI ServiceProvider_AddRef ( IServiceProvider iface)
static

Definition at line 2114 of file activex.c.

2115{
2116 return 2;
2117}

◆ ServiceProvider_QueryInterface()

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

Definition at line 2108 of file activex.c.

2110{
2111 return cs_qi(riid, ppv);
2112}

◆ ServiceProvider_QueryService()

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

Definition at line 2124 of file activex.c.

2126{
2127 if(IsEqualGUID(&CLSID_TestActiveX, guidService)) {
2128 CHECK_EXPECT(QueryService_TestActiveX);
2129 ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
2130 *ppv = &OleObject;
2131 return S_OK;
2132 }
2133
2134 *ppv = NULL;
2135 return E_NOINTERFACE;
2136}

◆ ServiceProvider_Release()

static ULONG WINAPI ServiceProvider_Release ( IServiceProvider iface)
static

Definition at line 2119 of file activex.c.

2120{
2121 return 1;
2122}

◆ set_client_site()

static void set_client_site ( IHTMLDocument2 *  doc,
BOOL  set 
)
static

Definition at line 2265 of file activex.c.

2266{
2267 IOleObject *oleobj;
2268 HRESULT hres;
2269
2270 if(!set && view) {
2271 IOleDocumentView_Show(view, FALSE);
2272 IOleDocumentView_CloseView(view, 0);
2273 IOleDocumentView_SetInPlaceSite(view, NULL);
2274 IOleDocumentView_Release(view);
2275 view = NULL;
2276 }
2277
2278 hres = IHTMLDocument2_QueryInterface(doc, &IID_IOleObject, (void**)&oleobj);
2279 ok(hres == S_OK, "Could not et IOleObject: %08x\n", hres);
2280
2281 hres = IOleObject_SetClientSite(oleobj, set ? &ClientSite : NULL);
2282 ok(hres == S_OK, "SetClientSite failed: %08x\n", hres);
2283
2284 if(set) {
2285 IHlinkTarget *hlink;
2286
2287 hres = IOleObject_QueryInterface(oleobj, &IID_IHlinkTarget, (void**)&hlink);
2288 ok(hres == S_OK, "Could not get IHlinkTarget iface: %08x\n", hres);
2289
2290 hres = IHlinkTarget_Navigate(hlink, 0, NULL);
2291 ok(hres == S_OK, "Navgate failed: %08x\n", hres);
2292
2293 IHlinkTarget_Release(hlink);
2294 }
2295
2296 IOleObject_Release(oleobj);
2297}
Definition: _set.h:50

Referenced by create_doc(), release_doc(), and run_domtest().

◆ set_plugin_readystate()

static void set_plugin_readystate ( READYSTATE  state)
static

Definition at line 203 of file activex.c.

204{
205 IPropertyNotifySink *prop_notif;
207
209
210 hres = IOleClientSite_QueryInterface(client_site, &IID_IPropertyNotifySink, (void**)&prop_notif);
211 ok(hres == S_OK, "Could not get IPropertyNotifySink iface: %08x\n", hres);
212
213 hres = IPropertyNotifySink_OnChanged(prop_notif, DISPID_READYSTATE);
214 ok(hres == S_OK, "OnChanged(DISPID_READYSTATE) failed: %08x\n", hres);
215
216 IPropertyNotifySink_Release(prop_notif);
217}

Referenced by PersistPropertyBag_Load().

◆ START_TEST()

START_TEST ( activex  )

Definition at line 2768 of file activex.c.

2769{
2771
2772 if(!check_ie()) {
2774 win_skip("Too old IE\n");
2775 return;
2776 }
2777
2778 if(is_ie_hardened()) {
2780 win_skip("IE running in Enhanced Security Configuration\n");
2781 return;
2782 }
2783
2785 load_typelib();
2788
2789 if(register_activex()) {
2790 trace("Testing emulated flash embedding...\n");
2791 test_flash_ax();
2792 trace("Testing plugin without IQuickActivate iface...\n");
2794 trace("Testing plugin with IDispatch iface only...\n");
2796 trace("Testing event object binding...\n");
2798 trace("Testing createElement(object)...\n");
2801 }else {
2802 skip("Could not register ActiveX\n");
2803 }
2804
2806 ITypeInfo_Release(actxtest_typeinfo);
2807 if(class_typeinfo)
2808 ITypeInfo_Release(class_typeinfo);
2811}
#define skip(...)
Definition: atltest.h:64
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
static BOOL register_activex(void)
Definition: activex.c:1100
static void init_wrapped_iface(void)
Definition: activex.c:1399
static BOOL check_ie(void)
Definition: activex.c:2754
static void test_nooleobj_ax(void)
Definition: activex.c:2574
static void test_noquickact_ax(void)
Definition: activex.c:2460
static void test_flash_ax(void)
Definition: activex.c:2386
static void load_typelib(void)
Definition: activex.c:2686
static void test_event_binding(void)
Definition: activex.c:2509
static HWND create_container_window(void)
Definition: activex.c:2667
static void test_create_element(void)
Definition: activex.c:2616
static BOOL is_ie_hardened(void)
Definition: mshtml_test.h:23
#define win_skip
Definition: test.h:160
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOW
Definition: winuser.h:775

◆ strcmp_wa()

static int strcmp_wa ( LPCWSTR  strw,
const char stra 
)
static

Definition at line 179 of file activex.c.

180{
181 CHAR buf[512];
182 WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL);
183 return lstrcmpA(stra, buf);
184}
#define WideCharToMultiByte
Definition: compat.h:111
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
static const char * strw(LPCWSTR x)
Definition: actctx.c:49
char CHAR
Definition: xmlstorage.h:175

◆ test_container()

static void test_container ( IHTMLDocument2 *  doc_obj)
static

Definition at line 1686 of file activex.c.

1687{
1688 IHTMLWindow2 *parent_window, *html_window;
1689 IServiceProvider *serv_prov;
1691 IHTMLDocument2 *doc;
1692 IUnknown *unk;
1693 HRESULT hres;
1694
1695 container = NULL;
1696 hres = IOleClientSite_GetContainer(client_site, &container);
1697 ok(hres == S_OK, "GetContainer failed: %08x\n", hres);
1698 ok(container != NULL, "container == NULL\n");
1699
1700 hres = IHTMLDocument2_get_parentWindow(doc_obj, &parent_window);
1701 ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
1702 ok(parent_window != NULL, "parentWindow == NULL\n");
1703
1704 hres = IHTMLWindow2_get_document(parent_window, &doc);
1705 ok(hres == S_OK, "get_document failed: %08x\n", hres);
1706 ok(doc != NULL, "doc == NULL\n");
1707 ok(iface_cmp((IUnknown*)doc, (IUnknown*)container), "container != doc\n");
1708 IHTMLDocument2_Release(doc);
1709
1710 hres = IOleClientSite_QueryInterface(client_site, &IID_IServiceProvider, (void**)&serv_prov);
1711 ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
1712
1713 hres = IServiceProvider_QueryService(serv_prov, &IID_IHTMLWindow2, &IID_IHTMLWindow2, (void**)&html_window);
1714 ok(hres == S_OK, "Could not get IHTMLWindow2 service: %08x\n", hres);
1715 todo_wine
1716 ok(!iface_cmp((IUnknown*)html_window, (IUnknown*)parent_window), "html_window != parent_window\n");
1717 IHTMLWindow2_Release(html_window);
1718
1719 SET_EXPECT(QueryService_TestActiveX);
1720 hres = IServiceProvider_QueryService(serv_prov, &CLSID_TestActiveX, &IID_IUnknown, (void**)&unk);
1721 ok(hres == S_OK, "QueryService(CLSID_TestActiveX) failed: %08x\n", hres);
1722 ok(unk == (IUnknown*)&OleObject, "unexpected unk %p\n", unk);
1723 CHECK_CALLED(QueryService_TestActiveX);
1724 IUnknown_Release(unk);
1725
1726 IServiceProvider_Release(serv_prov);
1727
1728 IHTMLWindow2_Release(parent_window);
1729 IOleContainer_Release(container);
1730}
interface IHTMLWindow2 IHTMLWindow2
Definition: mshtmhst.idl:64

Referenced by test_flash_ax().

◆ test_create_element()

static void test_create_element ( void  )
static

Definition at line 2616 of file activex.c.

2617{
2618 IHTMLDocument2 *doc;
2619
2621
2622 doc = create_doc("<html></html>");
2623
2625
2626 SET_EXPECT(CreateInstance);
2627 SET_EXPECT(FreezeEvents_TRUE);
2629 SET_EXPECT(IPersistPropertyBag_InitNew);
2630 SET_EXPECT(Invoke_READYSTATE);
2631 SET_EXPECT(FreezeEvents_FALSE);
2632
2633 test_exec_script(doc,
2634 "var test_elem = document.createElement('object');"
2635 "test_elem.classid = 'CLSID:178fc163-f585-4e24-9c13-4bb7f6680746';",
2636 "javascript");
2637
2638 CHECK_CALLED(CreateInstance);
2639 todo_wine CHECK_CALLED(FreezeEvents_TRUE);
2641 CHECK_CALLED(IPersistPropertyBag_InitNew);
2642 CHECK_CALLED(Invoke_READYSTATE);
2643 todo_wine CHECK_CALLED(FreezeEvents_FALSE);
2644
2646
2647 SET_EXPECT(DoVerb);
2648 test_exec_script(doc,
2649 "document.body.appendChild(test_elem);",
2650 "javascript");
2651 todo_wine CHECK_CALLED(DoVerb);
2652
2653 SET_EXPECT(InPlaceDeactivate);
2655 SET_EXPECT(SetClientSite_NULL);
2656 release_doc(doc);
2657 todo_wine CHECK_CALLED(InPlaceDeactivate);
2659 CHECK_CALLED(SetClientSite_NULL);
2660}
static void release_doc(IHTMLDocument2 *doc)
Definition: activex.c:2328
static IHTMLDocument2 * create_doc(const char *str)
Definition: activex.c:2310
static void test_exec_script(IHTMLDocument2 *doc, const char *codea, const char *langa)
Definition: activex.c:2595
static void init_test(void)
Definition: shlexec.c:2649

Referenced by START_TEST().

◆ test_elem_dispex()

static void test_elem_dispex ( IDispatchEx dispex)
static

Definition at line 1509 of file activex.c.

1510{
1511 DISPPARAMS dp;
1512 EXCEPINFO ei;
1513 VARIANT v;
1514 DISPID id;
1515 BSTR str;
1516 HRESULT hres;
1517
1518 str = a2bstr("scriptprop");
1519 SET_EXPECT(GetIDsOfNames_scriptprop);
1520 hres = IDispatchEx_GetDispID(dispex, str, 0, &id);
1521 CHECK_CALLED(GetIDsOfNames_scriptprop);
1523 ok(hres == S_OK, "GetDispID failed: %08x\n", hres);
1524 todo_wine
1525 ok(id == DISPID_SCRIPTPROP, "id = %d\n", id);
1526
1527 SET_EXPECT(Invoke_SECURITYCTX);
1528 SET_EXPECT(Invoke_SCRIPTPROP);
1529 memset(&dp, 0, sizeof(dp));
1530 memset(&ei, 0, sizeof(ei));
1531 V_VT(&v) = VT_EMPTY;
1532 hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL);
1533 ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
1534 ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v));
1535 ok(V_I4(&v) == 4, "V_I4(v) = %d\n", V_I4(&v));
1536 CHECK_CALLED(Invoke_SECURITYCTX);
1537 CHECK_CALLED(Invoke_SCRIPTPROP);
1538}
@ VT_EMPTY
Definition: compat.h:2295
GLuint id
Definition: glext.h:5910
static BSTR a2bstr(const char *str)
Definition: activex.c:119
static VARIANTARG static DISPID
Definition: ordinal.c:52
struct stdole::DISPPARAMS DISPPARAMS
struct stdole::EXCEPINFO EXCEPINFO
#define LOCALE_NEUTRAL
#define memset(x, y, z)
Definition: compat.h:39

Referenced by test_object_elem().

◆ test_event_binding()

static void test_event_binding ( void  )
static

Definition at line 2509 of file activex.c.

2510{
2511 IHTMLDocument2 *doc;
2512
2514
2515 SET_EXPECT(CreateInstance);
2516 SET_EXPECT(FreezeEvents_TRUE);
2518 SET_EXPECT(FreezeEvents_FALSE);
2519 SET_EXPECT(IPersistPropertyBag_Load);
2520 SET_EXPECT(Invoke_READYSTATE);
2521 SET_EXPECT(SetExtent);
2522 SET_EXPECT(GetExtent);
2523 SET_EXPECT(DoVerb);
2524
2526 SET_EXPECT(OnAmbientPropertyChange_UNKNOWN);
2527 SET_EXPECT(FindConnectionPoint);
2528 SET_EXPECT(Advise);
2529
2531
2532 CHECK_CALLED(CreateInstance);
2533 todo_wine
2534 CHECK_CALLED(FreezeEvents_TRUE);
2536 todo_wine
2537 CHECK_CALLED(FreezeEvents_FALSE);
2538 CHECK_CALLED(IPersistPropertyBag_Load);
2539 CHECK_CALLED(Invoke_READYSTATE);
2540 todo_wine
2541 CHECK_CALLED(SetExtent);
2542 todo_wine
2543 CHECK_CALLED(GetExtent);
2544 CHECK_CALLED(DoVerb);
2545
2546 /* Set in DoVerb */
2547 CHECK_CALLED(InPlaceObject_GetWindow);
2548 CHECK_CALLED(SetObjectRects);
2549
2551 todo_wine
2552 CHECK_CALLED(OnAmbientPropertyChange_UNKNOWN);
2553 CHECK_CALLED(FindConnectionPoint);
2554 CHECK_CALLED(Advise);
2555
2558 else
2559 skip("Skipping test_event_call(). ROSTESTS-114.\n");
2560
2561 SET_EXPECT(InPlaceDeactivate);
2563 SET_EXPECT(SetClientSite_NULL);
2564 SET_EXPECT(FindConnectionPoint);
2565 SET_EXPECT(Unadvise);
2566 release_doc(doc);
2567 CHECK_CALLED(InPlaceDeactivate);
2569 CHECK_CALLED(SetClientSite_NULL);
2570 CHECK_CALLED(FindConnectionPoint);
2571 CHECK_CALLED(Unadvise);
2572}
static const char event_binding_str[]
Definition: activex.c:124
static void test_event_call(void)
Definition: activex.c:2358
int winetest_interactive

Referenced by START_TEST().

◆ test_event_call()

static void test_event_call ( void  )
static

Definition at line 2358 of file activex.c.

2359{
2360 VARIANT res, args[2];
2361 DISPPARAMS dp = {args};
2362 EXCEPINFO ei = {0};
2363 HRESULT hres;
2364
2365 V_VT(&res) = VT_EMPTY;
2366 hres = IDispatch_Invoke(sink_disp, 1, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
2367 ok(hres == S_OK, "Invoke failed: %08x\n", hres);
2368 ok(V_VT(&res) == VT_I4 && V_I4(&res) == 6, "unexpected result\n");
2369
2370 V_VT(args) = VT_I4;
2371 V_I4(args) = 2;
2372 V_VT(args+1) = VT_I4;
2373 V_I4(args+1) = 3;
2374 dp.cArgs = 2;
2375 V_VT(&res) = VT_EMPTY;
2376 hres = IDispatch_Invoke(sink_disp, 2, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
2377 ok(hres == S_OK, "Invoke failed: %08x\n", hres);
2378 ok(V_VT(&res) == VT_I4 && V_I4(&res) == 7, "unexpected result: %d\n", V_I4(&res));
2379
2380 V_VT(&res) = VT_ERROR;
2381 hres = IDispatch_Invoke(sink_disp, 10, &IID_NULL, 0, DISPATCH_METHOD, &dp, &res, &ei, NULL);
2382 ok(hres == S_OK, "Invoke failed: %08x\n", hres);
2383 ok(V_VT(&res) == VT_EMPTY, "V_VT(res) = %d\n", V_VT(&res));
2384}
@ VT_ERROR
Definition: compat.h:2305
Definition: match.c:390

Referenced by test_event_binding().

◆ test_exec_script()

static void test_exec_script ( IHTMLDocument2 *  doc,
const char codea,
const char langa 
)
static

Definition at line 2595 of file activex.c.

2596{
2598 BSTR code, lang;
2599 VARIANT v;
2600 HRESULT hres;
2601
2602 hres = IHTMLDocument2_get_parentWindow(doc, &window);
2603 ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres);
2604
2605 code = a2bstr(codea);
2606 lang = a2bstr(langa);
2607
2608 hres = IHTMLWindow2_execScript(window, code, lang, &v);
2609 ok(hres == S_OK, "execScript failed: %08x\n", hres);
2611 VariantClear(&v);
2612
2613 IHTMLWindow2_Release(window);
2614}
static IHTMLWindow2 * window
Definition: events.c:77
Definition: inflate.c:139
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648<