inetcomm: Use proper iface call helpers.

This commit is contained in:
Jacek Caban 2012-08-13 11:11:26 +02:00 committed by Alexandre Julliard
parent e02c33164d
commit 1f60e14c78
5 changed files with 15 additions and 15 deletions

View File

@ -50,7 +50,7 @@ static HRESULT WINAPI IMAPTransport_QueryInterface(IIMAPTransport *iface, REFIID
IsEqualIID(riid, &IID_IIMAPTransport)) IsEqualIID(riid, &IID_IIMAPTransport))
{ {
*ppv = iface; *ppv = iface;
IUnknown_AddRef(iface); IIMAPTransport_AddRef(iface);
return S_OK; return S_OK;
} }
*ppv = NULL; *ppv = NULL;
@ -443,30 +443,30 @@ HRESULT WINAPI CreateIMAPTransport(IIMAPTransport **ppTransport)
return S_OK; return S_OK;
} }
static HRESULT WINAPI IMAPTransportCF_QueryInterface(LPCLASSFACTORY iface, static HRESULT WINAPI IMAPTransportCF_QueryInterface(IClassFactory *iface,
REFIID riid, LPVOID *ppv) REFIID riid, LPVOID *ppv)
{ {
*ppv = NULL; *ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory))
{ {
*ppv = iface; *ppv = iface;
IUnknown_AddRef(iface); IClassFactory_AddRef(iface);
return S_OK; return S_OK;
} }
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG WINAPI IMAPTransportCF_AddRef(LPCLASSFACTORY iface) static ULONG WINAPI IMAPTransportCF_AddRef(IClassFactory *iface)
{ {
return 2; /* non-heap based object */ return 2; /* non-heap based object */
} }
static ULONG WINAPI IMAPTransportCF_Release(LPCLASSFACTORY iface) static ULONG WINAPI IMAPTransportCF_Release(IClassFactory *iface)
{ {
return 1; /* non-heap based object */ return 1; /* non-heap based object */
} }
static HRESULT WINAPI IMAPTransportCF_CreateInstance(LPCLASSFACTORY iface, static HRESULT WINAPI IMAPTransportCF_CreateInstance(IClassFactory *iface,
LPUNKNOWN pUnk, REFIID riid, LPVOID *ppv) LPUNKNOWN pUnk, REFIID riid, LPVOID *ppv)
{ {
HRESULT hr; HRESULT hr;
@ -489,7 +489,7 @@ static HRESULT WINAPI IMAPTransportCF_CreateInstance(LPCLASSFACTORY iface,
return hr; return hr;
} }
static HRESULT WINAPI IMAPTransportCF_LockServer(LPCLASSFACTORY iface, BOOL fLock) static HRESULT WINAPI IMAPTransportCF_LockServer(IClassFactory *iface, BOOL fLock)
{ {
FIXME("(%d), stub!\n",fLock); FIXME("(%d), stub!\n",fLock);
return S_OK; return S_OK;

View File

@ -1448,7 +1448,7 @@ static HRESULT WINAPI MimeMessage_QueryInterface(IMimeMessage *iface, REFIID rii
IsEqualIID(riid, &IID_IMimeMessage)) IsEqualIID(riid, &IID_IMimeMessage))
{ {
*ppv = iface; *ppv = iface;
IUnknown_AddRef(iface); IMimeMessage_AddRef(iface);
return S_OK; return S_OK;
} }
@ -2619,7 +2619,7 @@ static HRESULT WINAPI MimeSecurity_QueryInterface(
IsEqualIID(riid, &IID_IMimeSecurity)) IsEqualIID(riid, &IID_IMimeSecurity))
{ {
*obj = iface; *obj = iface;
IUnknown_AddRef(iface); IMimeSecurity_AddRef(iface);
return S_OK; return S_OK;
} }
@ -2807,7 +2807,7 @@ static HRESULT WINAPI MimeAlloc_QueryInterface(
IsEqualIID(riid, &IID_IMimeAllocator)) IsEqualIID(riid, &IID_IMimeAllocator))
{ {
*obj = iface; *obj = iface;
IUnknown_AddRef(iface); IMimeAllocator_AddRef(iface);
return S_OK; return S_OK;
} }

View File

@ -729,7 +729,7 @@ static HRESULT WINAPI POP3Transport_QueryInterface(IPOP3Transport *iface, REFIID
IsEqualIID(riid, &IID_IPOP3Transport)) IsEqualIID(riid, &IID_IPOP3Transport))
{ {
*ppv = iface; *ppv = iface;
IUnknown_AddRef(iface); IPOP3Transport_AddRef(iface);
return S_OK; return S_OK;
} }
*ppv = NULL; *ppv = NULL;
@ -1139,7 +1139,7 @@ static HRESULT WINAPI POP3TransportCF_QueryInterface(LPCLASSFACTORY iface,
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory))
{ {
*ppv = iface; *ppv = iface;
IUnknown_AddRef(iface); IClassFactory_AddRef(iface);
return S_OK; return S_OK;
} }
return E_NOINTERFACE; return E_NOINTERFACE;

View File

@ -532,7 +532,7 @@ static HRESULT WINAPI SMTPTransport_QueryInterface(ISMTPTransport2 *iface, REFII
IsEqualIID(riid, &IID_ISMTPTransport2)) IsEqualIID(riid, &IID_ISMTPTransport2))
{ {
*ppv = iface; *ppv = iface;
IUnknown_AddRef(iface); ISMTPTransport2_AddRef(iface);
return S_OK; return S_OK;
} }
*ppv = NULL; *ppv = NULL;
@ -989,7 +989,7 @@ static HRESULT WINAPI SMTPTransportCF_QueryInterface(LPCLASSFACTORY iface,
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory))
{ {
*ppv = iface; *ppv = iface;
IUnknown_AddRef(iface); IClassFactory_AddRef(iface);
return S_OK; return S_OK;
} }
return E_NOINTERFACE; return E_NOINTERFACE;

View File

@ -314,7 +314,7 @@ static void test_CreateMessage(void)
ok(count == 2, "got %d\n", count); ok(count == 2, "got %d\n", count);
CoTaskMemFree(body_list); CoTaskMemFree(body_list);
hr = IMimeMessage_GetCharset(body, &hcs); hr = IMimeBody_GetCharset(body, &hcs);
ok(hr == S_OK, "ret %08x\n", hr); ok(hr == S_OK, "ret %08x\n", hr);
todo_wine todo_wine
{ {