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
0670ebc6
Commit
0670ebc6
authored
Nov 27, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Use MSI_IterateRecords when cloning properties.
parent
78584b6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
32 deletions
+20
-32
package.c
dlls/msi/package.c
+20
-32
No files found.
dlls/msi/package.c
View file @
0670ebc6
...
...
@@ -60,45 +60,33 @@ static void MSI_FreePackage( MSIOBJECTHDR *arg)
msi_free_properties
(
package
);
}
static
UINT
iterate_clone_props
(
MSIRECORD
*
row
,
LPVOID
param
)
{
MSIPACKAGE
*
package
=
param
;
LPCWSTR
name
,
value
;
name
=
MSI_RecordGetString
(
row
,
1
);
value
=
MSI_RecordGetString
(
row
,
2
);
MSI_SetPropertyW
(
package
,
name
,
value
);
return
ERROR_SUCCESS
;
}
static
UINT
clone_properties
(
MSIPACKAGE
*
package
)
{
MSIQUERY
*
view
=
NULL
;
UINT
rc
;
static
const
WCHAR
Query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
0
};
/* clone the existing properties */
rc
=
MSI_DatabaseOpenViewW
(
package
->
db
,
Query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
0
};
MSIQUERY
*
view
=
NULL
;
UINT
r
;
r
c
=
MSI_ViewExecute
(
view
,
0
);
if
(
r
c
!
=
ERROR_SUCCESS
)
r
=
MSI_OpenQuery
(
package
->
db
,
&
view
,
Query
);
if
(
r
=
=
ERROR_SUCCESS
)
{
MSI_ViewClose
(
view
);
r
=
MSI_IterateRecords
(
view
,
NULL
,
iterate_clone_props
,
package
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
}
while
(
1
)
{
MSIRECORD
*
row
;
LPCWSTR
name
,
value
;
rc
=
MSI_ViewFetch
(
view
,
&
row
);
if
(
rc
!=
ERROR_SUCCESS
)
break
;
name
=
MSI_RecordGetString
(
row
,
1
);
value
=
MSI_RecordGetString
(
row
,
2
);
MSI_SetPropertyW
(
package
,
name
,
value
);
msiobj_release
(
&
row
->
hdr
);
}
MSI_ViewClose
(
view
);
msiobj_release
(
&
view
->
hdr
);
return
rc
;
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