Fix some small pointer aliasing problems.

This commit is contained in:
Marcus Meissner 2003-07-22 03:14:25 +00:00 committed by Alexandre Julliard
parent acaaecddf8
commit 269048684b
3 changed files with 12 additions and 7 deletions

View File

@ -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);

View File

@ -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;
}
}

View File

@ -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))