On Sat, Jul 19, 2003 at 03:11:29PM +0200, Marcus Meissner wrote: > Hi, > > Changelog: > Fix some small pointer aliasing problems. Index: dlls/devenum/devenum_main.c =================================================================== RCS file: /home/wine/wine/dlls/devenum/devenum_main.c,v retrieving revision 1.3 diff -u -r1.3 devenum_main.c --- dlls/devenum/devenum_main.c 1 Jul 2003 04:30:30 -0000 1.3 +++ dlls/devenum/devenum_main.c 19 Jul 2003 13:25:00 -0000 @@ -76,7 +76,7 @@ * 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 @@ 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); Index: dlls/devenum/mediacatenum.c =================================================================== RCS file: /home/wine/wine/dlls/devenum/mediacatenum.c,v retrieving revision 1.1 diff -u -r1.1 mediacatenum.c --- dlls/devenum/mediacatenum.c 1 Jul 2003 04:30:30 -0000 1.1 +++ dlls/devenum/mediacatenum.c 19 Jul 2003 13:25:01 -0000 @@ -88,8 +88,6 @@ return This->ref; } -static const WCHAR wszNull = '\0'; - static HRESULT WINAPI DEVENUM_IPropertyBag_Read( LPPROPERTYBAG iface, LPCOLESTR pszPropName, @@ -375,7 +373,9 @@ 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 @@ } 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; } } Index: dlls/devenum/parsedisplayname.c =================================================================== RCS file: /home/wine/wine/dlls/devenum/parsedisplayname.c,v retrieving revision 1.1 diff -u -r1.1 parsedisplayname.c --- dlls/devenum/parsedisplayname.c 1 Jul 2003 04:30:30 -0000 1.1 +++ dlls/devenum/parsedisplayname.c 19 Jul 2003 13:25:01 -0000 @@ -131,7 +131,7 @@ 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))