[PATCH 4/5] ddrawex: Avoid LPVOID.
Henri Verbeet
hverbeet at codeweavers.com
Thu Sep 12 02:20:54 CDT 2013
---
dlls/ddrawex/ddrawex_private.h | 2 +-
dlls/ddrawex/main.c | 23 +++++++++--------------
dlls/ddrawex/tests/ddrawex.c | 2 +-
dlls/ddrawex/tests/ddrawex.h | 2 +-
dlls/ddrawex/tests/surface.c | 2 +-
5 files changed, 13 insertions(+), 18 deletions(-)
diff --git a/dlls/ddrawex/ddrawex_private.h b/dlls/ddrawex/ddrawex_private.h
index 9fbb37f..be602b5 100644
--- a/dlls/ddrawex/ddrawex_private.h
+++ b/dlls/ddrawex/ddrawex_private.h
@@ -30,7 +30,7 @@ DECLARE_INTERFACE_(IDirectDrawFactory, IUnknown)
STDMETHOD_(ULONG, Release)(THIS) PURE;
STDMETHOD(CreateDirectDraw)(THIS_ GUID * pGUID, HWND hWnd, DWORD dwCoopLevelFlags,
DWORD dwReserved, IUnknown *pUnkOuter, IDirectDraw **ppDirectDraw) PURE;
- STDMETHOD(_DirectDrawEnumerate)(THIS_ LPDDENUMCALLBACKW lpCallback, LPVOID lpContext) PURE;
+ STDMETHOD(_DirectDrawEnumerate)(THIS_ LPDDENUMCALLBACKW cb, void *ctx) PURE;
};
#undef INTERFACE
diff --git a/dlls/ddrawex/main.c b/dlls/ddrawex/main.c
index d1c0fda..be989ef 100644
--- a/dlls/ddrawex/main.c
+++ b/dlls/ddrawex/main.c
@@ -43,7 +43,7 @@ typedef struct
{
IClassFactory IClassFactory_iface;
LONG ref;
- HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, REFIID iid, LPVOID *ppObj);
+ HRESULT (*pfnCreateInstance)(IUnknown *outer, REFIID iid, void **out);
} IClassFactoryImpl;
static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
@@ -215,13 +215,8 @@ static ULONG WINAPI IDirectDrawFactoryImpl_Release(IDirectDrawFactory *iface)
return ref;
}
-/*******************************************************************************
- * IDirectDrawFactoryImpl_DirectDrawEnumerate
- *******************************************************************************/
-static HRESULT WINAPI
-IDirectDrawFactoryImpl_DirectDrawEnumerate(IDirectDrawFactory* iface,
- LPDDENUMCALLBACKW lpCallback,
- LPVOID lpContext)
+static HRESULT WINAPI IDirectDrawFactoryImpl_DirectDrawEnumerate(IDirectDrawFactory *iface,
+ LPDDENUMCALLBACKW cb, void *ctx)
{
FIXME("Stub!\n");
return E_FAIL;
@@ -286,11 +281,11 @@ HRESULT WINAPI DllCanUnloadNow(void)
/*******************************************************************************
* DllGetClassObject [DDRAWEX.@]
*/
-HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **out)
{
IClassFactoryImpl *factory;
- TRACE("ddrawex (%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
+ TRACE("rclsid %s, riid %s, out %p.\n", debugstr_guid(rclsid), debugstr_guid(riid), out);
if (!IsEqualGUID( &IID_IClassFactory, riid)
&& !IsEqualGUID( &IID_IUnknown, riid))
@@ -310,7 +305,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
factory->pfnCreateInstance = CreateDirectDrawFactory;
- *ppv = factory;
+ *out = factory;
return S_OK;
}
@@ -319,13 +314,13 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
/***********************************************************************
* DllMain
*/
-BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, LPVOID lpv)
+BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
- instance = hInstDLL;
- DisableThreadLibraryCalls( hInstDLL );
+ instance = inst;
+ DisableThreadLibraryCalls( inst );
break;
}
return TRUE;
diff --git a/dlls/ddrawex/tests/ddrawex.c b/dlls/ddrawex/tests/ddrawex.c
index 7a6440b..c07e694 100644
--- a/dlls/ddrawex/tests/ddrawex.c
+++ b/dlls/ddrawex/tests/ddrawex.c
@@ -25,7 +25,7 @@
#include "unknwn.h"
static IDirectDrawFactory *factory;
-static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
+static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID rclsid, REFIID riid, void **out);
static IDirectDraw *createDD(void)
{
diff --git a/dlls/ddrawex/tests/ddrawex.h b/dlls/ddrawex/tests/ddrawex.h
index f57adcf..15dd812 100644
--- a/dlls/ddrawex/tests/ddrawex.h
+++ b/dlls/ddrawex/tests/ddrawex.h
@@ -30,7 +30,7 @@ DECLARE_INTERFACE_(IDirectDrawFactory, IUnknown)
STDMETHOD_(ULONG, Release)(THIS) PURE;
STDMETHOD(CreateDirectDraw)(THIS_ GUID * pGUID, HWND hWnd, DWORD dwCoopLevelFlags,
DWORD dwReserved, IUnknown *pUnkOuter, IDirectDraw **ppDirectDraw) PURE;
- STDMETHOD(_DirectDrawEnumerate)(THIS_ LPDDENUMCALLBACKW lpCallback, LPVOID lpContext) PURE;
+ STDMETHOD(_DirectDrawEnumerate)(THIS_ LPDDENUMCALLBACKW cb, void *ctx) PURE;
};
#undef INTERFACE
diff --git a/dlls/ddrawex/tests/surface.c b/dlls/ddrawex/tests/surface.c
index ecf0084..d81bc4e 100644
--- a/dlls/ddrawex/tests/surface.c
+++ b/dlls/ddrawex/tests/surface.c
@@ -27,7 +27,7 @@
#include "unknwn.h"
static IDirectDrawFactory *factory;
-static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
+static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID rclsid, REFIID riid, void **out);
static IDirectDraw *createDD(void)
{
--
1.7.10.4
More information about the wine-patches
mailing list