Commit 26904868 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Fix some small pointer aliasing problems.

parent acaaecdd
......@@ -76,7 +76,7 @@ HRESULT WINAPI DEVENUM_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *pp
* Oh well - works just fine as it is */
if (IsEqualGUID(rclsid, &CLSID_SystemDeviceEnum) ||
IsEqualGUID(rclsid, &CLSID_CDeviceMoniker))
return IClassFactory_QueryInterface((LPCLASSFACTORY)&DEVENUM_ClassFactory, iid, ppv);
return IClassFactory_QueryInterface((LPCLASSFACTORY)(char*)&DEVENUM_ClassFactory, iid, ppv);
FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n",debugstr_guid(rclsid),debugstr_guid(iid));
return CLASS_E_CLASSNOTAVAILABLE;
}
......@@ -142,9 +142,13 @@ HRESULT WINAPI DEVENUM_DllRegisterServer(void)
const WCHAR friendlymidirend[] = {'M','i','d','i',' ','R','e','n','d','e','r','e','r','s',0};
const WCHAR friendlyextrend[] = {'E','x','t','e','r','n','a','l',' ','R','e','n','d','e','r','e','r','s',0};
const WCHAR friendlydevctrl[] = {'D','e','v','i','c','e',' ','C','o','n','t','r','o','l',' ','F','i','l','t','e','r','s',0};
LPVOID mapvptr;
CoInitialize(NULL);
res = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC,
&IID_IFilterMapper2, (void **) &pMapper);
&IID_IFilterMapper2, &mapvptr);
pMapper = (IFilterMapper2*)mapvptr;
IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_DO_NOT_USE, friendlyvidcap);
IFilterMapper2_CreateCategory(pMapper, &CLSID_LegacyAmFilterCategory, MERIT_NORMAL, friendlydshow);
......
......@@ -88,8 +88,6 @@ static ULONG WINAPI DEVENUM_IPropertyBag_Release(LPPROPERTYBAG iface)
return This->ref;
}
static const WCHAR wszNull = '\0';
static HRESULT WINAPI DEVENUM_IPropertyBag_Read(
LPPROPERTYBAG iface,
LPCOLESTR pszPropName,
......@@ -375,7 +373,9 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(
if(pmkToLeft==NULL)
{
/* first activation of this class */
res=IMoniker_BindToStorage(iface, NULL, NULL, &IID_IPropertyBag, (void**)&pProp);
LPVOID pvptr;
res=IMoniker_BindToStorage(iface, NULL, NULL, &IID_IPropertyBag, &pvptr);
pProp = (IPropertyBag*)pvptr;
if (SUCCEEDED(res))
{
V_VT(&var) = VT_LPWSTR;
......@@ -388,7 +388,8 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(
}
if (SUCCEEDED(res))
{
res=CoCreateInstance(&clsID,NULL,CLSCTX_ALL,&IID_IUnknown,(void**)&pObj);
res=CoCreateInstance(&clsID,NULL,CLSCTX_ALL,&IID_IUnknown,&pvptr);
pObj = (IUnknown*)pvptr;
}
}
......
......@@ -131,7 +131,7 @@ static HRESULT WINAPI DEVENUM_IParseDisplayName_ParseDisplayName(
if (SUCCEEDED(res))
{
res = DEVENUM_ICreateDevEnum_CreateClassEnumerator((ICreateDevEnum *)&DEVENUM_CreateDevEnum, &clsidDevice, &pEm, 0);
res = DEVENUM_ICreateDevEnum_CreateClassEnumerator((ICreateDevEnum *)(char*)&DEVENUM_CreateDevEnum, &clsidDevice, &pEm, 0);
}
if (SUCCEEDED(res))
......
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