Commit f7c13328 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

devenum: Remove superfluous pointer casts.

parent b5e905a6
...@@ -71,7 +71,7 @@ static HRESULT WINAPI DEVENUM_ICreateDevEnum_QueryInterface( ...@@ -71,7 +71,7 @@ static HRESULT WINAPI DEVENUM_ICreateDevEnum_QueryInterface(
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_ICreateDevEnum)) IsEqualGUID(riid, &IID_ICreateDevEnum))
{ {
*ppvObj = (LPVOID)iface; *ppvObj = iface;
DEVENUM_ICreateDevEnum_AddRef(iface); DEVENUM_ICreateDevEnum_AddRef(iface);
return S_OK; return S_OK;
} }
......
...@@ -154,7 +154,7 @@ HRESULT WINAPI DllRegisterServer(void) ...@@ -154,7 +154,7 @@ HRESULT WINAPI DllRegisterServer(void)
static const WCHAR friendlyextrend[] = {'E','x','t','e','r','n','a','l',' ','R','e','n','d','e','r','e','r','s',0}; static const WCHAR friendlyextrend[] = {'E','x','t','e','r','n','a','l',' ','R','e','n','d','e','r','e','r','s',0};
static const WCHAR friendlydevctrl[] = {'D','e','v','i','c','e',' ','C','o','n','t','r','o','l',' ','F','i','l','t','e','r','s',0}; static const WCHAR friendlydevctrl[] = {'D','e','v','i','c','e',' ','C','o','n','t','r','o','l',' ','F','i','l','t','e','r','s',0};
pMapper = (IFilterMapper2*)mapvptr; pMapper = mapvptr;
IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_DO_NOT_USE, friendlyvidcap); IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_DO_NOT_USE, friendlyvidcap);
IFilterMapper2_CreateCategory(pMapper, &CLSID_LegacyAmFilterCategory, MERIT_NORMAL, friendlydshow); IFilterMapper2_CreateCategory(pMapper, &CLSID_LegacyAmFilterCategory, MERIT_NORMAL, friendlydshow);
......
...@@ -40,7 +40,7 @@ static HRESULT WINAPI DEVENUM_IClassFactory_QueryInterface( ...@@ -40,7 +40,7 @@ static HRESULT WINAPI DEVENUM_IClassFactory_QueryInterface(
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IClassFactory)) IsEqualGUID(riid, &IID_IClassFactory))
{ {
*ppvObj = (LPVOID)iface; *ppvObj = iface;
IClassFactory_AddRef(iface); IClassFactory_AddRef(iface);
return S_OK; return S_OK;
} }
......
...@@ -56,7 +56,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_QueryInterface( ...@@ -56,7 +56,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_QueryInterface(
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IPropertyBag)) IsEqualGUID(riid, &IID_IPropertyBag))
{ {
*ppvObj = (LPVOID)iface; *ppvObj = iface;
DEVENUM_IPropertyBag_AddRef(iface); DEVENUM_IPropertyBag_AddRef(iface);
return S_OK; return S_OK;
} }
...@@ -122,7 +122,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read( ...@@ -122,7 +122,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read(
pData = HeapAlloc(GetProcessHeap(), 0, received); pData = HeapAlloc(GetProcessHeap(), 0, received);
/* work around a GCC bug that occurs here unless we use the reswin32 variable as well */ /* work around a GCC bug that occurs here unless we use the reswin32 variable as well */
reswin32 = RegQueryValueExW(This->hkey, pszPropName, NULL, &type, (LPBYTE)pData, &received); reswin32 = RegQueryValueExW(This->hkey, pszPropName, NULL, &type, pData, &received);
res = HRESULT_FROM_WIN32(reswin32); res = HRESULT_FROM_WIN32(reswin32);
} }
...@@ -130,7 +130,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read( ...@@ -130,7 +130,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read(
{ {
res = E_INVALIDARG; /* assume we cannot coerce into right type */ res = E_INVALIDARG; /* assume we cannot coerce into right type */
TRACE("Read %d bytes (%s)\n", received, type == REG_SZ ? debugstr_w((LPWSTR)pData) : "binary data"); TRACE("Read %d bytes (%s)\n", received, type == REG_SZ ? debugstr_w(pData) : "binary data");
switch (type) switch (type)
{ {
...@@ -139,14 +139,14 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read( ...@@ -139,14 +139,14 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read(
{ {
case VT_LPWSTR: case VT_LPWSTR:
V_UNION(pVar, bstrVal) = CoTaskMemAlloc(received); V_UNION(pVar, bstrVal) = CoTaskMemAlloc(received);
memcpy(V_UNION(pVar, bstrVal), (LPWSTR)pData, received); memcpy(V_UNION(pVar, bstrVal), pData, received);
res = S_OK; res = S_OK;
break; break;
case VT_EMPTY: case VT_EMPTY:
V_VT(pVar) = VT_BSTR; V_VT(pVar) = VT_BSTR;
/* fall through */ /* fall through */
case VT_BSTR: case VT_BSTR:
V_UNION(pVar, bstrVal) = SysAllocStringLen((LPWSTR)pData, received/sizeof(WCHAR) - 1); V_UNION(pVar, bstrVal) = SysAllocStringLen(pData, received/sizeof(WCHAR) - 1);
res = S_OK; res = S_OK;
break; break;
} }
...@@ -224,14 +224,14 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Write( ...@@ -224,14 +224,14 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Write(
{ {
case VT_BSTR: case VT_BSTR:
TRACE("writing %s\n", debugstr_w(V_UNION(pVar, bstrVal))); TRACE("writing %s\n", debugstr_w(V_UNION(pVar, bstrVal)));
lpData = (LPVOID)V_UNION(pVar, bstrVal); lpData = V_UNION(pVar, bstrVal);
dwType = REG_SZ; dwType = REG_SZ;
cbData = (lstrlenW(V_UNION(pVar, bstrVal)) + 1) * sizeof(WCHAR); cbData = (lstrlenW(V_UNION(pVar, bstrVal)) + 1) * sizeof(WCHAR);
break; break;
case VT_I4: case VT_I4:
case VT_UI4: case VT_UI4:
TRACE("writing %u\n", V_UNION(pVar, ulVal)); TRACE("writing %u\n", V_UNION(pVar, ulVal));
lpData = (LPVOID)&V_UNION(pVar, ulVal); lpData = &V_UNION(pVar, ulVal);
dwType = REG_DWORD; dwType = REG_DWORD;
cbData = sizeof(DWORD); cbData = sizeof(DWORD);
break; break;
...@@ -303,7 +303,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_QueryInterface( ...@@ -303,7 +303,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_QueryInterface(
IsEqualGUID(riid, &IID_IPersistStream) || IsEqualGUID(riid, &IID_IPersistStream) ||
IsEqualGUID(riid, &IID_IMoniker)) IsEqualGUID(riid, &IID_IMoniker))
{ {
*ppvObj = (LPVOID)iface; *ppvObj = iface;
DEVENUM_IMediaCatMoniker_AddRef(iface); DEVENUM_IMediaCatMoniker_AddRef(iface);
return S_OK; return S_OK;
} }
...@@ -412,7 +412,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject( ...@@ -412,7 +412,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(
/* first activation of this class */ /* first activation of this class */
LPVOID pvptr; LPVOID pvptr;
res=IMoniker_BindToStorage(iface, NULL, NULL, &IID_IPropertyBag, &pvptr); res=IMoniker_BindToStorage(iface, NULL, NULL, &IID_IPropertyBag, &pvptr);
pProp = (IPropertyBag*)pvptr; pProp = pvptr;
if (SUCCEEDED(res)) if (SUCCEEDED(res))
{ {
V_VT(&var) = VT_LPWSTR; V_VT(&var) = VT_LPWSTR;
...@@ -426,7 +426,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject( ...@@ -426,7 +426,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(
if (SUCCEEDED(res)) if (SUCCEEDED(res))
{ {
res=CoCreateInstance(&clsID,NULL,CLSCTX_ALL,&IID_IUnknown,&pvptr); res=CoCreateInstance(&clsID,NULL,CLSCTX_ALL,&IID_IUnknown,&pvptr);
pObj = (IUnknown*)pvptr; pObj = pvptr;
} }
} }
...@@ -718,7 +718,7 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_QueryInterface( ...@@ -718,7 +718,7 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_QueryInterface(
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IEnumMoniker)) IsEqualGUID(riid, &IID_IEnumMoniker))
{ {
*ppvObj = (LPVOID)iface; *ppvObj = iface;
DEVENUM_IEnumMoniker_AddRef(iface); DEVENUM_IEnumMoniker_AddRef(iface);
return S_OK; return S_OK;
} }
......
...@@ -39,7 +39,7 @@ static HRESULT WINAPI DEVENUM_IParseDisplayName_QueryInterface( ...@@ -39,7 +39,7 @@ static HRESULT WINAPI DEVENUM_IParseDisplayName_QueryInterface(
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IParseDisplayName)) IsEqualGUID(riid, &IID_IParseDisplayName))
{ {
*ppvObj = (LPVOID)iface; *ppvObj = iface;
IParseDisplayName_AddRef(iface); IParseDisplayName_AddRef(iface);
return S_OK; return S_OK;
} }
......
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