Commit 552db7aa authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Added IActiveScriptParseProcedure2 stub implementation.

parent d32ee8e4
......@@ -33,6 +33,8 @@
#define IActiveScriptParse_Release IActiveScriptParse64_Release
#define IActiveScriptParse_InitNew IActiveScriptParse64_InitNew
#define IActiveScriptParse_ParseScriptText IActiveScriptParse64_ParseScriptText
#define IActiveScriptParseProcedure2_Release \
IActiveScriptParseProcedure2_64_Release
#else
......@@ -40,6 +42,8 @@
#define IActiveScriptParse_Release IActiveScriptParse32_Release
#define IActiveScriptParse_InitNew IActiveScriptParse32_InitNew
#define IActiveScriptParse_ParseScriptText IActiveScriptParse32_ParseScriptText
#define IActiveScriptParseProcedure2_Release \
IActiveScriptParseProcedure2_32_Release
#endif
......@@ -339,6 +343,7 @@ static IActiveScript *create_vbscript(void)
static void test_vbscript(void)
{
IActiveScriptParseProcedure2 *parse_proc;
IActiveScriptParse *parser;
IActiveScript *vbscript;
ULONG ref;
......@@ -390,6 +395,13 @@ static void test_vbscript(void)
IActiveScriptParse_Release(parser);
hres = IActiveScript_QueryInterface(vbscript, &IID_IActiveScriptParseProcedure, (void**)&parse_proc);
ok(hres == E_NOINTERFACE, "Got IActiveScriptParseProcedure interface, expected E_NOTIMPL\n");
hres = IActiveScript_QueryInterface(vbscript, &IID_IActiveScriptParseProcedure2, (void**)&parse_proc);
ok(hres == S_OK, "Could not get IActiveScriptParseProcedure2 interface\n");
IActiveScriptParseProcedure2_Release(parse_proc);
ref = IActiveScript_Release(vbscript);
ok(!ref, "ref = %d\n", ref);
}
......
......@@ -30,17 +30,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
#define CTXARG_T DWORDLONG
#define IActiveScriptParseVtbl IActiveScriptParse64Vtbl
#define IActiveScriptParseProcedure2Vtbl IActiveScriptParseProcedure2_64Vtbl
#else
#define CTXARG_T DWORD
#define IActiveScriptParseVtbl IActiveScriptParse32Vtbl
#define IActiveScriptParseProcedure2Vtbl IActiveScriptParseProcedure2_32Vtbl
#endif
struct VBScript {
IActiveScript IActiveScript_iface;
IActiveScriptParse IActiveScriptParse_iface;
IActiveScriptParseProcedure2 IActiveScriptParseProcedure2_iface;
IObjectSafety IObjectSafety_iface;
LONG ref;
......@@ -224,6 +227,9 @@ static HRESULT WINAPI VBScript_QueryInterface(IActiveScript *iface, REFIID riid,
}else if(IsEqualGUID(riid, &IID_IActiveScriptParse)) {
TRACE("(%p)->(IID_IActiveScriptParse %p)\n", This, ppv);
*ppv = &This->IActiveScriptParse_iface;
}else if(IsEqualGUID(riid, &IID_IActiveScriptParseProcedure2)) {
TRACE("(%p)->(IID_IActiveScriptParseProcedure2 %p)\n", This, ppv);
*ppv = &This->IActiveScriptParseProcedure2_iface;
}else if(IsEqualGUID(riid, &IID_IObjectSafety)) {
TRACE("(%p)->(IID_IObjectSafety %p)\n", This, ppv);
*ppv = &This->IObjectSafety_iface;
......@@ -610,6 +616,48 @@ static const IActiveScriptParseVtbl VBScriptParseVtbl = {
VBScriptParse_ParseScriptText
};
static inline VBScript *impl_from_IActiveScriptParseProcedure2(IActiveScriptParseProcedure2 *iface)
{
return CONTAINING_RECORD(iface, VBScript, IActiveScriptParseProcedure2_iface);
}
static HRESULT WINAPI VBScriptParseProcedure_QueryInterface(IActiveScriptParseProcedure2 *iface, REFIID riid, void **ppv)
{
VBScript *This = impl_from_IActiveScriptParseProcedure2(iface);
return IActiveScript_QueryInterface(&This->IActiveScript_iface, riid, ppv);
}
static ULONG WINAPI VBScriptParseProcedure_AddRef(IActiveScriptParseProcedure2 *iface)
{
VBScript *This = impl_from_IActiveScriptParseProcedure2(iface);
return IActiveScript_AddRef(&This->IActiveScript_iface);
}
static ULONG WINAPI VBScriptParseProcedure_Release(IActiveScriptParseProcedure2 *iface)
{
VBScript *This = impl_from_IActiveScriptParseProcedure2(iface);
return IActiveScript_Release(&This->IActiveScript_iface);
}
static HRESULT WINAPI VBScriptParseProcedure_ParseProcedureText(IActiveScriptParseProcedure2 *iface,
LPCOLESTR pstrCode, LPCOLESTR pstrFormalParams, LPCOLESTR pstrProcedureName,
LPCOLESTR pstrItemName, IUnknown *punkContext, LPCOLESTR pstrDelimiter,
CTXARG_T dwSourceContextCookie, ULONG ulStartingLineNumber, DWORD dwFlags, IDispatch **ppdisp)
{
VBScript *This = impl_from_IActiveScriptParseProcedure2(iface);
FIXME("(%p)->(%s %s %s %s %p %s %s %u %x %p)\n", This, debugstr_w(pstrCode), debugstr_w(pstrFormalParams),
debugstr_w(pstrProcedureName), debugstr_w(pstrItemName), punkContext, debugstr_w(pstrDelimiter),
wine_dbgstr_longlong(dwSourceContextCookie), ulStartingLineNumber, dwFlags, ppdisp);
return E_NOTIMPL;
}
static const IActiveScriptParseProcedure2Vtbl VBScriptParseProcedureVtbl = {
VBScriptParseProcedure_QueryInterface,
VBScriptParseProcedure_AddRef,
VBScriptParseProcedure_Release,
VBScriptParseProcedure_ParseProcedureText,
};
static inline VBScript *impl_from_IObjectSafety(IObjectSafety *iface)
{
return CONTAINING_RECORD(iface, VBScript, IObjectSafety_iface);
......@@ -685,6 +733,7 @@ HRESULT WINAPI VBScriptFactory_CreateInstance(IClassFactory *iface, IUnknown *pU
ret->IActiveScript_iface.lpVtbl = &VBScriptVtbl;
ret->IActiveScriptParse_iface.lpVtbl = &VBScriptParseVtbl;
ret->IActiveScriptParseProcedure2_iface.lpVtbl = &VBScriptParseProcedureVtbl;
ret->IObjectSafety_iface.lpVtbl = &VBScriptSafetyVtbl;
ret->ref = 1;
......
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