Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fe404d1d
Commit
fe404d1d
authored
Jul 27, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Always check the return value of MSI_IterateRecords.
parent
e1c2e882
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
146 additions
and
81 deletions
+146
-81
action.c
dlls/msi/action.c
+74
-49
classes.c
dlls/msi/classes.c
+65
-27
files.c
dlls/msi/files.c
+3
-1
font.c
dlls/msi/font.c
+4
-4
No files found.
dlls/msi/action.c
View file @
fe404d1d
...
@@ -1109,9 +1109,9 @@ static UINT load_feature(MSIRECORD * row, LPVOID param)
...
@@ -1109,9 +1109,9 @@ static UINT load_feature(MSIRECORD * row, LPVOID param)
ilfs
.
package
=
package
;
ilfs
.
package
=
package
;
ilfs
.
feature
=
feature
;
ilfs
.
feature
=
feature
;
MSI_IterateRecords
(
view
,
NULL
,
iterate_load_featurecomponents
,
&
ilfs
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_load_featurecomponents
,
&
ilfs
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
ERROR_SUCCESS
;
return
rc
;
}
}
static
UINT
find_feature_children
(
MSIRECORD
*
row
,
LPVOID
param
)
static
UINT
find_feature_children
(
MSIRECORD
*
row
,
LPVOID
param
)
...
@@ -1316,7 +1316,7 @@ static UINT load_all_files(MSIPACKAGE *package)
...
@@ -1316,7 +1316,7 @@ static UINT load_all_files(MSIPACKAGE *package)
rc
=
MSI_IterateRecords
(
view
,
NULL
,
load_file
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
load_file
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
ERROR_SUCCESS
;
return
rc
;
}
}
static
UINT
load_media
(
MSIRECORD
*
row
,
LPVOID
param
)
static
UINT
load_media
(
MSIRECORD
*
row
,
LPVOID
param
)
...
@@ -1344,9 +1344,9 @@ static UINT load_all_media( MSIPACKAGE *package )
...
@@ -1344,9 +1344,9 @@ static UINT load_all_media( MSIPACKAGE *package )
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
MSI_IterateRecords
(
view
,
NULL
,
load_media
,
package
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
load_media
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
ERROR_SUCCESS
;
return
r
;
}
}
static
UINT
load_patch
(
MSIRECORD
*
row
,
LPVOID
param
)
static
UINT
load_patch
(
MSIRECORD
*
row
,
LPVOID
param
)
...
@@ -1409,7 +1409,7 @@ static UINT load_all_patches(MSIPACKAGE *package)
...
@@ -1409,7 +1409,7 @@ static UINT load_all_patches(MSIPACKAGE *package)
rc
=
MSI_IterateRecords
(
view
,
NULL
,
load_patch
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
load_patch
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
ERROR_SUCCESS
;
return
rc
;
}
}
static
UINT
load_folder_persistence
(
MSIPACKAGE
*
package
,
MSIFOLDER
*
folder
)
static
UINT
load_folder_persistence
(
MSIPACKAGE
*
package
,
MSIFOLDER
*
folder
)
...
@@ -2347,6 +2347,8 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
...
@@ -2347,6 +2347,8 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
{
{
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_CostFinalizeConditions
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_CostFinalizeConditions
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
}
}
}
}
...
@@ -2910,8 +2912,10 @@ static UINT ACTION_InstallValidate(MSIPACKAGE *package)
...
@@ -2910,8 +2912,10 @@ static UINT ACTION_InstallValidate(MSIPACKAGE *package)
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
rc
==
ERROR_SUCCESS
)
if
(
rc
==
ERROR_SUCCESS
)
{
{
MSI_IterateRecords
(
view
,
&
count
,
NULL
,
package
);
rc
=
MSI_IterateRecords
(
view
,
&
count
,
NULL
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
total
+=
count
*
REG_PROGRESS_VALUE
;
total
+=
count
*
REG_PROGRESS_VALUE
;
}
}
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
LIST_FOR_EACH_ENTRY
(
comp
,
&
package
->
components
,
MSICOMPONENT
,
entry
)
...
@@ -3798,8 +3802,10 @@ static UINT msi_publish_icons(MSIPACKAGE *package)
...
@@ -3798,8 +3802,10 @@ static UINT msi_publish_icons(MSIPACKAGE *package)
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
r
==
ERROR_SUCCESS
)
if
(
r
==
ERROR_SUCCESS
)
{
{
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_PublishIcon
,
package
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_PublishIcon
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
}
}
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
...
@@ -4487,9 +4493,9 @@ static UINT ACTION_SelfRegModules(MSIPACKAGE *package)
...
@@ -4487,9 +4493,9 @@ static UINT ACTION_SelfRegModules(MSIPACKAGE *package)
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_SelfRegModules
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_SelfRegModules
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
ERROR_SUCCESS
;
return
rc
;
}
}
static
UINT
ITERATE_SelfUnregModules
(
MSIRECORD
*
row
,
LPVOID
param
)
static
UINT
ITERATE_SelfUnregModules
(
MSIRECORD
*
row
,
LPVOID
param
)
...
@@ -4537,9 +4543,9 @@ static UINT ACTION_SelfUnregModules( MSIPACKAGE *package )
...
@@ -4537,9 +4543,9 @@ static UINT ACTION_SelfUnregModules( MSIPACKAGE *package )
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_SelfUnregModules
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_SelfUnregModules
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
ERROR_SUCCESS
;
return
rc
;
}
}
static
UINT
ACTION_PublishFeatures
(
MSIPACKAGE
*
package
)
static
UINT
ACTION_PublishFeatures
(
MSIPACKAGE
*
package
)
...
@@ -6180,26 +6186,30 @@ static UINT ACTION_InstallODBC( MSIPACKAGE *package )
...
@@ -6180,26 +6186,30 @@ static UINT ACTION_InstallODBC( MSIPACKAGE *package )
UINT
rc
;
UINT
rc
;
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
driver_query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
driver_query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
==
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
{
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_InstallODBCDriver
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_InstallODBCDriver
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
}
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
translator_query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
translator_query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
==
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
{
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_InstallODBCTranslator
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_InstallODBCTranslator
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
}
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
source_query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
source_query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
==
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
{
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_InstallODBCDataSource
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_InstallODBCDataSource
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
return
rc
;
}
return
ERROR_SUCCESS
;
}
}
static
UINT
ITERATE_RemoveODBCDriver
(
MSIRECORD
*
rec
,
LPVOID
param
)
static
UINT
ITERATE_RemoveODBCDriver
(
MSIRECORD
*
rec
,
LPVOID
param
)
...
@@ -6354,26 +6364,30 @@ static UINT ACTION_RemoveODBC( MSIPACKAGE *package )
...
@@ -6354,26 +6364,30 @@ static UINT ACTION_RemoveODBC( MSIPACKAGE *package )
UINT
rc
;
UINT
rc
;
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
driver_query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
driver_query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
==
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
{
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveODBCDriver
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveODBCDriver
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
}
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
translator_query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
translator_query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
==
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
{
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveODBCTranslator
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveODBCTranslator
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
}
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
source_query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
source_query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
==
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
{
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveODBCDataSource
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveODBCDataSource
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
return
rc
;
}
return
ERROR_SUCCESS
;
}
}
#define ENV_ACT_SETALWAYS 0x1
#define ENV_ACT_SETALWAYS 0x1
...
@@ -6856,6 +6870,8 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package )
...
@@ -6856,6 +6870,8 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package )
count
=
0
;
count
=
0
;
r
=
MSI_IterateRecords
(
view
,
&
count
,
NULL
,
package
);
r
=
MSI_IterateRecords
(
view
,
&
count
,
NULL
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
if
(
count
)
FIXME
(
"ignored %u rows in ODBCDriver table
\n
"
,
count
);
if
(
count
)
FIXME
(
"ignored %u rows in ODBCDriver table
\n
"
,
count
);
}
}
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
translator_query
,
&
view
);
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
translator_query
,
&
view
);
...
@@ -6864,6 +6880,8 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package )
...
@@ -6864,6 +6880,8 @@ static UINT ACTION_SetODBCFolders( MSIPACKAGE *package )
count
=
0
;
count
=
0
;
r
=
MSI_IterateRecords
(
view
,
&
count
,
NULL
,
package
);
r
=
MSI_IterateRecords
(
view
,
&
count
,
NULL
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
if
(
count
)
FIXME
(
"ignored %u rows in ODBCTranslator table
\n
"
,
count
);
if
(
count
)
FIXME
(
"ignored %u rows in ODBCTranslator table
\n
"
,
count
);
}
}
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
...
@@ -6896,7 +6914,8 @@ static UINT ACTION_RemoveExistingProducts( MSIPACKAGE *package )
...
@@ -6896,7 +6914,8 @@ static UINT ACTION_RemoveExistingProducts( MSIPACKAGE *package )
{
{
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveExistingProducts
,
package
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveExistingProducts
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
r
;
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
}
}
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
...
@@ -6959,6 +6978,8 @@ static UINT ACTION_MigrateFeatureStates( MSIPACKAGE *package )
...
@@ -6959,6 +6978,8 @@ static UINT ACTION_MigrateFeatureStates( MSIPACKAGE *package )
{
{
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_MigrateFeatureStates
,
package
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_MigrateFeatureStates
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
}
}
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
...
@@ -7020,6 +7041,8 @@ static UINT ACTION_BindImage( MSIPACKAGE *package )
...
@@ -7020,6 +7041,8 @@ static UINT ACTION_BindImage( MSIPACKAGE *package )
{
{
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_BindImage
,
package
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_BindImage
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
}
}
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
...
@@ -7037,6 +7060,8 @@ static UINT msi_unimplemented_action_stub( MSIPACKAGE *package, LPCSTR action, L
...
@@ -7037,6 +7060,8 @@ static UINT msi_unimplemented_action_stub( MSIPACKAGE *package, LPCSTR action, L
{
{
r
=
MSI_IterateRecords
(
view
,
&
count
,
NULL
,
package
);
r
=
MSI_IterateRecords
(
view
,
&
count
,
NULL
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
}
}
if
(
count
)
FIXME
(
"%s: ignored %u rows from %s
\n
"
,
action
,
count
,
debugstr_w
(
table
));
if
(
count
)
FIXME
(
"%s: ignored %u rows from %s
\n
"
,
action
,
count
,
debugstr_w
(
table
));
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
...
...
dlls/msi/classes.c
View file @
fe404d1d
...
@@ -538,7 +538,7 @@ static UINT iterate_all_classes(MSIRECORD *rec, LPVOID param)
...
@@ -538,7 +538,7 @@ static UINT iterate_all_classes(MSIRECORD *rec, LPVOID param)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
static
VOID
load_all_classes
(
MSIPACKAGE
*
package
)
static
UINT
load_all_classes
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'`'
,
0
};
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'`'
,
0
};
...
@@ -547,10 +547,11 @@ static VOID load_all_classes(MSIPACKAGE *package)
...
@@ -547,10 +547,11 @@ static VOID load_all_classes(MSIPACKAGE *package)
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
;
return
ERROR_SUCCESS
;
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_all_classes
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_all_classes
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
}
}
static
UINT
iterate_all_extensions
(
MSIRECORD
*
rec
,
LPVOID
param
)
static
UINT
iterate_all_extensions
(
MSIRECORD
*
rec
,
LPVOID
param
)
...
@@ -583,7 +584,7 @@ static UINT iterate_all_extensions(MSIRECORD *rec, LPVOID param)
...
@@ -583,7 +584,7 @@ static UINT iterate_all_extensions(MSIRECORD *rec, LPVOID param)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
static
VOID
load_all_extensions
(
MSIPACKAGE
*
package
)
static
UINT
load_all_extensions
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'E'
,
'x'
,
't'
,
'e'
,
'n'
,
's'
,
'i'
,
'o'
,
'n'
,
'`'
,
0
};
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'E'
,
'x'
,
't'
,
'e'
,
'n'
,
's'
,
'i'
,
'o'
,
'n'
,
'`'
,
0
};
...
@@ -592,10 +593,11 @@ static VOID load_all_extensions(MSIPACKAGE *package)
...
@@ -592,10 +593,11 @@ static VOID load_all_extensions(MSIPACKAGE *package)
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
;
return
ERROR_SUCCESS
;
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_all_extensions
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_all_extensions
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
}
}
static
UINT
iterate_all_progids
(
MSIRECORD
*
rec
,
LPVOID
param
)
static
UINT
iterate_all_progids
(
MSIRECORD
*
rec
,
LPVOID
param
)
...
@@ -608,7 +610,7 @@ static UINT iterate_all_progids(MSIRECORD *rec, LPVOID param)
...
@@ -608,7 +610,7 @@ static UINT iterate_all_progids(MSIRECORD *rec, LPVOID param)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
static
VOID
load_all_progids
(
MSIPACKAGE
*
package
)
static
UINT
load_all_progids
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'd'
,
'`'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'd'
,
'`'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
...
@@ -618,13 +620,14 @@ static VOID load_all_progids(MSIPACKAGE *package)
...
@@ -618,13 +620,14 @@ static VOID load_all_progids(MSIPACKAGE *package)
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
;
return
ERROR_SUCCESS
;
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_all_progids
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_all_progids
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
}
}
static
VOID
load_all_verbs
(
MSIPACKAGE
*
package
)
static
UINT
load_all_verbs
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'V'
,
'e'
,
'r'
,
'b'
,
'`'
,
0
};
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'V'
,
'e'
,
'r'
,
'b'
,
'`'
,
0
};
...
@@ -633,10 +636,11 @@ static VOID load_all_verbs(MSIPACKAGE *package)
...
@@ -633,10 +636,11 @@ static VOID load_all_verbs(MSIPACKAGE *package)
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
;
return
ERROR_SUCCESS
;
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_load_verb
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_load_verb
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
}
}
static
UINT
iterate_all_mimes
(
MSIRECORD
*
rec
,
LPVOID
param
)
static
UINT
iterate_all_mimes
(
MSIRECORD
*
rec
,
LPVOID
param
)
...
@@ -649,7 +653,7 @@ static UINT iterate_all_mimes(MSIRECORD *rec, LPVOID param)
...
@@ -649,7 +653,7 @@ static UINT iterate_all_mimes(MSIRECORD *rec, LPVOID param)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
static
VOID
load_all_mimes
(
MSIPACKAGE
*
package
)
static
UINT
load_all_mimes
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'`'
,
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
,
'T'
,
'y'
,
'p'
,
'e'
,
'`'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'`'
,
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
,
'T'
,
'y'
,
'p'
,
'e'
,
'`'
,
' '
,
...
@@ -659,29 +663,39 @@ static VOID load_all_mimes(MSIPACKAGE *package)
...
@@ -659,29 +663,39 @@ static VOID load_all_mimes(MSIPACKAGE *package)
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
;
return
ERROR_SUCCESS
;
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_all_mimes
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_all_mimes
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
}
}
static
void
load_classes_and_such
(
MSIPACKAGE
*
package
)
static
UINT
load_classes_and_such
(
MSIPACKAGE
*
package
)
{
{
UINT
r
;
TRACE
(
"Loading all the class info and related tables
\n
"
);
TRACE
(
"Loading all the class info and related tables
\n
"
);
/* check if already loaded */
/* check if already loaded */
if
(
!
list_empty
(
&
package
->
classes
)
||
if
(
!
list_empty
(
&
package
->
classes
)
||
!
list_empty
(
&
package
->
mimes
)
||
!
list_empty
(
&
package
->
mimes
)
||
!
list_empty
(
&
package
->
extensions
)
||
!
list_empty
(
&
package
->
extensions
)
||
!
list_empty
(
&
package
->
progids
)
)
!
list_empty
(
&
package
->
progids
))
return
ERROR_SUCCESS
;
return
;
r
=
load_all_classes
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
r
=
load_all_extensions
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
r
=
load_all_progids
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
load_all_classes
(
package
);
load_all_extensions
(
package
);
load_all_progids
(
package
);
/* these loads must come after the other loads */
/* these loads must come after the other loads */
load_all_verbs
(
package
);
r
=
load_all_verbs
(
package
);
load_all_mimes
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
return
load_all_mimes
(
package
);
}
}
static
void
mark_progid_for_install
(
MSIPACKAGE
*
package
,
MSIPROGID
*
progid
)
static
void
mark_progid_for_install
(
MSIPACKAGE
*
package
,
MSIPROGID
*
progid
)
...
@@ -788,10 +802,13 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
...
@@ -788,10 +802,13 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
static
const
WCHAR
szFileType_fmt
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
,
'T'
,
'y'
,
'p'
,
'e'
,
'\\'
,
'%'
,
's'
,
'\\'
,
'%'
,
'i'
,
0
};
static
const
WCHAR
szFileType_fmt
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
,
'T'
,
'y'
,
'p'
,
'e'
,
'\\'
,
'%'
,
's'
,
'\\'
,
'%'
,
'i'
,
0
};
const
WCHAR
*
keypath
;
const
WCHAR
*
keypath
;
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
HKEY
hkey
,
hkey2
,
hkey3
;
HKEY
hkey
,
hkey2
,
hkey3
;
MSICLASS
*
cls
;
MSICLASS
*
cls
;
UINT
r
;
load_classes_and_such
(
package
);
r
=
load_classes_and_such
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
if
(
is_64bit
&&
package
->
platform
==
PLATFORM_INTEL
)
if
(
is_64bit
&&
package
->
platform
==
PLATFORM_INTEL
)
keypath
=
szWow6432NodeCLSID
;
keypath
=
szWow6432NodeCLSID
;
...
@@ -953,8 +970,11 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
...
@@ -953,8 +970,11 @@ UINT ACTION_UnregisterClassInfo( MSIPACKAGE *package )
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
MSICLASS
*
cls
;
MSICLASS
*
cls
;
HKEY
hkey
,
hkey2
;
HKEY
hkey
,
hkey2
;
UINT
r
;
load_classes_and_such
(
package
);
r
=
load_classes_and_such
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
if
(
is_64bit
&&
package
->
platform
==
PLATFORM_INTEL
)
if
(
is_64bit
&&
package
->
platform
==
PLATFORM_INTEL
)
keypath
=
szWow6432NodeCLSID
;
keypath
=
szWow6432NodeCLSID
;
...
@@ -1087,8 +1107,11 @@ UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
...
@@ -1087,8 +1107,11 @@ UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package)
{
{
MSIPROGID
*
progid
;
MSIPROGID
*
progid
;
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
UINT
r
;
load_classes_and_such
(
package
);
r
=
load_classes_and_such
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
LIST_FOR_EACH_ENTRY
(
progid
,
&
package
->
progids
,
MSIPROGID
,
entry
)
LIST_FOR_EACH_ENTRY
(
progid
,
&
package
->
progids
,
MSIPROGID
,
entry
)
{
{
...
@@ -1120,8 +1143,11 @@ UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
...
@@ -1120,8 +1143,11 @@ UINT ACTION_UnregisterProgIdInfo( MSIPACKAGE *package )
MSIPROGID
*
progid
;
MSIPROGID
*
progid
;
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
LONG
res
;
LONG
res
;
UINT
r
;
load_classes_and_such
(
package
);
r
=
load_classes_and_such
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
LIST_FOR_EACH_ENTRY
(
progid
,
&
package
->
progids
,
MSIPROGID
,
entry
)
LIST_FOR_EACH_ENTRY
(
progid
,
&
package
->
progids
,
MSIPROGID
,
entry
)
{
{
...
@@ -1233,8 +1259,11 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
...
@@ -1233,8 +1259,11 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package)
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
BOOL
install_on_demand
=
TRUE
;
BOOL
install_on_demand
=
TRUE
;
LONG
res
;
LONG
res
;
UINT
r
;
load_classes_and_such
(
package
);
r
=
load_classes_and_such
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
/* We need to set install_on_demand based on if the shell handles advertised
/* We need to set install_on_demand based on if the shell handles advertised
* shortcuts and the like. Because Mike McCormack is working on this i am
* shortcuts and the like. Because Mike McCormack is working on this i am
...
@@ -1346,8 +1375,11 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
...
@@ -1346,8 +1375,11 @@ UINT ACTION_UnregisterExtensionInfo( MSIPACKAGE *package )
MSIEXTENSION
*
ext
;
MSIEXTENSION
*
ext
;
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
LONG
res
;
LONG
res
;
UINT
r
;
load_classes_and_such
(
package
);
r
=
load_classes_and_such
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
LIST_FOR_EACH_ENTRY
(
ext
,
&
package
->
extensions
,
MSIEXTENSION
,
entry
)
LIST_FOR_EACH_ENTRY
(
ext
,
&
package
->
extensions
,
MSIEXTENSION
,
entry
)
{
{
...
@@ -1431,8 +1463,11 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
...
@@ -1431,8 +1463,11 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package)
static
const
WCHAR
szExtension
[]
=
{
'E'
,
'x'
,
't'
,
'e'
,
'n'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szExtension
[]
=
{
'E'
,
'x'
,
't'
,
'e'
,
'n'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
MSIMIME
*
mt
;
MSIMIME
*
mt
;
UINT
r
;
load_classes_and_such
(
package
);
r
=
load_classes_and_such
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
LIST_FOR_EACH_ENTRY
(
mt
,
&
package
->
mimes
,
MSIMIME
,
entry
)
LIST_FOR_EACH_ENTRY
(
mt
,
&
package
->
mimes
,
MSIMIME
,
entry
)
{
{
...
@@ -1485,8 +1520,11 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
...
@@ -1485,8 +1520,11 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package )
{
{
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
MSIMIME
*
mime
;
MSIMIME
*
mime
;
UINT
r
;
load_classes_and_such
(
package
);
r
=
load_classes_and_such
(
package
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
LIST_FOR_EACH_ENTRY
(
mime
,
&
package
->
mimes
,
MSIMIME
,
entry
)
LIST_FOR_EACH_ENTRY
(
mime
,
&
package
->
mimes
,
MSIMIME
,
entry
)
{
{
...
...
dlls/msi/files.c
View file @
fe404d1d
...
@@ -1235,8 +1235,10 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
...
@@ -1235,8 +1235,10 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
r
==
ERROR_SUCCESS
)
if
(
r
==
ERROR_SUCCESS
)
{
{
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveFiles
,
package
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveFiles
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
}
}
LIST_FOR_EACH_ENTRY
(
file
,
&
package
->
files
,
MSIFILE
,
entry
)
LIST_FOR_EACH_ENTRY
(
file
,
&
package
->
files
,
MSIFILE
,
entry
)
...
...
dlls/msi/font.c
View file @
fe404d1d
...
@@ -275,9 +275,9 @@ UINT ACTION_RegisterFonts(MSIPACKAGE *package)
...
@@ -275,9 +275,9 @@ UINT ACTION_RegisterFonts(MSIPACKAGE *package)
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RegisterFonts
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RegisterFonts
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
ERROR_SUCCESS
;
return
rc
;
}
}
static
UINT
ITERATE_UnregisterFonts
(
MSIRECORD
*
row
,
LPVOID
param
)
static
UINT
ITERATE_UnregisterFonts
(
MSIRECORD
*
row
,
LPVOID
param
)
...
@@ -355,7 +355,7 @@ UINT ACTION_UnregisterFonts( MSIPACKAGE *package )
...
@@ -355,7 +355,7 @@ UINT ACTION_UnregisterFonts( MSIPACKAGE *package )
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_UnregisterFonts
,
package
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_UnregisterFonts
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
ERROR_SUCCESS
;
return
r
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment