static void ref_count_test(LPCWSTR type_lib) { ITypeLib *iface; ITypeInfo *iti1, *iti2; HRESULT hRes; int ref_count; trace("Loading type library\n"); hRes = LoadTypeLib(type_lib, &iface); ok(hRes == S_OK, "Could not load type library\n"); if(hRes != S_OK) return; hRes = ITypeLib_GetTypeInfo(iface, 1, &iti1); ok(hRes == S_OK, "ITypeLib_GetTypeInfo failed on index = 1\n"); ok(ref_count=ITypeLib_Release(iface) > 0, "ITypeLib destroyed while ITypeInfo has back pointer\n"); if(!ref_count) return; hRes = ITypeLib_GetTypeInfo(iface, 1, &iti2); ok(hRes == S_OK, "ITypeLib_GetTypeInfo failed on index = 1\n"); ok(iti1 == iti2, "ITypeLib_GetTypeInfo returned different pointers for same indexes\n"); ITypeLib_AddRef(iface); ITypeInfo_Release(iti2); ITypeInfo_Release(iti1); ok(ITypeLib_Release(iface) == 0, "ITypeLib should be destroyed here.\n"); }
HRESULT get_dispids(tid_t tid, DWORD *ret_size, DISPID **ret) { unsigned i, func_cnt; FUNCDESC *funcdesc; ITypeInfo *ti; TYPEATTR *attr; DISPID *ids; HRESULT hres; hres = get_typeinfo(tid, &ti); if(FAILED(hres)) return hres; hres = ITypeInfo_GetTypeAttr(ti, &attr); if(FAILED(hres)) { ITypeInfo_Release(ti); return hres; } func_cnt = attr->cFuncs; ITypeInfo_ReleaseTypeAttr(ti, attr); ids = heap_alloc(func_cnt*sizeof(DISPID)); if(!ids) { ITypeInfo_Release(ti); return E_OUTOFMEMORY; } for(i=0; i < func_cnt; i++) { hres = ITypeInfo_GetFuncDesc(ti, i, &funcdesc); if(FAILED(hres)) break; ids[i] = funcdesc->memid; ITypeInfo_ReleaseFuncDesc(ti, funcdesc); } ITypeInfo_Release(ti); if(FAILED(hres)) { heap_free(ids); return hres; } qsort(ids, func_cnt, sizeof(DISPID), id_cmp); *ret_size = func_cnt; *ret = ids; return S_OK; }
void php_com_object_free_storage(zend_object *object) { php_com_dotnet_object *obj = (php_com_dotnet_object*)object; if (obj->typeinfo) { ITypeInfo_Release(obj->typeinfo); obj->typeinfo = NULL; } if (obj->sink_dispatch) { php_com_object_enable_event_sink(obj, FALSE); IDispatch_Release(obj->sink_dispatch); obj->sink_dispatch = NULL; } VariantClear(&obj->v); if (obj->method_cache) { zend_hash_destroy(obj->method_cache); FREE_HASHTABLE(obj->method_cache); } if (obj->id_of_name_cache) { zend_hash_destroy(obj->id_of_name_cache); FREE_HASHTABLE(obj->id_of_name_cache); } }
HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo) { HRESULT hres; if (!typelib) hres = load_typelib(); if (!typelib) return hres; if(!typeinfos[tid]) { ITypeInfo *ti; hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti); if(FAILED(hres)) { ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hres); return hres; } if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), ti, NULL)) ITypeInfo_Release(ti); } *typeinfo = typeinfos[tid]; ITypeInfo_AddRef(*typeinfo); return S_OK; }
void release_typelib(void) { dispex_data_t *iter; unsigned i; while(!list_empty(&dispex_data_list)) { iter = LIST_ENTRY(list_head(&dispex_data_list), dispex_data_t, entry); list_remove(&iter->entry); for(i=0; i < iter->func_cnt; i++) SysFreeString(iter->funcs[i].name); heap_free(iter->funcs); heap_free(iter->name_table); heap_free(iter); } for(i=0; i < ARRAY_SIZE(typeinfos); i++) if(typeinfos[i]) ITypeInfo_Release(typeinfos[i]); for(i=0; i < ARRAY_SIZE(typelib); i++) if(typelib[i]) ITypeLib_Release(typelib[i]); DeleteCriticalSection(&cs_dispex_static_data); }
HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo) { HRESULT hres; if(!typelib) { ITypeLib *tl; hres = LoadRegTypeLib(&LIBID_MSXML2, 3, 0, LOCALE_SYSTEM_DEFAULT, &tl); if(FAILED(hres)) { ERR("LoadRegTypeLib failed: %08x\n", hres); return hres; } if(InterlockedCompareExchangePointer((void**)&typelib, tl, NULL)) ITypeLib_Release(tl); } if(!typeinfos[tid]) { ITypeInfo *ti; hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti); if(FAILED(hres)) { ERR("GetTypeInfoOfGuid failed: %08x\n", hres); return hres; } if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), ti, NULL)) ITypeInfo_Release(ti); } *typeinfo = typeinfos[tid]; ITypeInfo_AddRef(typeinfos[tid]); return S_OK; }
void release_typelib(void) { dispex_data_t *iter; unsigned i; while(!list_empty(&dispex_data_list)) { iter = LIST_ENTRY(list_head(&dispex_data_list), dispex_data_t, entry); list_remove(&iter->entry); for(i=0; i < iter->func_cnt; i++) SysFreeString(iter->funcs[i].name); heap_free(iter->funcs); heap_free(iter->name_table); heap_free(iter); } if(!typelib) return; for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) if(typeinfos[i]) ITypeInfo_Release(typeinfos[i]); ITypeLib_Release(typelib); }
static void _test_disp(unsigned line, IUnknown *unk, const IID *diid, const IID *broken_diid) { IDispatchEx *dispex; ITypeInfo *typeinfo; UINT ticnt; HRESULT hres; hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex); ok_(__FILE__,line) (hres == S_OK, "Could not get IDispatch: %08x\n", hres); if(FAILED(hres)) return; ticnt = 0xdeadbeef; hres = IDispatchEx_GetTypeInfoCount(dispex, &ticnt); ok_(__FILE__,line) (hres == S_OK, "GetTypeInfoCount failed: %08x\n", hres); ok_(__FILE__,line) (ticnt == 1, "ticnt=%u\n", ticnt); hres = IDispatchEx_GetTypeInfo(dispex, 0, 0, &typeinfo); ok_(__FILE__,line) (hres == S_OK, "GetTypeInfo failed: %08x\n", hres); if(SUCCEEDED(hres)) { TYPEATTR *type_attr; hres = ITypeInfo_GetTypeAttr(typeinfo, &type_attr); ok_(__FILE__,line) (hres == S_OK, "GetTypeAttr failed: %08x\n", hres); ok_(__FILE__,line) (IsEqualGUID(&type_attr->guid, diid) || broken(broken_diid && IsEqualGUID(&type_attr->guid, broken_diid)), "unexpected guid %s\n", wine_dbgstr_guid(&type_attr->guid)); ITypeInfo_ReleaseTypeAttr(typeinfo, type_attr); ITypeInfo_Release(typeinfo); } IDispatchEx_Release(dispex); }
static HRESULT WINAPI queryresult_Invoke( IXMLDOMNodeList *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr ) { queryresult *This = impl_from_IXMLDOMNodeList( iface ); ITypeInfo *typeinfo; HRESULT hr; TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); hr = get_typeinfo(IXMLDOMNodeList_tid, &typeinfo); if(SUCCEEDED(hr)) { hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); ITypeInfo_Release(typeinfo); } return hr; }
static HRESULT WINAPI fw_apps_Invoke( INetFwAuthorizedApplications *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr ) { fw_apps *This = impl_from_INetFwAuthorizedApplications( iface ); ITypeInfo *typeinfo; HRESULT hr; TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); hr = get_typeinfo( INetFwAuthorizedApplications_tid, &typeinfo ); if (SUCCEEDED(hr)) { hr = ITypeInfo_Invoke( typeinfo, &This->INetFwAuthorizedApplications_iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr ); ITypeInfo_Release( typeinfo ); } return hr; }
static HRESULT FolderItem_Constructor(VARIANT *dir, FolderItem **ppfi) { FolderItemImpl *This; HRESULT ret; *ppfi = NULL; This = HeapAlloc(GetProcessHeap(), 0, sizeof(FolderItemImpl)); if (!This) return E_OUTOFMEMORY; This->FolderItem_iface.lpVtbl = &FolderItemImpl_Vtbl; This->ref = 1; ret = load_type_info(&IID_FolderItem, &This->iTypeInfo); if (FAILED(ret)) { HeapFree(GetProcessHeap(), 0, This); return ret; } VariantInit(&This->dir); ret = VariantCopy(&This->dir, dir); if (FAILED(ret)) { ITypeInfo_Release(This->iTypeInfo); HeapFree(GetProcessHeap(), 0, This); return E_OUTOFMEMORY; } *ppfi = (FolderItem*)This; return ret; }
HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret ) { HRESULT hr; if (!typelib) { ITypeLib *lib; hr = LoadRegTypeLib( &LIBID_NetFwPublicTypeLib, 1, 0, LOCALE_SYSTEM_DEFAULT, &lib ); if (FAILED(hr)) { ERR("LoadRegTypeLib failed: %08x\n", hr); return hr; } if (InterlockedCompareExchangePointer( (void **)&typelib, lib, NULL )) ITypeLib_Release( lib ); } if (!typeinfo[tid]) { ITypeInfo *info; hr = ITypeLib_GetTypeInfoOfGuid( typelib, tid_id[tid], &info ); if (FAILED(hr)) { ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_id[tid]), hr); return hr; } if (InterlockedCompareExchangePointer( (void **)(typeinfo + tid), info, NULL )) ITypeInfo_Release( info ); } *ret = typeinfo[tid]; ITypeInfo_AddRef(typeinfo[tid]); return S_OK; }
static HRESULT WINAPI queryresult_GetIDsOfNames( IXMLDOMNodeList *iface, REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId ) { queryresult *This = impl_from_IXMLDOMNodeList( iface ); ITypeInfo *typeinfo; HRESULT hr; TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); if(!rgszNames || cNames == 0 || !rgDispId) return E_INVALIDARG; hr = get_typeinfo(IXMLDOMNodeList_tid, &typeinfo); if(SUCCEEDED(hr)) { hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId); ITypeInfo_Release(typeinfo); } return hr; }
HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo) { HRESULT hres; if (!typelib) { ITypeLib *tl; static const WCHAR vbscript_dll1W[] = {'v','b','s','c','r','i','p','t','.','d','l','l','\\','1',0}; hres = LoadTypeLib(vbscript_dll1W, &tl); if(FAILED(hres)) { ERR("LoadRegTypeLib failed: %08x\n", hres); return hres; } if(InterlockedCompareExchangePointer((void**)&typelib, tl, NULL)) ITypeLib_Release(tl); } if(!typeinfos[tid]) { ITypeInfo *ti; hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti); if(FAILED(hres)) { ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hres); return hres; } if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), ti, NULL)) ITypeInfo_Release(ti); } *typeinfo = typeinfos[tid]; return S_OK; }
static void test_dispatch_typeinfo(IDispatch *disp, REFIID *riid) { ITypeInfo *typeinfo; TYPEATTR *typeattr; UINT count; HRESULT hr; count = 10; hr = IDispatch_GetTypeInfoCount(disp, &count); ok(hr == S_OK, "got 0x%08x\n", hr); ok(count == 1, "got %u\n", count); hr = IDispatch_GetTypeInfo(disp, 0, LOCALE_SYSTEM_DEFAULT, &typeinfo); ok(hr == S_OK, "got 0x%08x\n", hr); hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr); ok(hr == S_OK, "got 0x%08x\n", hr); while (!IsEqualGUID(*riid, &IID_NULL)) { if (IsEqualGUID(&typeattr->guid, *riid)) break; riid++; } ok(IsEqualGUID(&typeattr->guid, *riid), "unexpected type guid %s\n", wine_dbgstr_guid(&typeattr->guid)); ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr); ITypeInfo_Release(typeinfo); }
/****************************************************************************** * GetRecordInfoFromGuids [OLEAUT32.322] * * RETURNS * Success: S_OK * Failure: E_INVALIDARG, if any argument is invalid. */ HRESULT WINAPI GetRecordInfoFromGuids(REFGUID rGuidTypeLib, ULONG uVerMajor, ULONG uVerMinor, LCID lcid, REFGUID rGuidTypeInfo, IRecordInfo** ppRecInfo) { ITypeInfo *pTypeInfo; ITypeLib *pTypeLib; HRESULT hres; TRACE("(%p,%d,%d,%d,%p,%p)\n", rGuidTypeLib, uVerMajor, uVerMinor, lcid, rGuidTypeInfo, ppRecInfo); hres = LoadRegTypeLib(rGuidTypeLib, uVerMajor, uVerMinor, lcid, &pTypeLib); if(FAILED(hres)) { WARN("LoadRegTypeLib failed!\n"); return hres; } hres = ITypeLib_GetTypeInfoOfGuid(pTypeLib, rGuidTypeInfo, &pTypeInfo); ITypeLib_Release(pTypeLib); if(FAILED(hres)) { WARN("GetTypeInfoOfGuid failed!\n"); return hres; } hres = GetRecordInfoFromTypeInfo(pTypeInfo, ppRecInfo); ITypeInfo_Release(pTypeInfo); return hres; }
static HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo) { HRESULT hres; if(!typelib) { ITypeLib *tl; hres = LoadRegTypeLib(&LIBID_MSHTML, 4, 0, LOCALE_SYSTEM_DEFAULT, &tl); if(FAILED(hres)) { ERR("LoadRegTypeLib failed: %08x\n", hres); return hres; } if(InterlockedCompareExchangePointer((void**)&typelib, tl, NULL)) ITypeLib_Release(tl); } if(!typeinfos[tid]) { ITypeInfo *typeinfo; hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &typeinfo); if(FAILED(hres)) { ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hres); return hres; } if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), typeinfo, NULL)) ITypeInfo_Release(typeinfo); } *typeinfo = typeinfos[tid]; return S_OK; }
void release_typelib(void) { unsigned i; for (i = 0; i < sizeof(typeinfo)/sizeof(*typeinfo); i++) if (typeinfo[i]) ITypeInfo_Release(typeinfo[i]); if (typelib) ITypeLib_Release(typelib); }
void release_regexp_typelib(void) { DWORD i; for(i=0; i<REGEXP_LAST_tid; i++) { if(typeinfos[i]) ITypeInfo_Release(typeinfos[i]); } if(typelib) ITypeLib_Release(typelib); }
static void process_detach(void) { if(typelib) { unsigned i; for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) if(typeinfos[i]) ITypeInfo_Release(typeinfos[i]); ITypeLib_Release(typelib); } }
static void release_typelib(void) { unsigned i; if(!typelib) return; for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) if(typeinfos[i]) ITypeInfo_Release(typeinfos[i]); ITypeLib_Release(typelib); }
static ULONG WINAPI ShellDispatch_Release(IShellDispatch2 *iface) { ShellDispatch *This = impl_from_IShellDispatch2(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p), new refcount=%i\n", iface, ref); if (!ref) { ITypeInfo_Release(This->typeinfo); HeapFree(GetProcessHeap(), 0, This); } return ref; }
static ULONG WINAPI FolderImpl_Release(Folder3 *iface) { FolderImpl *This = impl_from_Folder(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p), new refcount=%i\n", iface, ref); if (!ref) { VariantClear(&This->dir); ITypeInfo_Release(This->iTypeInfo); HeapFree(GetProcessHeap(), 0, This); } return ref; }
/****************************************************************************** * IDispatch_Release {OLEAUT32} * * See IUnknown_Release. */ static ULONG WINAPI StdDispatch_Release(LPDISPATCH iface) { StdDispatch *This = impl_from_IDispatch(iface); ULONG refCount = InterlockedDecrement(&This->ref); TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); if (!refCount) { ITypeInfo_Release(This->pTypeInfo); CoTaskMemFree(This); } return refCount; }
HRESULT WINAPI BaseControlVideoImpl_Invoke(IBasicVideo *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr) { BaseControlVideo *This = impl_from_IBasicVideo(iface); ITypeInfo *pTypeInfo; HRESULT hr; hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo); if (SUCCEEDED(hr)) { hr = ITypeInfo_Invoke(pTypeInfo, &This->IBasicVideo_iface, dispIdMember, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); ITypeInfo_Release(pTypeInfo); } return hr; }
/* map an ID to a name */ HRESULT php_com_get_id_of_name(php_com_dotnet_object *obj, char *name, size_t namelen, DISPID *dispid) { OLECHAR *olename; HRESULT hr; zval *tmp; if (namelen == -1) { namelen = strlen(name); } if (obj->id_of_name_cache && NULL != (tmp = zend_hash_str_find(obj->id_of_name_cache, name, namelen))) { *dispid = (DISPID)Z_LVAL_P(tmp); return S_OK; } olename = php_com_string_to_olestring(name, namelen, obj->code_page); if (obj->typeinfo) { hr = ITypeInfo_GetIDsOfNames(obj->typeinfo, &olename, 1, dispid); if (FAILED(hr)) { hr = IDispatch_GetIDsOfNames(V_DISPATCH(&obj->v), &IID_NULL, &olename, 1, LOCALE_SYSTEM_DEFAULT, dispid); if (SUCCEEDED(hr)) { /* fall back on IDispatch direct */ ITypeInfo_Release(obj->typeinfo); obj->typeinfo = NULL; } } } else { hr = IDispatch_GetIDsOfNames(V_DISPATCH(&obj->v), &IID_NULL, &olename, 1, LOCALE_SYSTEM_DEFAULT, dispid); } efree(olename); if (SUCCEEDED(hr)) { zval tmp; /* cache the mapping */ if (!obj->id_of_name_cache) { ALLOC_HASHTABLE(obj->id_of_name_cache); zend_hash_init(obj->id_of_name_cache, 2, NULL, NULL, 0); } ZVAL_LONG(&tmp, *dispid); zend_hash_str_update(obj->id_of_name_cache, name, namelen, &tmp); } return hr; }
static HRESULT WINAPI WshShell3_GetIDsOfNames(IWshShell3 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { ITypeInfo *typeinfo; HRESULT hr; TRACE("(%s %p %u %u %p)\n", debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); hr = get_typeinfo(IWshShell3_tid, &typeinfo); if(SUCCEEDED(hr)) { hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId); ITypeInfo_Release(typeinfo); } return hr; }
static HRESULT Folder_Constructor(VARIANT *dir, Folder **ppsdf) { FolderImpl *This; HRESULT ret; *ppsdf = NULL; switch (V_VT(dir)) { case VT_I4: /* FIXME: add some checks */ break; case VT_BSTR: if (PathIsDirectoryW(V_BSTR(dir)) && !PathIsRelativeW(V_BSTR(dir)) && PathFileExistsW(V_BSTR(dir))) break; default: return S_FALSE; } This = HeapAlloc(GetProcessHeap(), 0, sizeof(FolderImpl)); if (!This) return E_OUTOFMEMORY; This->Folder_iface.lpVtbl = &FolderImpl_Vtbl; This->ref = 1; ret = load_type_info(&IID_Folder3, &This->iTypeInfo); if (FAILED(ret)) { HeapFree(GetProcessHeap(), 0, This); return ret; } VariantInit(&This->dir); ret = VariantCopy(&This->dir, dir); if (FAILED(ret)) { ITypeInfo_Release(This->iTypeInfo); HeapFree(GetProcessHeap(), 0, This); return E_OUTOFMEMORY; } *ppsdf = (Folder*)This; return ret; }
static ULONG WINAPI IRecordInfoImpl_Release(IRecordInfo *iface) { IRecordInfoImpl *This = impl_from_IRecordInfo(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) -> %d\n", This, ref); if(!ref) { int i; for(i=0; i<This->n_vars; i++) SysFreeString(This->fields[i].name); HeapFree(GetProcessHeap(), 0, This->name); HeapFree(GetProcessHeap(), 0, This->fields); ITypeInfo_Release(This->pTypeInfo); HeapFree(GetProcessHeap(), 0, This); } return ref; }
static HRESULT WINAPI WshCollection_GetIDsOfNames(IWshCollection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { WshCollection *This = impl_from_IWshCollection(iface); ITypeInfo *typeinfo; HRESULT hr; TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); hr = get_typeinfo(IWshCollection_tid, &typeinfo); if(SUCCEEDED(hr)) { hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId); ITypeInfo_Release(typeinfo); } return hr; }