Commit a96e1cef authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Do not loop if a ProgId's Parent Index it itself.

Add a VersionIndIndex for tracking version independent fields for the ProgIds properly.
parent 20ad4d17
...@@ -4558,9 +4558,11 @@ static INT load_progid(MSIPACKAGE* package, MSIRECORD *row) ...@@ -4558,9 +4558,11 @@ static INT load_progid(MSIPACKAGE* package, MSIRECORD *row)
} }
package->progids[index].CurVerIndex = -1; package->progids[index].CurVerIndex = -1;
package->progids[index].VersionIndIndex = -1;
/* if we have a parent then we may be that parents CurVer */ /* if we have a parent then we may be that parents CurVer */
if (package->progids[index].ParentIndex >= 0) if (package->progids[index].ParentIndex >= 0 &&
package->progids[index].ParentIndex != index)
{ {
int pindex = package->progids[index].ParentIndex; int pindex = package->progids[index].ParentIndex;
while (package->progids[pindex].ParentIndex>= 0) while (package->progids[pindex].ParentIndex>= 0)
...@@ -4569,6 +4571,7 @@ static INT load_progid(MSIPACKAGE* package, MSIRECORD *row) ...@@ -4569,6 +4571,7 @@ static INT load_progid(MSIPACKAGE* package, MSIRECORD *row)
FIXME("BAD BAD need to determing if we are really the CurVer\n"); FIXME("BAD BAD need to determing if we are really the CurVer\n");
package->progids[index].CurVerIndex = pindex; package->progids[index].CurVerIndex = pindex;
package->progids[pindex].VersionIndIndex = index;
} }
return index; return index;
...@@ -5441,16 +5444,17 @@ static UINT ACTION_RegisterClassInfo(MSIPACKAGE *package) ...@@ -5441,16 +5444,17 @@ static UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
RegCloseKey(hkey3); RegCloseKey(hkey3);
if (package->classes[i].ProgIDIndex >= 0 && if (package->classes[i].ProgIDIndex >= 0 &&
package->progids[package->classes[i].ProgIDIndex].ParentIndex package->progids[package->classes[i].ProgIDIndex].
>= 0) VersionIndIndex >= 0)
{ {
progid = package->progids[package->progids[ LPWSTR viprogid = strdupW(package->progids[package->progids[
package->classes[i].ProgIDIndex].ParentIndex].ProgID; package->classes[i].ProgIDIndex].VersionIndIndex].
ProgID);
RegCreateKeyW(hkey2,szVIProgID,&hkey3); RegCreateKeyW(hkey2,szVIProgID,&hkey3);
RegSetValueExW(hkey3,NULL,0,REG_SZ,(LPVOID)progid, RegSetValueExW(hkey3,NULL,0,REG_SZ,(LPVOID)viprogid,
(strlenW(progid)+1) *sizeof(WCHAR)); (strlenW(viprogid)+1) *sizeof(WCHAR));
RegCloseKey(hkey3); RegCloseKey(hkey3);
HeapFree(GetProcessHeap(), 0, viprogid);
} }
} }
......
...@@ -147,6 +147,7 @@ typedef struct tagMSIPROGID ...@@ -147,6 +147,7 @@ typedef struct tagMSIPROGID
/* not in the table, set during installation */ /* not in the table, set during installation */
BOOL InstallMe; BOOL InstallMe;
INT CurVerIndex; INT CurVerIndex;
INT VersionIndIndex;
} MSIPROGID; } MSIPROGID;
typedef struct tagMSIVERB typedef struct tagMSIVERB
......
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