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
40aa7df3
Commit
40aa7df3
authored
Feb 13, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Implement the MSIMODIFY_REFRESH command of MsiViewModify.
parent
30e53218
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
23 deletions
+35
-23
table.c
dlls/msi/table.c
+21
-1
automation.c
dlls/msi/tests/automation.c
+1
-3
db.c
dlls/msi/tests/db.c
+4
-16
where.c
dlls/msi/where.c
+9
-3
No files found.
dlls/msi/table.c
View file @
40aa7df3
...
...
@@ -1626,6 +1626,23 @@ static UINT modify_delete_row( struct tagMSIVIEW *view, MSIRECORD *rec )
return
TABLE_delete_row
(
view
,
row
);
}
static
UINT
msi_refresh_record
(
struct
tagMSIVIEW
*
view
,
MSIRECORD
*
rec
,
UINT
row
)
{
MSIRECORD
*
curr
;
UINT
r
,
i
,
count
;
r
=
TABLE_get_row
(
view
,
row
-
1
,
&
curr
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
count
=
MSI_RecordGetFieldCount
(
rec
);
for
(
i
=
0
;
i
<
count
;
i
++
)
MSI_RecordCopyField
(
curr
,
i
+
1
,
rec
,
i
+
1
);
msiobj_release
(
&
curr
->
hdr
);
return
ERROR_SUCCESS
;
}
static
UINT
TABLE_modify
(
struct
tagMSIVIEW
*
view
,
MSIMODIFY
eModifyMode
,
MSIRECORD
*
rec
,
UINT
row
)
{
...
...
@@ -1657,11 +1674,14 @@ static UINT TABLE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
r
=
TABLE_insert_row
(
view
,
rec
,
TRUE
);
break
;
case
MSIMODIFY_REFRESH
:
r
=
msi_refresh_record
(
view
,
rec
,
row
);
break
;
case
MSIMODIFY_UPDATE
:
r
=
msi_table_update
(
view
,
rec
,
row
);
break
;
case
MSIMODIFY_REFRESH
:
case
MSIMODIFY_ASSIGN
:
case
MSIMODIFY_REPLACE
:
case
MSIMODIFY_MERGE
:
...
...
dlls/msi/tests/automation.c
View file @
40aa7df3
...
...
@@ -1527,10 +1527,8 @@ static void test_Database(IDispatch *pDatabase, BOOL readonly)
ok
(
hr
==
DISP_E_EXCEPTION
,
"View_Modify failed, hresult 0x%08x
\n
"
,
hr
);
ok_exception
(
hr
,
szModifyModeRecord
);
/* View::Modify with MSIMODIFY_REFRESH should undo our changes */
hr
=
View_Modify
(
pView
,
MSIMODIFY_REFRESH
,
pRecord
);
/* Wine's MsiViewModify currently does not support MSIMODIFY_REFRESH */
todo_wine
ok
(
hr
==
S_OK
,
"View_Modify failed, hresult 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"View_Modify failed, hresult 0x%08x
\n
"
,
hr
);
/* Record::StringDataGet, confirm that the record is back to its unmodified value */
memset
(
szString
,
0
,
sizeof
(
szString
));
...
...
dlls/msi/tests/db.c
View file @
40aa7df3
...
...
@@ -5762,10 +5762,7 @@ static void test_viewmodify_refresh(void)
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiViewModify
(
hview
,
MSIMODIFY_REFRESH
,
hrec
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
size
=
MAX_PATH
;
r
=
MsiRecordGetStringA
(
hrec
,
1
,
buffer
,
&
size
);
...
...
@@ -5774,10 +5771,7 @@ static void test_viewmodify_refresh(void)
ok
(
size
==
2
,
"Expected 2, got %d
\n
"
,
size
);
r
=
MsiRecordGetInteger
(
hrec
,
2
);
todo_wine
{
ok
(
r
==
2
,
"Expected 2, got %d
\n
"
,
r
);
}
ok
(
r
==
2
,
"Expected 2, got %d
\n
"
,
r
);
MsiCloseHandle
(
hrec
);
MsiViewClose
(
hview
);
...
...
@@ -5805,10 +5799,7 @@ static void test_viewmodify_refresh(void)
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
MsiViewModify
(
hview
,
MSIMODIFY_REFRESH
,
hrec
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
size
=
MAX_PATH
;
r
=
MsiRecordGetStringA
(
hrec
,
1
,
buffer
,
&
size
);
...
...
@@ -5817,10 +5808,7 @@ static void test_viewmodify_refresh(void)
ok
(
size
==
5
,
"Expected 5, got %d
\n
"
,
size
);
r
=
MsiRecordGetInteger
(
hrec
,
2
);
todo_wine
{
ok
(
r
==
2
,
"Expected 2, got %d
\n
"
,
r
);
}
ok
(
r
==
2
,
"Expected 2, got %d
\n
"
,
r
);
MsiCloseHandle
(
hrec
);
MsiViewClose
(
hview
);
...
...
dlls/msi/where.c
View file @
40aa7df3
...
...
@@ -503,11 +503,17 @@ static UINT WHERE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
MSIRECORD
*
rec
,
UINT
row
)
{
MSIWHEREVIEW
*
wv
=
(
MSIWHEREVIEW
*
)
view
;
UINT
r
;
TRACE
(
"%p %d %p
\n
"
,
wv
,
eModifyMode
,
rec
);
TRACE
(
"%p %d %p
\n
"
,
wv
,
eModifyMode
,
rec
);
if
(
!
wv
->
table
)
return
ERROR_FUNCTION_FAILED
;
r
=
WHERE_execute
(
view
,
NULL
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
r
=
find_entry_in_hash
(
wv
->
reorder
,
row
-
1
,
&
row
);
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
return
wv
->
table
->
ops
->
modify
(
wv
->
table
,
eModifyMode
,
rec
,
row
);
}
...
...
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