Commit 4a5eca88 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

oleaut32: Use proper helpers for iface calls.

parent d2fe8b70
......@@ -736,7 +736,7 @@ static HRESULT WINAPI PSDispatchFacBuf_QueryInterface(IPSFactoryBuffer *iface, R
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IPSFactoryBuffer))
{
IUnknown_AddRef(iface);
IPSFactoryBuffer_AddRef(iface);
*ppv = iface;
return S_OK;
}
......
......@@ -441,11 +441,11 @@ static void OLEFont_SendNotify(OLEFontImpl* this, DISPID dispID)
IFontEventsDisp *disp;
IUnknown_QueryInterface(CD.pUnk, &IID_IFontEventsDisp, (LPVOID)&disp);
IDispatch_Invoke(disp, DISPID_FONT_CHANGED, &IID_NULL,
LOCALE_NEUTRAL, INVOKE_FUNC, &dispparams, NULL,
NULL, NULL);
IFontEventsDisp_Invoke(disp, DISPID_FONT_CHANGED, &IID_NULL,
LOCALE_NEUTRAL, INVOKE_FUNC, &dispparams, NULL,
NULL, NULL);
IDispatch_Release(disp);
IFontEventsDisp_Release(disp);
IUnknown_Release(CD.pUnk);
}
VariantClear(&vararg);
......
......@@ -246,7 +246,7 @@ _marshal_interface(marshal_state *buf, REFIID riid, LPUNKNOWN pUnk) {
fail:
xsize = 0;
xbuf_add(buf,(LPBYTE)&xsize,sizeof(xsize));
if (pStm) IUnknown_Release(pStm);
if (pStm) IStream_Release(pStm);
HeapFree(GetProcessHeap(), 0, tempbuf);
return hres;
}
......@@ -848,7 +848,7 @@ serialize_param(
ELEMDESC *elem2;
TYPEDESC *tdesc2;
hres = ITypeInfo2_GetVarDesc(tinfo2, i, &vdesc);
hres = ITypeInfo_GetVarDesc(tinfo2, i, &vdesc);
if (hres) {
ERR("Could not get vardesc of %d\n",i);
return hres;
......@@ -1138,7 +1138,7 @@ deserialize_param(
for (i=0;i<tattr->cVars;i++) {
VARDESC *vdesc;
hres = ITypeInfo2_GetVarDesc(tinfo2, i, &vdesc);
hres = ITypeInfo_GetVarDesc(tinfo2, i, &vdesc);
if (hres) {
ERR("Could not get vardesc of %d\n",i);
ITypeInfo_ReleaseTypeAttr(tinfo2, tattr);
......@@ -1154,7 +1154,7 @@ deserialize_param(
(DWORD*)(((LPBYTE)arg)+vdesc->u.oInst),
buf
);
ITypeInfo2_ReleaseVarDesc(tinfo2, vdesc);
ITypeInfo_ReleaseVarDesc(tinfo2, vdesc);
if (debugout && (i<tattr->cVars-1)) TRACE_(olerelay)(",");
}
if (debugout) TRACE_(olerelay)("}");
......@@ -1604,13 +1604,13 @@ static inline TMarshalDispatchChannel *impl_from_IRpcChannelBuffer(IRpcChannelBu
return CONTAINING_RECORD(iface, TMarshalDispatchChannel, IRpcChannelBuffer_iface);
}
static HRESULT WINAPI TMarshalDispatchChannel_QueryInterface(LPRPCCHANNELBUFFER iface, REFIID riid, LPVOID *ppv)
static HRESULT WINAPI TMarshalDispatchChannel_QueryInterface(IRpcChannelBuffer *iface, REFIID riid, LPVOID *ppv)
{
*ppv = NULL;
if (IsEqualIID(riid,&IID_IRpcChannelBuffer) || IsEqualIID(riid,&IID_IUnknown))
{
*ppv = iface;
IUnknown_AddRef(iface);
IRpcChannelBuffer_AddRef(iface);
return S_OK;
}
return E_NOINTERFACE;
......
......@@ -446,7 +446,7 @@ HRESULT WINAPI LoadTypeLibEx(
case REGKIND_REGISTER:
if (FAILED(res = RegisterTypeLib(*pptLib, szPath, NULL)))
{
IUnknown_Release(*pptLib);
ITypeLib_Release(*pptLib);
*pptLib = 0;
}
break;
......@@ -2913,7 +2913,7 @@ static HRESULT TLB_ReadTypeLib(LPCWSTR pszFileName, LPWSTR pszPath, UINT cchPath
{
TRACE("cache hit\n");
*ppTypeLib = (ITypeLib2*)entry;
ITypeLib_AddRef(*ppTypeLib);
ITypeLib2_AddRef(*ppTypeLib);
LeaveCriticalSection(&cache_section);
return S_OK;
}
......@@ -4828,7 +4828,7 @@ static HRESULT WINAPI ITypeLibComp_fnQueryInterface(ITypeComp * iface, REFIID ri
{
ITypeLibImpl *This = impl_from_ITypeComp(iface);
return ITypeLib2_QueryInterface((ITypeLib *)This, riid, ppv);
return ITypeLib2_QueryInterface((ITypeLib2 *)This, riid, ppv);
}
static ULONG WINAPI ITypeLibComp_fnAddRef(ITypeComp * iface)
......@@ -5068,7 +5068,7 @@ static HRESULT WINAPI ITypeInfo_fnQueryInterface(
*ppvObject = This;
if(*ppvObject){
ITypeInfo_AddRef(iface);
ITypeInfo2_AddRef(iface);
TRACE("-- Interface: (%p)->(%p)\n",ppvObject,*ppvObject);
return S_OK;
}
......@@ -5598,8 +5598,7 @@ static HRESULT WINAPI ITypeInfo_fnGetNames( ITypeInfo2 *iface, MEMBERID memid,
/* recursive search */
ITypeInfo *pTInfo;
HRESULT result;
result=ITypeInfo_GetRefTypeInfo(iface, This->impltypes[0].hRef,
&pTInfo);
result = ITypeInfo2_GetRefTypeInfo(iface, This->impltypes[0].hRef, &pTInfo);
if(SUCCEEDED(result))
{
result=ITypeInfo_GetNames(pTInfo, memid, rgBstrNames, cMaxNames, pcNames);
......@@ -5751,8 +5750,7 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( ITypeInfo2 *iface,
if(This->impltypes) {
/* recursive search */
ITypeInfo *pTInfo;
ret=ITypeInfo_GetRefTypeInfo(iface,
This->impltypes[0].hRef, &pTInfo);
ret = ITypeInfo2_GetRefTypeInfo(iface, This->impltypes[0].hRef, &pTInfo);
if(SUCCEEDED(ret)){
ret=ITypeInfo_GetIDsOfNames(pTInfo, rgszNames, cNames, pMemId );
ITypeInfo_Release(pTInfo);
......@@ -6750,7 +6748,7 @@ func_fail:
if(This->impltypes) {
/* recursive search */
ITypeInfo *pTInfo;
hres = ITypeInfo_GetRefTypeInfo(iface, This->impltypes[0].hRef, &pTInfo);
hres = ITypeInfo2_GetRefTypeInfo(iface, This->impltypes[0].hRef, &pTInfo);
if(SUCCEEDED(hres)){
hres = ITypeInfo_Invoke(pTInfo,pIUnk,memid,wFlags,pDispParams,pVarResult,pExcepInfo,pArgErr);
ITypeInfo_Release(pTInfo);
......@@ -6818,8 +6816,7 @@ static HRESULT WINAPI ITypeInfo_fnGetDocumentation( ITypeInfo2 *iface,
/* recursive search */
ITypeInfo *pTInfo;
HRESULT result;
result = ITypeInfo_GetRefTypeInfo(iface, This->impltypes[0].hRef,
&pTInfo);
result = ITypeInfo2_GetRefTypeInfo(iface, This->impltypes[0].hRef, &pTInfo);
if(SUCCEEDED(result)) {
result = ITypeInfo_GetDocumentation(pTInfo, memid, pBstrName,
pBstrDocString, pdwHelpContext, pBstrHelpFile);
......@@ -6983,12 +6980,12 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo(
if(ref_type->pImpTLInfo == TLB_REF_INTERNAL) {
UINT Index;
result = ITypeInfo_GetContainingTypeLib(iface, &pTLib, &Index);
result = ITypeInfo2_GetContainingTypeLib(iface, &pTLib, &Index);
} else {
if(ref_type->pImpTLInfo->pImpTypeLib) {
TRACE("typeinfo in imported typelib that is already loaded\n");
pTLib = (ITypeLib*)ref_type->pImpTLInfo->pImpTypeLib;
ITypeLib2_AddRef(pTLib);
ITypeLib_AddRef(pTLib);
result = S_OK;
} else {
TRACE("typeinfo in imported typelib that isn't already loaded\n");
......@@ -7005,21 +7002,18 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo(
}
if(SUCCEEDED(result)) {
ref_type->pImpTLInfo->pImpTypeLib = (ITypeLibImpl*)pTLib;
ITypeLib2_AddRef(pTLib);
ITypeLib_AddRef(pTLib);
}
}
}
if(SUCCEEDED(result)) {
if(ref_type->index == TLB_REF_USE_GUID)
result = ITypeLib2_GetTypeInfoOfGuid(pTLib,
&ref_type->guid,
ppTInfo);
result = ITypeLib_GetTypeInfoOfGuid(pTLib, &ref_type->guid, ppTInfo);
else
result = ITypeLib2_GetTypeInfo(pTLib, ref_type->index,
ppTInfo);
result = ITypeLib_GetTypeInfo(pTLib, ref_type->index, ppTInfo);
}
if (pTLib != NULL)
ITypeLib2_Release(pTLib);
ITypeLib_Release(pTLib);
}
}
......@@ -7045,7 +7039,7 @@ static HRESULT WINAPI ITypeInfo_fnAddressOfMember( ITypeInfo2 *iface,
TRACE("(%p)->(0x%x, 0x%x, %p)\n", This, memid, invKind, ppv);
hr = ITypeInfo_GetDllEntry(iface, memid, invKind, &dll, &entry, &ordinal);
hr = ITypeInfo2_GetDllEntry(iface, memid, invKind, &dll, &entry, &ordinal);
if (FAILED(hr))
return hr;
......@@ -7110,7 +7104,7 @@ static HRESULT WINAPI ITypeInfo_fnCreateInstance( ITypeInfo2 *iface,
return CLASS_E_NOAGGREGATION;
}
hr = ITypeInfo_GetTypeAttr(iface, &pTA);
hr = ITypeInfo2_GetTypeAttr(iface, &pTA);
if(FAILED(hr)) return hr;
if(pTA->typekind != TKIND_COCLASS)
......@@ -7139,7 +7133,7 @@ static HRESULT WINAPI ITypeInfo_fnCreateInstance( ITypeInfo2 *iface,
riid, ppvObj);
end:
ITypeInfo_ReleaseTypeAttr(iface, pTA);
ITypeInfo2_ReleaseTypeAttr(iface, pTA);
return hr;
}
......@@ -7174,7 +7168,7 @@ static HRESULT WINAPI ITypeInfo_fnGetContainingTypeLib( ITypeInfo2 *iface,
if (ppTLib) {
*ppTLib=(LPTYPELIB )(This->pTypeLib);
ITypeLib2_AddRef(*ppTLib);
ITypeLib_AddRef(*ppTLib);
TRACE("returning ppTLib=%p\n", *ppTLib);
}
......
......@@ -1488,7 +1488,7 @@ static HRESULT ctl2_find_typeinfo_from_offset(
for (typeinfo = This->typeinfos; typeinfo; typeinfo = typeinfo->next_typeinfo) {
if (typeinfo->typeinfo == typeinfodata) {
*ppTinfo = (ITypeInfo *)&typeinfo->ITypeInfo2_iface;
ITypeInfo2_AddRef(*ppTinfo);
ITypeInfo_AddRef(*ppTinfo);
return S_OK;
}
}
......@@ -2663,7 +2663,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut(
ITypeInfo *cur, *next;
TYPEATTR *typeattr;
hres = ICreateTypeInfo_QueryInterface(iface, &IID_ITypeInfo, (void**)&next);
hres = ICreateTypeInfo2_QueryInterface(iface, &IID_ITypeInfo, (void**)&next);
if(FAILED(hres))
return hres;
......@@ -2712,7 +2712,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnLayOut(
ITypeInfo *cur, *inherited;
TYPEATTR *typeattr;
hres = ICreateTypeInfo_QueryInterface(iface, &IID_ITypeInfo, (void**)&cur);
hres = ICreateTypeInfo2_QueryInterface(iface, &IID_ITypeInfo, (void**)&cur);
if(FAILED(hres))
return hres;
......@@ -3202,7 +3202,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetTypeAttr(
if(!ppTypeAttr)
return E_INVALIDARG;
hres = ICreateTypeInfo_LayOut(&This->ICreateTypeInfo2_iface);
hres = ICreateTypeInfo2_LayOut(&This->ICreateTypeInfo2_iface);
if(FAILED(hres))
return hres;
......@@ -3653,7 +3653,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetRefTypeInfo(
if(This->typelib->typelib_typeinfo_offsets[i] == (hRefType&(~0x3))) {
*ppTInfo = (ITypeInfo *)&iter->ITypeInfo2_iface;
ITypeLib_AddRef(*ppTInfo);
ITypeInfo_AddRef(*ppTInfo);
return S_OK;
}
i++;
......@@ -4959,7 +4959,7 @@ static HRESULT WINAPI ITypeLib2_fnGetDocumentation(
if(!iter)
return TYPE_E_ELEMENTNOTFOUND;
return ITypeInfo_GetDocumentation(&iter->ITypeInfo2_iface,
return ITypeInfo2_GetDocumentation(&iter->ITypeInfo2_iface,
-1, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
}
......
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