Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/vbscript/vbdisp.c | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index fea82c1..297524d 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -19,11 +19,14 @@ #include <assert.h>
#include "vbscript.h" +#include "initguid.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(vbscript);
+DEFINE_GUID(IID_IScriptTypeInfo, 0xc59c6b12, 0xf6c1, 0x11cf, 0x88,0x35, 0x00,0xa0,0xc9,0x11,0xe8,0xb2); + #define FDEX_VERSION_MASK 0xf0000000
static WCHAR *copy_string_to_heap_pool(const WCHAR *str, heap_pool_t *heap) @@ -810,10 +813,32 @@ static ULONG WINAPI ScriptTypeInfo_Release(ITypeInfo *iface) static HRESULT WINAPI ScriptTypeInfo_GetTypeAttr(ITypeInfo *iface, TYPEATTR **ppTypeAttr) { ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface); - - FIXME("(%p)->(%p)\n", This, ppTypeAttr); - - return E_NOTIMPL; + TYPEATTR *p; + + TRACE("(%p)->(%p)\n", This, ppTypeAttr); + + if (!ppTypeAttr) return E_INVALIDARG; + + p = heap_alloc_zero(sizeof(*p)); + if (!p) return E_OUTOFMEMORY; + + p->guid = IID_IScriptTypeInfo; + p->lcid = LOCALE_USER_DEFAULT; + p->memidConstructor = MEMBERID_NIL; + p->memidDestructor = MEMBERID_NIL; + p->cbSizeInstance = 4; + p->typekind = TKIND_DISPATCH; + p->cFuncs = This->num_funcs; + p->cVars = This->num_vars; + p->cImplTypes = 1; + p->cbSizeVft = 7 * sizeof(void*); + p->cbAlignment = 4; + p->wTypeFlags = TYPEFLAG_FDISPATCHABLE; + p->wMajorVerNum = VBSCRIPT_MAJOR_VERSION; + p->wMinorVerNum = VBSCRIPT_MINOR_VERSION; + + *ppTypeAttr = p; + return S_OK; }
static HRESULT WINAPI ScriptTypeInfo_GetTypeComp(ITypeInfo *iface, ITypeComp **ppTComp) @@ -961,7 +986,9 @@ static void WINAPI ScriptTypeInfo_ReleaseTypeAttr(ITypeInfo *iface, TYPEATTR *pT { ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface);
- FIXME("(%p)->(%p)\n", This, pTypeAttr); + TRACE("(%p)->(%p)\n", This, pTypeAttr); + + heap_free(pTypeAttr); }
static void WINAPI ScriptTypeInfo_ReleaseFuncDesc(ITypeInfo *iface, FUNCDESC *pFuncDesc)