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
e1c2e882
Commit
e1c2e882
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: Clean up the database queries.
parent
d1b20585
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
196 additions
and
271 deletions
+196
-271
action.c
dlls/msi/action.c
+0
-0
alter.c
dlls/msi/alter.c
+5
-1
appsearch.c
dlls/msi/appsearch.c
+4
-8
classes.c
dlls/msi/classes.c
+52
-81
custom.c
dlls/msi/custom.c
+7
-9
database.c
dlls/msi/database.c
+4
-5
dialog.c
dlls/msi/dialog.c
+33
-43
files.c
dlls/msi/files.c
+17
-21
font.c
dlls/msi/font.c
+7
-17
install.c
dlls/msi/install.c
+3
-5
msipriv.h
dlls/msi/msipriv.h
+1
-1
package.c
dlls/msi/package.c
+45
-57
patch.c
dlls/msi/patch.c
+6
-6
table.c
dlls/msi/table.c
+7
-10
upgrade.c
dlls/msi/upgrade.c
+5
-7
No files found.
dlls/msi/action.c
View file @
e1c2e882
This diff is collapsed.
Click to expand it.
dlls/msi/alter.c
View file @
e1c2e882
...
@@ -135,8 +135,12 @@ static UINT alter_add_column(MSIALTERVIEW *av)
...
@@ -135,8 +135,12 @@ static UINT alter_add_column(MSIALTERVIEW *av)
{
{
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_columns
,
&
colnum
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_columns
,
&
colnum
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
if
(
r
!=
ERROR_SUCCESS
)
{
columns
->
ops
->
delete
(
columns
);
return
r
;
}
}
}
r
=
columns
->
ops
->
add_column
(
columns
,
av
->
colinfo
->
table
,
r
=
columns
->
ops
->
add_column
(
columns
,
av
->
colinfo
->
table
,
colnum
,
av
->
colinfo
->
column
,
colnum
,
av
->
colinfo
->
column
,
av
->
colinfo
->
type
,
(
av
->
hold
==
1
));
av
->
colinfo
->
type
,
(
av
->
hold
==
1
));
...
...
dlls/msi/appsearch.c
View file @
e1c2e882
...
@@ -1072,10 +1072,9 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param)
...
@@ -1072,10 +1072,9 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param)
UINT
ACTION_AppSearch
(
MSIPACKAGE
*
package
)
UINT
ACTION_AppSearch
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
's'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
' '
,
'*'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'f'
,
'r'
,
'o'
,
'm'
,
' '
,
'A'
,
'p'
,
'p'
,
'S'
,
'e'
,
'a'
,
'r'
,
'c'
,
'h'
,
0
};
'A'
,
'p'
,
'p'
,
'S'
,
'e'
,
'a'
,
'r'
,
'c'
,
'h'
,
0
};
MSIQUERY
*
view
=
NULL
;
MSIQUERY
*
view
;
UINT
r
;
UINT
r
;
if
(
msi_action_is_unique
(
package
,
szAppSearch
))
if
(
msi_action_is_unique
(
package
,
szAppSearch
))
...
@@ -1092,7 +1091,6 @@ UINT ACTION_AppSearch(MSIPACKAGE *package)
...
@@ -1092,7 +1091,6 @@ UINT ACTION_AppSearch(MSIPACKAGE *package)
r
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_appsearch
,
package
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_appsearch
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
r
;
return
r
;
}
}
...
@@ -1127,10 +1125,9 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
...
@@ -1127,10 +1125,9 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
UINT
ACTION_CCPSearch
(
MSIPACKAGE
*
package
)
UINT
ACTION_CCPSearch
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
's'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
' '
,
'*'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'f'
,
'r'
,
'o'
,
'm'
,
' '
,
'C'
,
'C'
,
'P'
,
'S'
,
'e'
,
'a'
,
'r'
,
'c'
,
'h'
,
0
};
'C'
,
'C'
,
'P'
,
'S'
,
'e'
,
'a'
,
'r'
,
'c'
,
'h'
,
0
};
MSIQUERY
*
view
=
NULL
;
MSIQUERY
*
view
;
UINT
r
;
UINT
r
;
if
(
msi_action_is_unique
(
package
,
szCCPSearch
))
if
(
msi_action_is_unique
(
package
,
szCCPSearch
))
...
@@ -1147,6 +1144,5 @@ UINT ACTION_CCPSearch(MSIPACKAGE *package)
...
@@ -1147,6 +1144,5 @@ UINT ACTION_CCPSearch(MSIPACKAGE *package)
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_CCPSearch
,
package
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_CCPSearch
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
r
;
return
r
;
}
}
dlls/msi/classes.c
View file @
e1c2e882
This diff is collapsed.
Click to expand it.
dlls/msi/custom.c
View file @
e1c2e882
...
@@ -1186,18 +1186,16 @@ static UINT HANDLE_CustomType53_54(MSIPACKAGE *package, LPCWSTR source,
...
@@ -1186,18 +1186,16 @@ static UINT HANDLE_CustomType53_54(MSIPACKAGE *package, LPCWSTR source,
UINT
ACTION_CustomAction
(
MSIPACKAGE
*
package
,
LPCWSTR
action
,
UINT
script
,
BOOL
execute
)
UINT
ACTION_CustomAction
(
MSIPACKAGE
*
package
,
LPCWSTR
action
,
UINT
script
,
BOOL
execute
)
{
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'C'
,
'u'
,
's'
,
't'
,
'o'
,
'm'
,
'A'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'`'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'A'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
UINT
rc
=
ERROR_SUCCESS
;
UINT
rc
=
ERROR_SUCCESS
;
MSIRECORD
*
row
=
0
;
MSIRECORD
*
row
;
static
const
WCHAR
ExecSeqQuery
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'C'
,
'u'
,
's'
,
't'
,
'o'
,
'm'
,
'A'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'`'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'A'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
UINT
type
;
UINT
type
;
LPCWSTR
source
,
target
;
LPCWSTR
source
,
target
;
LPWSTR
ptr
,
deferred_data
=
NULL
;
LPWSTR
ptr
,
deferred_data
=
NULL
;
LPWSTR
action_copy
=
strdupW
(
action
);
LPWSTR
deformated
=
NULL
,
action_copy
=
strdupW
(
action
);
WCHAR
*
deformated
=
NULL
;
/* deferred action: [properties]Action */
/* deferred action: [properties]Action */
if
((
ptr
=
strrchrW
(
action_copy
,
']'
)))
if
((
ptr
=
strrchrW
(
action_copy
,
']'
)))
...
@@ -1206,7 +1204,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
...
@@ -1206,7 +1204,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL
action
=
ptr
+
1
;
action
=
ptr
+
1
;
}
}
row
=
MSI_QueryGetRecord
(
package
->
db
,
ExecSeqQ
uery
,
action
);
row
=
MSI_QueryGetRecord
(
package
->
db
,
q
uery
,
action
);
if
(
!
row
)
if
(
!
row
)
{
{
msi_free
(
action_copy
);
msi_free
(
action_copy
);
...
...
dlls/msi/database.c
View file @
e1c2e882
...
@@ -1877,12 +1877,12 @@ done:
...
@@ -1877,12 +1877,12 @@ done:
static
UINT
gather_merge_data
(
MSIDATABASE
*
db
,
MSIDATABASE
*
merge
,
static
UINT
gather_merge_data
(
MSIDATABASE
*
db
,
MSIDATABASE
*
merge
,
struct
list
*
tabledata
)
struct
list
*
tabledata
)
{
{
UINT
r
;
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'_'
,
'T'
,
'a'
,
'b'
,
'l'
,
'e'
,
's'
,
'`'
,
0
};
MSIQUERY
*
view
;
MSIQUERY
*
view
;
MERGEDATA
data
;
MERGEDATA
data
;
UINT
r
;
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'_'
,
'T'
,
'a'
,
'b'
,
'l'
,
'e'
,
's'
,
'`'
,
0
};
r
=
MSI_DatabaseOpenViewW
(
merge
,
query
,
&
view
);
r
=
MSI_DatabaseOpenViewW
(
merge
,
query
,
&
view
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
...
@@ -1892,7 +1892,6 @@ static UINT gather_merge_data(MSIDATABASE *db, MSIDATABASE *merge,
...
@@ -1892,7 +1892,6 @@ static UINT gather_merge_data(MSIDATABASE *db, MSIDATABASE *merge,
data
.
merge
=
merge
;
data
.
merge
=
merge
;
data
.
tabledata
=
tabledata
;
data
.
tabledata
=
tabledata
;
r
=
MSI_IterateRecords
(
view
,
NULL
,
merge_diff_tables
,
&
data
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
merge_diff_tables
,
&
data
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
r
;
return
r
;
}
}
...
...
dlls/msi/dialog.c
View file @
e1c2e882
...
@@ -369,11 +369,10 @@ static UINT msi_dialog_set_font( msi_dialog *dialog, HWND hwnd, LPCWSTR name )
...
@@ -369,11 +369,10 @@ static UINT msi_dialog_set_font( msi_dialog *dialog, HWND hwnd, LPCWSTR name )
static
UINT
msi_dialog_build_font_list
(
msi_dialog
*
dialog
)
static
UINT
msi_dialog_build_font_list
(
msi_dialog
*
dialog
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*
'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M
'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'T'
,
'e'
,
'x'
,
't'
,
'S'
,
't'
,
'y'
,
'l'
,
'e'
,
'`'
,
' '
,
0
'`'
,
'T'
,
'e'
,
'x'
,
't'
,
'S'
,
't'
,
'y'
,
'l'
,
'e'
,
'`'
,
0
};
}
;
MSIQUERY
*
view
;
UINT
r
;
UINT
r
;
MSIQUERY
*
view
=
NULL
;
TRACE
(
"dialog %p
\n
"
,
dialog
);
TRACE
(
"dialog %p
\n
"
,
dialog
);
...
@@ -938,12 +937,12 @@ static UINT msi_dialog_control_event( MSIRECORD *rec, LPVOID param )
...
@@ -938,12 +937,12 @@ static UINT msi_dialog_control_event( MSIRECORD *rec, LPVOID param )
static
UINT
msi_dialog_button_handler
(
msi_dialog
*
dialog
,
msi_control
*
control
,
WPARAM
param
)
static
UINT
msi_dialog_button_handler
(
msi_dialog
*
dialog
,
msi_control
*
control
,
WPARAM
param
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'E'
,
'v'
,
'e'
,
'n'
,
't'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'E'
,
'v'
,
'e'
,
'n'
,
't'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'D'
,
'i'
,
'a'
,
'l'
,
'o'
,
'g'
,
'_'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
' '
,
'A'
,
'N'
,
'D'
,
' '
,
'`'
,
'D'
,
'i'
,
'a'
,
'l'
,
'o'
,
'g'
,
'_'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
' '
,
'A'
,
'N'
,
'D'
,
' '
,
'`'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'_'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
' '
,
'`'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'_'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
' '
,
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'`'
,
'O'
,
'r'
,
'd'
,
'e'
,
'r'
,
'i'
,
'n'
,
'g'
,
'`'
,
0
};
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'`'
,
'O'
,
'r'
,
'd'
,
'e'
,
'r'
,
'i'
,
'n'
,
'g'
,
'`'
,
0
};
MSIQUERY
*
view
=
NULL
;
MSIQUERY
*
view
;
UINT
r
;
UINT
r
;
if
(
HIWORD
(
param
)
!=
BN_CLICKED
)
if
(
HIWORD
(
param
)
!=
BN_CLICKED
)
...
@@ -953,9 +952,8 @@ static UINT msi_dialog_button_handler( msi_dialog *dialog, msi_control *control,
...
@@ -953,9 +952,8 @@ static UINT msi_dialog_button_handler( msi_dialog *dialog, msi_control *control,
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
{
{
ERR
(
"query failed
\n
"
);
ERR
(
"query failed
\n
"
);
return
0
;
return
ERROR_SUCCESS
;
}
}
r
=
MSI_IterateRecords
(
view
,
0
,
msi_dialog_control_event
,
dialog
);
r
=
MSI_IterateRecords
(
view
,
0
,
msi_dialog_control_event
,
dialog
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
r
;
return
r
;
...
@@ -1472,17 +1470,14 @@ static UINT msi_combobox_add_item( MSIRECORD *rec, LPVOID param )
...
@@ -1472,17 +1470,14 @@ static UINT msi_combobox_add_item( MSIRECORD *rec, LPVOID param )
static
UINT
msi_combobox_add_items
(
struct
msi_combobox_info
*
info
,
LPCWSTR
property
)
static
UINT
msi_combobox_add_items
(
struct
msi_combobox_info
*
info
,
LPCWSTR
property
)
{
{
UINT
r
;
MSIQUERY
*
view
=
NULL
;
DWORD
count
;
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'C'
,
'o'
,
'm'
,
'b'
,
'o'
,
'B'
,
'o'
,
'x'
,
'`'
,
' '
,
'`'
,
'C'
,
'o'
,
'm'
,
'b'
,
'o'
,
'B'
,
'o'
,
'x'
,
'`'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
' '
,
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'`'
,
'O'
,
'r'
,
'd'
,
'e'
,
'r'
,
'`'
,
0
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'`'
,
'O'
,
'r'
,
'd'
,
'e'
,
'r'
,
'`'
,
0
};
};
MSIQUERY
*
view
;
DWORD
count
;
UINT
r
;
r
=
MSI_OpenQuery
(
info
->
dialog
->
package
->
db
,
&
view
,
query
,
property
);
r
=
MSI_OpenQuery
(
info
->
dialog
->
package
->
db
,
&
view
,
query
,
property
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
...
@@ -1545,11 +1540,11 @@ static UINT msi_dialog_set_control_condition( MSIRECORD *rec, LPVOID param )
...
@@ -1545,11 +1540,11 @@ static UINT msi_dialog_set_control_condition( MSIRECORD *rec, LPVOID param )
static
UINT
msi_dialog_evaluate_control_conditions
(
msi_dialog
*
dialog
)
static
UINT
msi_dialog_evaluate_control_conditions
(
msi_dialog
*
dialog
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'C'
,
'o'
,
'n'
,
'd'
,
'i'
,
't'
,
'i'
,
'o'
,
'n'
,
' '
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'C'
,
'o'
,
'n'
,
'd'
,
'i'
,
't'
,
'i'
,
'o'
,
'n'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'D'
,
'i'
,
'a'
,
'l'
,
'o'
,
'g'
,
'_'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'D'
,
'i'
,
'a'
,
'l'
,
'o'
,
'g'
,
'_'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
UINT
r
;
UINT
r
;
MSIQUERY
*
view
=
NULL
;
MSIQUERY
*
view
;
MSIPACKAGE
*
package
=
dialog
->
package
;
MSIPACKAGE
*
package
=
dialog
->
package
;
TRACE
(
"%p %s
\n
"
,
dialog
,
debugstr_w
(
dialog
->
name
));
TRACE
(
"%p %s
\n
"
,
dialog
,
debugstr_w
(
dialog
->
name
));
...
@@ -2274,14 +2269,13 @@ static LRESULT WINAPI MSIRadioGroup_WndProc( HWND hWnd, UINT msg, WPARAM wParam,
...
@@ -2274,14 +2269,13 @@ static LRESULT WINAPI MSIRadioGroup_WndProc( HWND hWnd, UINT msg, WPARAM wParam,
static
UINT
msi_dialog_radiogroup_control
(
msi_dialog
*
dialog
,
MSIRECORD
*
rec
)
static
UINT
msi_dialog_radiogroup_control
(
msi_dialog
*
dialog
,
MSIRECORD
*
rec
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'R'
,
'a'
,
'd'
,
'i'
,
'o'
,
'B'
,
'u'
,
't'
,
't'
,
'o'
,
'n'
,
' '
,
'R'
,
'a'
,
'd'
,
'i'
,
'o'
,
'B'
,
'u'
,
't'
,
't'
,
'o'
,
'n'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
UINT
r
;
UINT
r
;
LPCWSTR
prop
;
LPCWSTR
prop
;
msi_control
*
control
;
msi_control
*
control
;
MSIQUERY
*
view
=
NULL
;
MSIQUERY
*
view
;
radio_button_group_descr
group
;
radio_button_group_descr
group
;
MSIPACKAGE
*
package
=
dialog
->
package
;
MSIPACKAGE
*
package
=
dialog
->
package
;
WNDPROC
oldproc
;
WNDPROC
oldproc
;
...
@@ -2760,17 +2754,14 @@ static UINT msi_listbox_add_item( MSIRECORD *rec, LPVOID param )
...
@@ -2760,17 +2754,14 @@ static UINT msi_listbox_add_item( MSIRECORD *rec, LPVOID param )
static
UINT
msi_listbox_add_items
(
struct
msi_listbox_info
*
info
,
LPCWSTR
property
)
static
UINT
msi_listbox_add_items
(
struct
msi_listbox_info
*
info
,
LPCWSTR
property
)
{
{
UINT
r
;
MSIQUERY
*
view
=
NULL
;
DWORD
count
;
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'L'
,
'i'
,
's'
,
't'
,
'B'
,
'o'
,
'x'
,
'`'
,
' '
,
'`'
,
'L'
,
'i'
,
's'
,
't'
,
'B'
,
'o'
,
'x'
,
'`'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
' '
,
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'`'
,
'O'
,
'r'
,
'd'
,
'e'
,
'r'
,
'`'
,
0
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'`'
,
'O'
,
'r'
,
'd'
,
'e'
,
'r'
,
'`'
,
0
};
};
MSIQUERY
*
view
;
DWORD
count
;
UINT
r
;
r
=
MSI_OpenQuery
(
info
->
dialog
->
package
->
db
,
&
view
,
query
,
property
);
r
=
MSI_OpenQuery
(
info
->
dialog
->
package
->
db
,
&
view
,
query
,
property
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
...
@@ -3359,12 +3350,11 @@ static UINT msi_dialog_create_controls( MSIRECORD *rec, LPVOID param )
...
@@ -3359,12 +3350,11 @@ static UINT msi_dialog_create_controls( MSIRECORD *rec, LPVOID param )
static
UINT
msi_dialog_fill_controls
(
msi_dialog
*
dialog
)
static
UINT
msi_dialog_fill_controls
(
msi_dialog
*
dialog
)
{
{
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'D'
,
'i'
,
'a'
,
'l'
,
'o'
,
'g'
,
'_'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
'`'
,
'D'
,
'i'
,
'a'
,
'l'
,
'o'
,
'g'
,
'_'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
UINT
r
;
UINT
r
;
MSIQUERY
*
view
=
NULL
;
MSIQUERY
*
view
;
MSIPACKAGE
*
package
=
dialog
->
package
;
MSIPACKAGE
*
package
=
dialog
->
package
;
TRACE
(
"%p %s
\n
"
,
dialog
,
debugstr_w
(
dialog
->
name
)
);
TRACE
(
"%p %s
\n
"
,
dialog
,
debugstr_w
(
dialog
->
name
)
);
...
...
dlls/msi/files.c
View file @
e1c2e882
...
@@ -880,20 +880,18 @@ done:
...
@@ -880,20 +880,18 @@ done:
UINT
ACTION_MoveFiles
(
MSIPACKAGE
*
package
)
UINT
ACTION_MoveFiles
(
MSIPACKAGE
*
package
)
{
{
UINT
rc
;
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'M'
,
'o'
,
'v'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
'`'
,
0
};
MSIQUERY
*
view
;
MSIQUERY
*
view
;
UINT
rc
;
static
const
WCHAR
ExecSeqQuery
[]
=
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'M'
,
'o'
,
'v'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
'`'
,
0
};
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
ExecSeqQuery
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_MoveFiles
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_MoveFiles
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
return
rc
;
}
}
...
@@ -1014,19 +1012,18 @@ static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
...
@@ -1014,19 +1012,18 @@ static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
UINT
ACTION_DuplicateFiles
(
MSIPACKAGE
*
package
)
UINT
ACTION_DuplicateFiles
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'D'
,
'u'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
'`'
,
0
};
MSIQUERY
*
view
;
UINT
rc
;
UINT
rc
;
MSIQUERY
*
view
;
static
const
WCHAR
ExecSeqQuery
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'D'
,
'u'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
'`'
,
0
};
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
ExecSeqQ
uery
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
q
uery
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_DuplicateFiles
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_DuplicateFiles
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
return
rc
;
}
}
...
@@ -1091,11 +1088,11 @@ static UINT ITERATE_RemoveDuplicateFiles( MSIRECORD *row, LPVOID param )
...
@@ -1091,11 +1088,11 @@ static UINT ITERATE_RemoveDuplicateFiles( MSIRECORD *row, LPVOID param )
UINT
ACTION_RemoveDuplicateFiles
(
MSIPACKAGE
*
package
)
UINT
ACTION_RemoveDuplicateFiles
(
MSIPACKAGE
*
package
)
{
{
UINT
rc
;
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'D'
,
'u'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
'`'
,
0
};
MSIQUERY
*
view
;
MSIQUERY
*
view
;
static
const
WCHAR
query
[]
=
UINT
rc
;
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'D'
,
'u'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
'`'
,
0
};
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
...
@@ -1103,7 +1100,6 @@ UINT ACTION_RemoveDuplicateFiles( MSIPACKAGE *package )
...
@@ -1103,7 +1100,6 @@ UINT ACTION_RemoveDuplicateFiles( MSIPACKAGE *package )
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveDuplicateFiles
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RemoveDuplicateFiles
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
return
rc
;
}
}
...
@@ -1228,9 +1224,9 @@ static void remove_folder( MSIFOLDER *folder )
...
@@ -1228,9 +1224,9 @@ static void remove_folder( MSIFOLDER *folder )
UINT
ACTION_RemoveFiles
(
MSIPACKAGE
*
package
)
UINT
ACTION_RemoveFiles
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
query
[]
=
static
const
WCHAR
query
[]
=
{
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'R'
,
'e'
,
'm'
,
'o'
,
'v'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
'`'
,
0
};
'`'
,
'R'
,
'e'
,
'm'
,
'o'
,
'v'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
'`'
,
0
};
MSIQUERY
*
view
;
MSIQUERY
*
view
;
MSICOMPONENT
*
comp
;
MSICOMPONENT
*
comp
;
MSIFILE
*
file
;
MSIFILE
*
file
;
...
...
dlls/msi/font.c
View file @
e1c2e882
...
@@ -266,22 +266,17 @@ static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
...
@@ -266,22 +266,17 @@ static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
UINT
ACTION_RegisterFonts
(
MSIPACKAGE
*
package
)
UINT
ACTION_RegisterFonts
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'F'
,
'o'
,
'n'
,
't'
,
'`'
,
0
};
MSIQUERY
*
view
;
UINT
rc
;
UINT
rc
;
MSIQUERY
*
view
;
static
const
WCHAR
ExecSeqQuery
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'F'
,
'o'
,
'n'
,
't'
,
'`'
,
0
};
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
ExecSeqQ
uery
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
q
uery
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
{
TRACE
(
"MSI_DatabaseOpenViewW failed: %d
\n
"
,
rc
);
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RegisterFonts
,
package
);
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_RegisterFonts
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
...
@@ -351,21 +346,16 @@ static UINT ITERATE_UnregisterFonts( MSIRECORD *row, LPVOID param )
...
@@ -351,21 +346,16 @@ static UINT ITERATE_UnregisterFonts( MSIRECORD *row, LPVOID param )
UINT
ACTION_UnregisterFonts
(
MSIPACKAGE
*
package
)
UINT
ACTION_UnregisterFonts
(
MSIPACKAGE
*
package
)
{
{
UINT
r
;
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'F'
,
'o'
,
'n'
,
't'
,
'`'
,
0
};
MSIQUERY
*
view
;
MSIQUERY
*
view
;
static
const
WCHAR
query
[]
=
UINT
r
;
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'F'
,
'o'
,
'n'
,
't'
,
'`'
,
0
};
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
{
TRACE
(
"MSI_DatabaseOpenViewW failed: %u
\n
"
,
r
);
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_UnregisterFonts
,
package
);
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_UnregisterFonts
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
dlls/msi/install.c
View file @
e1c2e882
...
@@ -119,7 +119,7 @@ UINT WINAPI MsiSequenceA( MSIHANDLE hInstall, LPCSTR szTable, INT iSequenceMode
...
@@ -119,7 +119,7 @@ UINT WINAPI MsiSequenceA( MSIHANDLE hInstall, LPCSTR szTable, INT iSequenceMode
LPWSTR
szwTable
;
LPWSTR
szwTable
;
UINT
ret
;
UINT
ret
;
TRACE
(
"%s
\n
"
,
debugstr_a
(
szTable
)
);
TRACE
(
"%s
, %d
\n
"
,
debugstr_a
(
szTable
),
iSequenceMode
);
szwTable
=
strdupAtoW
(
szTable
);
szwTable
=
strdupAtoW
(
szTable
);
if
(
szTable
&&
!
szwTable
)
if
(
szTable
&&
!
szwTable
)
...
@@ -138,7 +138,7 @@ UINT WINAPI MsiSequenceW( MSIHANDLE hInstall, LPCWSTR szTable, INT iSequenceMode
...
@@ -138,7 +138,7 @@ UINT WINAPI MsiSequenceW( MSIHANDLE hInstall, LPCWSTR szTable, INT iSequenceMode
MSIPACKAGE
*
package
;
MSIPACKAGE
*
package
;
UINT
ret
;
UINT
ret
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
szTable
)
);
TRACE
(
"%s
, %d
\n
"
,
debugstr_w
(
szTable
),
iSequenceMode
);
package
=
msihandle2msiinfo
(
hInstall
,
MSIHANDLETYPE_PACKAGE
);
package
=
msihandle2msiinfo
(
hInstall
,
MSIHANDLETYPE_PACKAGE
);
if
(
!
package
)
if
(
!
package
)
...
@@ -173,10 +173,8 @@ UINT WINAPI MsiSequenceW( MSIHANDLE hInstall, LPCWSTR szTable, INT iSequenceMode
...
@@ -173,10 +173,8 @@ UINT WINAPI MsiSequenceW( MSIHANDLE hInstall, LPCWSTR szTable, INT iSequenceMode
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
ret
=
MSI_Sequence
(
package
,
szTable
);
ret
=
MSI_Sequence
(
package
,
szTable
,
iSequenceMode
);
msiobj_release
(
&
package
->
hdr
);
msiobj_release
(
&
package
->
hdr
);
return
ret
;
return
ret
;
}
}
...
...
dlls/msi/msipriv.h
View file @
e1c2e882
...
@@ -774,7 +774,7 @@ extern UINT msi_apply_registered_patch( MSIPACKAGE *package, LPCWSTR patch_code
...
@@ -774,7 +774,7 @@ extern UINT msi_apply_registered_patch( MSIPACKAGE *package, LPCWSTR patch_code
extern
UINT
MSI_InstallPackage
(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
)
DECLSPEC_HIDDEN
;
extern
UINT
MSI_InstallPackage
(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
)
DECLSPEC_HIDDEN
;
extern
UINT
ACTION_DialogBox
(
MSIPACKAGE
*
,
LPCWSTR
)
DECLSPEC_HIDDEN
;
extern
UINT
ACTION_DialogBox
(
MSIPACKAGE
*
,
LPCWSTR
)
DECLSPEC_HIDDEN
;
extern
UINT
ACTION_ForceReboot
(
MSIPACKAGE
*
package
)
DECLSPEC_HIDDEN
;
extern
UINT
ACTION_ForceReboot
(
MSIPACKAGE
*
package
)
DECLSPEC_HIDDEN
;
extern
UINT
MSI_Sequence
(
MSIPACKAGE
*
package
,
LPCWSTR
szTable
,
INT
iSequenceMode
)
DECLSPEC_HIDDEN
;
extern
UINT
MSI_Sequence
(
MSIPACKAGE
*
package
,
LPCWSTR
szTable
)
DECLSPEC_HIDDEN
;
extern
UINT
MSI_SetFeatureStates
(
MSIPACKAGE
*
package
)
DECLSPEC_HIDDEN
;
extern
UINT
MSI_SetFeatureStates
(
MSIPACKAGE
*
package
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_parse_command_line
(
MSIPACKAGE
*
package
,
LPCWSTR
szCommandLine
,
BOOL
preserve_case
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_parse_command_line
(
MSIPACKAGE
*
package
,
LPCWSTR
szCommandLine
,
BOOL
preserve_case
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_schedule_action
(
MSIPACKAGE
*
package
,
UINT
script
,
const
WCHAR
*
action
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_schedule_action
(
MSIPACKAGE
*
package
,
UINT
script
,
const
WCHAR
*
action
)
DECLSPEC_HIDDEN
;
...
...
dlls/msi/package.c
View file @
e1c2e882
...
@@ -367,21 +367,20 @@ static void MSI_FreePackage( MSIOBJECTHDR *arg)
...
@@ -367,21 +367,20 @@ static void MSI_FreePackage( MSIOBJECTHDR *arg)
static
UINT
create_temp_property_table
(
MSIPACKAGE
*
package
)
static
UINT
create_temp_property_table
(
MSIPACKAGE
*
package
)
{
{
MSIQUERY
*
view
=
NULL
;
static
const
WCHAR
query
[]
=
{
'C'
,
'R'
,
'E'
,
'A'
,
'T'
,
'E'
,
' '
,
'T'
,
'A'
,
'B'
,
'L'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'('
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'C'
,
'H'
,
'A'
,
'R'
,
'('
,
'5'
,
'6'
,
')'
,
' '
,
'N'
,
'O'
,
'T'
,
' '
,
'N'
,
'U'
,
'L'
,
'L'
,
' '
,
'T'
,
'E'
,
'M'
,
'P'
,
'O'
,
'R'
,
'A'
,
'R'
,
'Y'
,
','
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
' '
,
'C'
,
'H'
,
'A'
,
'R'
,
'('
,
'9'
,
'8'
,
')'
,
' '
,
'N'
,
'O'
,
'T'
,
' '
,
'N'
,
'U'
,
'L'
,
'L'
,
' '
,
'T'
,
'E'
,
'M'
,
'P'
,
'O'
,
'R'
,
'A'
,
'R'
,
'Y'
,
' '
,
'P'
,
'R'
,
'I'
,
'M'
,
'A'
,
'R'
,
'Y'
,
' '
,
'K'
,
'E'
,
'Y'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
')'
,
' '
,
'H'
,
'O'
,
'L'
,
'D'
,
0
};
MSIQUERY
*
view
;
UINT
rc
;
UINT
rc
;
static
const
WCHAR
CreateSql
[]
=
{
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
'C'
,
'R'
,
'E'
,
'A'
,
'T'
,
'E'
,
' '
,
'T'
,
'A'
,
'B'
,
'L'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'('
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'C'
,
'H'
,
'A'
,
'R'
,
'('
,
'5'
,
'6'
,
')'
,
' '
,
'N'
,
'O'
,
'T'
,
' '
,
'N'
,
'U'
,
'L'
,
'L'
,
' '
,
'T'
,
'E'
,
'M'
,
'P'
,
'O'
,
'R'
,
'A'
,
'R'
,
'Y'
,
','
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
' '
,
'C'
,
'H'
,
'A'
,
'R'
,
'('
,
'9'
,
'8'
,
')'
,
' '
,
'N'
,
'O'
,
'T'
,
' '
,
'N'
,
'U'
,
'L'
,
'L'
,
' '
,
'T'
,
'E'
,
'M'
,
'P'
,
'O'
,
'R'
,
'A'
,
'R'
,
'Y'
,
' '
,
'P'
,
'R'
,
'I'
,
'M'
,
'A'
,
'R'
,
'Y'
,
' '
,
'K'
,
'E'
,
'Y'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
')'
,
' '
,
'H'
,
'O'
,
'L'
,
'D'
,
0
};
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
CreateSql
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
return
rc
;
...
@@ -393,22 +392,20 @@ static UINT create_temp_property_table(MSIPACKAGE *package)
...
@@ -393,22 +392,20 @@ static UINT create_temp_property_table(MSIPACKAGE *package)
UINT
msi_clone_properties
(
MSIPACKAGE
*
package
)
UINT
msi_clone_properties
(
MSIPACKAGE
*
package
)
{
{
MSIQUERY
*
view_select
=
NULL
;
UINT
rc
;
static
const
WCHAR
query_select
[]
=
{
static
const
WCHAR
query_select
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*
'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M
'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
0
};
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
0
};
static
const
WCHAR
query_insert
[]
=
{
static
const
WCHAR
query_insert
[]
=
{
'I'
,
'N'
,
'S'
,
'E'
,
'R'
,
'T'
,
' '
,
'i'
,
'n'
,
't'
,
'o'
,
' '
,
'I'
,
'N'
,
'S'
,
'E'
,
'R'
,
'T'
,
' '
,
'I'
,
'N'
,
'T'
,
'O'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'('
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
','
,
'('
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
','
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
')'
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
')'
,
' '
,
'V'
,
'A'
,
'L'
,
'U'
,
'E'
,
'S'
,
' '
,
'('
,
'?'
,
','
,
'?'
,
')'
,
0
};
'V'
,
'A'
,
'L'
,
'U'
,
'E'
,
'S'
,
' '
,
'('
,
'?'
,
','
,
'?'
,
')'
,
0
};
static
const
WCHAR
query_update
[]
=
{
static
const
WCHAR
query_update
[]
=
{
'U'
,
'P'
,
'D'
,
'A'
,
'T'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'U'
,
'P'
,
'D'
,
'A'
,
'T'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'S'
,
'E'
,
'T'
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
' '
,
'='
,
' '
,
'?'
,
' '
,
'S'
,
'E'
,
'T'
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
' '
,
'='
,
' '
,
'?'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'?'
,
0
};
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'?'
,
0
};
MSIQUERY
*
view_select
;
UINT
rc
;
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query_select
,
&
view_select
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query_select
,
&
view_select
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
...
@@ -1934,27 +1931,24 @@ void msi_reset_folders( MSIPACKAGE *package, BOOL source )
...
@@ -1934,27 +1931,24 @@ void msi_reset_folders( MSIPACKAGE *package, BOOL source )
UINT
msi_set_property
(
MSIDATABASE
*
db
,
LPCWSTR
szName
,
LPCWSTR
szValue
)
UINT
msi_set_property
(
MSIDATABASE
*
db
,
LPCWSTR
szName
,
LPCWSTR
szValue
)
{
{
MSIQUERY
*
view
;
static
const
WCHAR
insert_query
[]
=
{
MSIRECORD
*
row
=
NULL
;
'I'
,
'N'
,
'S'
,
'E'
,
'R'
,
'T'
,
' '
,
'I'
,
'N'
,
'T'
,
'O'
,
' '
,
UINT
rc
;
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
DWORD
sz
=
0
;
'('
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
','
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
')'
,
' '
,
WCHAR
Query
[
1024
];
'V'
,
'A'
,
'L'
,
'U'
,
'E'
,
'S'
,
' '
,
'('
,
'?'
,
','
,
'?'
,
')'
,
0
};
static
const
WCHAR
update_query
[]
=
{
static
const
WCHAR
Insert
[]
=
{
'U'
,
'P'
,
'D'
,
'A'
,
'T'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'I'
,
'N'
,
'S'
,
'E'
,
'R'
,
'T'
,
' '
,
'i'
,
'n'
,
't'
,
'o'
,
' '
,
'S'
,
'E'
,
'T'
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
' '
,
'='
,
' '
,
'?'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'('
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
','
,
static
const
WCHAR
delete_query
[]
=
{
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
')'
,
' '
,
'V'
,
'A'
,
'L'
,
'U'
,
'E'
,
'S'
,
' '
,
'('
,
'?'
,
','
,
'?'
,
')'
,
0
};
static
const
WCHAR
Update
[]
=
{
'U'
,
'P'
,
'D'
,
'A'
,
'T'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
's'
,
'e'
,
't'
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
' '
,
'='
,
' '
,
'?'
,
' '
,
'w'
,
'h'
,
'e'
,
'r'
,
'e'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
static
const
WCHAR
Delete
[]
=
{
'D'
,
'E'
,
'L'
,
'E'
,
'T'
,
'E'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'D'
,
'E'
,
'L'
,
'E'
,
'T'
,
'E'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
MSIQUERY
*
view
;
MSIRECORD
*
row
=
NULL
;
DWORD
sz
=
0
;
WCHAR
query
[
1024
];
UINT
rc
;
TRACE
(
"%p %s %s
\n
"
,
db
,
debugstr_w
(
szName
),
debugstr_w
(
szValue
));
TRACE
(
"%p %s %s
\n
"
,
db
,
debugstr_w
(
szName
),
debugstr_w
(
szValue
));
...
@@ -1968,35 +1962,32 @@ UINT msi_set_property( MSIDATABASE *db, LPCWSTR szName, LPCWSTR szValue )
...
@@ -1968,35 +1962,32 @@ UINT msi_set_property( MSIDATABASE *db, LPCWSTR szName, LPCWSTR szValue )
rc
=
msi_get_property
(
db
,
szName
,
0
,
&
sz
);
rc
=
msi_get_property
(
db
,
szName
,
0
,
&
sz
);
if
(
!
szValue
||
!*
szValue
)
if
(
!
szValue
||
!*
szValue
)
{
{
sprintfW
(
Query
,
Delete
,
szName
);
sprintfW
(
query
,
delete_query
,
szName
);
}
}
else
if
(
rc
==
ERROR_MORE_DATA
||
rc
==
ERROR_SUCCESS
)
else
if
(
rc
==
ERROR_MORE_DATA
||
rc
==
ERROR_SUCCESS
)
{
{
sprintfW
(
Query
,
Update
,
szName
);
sprintfW
(
query
,
update_query
,
szName
);
row
=
MSI_CreateRecord
(
1
);
row
=
MSI_CreateRecord
(
1
);
MSI_RecordSetStringW
(
row
,
1
,
szValue
);
MSI_RecordSetStringW
(
row
,
1
,
szValue
);
}
}
else
else
{
{
strcpyW
(
Query
,
Insert
);
strcpyW
(
query
,
insert_query
);
row
=
MSI_CreateRecord
(
2
);
row
=
MSI_CreateRecord
(
2
);
MSI_RecordSetStringW
(
row
,
1
,
szName
);
MSI_RecordSetStringW
(
row
,
1
,
szName
);
MSI_RecordSetStringW
(
row
,
2
,
szValue
);
MSI_RecordSetStringW
(
row
,
2
,
szValue
);
}
}
rc
=
MSI_DatabaseOpenViewW
(
db
,
Q
uery
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
db
,
q
uery
,
&
view
);
if
(
rc
==
ERROR_SUCCESS
)
if
(
rc
==
ERROR_SUCCESS
)
{
{
rc
=
MSI_ViewExecute
(
view
,
row
);
rc
=
MSI_ViewExecute
(
view
,
row
);
MSI_ViewClose
(
view
);
MSI_ViewClose
(
view
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
}
}
if
(
row
)
msiobj_release
(
&
row
->
hdr
);
if
(
row
)
msiobj_release
(
&
row
->
hdr
);
return
rc
;
return
rc
;
}
}
...
@@ -2053,15 +2044,13 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
...
@@ -2053,15 +2044,13 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
static
MSIRECORD
*
msi_get_property_row
(
MSIDATABASE
*
db
,
LPCWSTR
name
)
static
MSIRECORD
*
msi_get_property_row
(
MSIDATABASE
*
db
,
LPCWSTR
name
)
{
{
MSIQUERY
*
view
;
MSIRECORD
*
rec
,
*
row
=
NULL
;
UINT
r
;
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
'='
,
'?'
,
0
};
'='
,
'?'
,
0
};
MSIRECORD
*
rec
,
*
row
=
NULL
;
MSIQUERY
*
view
;
UINT
r
;
if
(
!
name
||
!*
name
)
if
(
!
name
||
!*
name
)
return
NULL
;
return
NULL
;
...
@@ -2080,7 +2069,6 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
...
@@ -2080,7 +2069,6 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
MSI_ViewClose
(
view
);
MSI_ViewClose
(
view
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
}
}
msiobj_release
(
&
rec
->
hdr
);
msiobj_release
(
&
rec
->
hdr
);
return
row
;
return
row
;
}
}
...
...
dlls/msi/patch.c
View file @
e1c2e882
...
@@ -266,7 +266,7 @@ static void patch_offset_list_free( struct patch_offset_list *pos )
...
@@ -266,7 +266,7 @@ static void patch_offset_list_free( struct patch_offset_list *pos )
static
void
patch_offset_get_patches
(
MSIDATABASE
*
db
,
UINT
last_sequence
,
struct
patch_offset_list
*
pos
)
static
void
patch_offset_get_patches
(
MSIDATABASE
*
db
,
UINT
last_sequence
,
struct
patch_offset_list
*
pos
)
{
{
static
const
WCHAR
query
_patch
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'P'
,
'a'
,
't'
,
'c'
,
'h'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'P'
,
'a'
,
't'
,
'c'
,
'h'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
' '
,
'<'
,
'='
,
' '
,
'?'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
' '
,
'<'
,
'='
,
' '
,
'?'
,
' '
,
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
0
};
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
0
};
...
@@ -274,7 +274,7 @@ static void patch_offset_get_patches( MSIDATABASE *db, UINT last_sequence, struc
...
@@ -274,7 +274,7 @@ static void patch_offset_get_patches( MSIDATABASE *db, UINT last_sequence, struc
MSIRECORD
*
rec
;
MSIRECORD
*
rec
;
UINT
r
;
UINT
r
;
r
=
MSI_DatabaseOpenViewW
(
db
,
query
_patch
,
&
view
);
r
=
MSI_DatabaseOpenViewW
(
db
,
query
,
&
view
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
return
;
return
;
...
@@ -301,7 +301,7 @@ static void patch_offset_get_patches( MSIDATABASE *db, UINT last_sequence, struc
...
@@ -301,7 +301,7 @@ static void patch_offset_get_patches( MSIDATABASE *db, UINT last_sequence, struc
static
void
patch_offset_get_files
(
MSIDATABASE
*
db
,
UINT
last_sequence
,
struct
patch_offset_list
*
pos
)
static
void
patch_offset_get_files
(
MSIDATABASE
*
db
,
UINT
last_sequence
,
struct
patch_offset_list
*
pos
)
{
{
static
const
WCHAR
query
_files
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'F'
,
'i'
,
'l'
,
'e'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'F'
,
'i'
,
'l'
,
'e'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
' '
,
'<'
,
'='
,
' '
,
'?'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
' '
,
'<'
,
'='
,
' '
,
'?'
,
' '
,
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
0
};
'O'
,
'R'
,
'D'
,
'E'
,
'R'
,
' '
,
'B'
,
'Y'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
0
};
...
@@ -309,7 +309,7 @@ static void patch_offset_get_files( MSIDATABASE *db, UINT last_sequence, struct
...
@@ -309,7 +309,7 @@ static void patch_offset_get_files( MSIDATABASE *db, UINT last_sequence, struct
MSIRECORD
*
rec
;
MSIRECORD
*
rec
;
UINT
r
;
UINT
r
;
r
=
MSI_DatabaseOpenViewW
(
db
,
query
_files
,
&
view
);
r
=
MSI_DatabaseOpenViewW
(
db
,
query
,
&
view
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
return
;
return
;
...
@@ -342,7 +342,7 @@ static void patch_offset_get_files( MSIDATABASE *db, UINT last_sequence, struct
...
@@ -342,7 +342,7 @@ static void patch_offset_get_files( MSIDATABASE *db, UINT last_sequence, struct
static
UINT
patch_offset_modify_db
(
MSIDATABASE
*
db
,
struct
patch_offset_list
*
pos
)
static
UINT
patch_offset_modify_db
(
MSIDATABASE
*
db
,
struct
patch_offset_list
*
pos
)
{
{
static
const
WCHAR
query
_files
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'F'
,
'i'
,
'l'
,
'e'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'F'
,
'i'
,
'l'
,
'e'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
' '
,
'>'
,
'='
,
' '
,
'?'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
' '
,
'>'
,
'='
,
' '
,
'?'
,
' '
,
'A'
,
'N'
,
'D'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
' '
,
'<'
,
'='
,
' '
,
'?'
,
' '
,
'A'
,
'N'
,
'D'
,
' '
,
'S'
,
'e'
,
'q'
,
'u'
,
'e'
,
'n'
,
'c'
,
'e'
,
' '
,
'<'
,
'='
,
' '
,
'?'
,
' '
,
...
@@ -352,7 +352,7 @@ static UINT patch_offset_modify_db( MSIDATABASE *db, struct patch_offset_list *p
...
@@ -352,7 +352,7 @@ static UINT patch_offset_modify_db( MSIDATABASE *db, struct patch_offset_list *p
MSIQUERY
*
view
;
MSIQUERY
*
view
;
UINT
r
;
UINT
r
;
r
=
MSI_DatabaseOpenViewW
(
db
,
query
_files
,
&
view
);
r
=
MSI_DatabaseOpenViewW
(
db
,
query
,
&
view
);
if
(
r
!=
ERROR_SUCCESS
)
if
(
r
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
...
...
dlls/msi/table.c
View file @
e1c2e882
...
@@ -1237,16 +1237,14 @@ static UINT TABLE_get_row( struct tagMSIVIEW *view, UINT row, MSIRECORD **rec )
...
@@ -1237,16 +1237,14 @@ static UINT TABLE_get_row( struct tagMSIVIEW *view, UINT row, MSIRECORD **rec )
static
UINT
msi_addstreamW
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
IStream
*
data
)
static
UINT
msi_addstreamW
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
IStream
*
data
)
{
{
UINT
r
;
MSIQUERY
*
query
=
NULL
;
MSIRECORD
*
rec
=
NULL
;
static
const
WCHAR
insert
[]
=
{
static
const
WCHAR
insert
[]
=
{
'I'
,
'N'
,
'S'
,
'E'
,
'R'
,
'T'
,
' '
,
'I'
,
'N'
,
'T'
,
'O'
,
' '
,
'I'
,
'N'
,
'S'
,
'E'
,
'R'
,
'T'
,
' '
,
'I'
,
'N'
,
'T'
,
'O'
,
' '
,
'`'
,
'_'
,
'S'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
's'
,
'`'
,
' '
,
'`'
,
'_'
,
'S'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
's'
,
'`'
,
' '
,
'('
,
'`'
,
'N'
,
'a'
,
'm'
,
'e'
,
'`'
,
','
,
'('
,
'`'
,
'N'
,
'a'
,
'm'
,
'e'
,
'`'
,
','
,
'`'
,
'D'
,
'a'
,
't'
,
'a'
,
'`'
,
')'
,
' '
,
'`'
,
'D'
,
'a'
,
't'
,
'a'
,
'`'
,
')'
,
' '
,
'V'
,
'A'
,
'L'
,
'U'
,
'E'
,
'S'
,
' '
,
'('
,
'?'
,
','
,
'?'
,
')'
,
0
};
'V'
,
'A'
,
'L'
,
'U'
,
'E'
,
'S'
,
' '
,
'('
,
'?'
,
','
,
'?'
,
')'
,
0
};
MSIQUERY
*
query
=
NULL
;
MSIRECORD
*
rec
;
UINT
r
;
TRACE
(
"%p %s %p
\n
"
,
db
,
debugstr_w
(
name
),
data
);
TRACE
(
"%p %s %p
\n
"
,
db
,
debugstr_w
(
name
),
data
);
...
@@ -1271,7 +1269,6 @@ static UINT msi_addstreamW( MSIDATABASE *db, LPCWSTR name, IStream *data )
...
@@ -1271,7 +1269,6 @@ static UINT msi_addstreamW( MSIDATABASE *db, LPCWSTR name, IStream *data )
err:
err:
msiobj_release
(
&
query
->
hdr
);
msiobj_release
(
&
query
->
hdr
);
msiobj_release
(
&
rec
->
hdr
);
msiobj_release
(
&
rec
->
hdr
);
return
r
;
return
r
;
}
}
...
...
dlls/msi/upgrade.c
View file @
e1c2e882
...
@@ -205,18 +205,17 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
...
@@ -205,18 +205,17 @@ static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
UINT
ACTION_FindRelatedProducts
(
MSIPACKAGE
*
package
)
UINT
ACTION_FindRelatedProducts
(
MSIPACKAGE
*
package
)
{
{
static
const
WCHAR
Query
[]
=
static
const
WCHAR
query
[]
=
{
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
' '
,
'`'
,
'U'
,
'p'
,
'g'
,
'r'
,
'a'
,
'd'
,
'e'
,
'`'
,
0
};
'`'
,
'U'
,
'p'
,
'g'
,
'r'
,
'a'
,
'd'
,
'e'
,
'`'
,
0
};
UINT
rc
=
ERROR_SUCCESS
;
MSIQUERY
*
view
;
MSIQUERY
*
view
;
UINT
rc
;
if
(
msi_get_property_int
(
package
->
db
,
szInstalled
,
0
))
if
(
msi_get_property_int
(
package
->
db
,
szInstalled
,
0
))
{
{
TRACE
(
"Skipping FindRelatedProducts action: product already installed
\n
"
);
TRACE
(
"Skipping FindRelatedProducts action: product already installed
\n
"
);
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
if
(
msi_action_is_unique
(
package
,
szFindRelatedProducts
))
if
(
msi_action_is_unique
(
package
,
szFindRelatedProducts
))
{
{
TRACE
(
"Skipping FindRelatedProducts action: already done in UI sequence
\n
"
);
TRACE
(
"Skipping FindRelatedProducts action: already done in UI sequence
\n
"
);
...
@@ -225,12 +224,11 @@ UINT ACTION_FindRelatedProducts(MSIPACKAGE *package)
...
@@ -225,12 +224,11 @@ UINT ACTION_FindRelatedProducts(MSIPACKAGE *package)
else
else
msi_register_unique_action
(
package
,
szFindRelatedProducts
);
msi_register_unique_action
(
package
,
szFindRelatedProducts
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
Q
uery
,
&
view
);
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
q
uery
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
if
(
rc
!=
ERROR_SUCCESS
)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_FindRelatedProducts
,
package
);
rc
=
MSI_IterateRecords
(
view
,
NULL
,
ITERATE_FindRelatedProducts
,
package
);
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
return
rc
;
}
}
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