From 1f60e14c78a44d9e4d889619dfc328a9e88b4df1 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 13 Aug 2012 11:11:26 +0200 Subject: [PATCH] inetcomm: Use proper iface call helpers. --- dlls/inetcomm/imaptransport.c | 14 +++++++------- dlls/inetcomm/mimeole.c | 6 +++--- dlls/inetcomm/pop3transport.c | 4 ++-- dlls/inetcomm/smtptransport.c | 4 ++-- dlls/inetcomm/tests/mimeole.c | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/inetcomm/imaptransport.c b/dlls/inetcomm/imaptransport.c index 4cef0838d2..0da456eac8 100644 --- a/dlls/inetcomm/imaptransport.c +++ b/dlls/inetcomm/imaptransport.c @@ -50,7 +50,7 @@ static HRESULT WINAPI IMAPTransport_QueryInterface(IIMAPTransport *iface, REFIID IsEqualIID(riid, &IID_IIMAPTransport)) { *ppv = iface; - IUnknown_AddRef(iface); + IIMAPTransport_AddRef(iface); return S_OK; } *ppv = NULL; @@ -443,30 +443,30 @@ HRESULT WINAPI CreateIMAPTransport(IIMAPTransport **ppTransport) return S_OK; } -static HRESULT WINAPI IMAPTransportCF_QueryInterface(LPCLASSFACTORY iface, +static HRESULT WINAPI IMAPTransportCF_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppv) { *ppv = NULL; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) { *ppv = iface; - IUnknown_AddRef(iface); + IClassFactory_AddRef(iface); return S_OK; } return E_NOINTERFACE; } -static ULONG WINAPI IMAPTransportCF_AddRef(LPCLASSFACTORY iface) +static ULONG WINAPI IMAPTransportCF_AddRef(IClassFactory *iface) { 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 */ } -static HRESULT WINAPI IMAPTransportCF_CreateInstance(LPCLASSFACTORY iface, +static HRESULT WINAPI IMAPTransportCF_CreateInstance(IClassFactory *iface, LPUNKNOWN pUnk, REFIID riid, LPVOID *ppv) { HRESULT hr; @@ -489,7 +489,7 @@ static HRESULT WINAPI IMAPTransportCF_CreateInstance(LPCLASSFACTORY iface, 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); return S_OK; diff --git a/dlls/inetcomm/mimeole.c b/dlls/inetcomm/mimeole.c index 8a1e3d4d26..ac4142acbd 100644 --- a/dlls/inetcomm/mimeole.c +++ b/dlls/inetcomm/mimeole.c @@ -1448,7 +1448,7 @@ static HRESULT WINAPI MimeMessage_QueryInterface(IMimeMessage *iface, REFIID rii IsEqualIID(riid, &IID_IMimeMessage)) { *ppv = iface; - IUnknown_AddRef(iface); + IMimeMessage_AddRef(iface); return S_OK; } @@ -2619,7 +2619,7 @@ static HRESULT WINAPI MimeSecurity_QueryInterface( IsEqualIID(riid, &IID_IMimeSecurity)) { *obj = iface; - IUnknown_AddRef(iface); + IMimeSecurity_AddRef(iface); return S_OK; } @@ -2807,7 +2807,7 @@ static HRESULT WINAPI MimeAlloc_QueryInterface( IsEqualIID(riid, &IID_IMimeAllocator)) { *obj = iface; - IUnknown_AddRef(iface); + IMimeAllocator_AddRef(iface); return S_OK; } diff --git a/dlls/inetcomm/pop3transport.c b/dlls/inetcomm/pop3transport.c index af7d1bf91c..bdae830612 100644 --- a/dlls/inetcomm/pop3transport.c +++ b/dlls/inetcomm/pop3transport.c @@ -729,7 +729,7 @@ static HRESULT WINAPI POP3Transport_QueryInterface(IPOP3Transport *iface, REFIID IsEqualIID(riid, &IID_IPOP3Transport)) { *ppv = iface; - IUnknown_AddRef(iface); + IPOP3Transport_AddRef(iface); return S_OK; } *ppv = NULL; @@ -1139,7 +1139,7 @@ static HRESULT WINAPI POP3TransportCF_QueryInterface(LPCLASSFACTORY iface, if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) { *ppv = iface; - IUnknown_AddRef(iface); + IClassFactory_AddRef(iface); return S_OK; } return E_NOINTERFACE; diff --git a/dlls/inetcomm/smtptransport.c b/dlls/inetcomm/smtptransport.c index d17419f295..c88ac9c65c 100644 --- a/dlls/inetcomm/smtptransport.c +++ b/dlls/inetcomm/smtptransport.c @@ -532,7 +532,7 @@ static HRESULT WINAPI SMTPTransport_QueryInterface(ISMTPTransport2 *iface, REFII IsEqualIID(riid, &IID_ISMTPTransport2)) { *ppv = iface; - IUnknown_AddRef(iface); + ISMTPTransport2_AddRef(iface); return S_OK; } *ppv = NULL; @@ -989,7 +989,7 @@ static HRESULT WINAPI SMTPTransportCF_QueryInterface(LPCLASSFACTORY iface, if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) { *ppv = iface; - IUnknown_AddRef(iface); + IClassFactory_AddRef(iface); return S_OK; } return E_NOINTERFACE; diff --git a/dlls/inetcomm/tests/mimeole.c b/dlls/inetcomm/tests/mimeole.c index a53ab233f4..389e267e6c 100644 --- a/dlls/inetcomm/tests/mimeole.c +++ b/dlls/inetcomm/tests/mimeole.c @@ -314,7 +314,7 @@ static void test_CreateMessage(void) ok(count == 2, "got %d\n", count); CoTaskMemFree(body_list); - hr = IMimeMessage_GetCharset(body, &hcs); + hr = IMimeBody_GetCharset(body, &hcs); ok(hr == S_OK, "ret %08x\n", hr); todo_wine {