Commit efc59d1b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Store class_desc_t in vbdisp_t.

parent fb57bc21
......@@ -463,7 +463,7 @@ static HRESULT interp_new(exec_ctx_t *ctx)
return E_FAIL;
}
hres = create_vbdisp(&obj);
hres = create_vbdisp(class_desc, &obj);
if(FAILED(hres))
return hres;
......
......@@ -184,7 +184,7 @@ static IDispatchExVtbl DispatchExVtbl = {
DispatchEx_GetNameSpaceParent
};
HRESULT create_vbdisp(vbdisp_t **ret)
HRESULT create_vbdisp(const class_desc_t *desc, vbdisp_t **ret)
{
vbdisp_t *vbdisp;
......@@ -194,6 +194,7 @@ HRESULT create_vbdisp(vbdisp_t **ret)
vbdisp->IDispatchEx_iface.lpVtbl = &DispatchExVtbl;
vbdisp->ref = 1;
vbdisp->desc = desc;
*ret = vbdisp;
return S_OK;
......@@ -201,7 +202,8 @@ HRESULT create_vbdisp(vbdisp_t **ret)
HRESULT init_global(script_ctx_t *ctx)
{
return create_vbdisp(&ctx->script_obj);
ctx->script_desc.ctx = ctx;
return create_vbdisp(&ctx->script_desc, &ctx->script_obj);
}
HRESULT disp_get_id(IDispatch *disp, BSTR name, DISPID *id)
......
......@@ -65,6 +65,8 @@ typedef struct {
IDispatchEx IDispatchEx_iface;
LONG ref;
const class_desc_t *desc;
} vbdisp_t;
typedef enum {
......@@ -74,7 +76,7 @@ typedef enum {
VBDISP_ANY
} vbdisp_invoke_type_t;
HRESULT create_vbdisp(vbdisp_t**);
HRESULT create_vbdisp(const class_desc_t*,vbdisp_t**);
HRESULT disp_get_id(IDispatch*,BSTR,DISPID*);
HRESULT disp_call(script_ctx_t*,IDispatch*,DISPID,DISPPARAMS*,VARIANT*);
HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,VARIANT*);
......@@ -101,6 +103,7 @@ struct _script_ctx_t {
IDispatch *host_global;
class_desc_t script_desc;
vbdisp_t *script_obj;
dynamic_var_t *global_vars;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment