From 545f83bc8f693c227347d14cfdf51dc98fd04681 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 12 Sep 2013 09:20:54 +0200 Subject: [PATCH] ddrawex: Avoid LPVOID. --- 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 9fbb37fc3fb..be602b5e0ec 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 d1c0fda2d3a..be989ef5d15 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 7a6440b4757..c07e69455ba 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 f57adcff7fc..15dd812e522 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 ecf0084b7b4..d81bc4e63b2 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) {