Commit a391a98a authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

- build a standard Wine list of classes instead of using an array

- use class pointers instead of array indexes
parent 80fdebbb
......@@ -133,6 +133,7 @@ typedef struct tagMSIAPPID
typedef struct tagMSICLASS
{
struct list entry;
WCHAR CLSID[IDENTIFIER_SIZE]; /* Primary Key */
WCHAR Context[IDENTIFIER_SIZE]; /* Primary Key */
MSICOMPONENT *Component;
......@@ -169,7 +170,7 @@ typedef struct tagMSIPROGID
{
LPWSTR ProgID; /* Primary Key */
INT ParentIndex;
INT ClassIndex;
MSICLASS *Class;
LPWSTR Description;
LPWSTR IconPath;
/* not in the table, set during installation */
......@@ -192,7 +193,7 @@ typedef struct tagMSIMIME
LPWSTR ContentType; /* Primary Key */
INT ExtensionIndex;
WCHAR CLSID[IDENTIFIER_SIZE];
INT ClassIndex;
MSICLASS *Class;
/* not in the table, set during installation */
BOOL InstallMe;
} MSIMIME;
......
......@@ -486,19 +486,19 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
}
/* clean up extension, progid, class and verb structures */
for (i = 0; i < package->loaded_classes; i++)
LIST_FOR_EACH_SAFE( item, cursor, &package->classes )
{
HeapFree(GetProcessHeap(),0,package->classes[i].Description);
HeapFree(GetProcessHeap(),0,package->classes[i].FileTypeMask);
HeapFree(GetProcessHeap(),0,package->classes[i].IconPath);
HeapFree(GetProcessHeap(),0,package->classes[i].DefInprocHandler);
HeapFree(GetProcessHeap(),0,package->classes[i].DefInprocHandler32);
HeapFree(GetProcessHeap(),0,package->classes[i].Argument);
HeapFree(GetProcessHeap(),0,package->classes[i].ProgIDText);
}
MSICLASS *cls = LIST_ENTRY( item, MSICLASS, entry );
if (package->classes && package->loaded_classes > 0)
HeapFree(GetProcessHeap(),0,package->classes);
list_remove( &cls->entry );
HeapFree( GetProcessHeap(), 0, cls->Description );
HeapFree( GetProcessHeap(), 0, cls->FileTypeMask );
HeapFree( GetProcessHeap(), 0, cls->IconPath );
HeapFree( GetProcessHeap(), 0, cls->DefInprocHandler );
HeapFree( GetProcessHeap(), 0, cls->DefInprocHandler32 );
HeapFree( GetProcessHeap(), 0, cls->Argument );
HeapFree( GetProcessHeap(), 0, cls->ProgIDText );
}
for (i = 0; i < package->loaded_extensions; i++)
{
......
......@@ -192,8 +192,7 @@ typedef struct tagMSIPACKAGE
LPWSTR ActionFormat;
LPWSTR LastAction;
struct tagMSICLASS *classes;
UINT loaded_classes;
struct list classes;
struct tagMSIEXTENSION *extensions;
UINT loaded_extensions;
struct tagMSIPROGID *progids;
......
......@@ -387,6 +387,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db )
package->next_dialog = NULL;
list_init( &package->subscriptions );
list_init( &package->appids );
list_init( &package->classes );
/* 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