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
8128d97f
Commit
8128d97f
authored
Oct 08, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Oct 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Replace lengthy calls to MSI_DatabaseOpenView with MSI_OpenQuery.
parent
f03889ae
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
25 deletions
+7
-25
database.c
dlls/msi/database.c
+7
-25
No files found.
dlls/msi/database.c
View file @
8128d97f
...
...
@@ -557,25 +557,16 @@ static UINT msi_add_records_to_table(MSIDATABASE *db, LPWSTR *columns, LPWSTR *t
int
num_columns
,
int
num_records
)
{
UINT
r
;
DWORD
i
,
size
;
DWORD
i
;
MSIQUERY
*
view
;
MSIRECORD
*
rec
;
LPWSTR
query
;
static
const
WCHAR
select
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'%'
,
's'
,
'`'
,
0
};
size
=
lstrlenW
(
select
)
+
lstrlenW
(
labels
[
0
])
-
1
;
query
=
msi_alloc
(
size
*
sizeof
(
WCHAR
));
if
(
!
query
)
return
ERROR_OUTOFMEMORY
;
sprintfW
(
query
,
select
,
labels
[
0
]);
r
=
MSI_DatabaseOpenViewW
(
db
,
query
,
&
view
);
msi_free
(
query
);
r
=
MSI_OpenQuery
(
db
,
&
view
,
select
,
labels
[
0
]);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
...
...
@@ -1268,29 +1259,21 @@ static UINT merge_diff_tables(MSIRECORD *rec, LPVOID param)
{
MERGEDATA
*
data
=
(
MERGEDATA
*
)
param
;
MERGETABLE
*
table
;
MSIQUERY
*
dbview
=
NULL
;
MSIQUERY
*
dbview
;
MSIQUERY
*
mergeview
=
NULL
;
LPCWSTR
name
;
LPWSTR
query
;
DWORD
size
;
UINT
r
;
static
const
WCHAR
fmt
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'%'
,
's'
,
'`'
,
0
};
name
=
MSI_RecordGetString
(
rec
,
1
);
size
=
lstrlenW
(
fmt
)
+
lstrlenW
(
name
)
-
1
;
query
=
msi_alloc
(
size
*
sizeof
(
WCHAR
));
if
(
!
query
)
return
ERROR_OUTOFMEMORY
;
sprintfW
(
query
,
fmt
,
name
);
r
=
MSI_DatabaseOpenViewW
(
data
->
db
,
query
,
&
dbview
);
r
=
MSI_OpenQuery
(
data
->
db
,
&
dbview
,
query
,
name
);
if
(
r
!=
ERROR_SUCCESS
)
goto
done
;
return
r
;
r
=
MSI_
DatabaseOpenViewW
(
data
->
merge
,
query
,
&
mergeview
);
r
=
MSI_
OpenQuery
(
data
->
merge
,
&
mergeview
,
query
,
name
);
if
(
r
!=
ERROR_SUCCESS
)
goto
done
;
...
...
@@ -1326,7 +1309,6 @@ static UINT merge_diff_tables(MSIRECORD *rec, LPVOID param)
list_add_tail
(
data
->
tabledata
,
&
table
->
entry
);
done:
msi_free
(
query
);
msiobj_release
(
&
dbview
->
hdr
);
msiobj_release
(
&
mergeview
->
hdr
);
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