Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f03889ae
Commit
f03889ae
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: Add initial implementation of MsiDatabaseMerge, with tests.
parent
c9ec69db
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
0 deletions
+73
-0
database.c
dlls/msi/database.c
+0
-0
msipriv.h
dlls/msi/msipriv.h
+2
-0
record.c
dlls/msi/record.c
+71
-0
db.c
dlls/msi/tests/db.c
+0
-0
No files found.
dlls/msi/database.c
View file @
f03889ae
This diff is collapsed.
Click to expand it.
dlls/msi/msipriv.h
View file @
f03889ae
...
...
@@ -703,6 +703,8 @@ extern UINT MSI_RecordSetStream( MSIRECORD *, UINT, IStream * );
extern
UINT
MSI_RecordDataSize
(
MSIRECORD
*
,
UINT
);
extern
UINT
MSI_RecordStreamToFile
(
MSIRECORD
*
,
UINT
,
LPCWSTR
);
extern
UINT
MSI_RecordCopyField
(
MSIRECORD
*
,
UINT
,
MSIRECORD
*
,
UINT
);
extern
MSIRECORD
*
MSI_CloneRecord
(
MSIRECORD
*
);
extern
BOOL
MSI_RecordsAreEqual
(
MSIRECORD
*
,
MSIRECORD
*
);
/* stream internals */
extern
UINT
get_raw_stream
(
MSIHANDLE
hdb
,
LPCWSTR
stname
,
IStream
**
stm
);
...
...
dlls/msi/record.c
View file @
f03889ae
...
...
@@ -903,3 +903,74 @@ UINT MSI_RecordStreamToFile( MSIRECORD *rec, UINT iField, LPCWSTR name )
return
r
;
}
MSIRECORD
*
MSI_CloneRecord
(
MSIRECORD
*
rec
)
{
MSIRECORD
*
clone
;
UINT
r
,
i
,
count
;
count
=
MSI_RecordGetFieldCount
(
rec
);
clone
=
MSI_CreateRecord
(
count
);
if
(
!
clone
)
return
NULL
;
for
(
i
=
0
;
i
<=
count
;
i
++
)
{
if
(
rec
->
fields
[
i
].
type
==
MSIFIELD_STREAM
)
{
if
(
FAILED
(
IStream_Clone
(
rec
->
fields
[
i
].
u
.
stream
,
&
clone
->
fields
[
i
].
u
.
stream
)))
{
msiobj_release
(
&
clone
->
hdr
);
return
NULL
;
}
}
else
{
r
=
MSI_RecordCopyField
(
rec
,
i
,
clone
,
i
);
if
(
r
!=
ERROR_SUCCESS
)
{
msiobj_release
(
&
clone
->
hdr
);
return
NULL
;
}
}
}
return
clone
;
}
BOOL
MSI_RecordsAreEqual
(
MSIRECORD
*
a
,
MSIRECORD
*
b
)
{
UINT
i
;
if
(
a
->
count
!=
b
->
count
)
return
FALSE
;
for
(
i
=
0
;
i
<=
a
->
count
;
i
++
)
{
if
(
a
->
fields
[
i
].
type
!=
b
->
fields
[
i
].
type
)
return
FALSE
;
switch
(
a
->
fields
[
i
].
type
)
{
case
MSIFIELD_NULL
:
break
;
case
MSIFIELD_INT
:
if
(
a
->
fields
[
i
].
u
.
iVal
!=
b
->
fields
[
i
].
u
.
iVal
)
return
FALSE
;
break
;
case
MSIFIELD_WSTR
:
if
(
lstrcmpW
(
a
->
fields
[
i
].
u
.
szwVal
,
b
->
fields
[
i
].
u
.
szwVal
))
return
FALSE
;
break
;
case
MSIFIELD_STREAM
:
default:
return
FALSE
;
}
}
return
TRUE
;
}
dlls/msi/tests/db.c
View file @
f03889ae
This diff is collapsed.
Click to expand it.
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