msscript.ocx: Added IScriptControl stub implementation.
This commit is contained in:
parent
ef0f0ad1d0
commit
6b205e41cf
|
@ -28,12 +28,317 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msscript);
|
||||
|
||||
struct ScriptControl {
|
||||
IScriptControl IScriptControl_iface;
|
||||
LONG ref;
|
||||
};
|
||||
|
||||
static HINSTANCE msscript_instance;
|
||||
|
||||
HRESULT WINAPI ScriptControl_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
|
||||
{
|
||||
FIXME("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
return E_NOINTERFACE;
|
||||
return HeapAlloc(GetProcessHeap(), 0, len);
|
||||
}
|
||||
|
||||
static inline BOOL heap_free(void *mem)
|
||||
{
|
||||
return HeapFree(GetProcessHeap(), 0, mem);
|
||||
}
|
||||
|
||||
static inline ScriptControl *impl_from_IScriptControl(IScriptControl *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ScriptControl, IScriptControl_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_QueryInterface(IScriptControl *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
*ppv = &This->IScriptControl_iface;
|
||||
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
||||
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
||||
*ppv = &This->IScriptControl_iface;
|
||||
}else if(IsEqualGUID(&IID_IScriptControl, riid)) {
|
||||
TRACE("(%p)->(IID_IScriptControl %p)\n", This, ppv);
|
||||
*ppv = &This->IScriptControl_iface;
|
||||
}else {
|
||||
FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
*ppv = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IUnknown_AddRef((IUnknown*)*ppv);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ScriptControl_AddRef(IScriptControl *iface)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ScriptControl_Release(IScriptControl *iface)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
||||
if(!ref)
|
||||
heap_free(This);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_GetTypeInfoCount(IScriptControl *iface, UINT *pctinfo)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_GetTypeInfo(IScriptControl *iface, UINT iTInfo,
|
||||
LCID lcid, ITypeInfo **ppTInfo)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_GetIDsOfNames(IScriptControl *iface, REFIID riid,
|
||||
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_Invoke(IScriptControl *iface, DISPID dispIdMember,
|
||||
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
|
||||
EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_get_Language(IScriptControl *iface, BSTR *p)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_put_Language(IScriptControl *iface, BSTR language)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(language));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_get_State(IScriptControl *iface, ScriptControlStates *p)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_put_State(IScriptControl *iface, ScriptControlStates state)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%x)\n", This, state);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_put_SitehWnd(IScriptControl *iface, LONG hwnd)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%x)\n", This, hwnd);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_get_SitehWnd(IScriptControl *iface, LONG *p)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_get_Timeout(IScriptControl *iface, LONG *p)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_put_Timeout(IScriptControl *iface, LONG milliseconds)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%d)\n", This, milliseconds);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_get_AllowUI(IScriptControl *iface, VARIANT_BOOL *p)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_put_AllowUI(IScriptControl *iface, VARIANT_BOOL allow_ui)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%x)\n", This, allow_ui);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_get_UseSafeSubset(IScriptControl *iface, VARIANT_BOOL *p)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_put_UseSafeSubset(IScriptControl *iface, VARIANT_BOOL v)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%x)\n", This, v);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_get_Modules(IScriptControl *iface, IScriptModuleCollection **p)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_get_Error(IScriptControl *iface, IScriptError **p)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_get_CodeObject(IScriptControl *iface, IDispatch **p)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_get_Procedures(IScriptControl *iface, IScriptProcedureCollection **p)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl__AboutBox(IScriptControl *iface)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_AddObject(IScriptControl *iface, BSTR name, IDispatch *object, VARIANT_BOOL add_members)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%s %p %x)\n", This, debugstr_w(name), object, add_members);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_Reset(IScriptControl *iface)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_AddCode(IScriptControl *iface, BSTR code)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(code));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_Eval(IScriptControl *iface, BSTR expression, VARIANT *res)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%s %p)\n", This, debugstr_w(expression), res);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_ExecuteStatement(IScriptControl *iface, BSTR statement)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%s)\n", This, debugstr_w(statement));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptControl_Run(IScriptControl *iface, BSTR procedure_name, SAFEARRAY **parameters, VARIANT *res)
|
||||
{
|
||||
ScriptControl *This = impl_from_IScriptControl(iface);
|
||||
FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(procedure_name), parameters, res);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IScriptControlVtbl ScriptControlVtbl = {
|
||||
ScriptControl_QueryInterface,
|
||||
ScriptControl_AddRef,
|
||||
ScriptControl_Release,
|
||||
ScriptControl_GetTypeInfoCount,
|
||||
ScriptControl_GetTypeInfo,
|
||||
ScriptControl_GetIDsOfNames,
|
||||
ScriptControl_Invoke,
|
||||
ScriptControl_get_Language,
|
||||
ScriptControl_put_Language,
|
||||
ScriptControl_get_State,
|
||||
ScriptControl_put_State,
|
||||
ScriptControl_put_SitehWnd,
|
||||
ScriptControl_get_SitehWnd,
|
||||
ScriptControl_get_Timeout,
|
||||
ScriptControl_put_Timeout,
|
||||
ScriptControl_get_AllowUI,
|
||||
ScriptControl_put_AllowUI,
|
||||
ScriptControl_get_UseSafeSubset,
|
||||
ScriptControl_put_UseSafeSubset,
|
||||
ScriptControl_get_Modules,
|
||||
ScriptControl_get_Error,
|
||||
ScriptControl_get_CodeObject,
|
||||
ScriptControl_get_Procedures,
|
||||
ScriptControl__AboutBox,
|
||||
ScriptControl_AddObject,
|
||||
ScriptControl_Reset,
|
||||
ScriptControl_AddCode,
|
||||
ScriptControl_Eval,
|
||||
ScriptControl_ExecuteStatement,
|
||||
ScriptControl_Run
|
||||
};
|
||||
|
||||
static HRESULT WINAPI ScriptControl_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
{
|
||||
ScriptControl *script_control;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
|
||||
script_control = heap_alloc(sizeof(*script_control));
|
||||
if(!script_control)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
script_control->IScriptControl_iface.lpVtbl = &ScriptControlVtbl;
|
||||
script_control->ref = 1;
|
||||
|
||||
hres = IScriptControl_QueryInterface(&script_control->IScriptControl_iface, riid, ppv);
|
||||
IScriptControl_Release(&script_control->IScriptControl_iface);
|
||||
return hres;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
|
|
@ -207,7 +207,7 @@ library MSScriptControl
|
|||
|
||||
[id(0x05e3), propget] HRESULT Error([out, retval] IScriptError **ppse);
|
||||
|
||||
[id(0x03e8), propget] HRESULT CodeObject([out, retval] IDispatch *ppdispObject);
|
||||
[id(0x03e8), propget] HRESULT CodeObject([out, retval] IDispatch **ppdispObject);
|
||||
|
||||
[id(0x03e9), propget] HRESULT Procedures([out, retval] IScriptProcedureCollection **ppdispProcedures);
|
||||
|
||||
|
|
Loading…
Reference in New Issue