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