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
ec4edbfd
Commit
ec4edbfd
authored
Jul 06, 2009
by
Hib Eris
Committed by
Alexandre Julliard
Jul 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement ASSIGN mode in MsiViewModify.
parent
eaea537f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
+26
-8
table.c
dlls/msi/table.c
+18
-0
db.c
dlls/msi/tests/db.c
+8
-8
No files found.
dlls/msi/table.c
View file @
ec4edbfd
...
...
@@ -1711,6 +1711,21 @@ static UINT msi_table_update(struct tagMSIVIEW *view, MSIRECORD *rec, UINT row)
return
TABLE_set_row
(
view
,
new_row
,
rec
,
(
1
<<
tv
->
num_cols
)
-
1
);
}
static
UINT
msi_table_assign
(
struct
tagMSIVIEW
*
view
,
MSIRECORD
*
rec
)
{
MSITABLEVIEW
*
tv
=
(
MSITABLEVIEW
*
)
view
;
UINT
r
,
row
;
if
(
!
tv
->
table
)
return
ERROR_INVALID_PARAMETER
;
r
=
msi_table_find_row
(
tv
,
rec
,
&
row
);
if
(
r
==
ERROR_SUCCESS
)
return
TABLE_set_row
(
view
,
row
,
rec
,
(
1
<<
tv
->
num_cols
)
-
1
);
else
return
TABLE_insert_row
(
view
,
rec
,
-
1
,
FALSE
);
}
static
UINT
modify_delete_row
(
struct
tagMSIVIEW
*
view
,
MSIRECORD
*
rec
)
{
MSITABLEVIEW
*
tv
=
(
MSITABLEVIEW
*
)
view
;
...
...
@@ -1780,6 +1795,9 @@ static UINT TABLE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
break
;
case
MSIMODIFY_ASSIGN
:
r
=
msi_table_assign
(
view
,
rec
);
break
;
case
MSIMODIFY_REPLACE
:
case
MSIMODIFY_MERGE
:
case
MSIMODIFY_VALIDATE
:
...
...
dlls/msi/tests/db.c
View file @
ec4edbfd
...
...
@@ -4795,7 +4795,7 @@ static void test_viewmodify_assign(void)
ok
(
r
==
ERROR_SUCCESS
,
"failed to set integer
\n
"
);
r
=
MsiViewModify
(
hview
,
MSIMODIFY_ASSIGN
,
hrec
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewModify failed: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewModify failed: %d
\n
"
,
r
);
r
=
MsiCloseHandle
(
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to close record
\n
"
);
...
...
@@ -4811,12 +4811,12 @@ static void test_viewmodify_assign(void)
r
=
MsiViewExecute
(
hview
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewExecute failed
\n
"
);
r
=
MsiViewFetch
(
hview
,
&
hrec
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewFetch failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewFetch failed
\n
"
);
r
=
MsiRecordGetInteger
(
hrec
,
1
);
todo_wine
ok
(
r
==
1
,
"Expected 1, got %d
\n
"
,
r
);
ok
(
r
==
1
,
"Expected 1, got %d
\n
"
,
r
);
r
=
MsiRecordGetInteger
(
hrec
,
2
);
todo_wine
ok
(
r
==
2
,
"Expected 2, got %d
\n
"
,
r
);
ok
(
r
==
2
,
"Expected 2, got %d
\n
"
,
r
);
r
=
MsiCloseHandle
(
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to close record
\n
"
);
...
...
@@ -4845,7 +4845,7 @@ static void test_viewmodify_assign(void)
ok
(
r
==
ERROR_SUCCESS
,
"failed to set integer
\n
"
);
r
=
MsiViewModify
(
hview
,
MSIMODIFY_ASSIGN
,
hrec
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewModify failed: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewModify failed: %d
\n
"
,
r
);
r
=
MsiCloseHandle
(
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to close record
\n
"
);
...
...
@@ -4861,12 +4861,12 @@ static void test_viewmodify_assign(void)
r
=
MsiViewExecute
(
hview
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewExecute failed
\n
"
);
r
=
MsiViewFetch
(
hview
,
&
hrec
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewFetch failed
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewFetch failed
\n
"
);
r
=
MsiRecordGetInteger
(
hrec
,
1
);
todo_wine
ok
(
r
==
1
,
"Expected 1, got %d
\n
"
,
r
);
ok
(
r
==
1
,
"Expected 1, got %d
\n
"
,
r
);
r
=
MsiRecordGetInteger
(
hrec
,
2
);
todo_wine
ok
(
r
==
4
,
"Expected 4, got %d
\n
"
,
r
);
ok
(
r
==
4
,
"Expected 4, got %d
\n
"
,
r
);
r
=
MsiCloseHandle
(
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to close record
\n
"
);
...
...
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