Commit 0c49c1c4 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

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

- use extension pointers instead of array indexes
parent a107234d
......@@ -156,6 +156,7 @@ typedef struct tagMSIMIME MSIMIME;
typedef struct tagMSIEXTENSION
{
struct list entry;
WCHAR Extension[256]; /* Primary Key */
MSICOMPONENT *Component;
INT ProgIDIndex;
......@@ -183,7 +184,7 @@ typedef struct tagMSIPROGID
typedef struct tagMSIVERB
{
INT ExtensionIndex;
MSIEXTENSION *Extension;
LPWSTR Verb;
INT Sequence;
LPWSTR Command;
......@@ -194,7 +195,7 @@ struct tagMSIMIME
{
struct list entry;
LPWSTR ContentType; /* Primary Key */
INT ExtensionIndex;
MSIEXTENSION *Extension;
WCHAR CLSID[IDENTIFIER_SIZE];
MSICLASS *Class;
/* not in the table, set during installation */
......
......@@ -498,15 +498,17 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
HeapFree( GetProcessHeap(), 0, cls->DefInprocHandler32 );
HeapFree( GetProcessHeap(), 0, cls->Argument );
HeapFree( GetProcessHeap(), 0, cls->ProgIDText );
HeapFree( GetProcessHeap(), 0, cls );
}
for (i = 0; i < package->loaded_extensions; i++)
LIST_FOR_EACH_SAFE( item, cursor, &package->extensions )
{
HeapFree(GetProcessHeap(),0,package->extensions[i].ProgIDText);
}
MSIEXTENSION *ext = LIST_ENTRY( item, MSIEXTENSION, entry );
if (package->extensions && package->loaded_extensions > 0)
HeapFree(GetProcessHeap(),0,package->extensions);
list_remove( &ext->entry );
HeapFree( GetProcessHeap(), 0, ext->ProgIDText );
HeapFree( GetProcessHeap(), 0, ext );
}
for (i = 0; i < package->loaded_progids; i++)
{
......
......@@ -193,8 +193,7 @@ typedef struct tagMSIPACKAGE
LPWSTR LastAction;
struct list classes;
struct tagMSIEXTENSION *extensions;
UINT loaded_extensions;
struct list extensions;
struct tagMSIPROGID *progids;
UINT loaded_progids;
struct tagMSIVERB *verbs;
......
......@@ -389,6 +389,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db )
list_init( &package->appids );
list_init( &package->classes );
list_init( &package->mimes );
list_init( &package->extensions );
/* 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