https://git.reactos.org/?p=reactos.git;a=commitdiff;h=17ae3a2dd9390df7bd128…
commit 17ae3a2dd9390df7bd1284e02a43528d32f7e27b
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 00:16:39 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:11 2022 +0100
[WINESYNC] msi: Implement MSIMODIFY_REFRESH using msi_view_refresh_row().
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 05976464556385e7a7ef5d04b2a56c4830ff33cf by Zebediah Figura
<z.figura12(a)gmail.com>
---
dll/win32/msi/query.h | 2 ++
dll/win32/msi/select.c | 15 ++++++++++-----
modules/rostests/winetests/msi/db.c | 4 +++-
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/dll/win32/msi/query.h b/dll/win32/msi/query.h
index d79c14fd42e..c0144d30544 100644
--- a/dll/win32/msi/query.h
+++ b/dll/win32/msi/query.h
@@ -153,4 +153,6 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info
*col_info,
UINT msi_select_update( MSIVIEW *view, MSIRECORD *rec, UINT row ) DECLSPEC_HIDDEN;
+UINT msi_view_refresh_row( MSIDATABASE *db, MSIVIEW *view, UINT row, MSIRECORD *rec )
DECLSPEC_HIDDEN;
+
#endif /* __WINE_MSI_QUERY_H */
diff --git a/dll/win32/msi/select.c b/dll/win32/msi/select.c
index ef16e5d09f7..b38f339bd7a 100644
--- a/dll/win32/msi/select.c
+++ b/dll/win32/msi/select.c
@@ -276,20 +276,25 @@ UINT msi_select_update(MSIVIEW *view, MSIRECORD *rec, UINT row)
return ERROR_SUCCESS;
}
-static UINT SELECT_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
+static UINT SELECT_modify( struct tagMSIVIEW *view, MSIMODIFY mode,
MSIRECORD *rec, UINT row )
{
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
- TRACE("%p %d %p %d\n", sv, eModifyMode, rec, row );
+ TRACE("view %p, mode %d, rec %p, row %u.\n", view, mode, rec, row);
if( !sv->table )
return ERROR_FUNCTION_FAILED;
- if (eModifyMode == MSIMODIFY_UPDATE)
+ switch (mode)
+ {
+ case MSIMODIFY_REFRESH:
+ return msi_view_refresh_row(sv->db, view, row, rec);
+ case MSIMODIFY_UPDATE:
return msi_select_update(view, rec, row);
-
- return sv->table->ops->modify( sv->table, eModifyMode, rec, row );
+ default:
+ return sv->table->ops->modify( sv->table, mode, rec, row );
+ }
}
static UINT SELECT_delete( struct tagMSIVIEW *view )
diff --git a/modules/rostests/winetests/msi/db.c b/modules/rostests/winetests/msi/db.c
index 09ba4b8293d..cbdfd3ce7de 100644
--- a/modules/rostests/winetests/msi/db.c
+++ b/modules/rostests/winetests/msi/db.c
@@ -3618,6 +3618,7 @@ static void test_join(void)
r = MsiViewFetch(hview, &hrec);
ok( r == ERROR_SUCCESS, "failed to fetch view: %d\n", r );
+ check_record(hrec, 2, "alveolar", "procerus");
r = MsiRecordSetStringA( hrec, 1, "epicranius" );
ok( r == ERROR_SUCCESS, "failed to set string: %d\n", r );
@@ -3627,7 +3628,8 @@ static void test_join(void)
/* try another valid operation for joins */
r = MsiViewModify(hview, MSIMODIFY_REFRESH, hrec);
- todo_wine ok( r == ERROR_SUCCESS, "failed to refresh row: %d\n", r );
+ ok( r == ERROR_SUCCESS, "failed to refresh row: %d\n", r );
+ check_record(hrec, 2, "epicranius", "procerus");
/* try an invalid operation for joins */
r = MsiViewModify(hview, MSIMODIFY_DELETE, hrec);