Commit 1ceb25ba authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Convert progids to a standard list.

parent d4f7f06f
......@@ -131,13 +131,15 @@ typedef struct tagMSIAPPID
BOOL RunAsInteractiveUser;
} MSIAPPID;
typedef struct tagMSIPROGID MSIPROGID;
typedef struct tagMSICLASS
{
struct list entry;
WCHAR CLSID[IDENTIFIER_SIZE]; /* Primary Key */
WCHAR Context[IDENTIFIER_SIZE]; /* Primary Key */
MSICOMPONENT *Component;
INT ProgIDIndex;
MSIPROGID *ProgID;
LPWSTR ProgIDText;
LPWSTR Description;
MSIAPPID *AppID;
......@@ -159,7 +161,7 @@ typedef struct tagMSIEXTENSION
struct list entry;
WCHAR Extension[256]; /* Primary Key */
MSICOMPONENT *Component;
INT ProgIDIndex;
MSIPROGID *ProgID;
LPWSTR ProgIDText;
MSIMIME *Mime;
MSIFEATURE *Feature;
......@@ -168,18 +170,19 @@ typedef struct tagMSIEXTENSION
struct list verbs;
} MSIEXTENSION;
typedef struct tagMSIPROGID
struct tagMSIPROGID
{
struct list entry;
LPWSTR ProgID; /* Primary Key */
INT ParentIndex;
MSIPROGID *Parent;
MSICLASS *Class;
LPWSTR Description;
LPWSTR IconPath;
/* not in the table, set during installation */
BOOL InstallMe;
INT CurVerIndex;
INT VersionIndIndex;
} MSIPROGID;
MSIPROGID *CurVer;
MSIPROGID *VersionInd;
};
typedef struct tagMSIVERB
{
......
......@@ -528,15 +528,16 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
free_extension( ext );
}
for (i = 0; i < package->loaded_progids; i++)
LIST_FOR_EACH_SAFE( item, cursor, &package->progids )
{
HeapFree(GetProcessHeap(),0,package->progids[i].ProgID);
HeapFree(GetProcessHeap(),0,package->progids[i].Description);
HeapFree(GetProcessHeap(),0,package->progids[i].IconPath);
}
MSIPROGID *progid = LIST_ENTRY( item, MSIPROGID, entry );
if (package->progids && package->loaded_progids > 0)
HeapFree(GetProcessHeap(),0,package->progids);
list_remove( &progid->entry );
HeapFree( GetProcessHeap(), 0, progid->ProgID );
HeapFree( GetProcessHeap(), 0, progid->Description );
HeapFree( GetProcessHeap(), 0, progid->IconPath );
HeapFree( GetProcessHeap(), 0, progid );
}
LIST_FOR_EACH_SAFE( item, cursor, &package->mimes )
{
......
......@@ -194,8 +194,7 @@ typedef struct tagMSIPACKAGE
struct list classes;
struct list extensions;
struct tagMSIPROGID *progids;
UINT loaded_progids;
struct list progids;
struct list mimes;
struct list appids;
......
......@@ -390,6 +390,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db )
list_init( &package->classes );
list_init( &package->mimes );
list_init( &package->extensions );
list_init( &package->progids );
/* OK, here is where we do a slew of things to the database to
* prep for all that is to come as a package */
......
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