On Mon, Mar 28, 2005 at 10:39:48AM -0600, Aric Stewart wrote: > make sure the GUID of the typelib we are registering matches the guid > requested from MSI. if not search the given typelib file to find the > typelib requested to register. > >
> Index: dlls/msi/action.c > =================================================================== > RCS file: /home/wine/wine/dlls/msi/action.c,v > retrieving revision 1.105 > diff -u -r1.105 action.c > --- dlls/msi/action.c 28 Mar 2005 14:17:52 -0000 1.105 > +++ dlls/msi/action.c 28 Mar 2005 16:33:23 -0000 > @@ -4097,7 +4101,39 @@ > continue; > } > > + guid = load_dynamic_stringW(row,1); > res = LoadTypeLib(package->files[index].TargetPath,&ptLib); > + ITypeLib_GetLibAttr(ptLib, &attr); > + CLSIDFromString(guid, &clsid); > + if (!IsEqualGUID(&clsid,&attr->guid)) > + { > + static const WCHAR fmt[] = {'%','s','\\','%','i',0}; > + int i; > + int sz; > + > + TRACE("Initial match failure\n"); > + > + sz = strlenW(package->files[index].TargetPath)+4; > + sz *= sizeof(WCHAR); > + > + for (i = 2; i < 10; i++) > + { > + path = HeapAlloc(GetProcessHeap(),0,sz); > + sprintfW(path,fmt,package->files[index].TargetPath, i); > + TRACE("trying %s\n", debugstr_w(path)); > + res = LoadTypeLib(path,&ptLib); > + ITypeLib_GetLibAttr(ptLib, &attr); > + CLSIDFromString(guid, &clsid); > + if (IsEqualGUID(&clsid,&attr->guid)) > + break; > + HeapFree(GetProcessHeap(),0,path); > + res = E_FAIL; > + > + } > + } > + else > + path = strdupW(package->files[index].TargetPath); > + > if (SUCCEEDED(res)) > { > LPWSTR help; This doesn't look right. Maybe you need to enumerate through the typelib resources here. What information are you actually given? You're also leaking ITypeLibs and TLIBATTRs Huw.