ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2022
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
20 participants
436 discussions
Start a n
N
ew thread
[reactos] 21/360: [WINESYNC] msi: Make MsiViewGetColumnInfo() RPC-compatible.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ec581d9fc963f1dce070b…
commit ec581d9fc963f1dce070b3415752a3be70d44a04 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:11:55 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:37 2022 +0100 [WINESYNC] msi: Make MsiViewGetColumnInfo() RPC-compatible. 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 cea37419f1d16798ca24ad14712f14dac136f7d6 by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/msiquery.c | 30 ++++++++++++++++++++++++++++-- dll/win32/msi/winemsi.idl | 2 ++ modules/rostests/winetests/msi/custom.c | 12 ++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c index 682881ee716..e73701f9253 100644 --- a/dll/win32/msi/msiquery.c +++ b/dll/win32/msi/msiquery.c @@ -603,8 +603,23 @@ UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE hView, MSICOLINFO info, MSIHANDLE *hR return ERROR_INVALID_PARAMETER; query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW ); - if( !query ) - return ERROR_INVALID_HANDLE; + if (!query) + { + struct wire_record *wire_rec = NULL; + MSIHANDLE remote; + + if (!(remote = msi_get_remote(hView))) + return ERROR_INVALID_HANDLE; + + r = remote_ViewGetColumnInfo(remote, info, &wire_rec); + if (!r) + { + r = unmarshal_record(wire_rec, hRec); + free_remote_record(wire_rec); + } + + return r; + } r = MSI_ViewGetColumnInfo( query, info, &rec ); if ( r == ERROR_SUCCESS ) @@ -1091,3 +1106,14 @@ UINT __cdecl remote_ViewFetch(MSIHANDLE view, struct wire_record **rec) MsiCloseHandle(handle); return r; } + +UINT __cdecl remote_ViewGetColumnInfo(MSIHANDLE view, MSICOLINFO info, struct wire_record **rec) +{ + MSIHANDLE handle; + UINT r = MsiViewGetColumnInfo(view, info, &handle); + *rec = NULL; + if (!r) + *rec = marshal_record(handle); + MsiCloseHandle(handle); + return r; +} diff --git a/dll/win32/msi/winemsi.idl b/dll/win32/msi/winemsi.idl index 74b59234793..628091b9b4c 100644 --- a/dll/win32/msi/winemsi.idl +++ b/dll/win32/msi/winemsi.idl @@ -27,6 +27,7 @@ typedef int INSTALLMESSAGE; typedef int MSICONDITION; typedef int MSIRUNMODE; typedef int INSTALLSTATE; +typedef int MSICOLINFO; #define MSIFIELD_NULL 0 #define MSIFIELD_INT 1 @@ -59,6 +60,7 @@ interface IWineMsiRemote UINT remote_ViewClose( [in] MSIHANDLE view ); UINT remote_ViewExecute( [in] MSIHANDLE view, [in, unique] struct wire_record *record ); UINT remote_ViewFetch( [in] MSIHANDLE view, [out] struct wire_record **record ); + UINT remote_ViewGetColumnInfo( [in] MSIHANDLE view, [in] MSICOLINFO info, [out] struct wire_record **record ); MSICONDITION remote_DatabaseIsTablePersistent( [in] MSIHANDLE db, [in] LPCWSTR table ); HRESULT remote_DatabaseGetPrimaryKeys( [in] MSIHANDLE db, [in] LPCWSTR table, [out] MSIHANDLE *keys ); diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index 3d7ebb99f34..d6b186c635a 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -263,6 +263,18 @@ static void test_db(MSIHANDLE hinst) r = MsiDatabaseOpenViewA(hdb, "SELECT * FROM `Test`", &view); ok(hinst, !r, "got %u\n", r); + r = MsiViewGetColumnInfo(view, MSICOLINFO_NAMES, &rec2); + ok(hinst, !r, "got %u\n", r); + + sz = sizeof(buffer); + r = MsiRecordGetStringA(rec2, 1, buffer, &sz); + ok(hinst, !r, "got %u\n", r); + ok(hinst, sz == strlen(buffer), "got size %u\n", sz); + ok(hinst, !strcmp(buffer, "Name"), "got '%s'\n", buffer); + + r = MsiCloseHandle(rec2); + ok(hinst, !r, "got %u\n", r); + r = MsiViewExecute(view, 0); ok(hinst, !r, "got %u\n", r);
2 years, 9 months
1
0
0
0
[reactos] 20/360: [WINESYNC] msi: Make MsiViewClose() RPC-compatible.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ae286278fcb7f2dfeee03…
commit ae286278fcb7f2dfeee039ef5f70a15024c7d945 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:11:54 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:37 2022 +0100 [WINESYNC] msi: Make MsiViewClose() RPC-compatible. 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 9ab15d4edea1ab0c80f9d3ea15d9855aba2f4880 by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/msiquery.c | 16 ++++++++++++++-- dll/win32/msi/winemsi.idl | 1 + modules/rostests/winetests/msi/custom.c | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c index 6eddf7a8219..682881ee716 100644 --- a/dll/win32/msi/msiquery.c +++ b/dll/win32/msi/msiquery.c @@ -440,8 +440,15 @@ UINT WINAPI MsiViewClose(MSIHANDLE hView) TRACE("%d\n", hView ); query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW ); - if( !query ) - return ERROR_INVALID_HANDLE; + if (!query) + { + MSIHANDLE remote; + + if (!(remote = msi_get_remote(hView))) + return ERROR_INVALID_HANDLE; + + return remote_ViewClose(remote); + } ret = MSI_ViewClose( query ); msiobj_release( &query->hdr ); @@ -1055,6 +1062,11 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentW( return r; } +UINT __cdecl remote_ViewClose(MSIHANDLE view) +{ + return MsiViewClose(view); +} + UINT __cdecl remote_ViewExecute(MSIHANDLE view, struct wire_record *remote_rec) { MSIHANDLE rec = 0; diff --git a/dll/win32/msi/winemsi.idl b/dll/win32/msi/winemsi.idl index b892f34bfea..74b59234793 100644 --- a/dll/win32/msi/winemsi.idl +++ b/dll/win32/msi/winemsi.idl @@ -56,6 +56,7 @@ struct wire_record { ] interface IWineMsiRemote { + UINT remote_ViewClose( [in] MSIHANDLE view ); UINT remote_ViewExecute( [in] MSIHANDLE view, [in, unique] struct wire_record *record ); UINT remote_ViewFetch( [in] MSIHANDLE view, [out] struct wire_record **record ); diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index 479cb930de4..3d7ebb99f34 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -316,6 +316,9 @@ static void test_db(MSIHANDLE hinst) ok(hinst, r == ERROR_NO_MORE_ITEMS, "got %u\n", r); ok(hinst, !rec2, "got %u\n", rec2); + r = MsiViewClose(view); + ok(hinst, !r, "got %u\n", r); + r = MsiCloseHandle(view); ok(hinst, !r, "got %u\n", r);
2 years, 9 months
1
0
0
0
[reactos] 19/360: [WINESYNC] msi: Make MsiViewFetch() RPC-compatible.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=795da5286b33e47849f15…
commit 795da5286b33e47849f15528dbb17ce36df3f2e2 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:11:54 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:37 2022 +0100 [WINESYNC] msi: Make MsiViewFetch() RPC-compatible. 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 39c116fd0c0aca6517b9c1f31296bf8665cf7834 by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/msipriv.h | 2 + dll/win32/msi/msiquery.c | 29 +++++++++++++- dll/win32/msi/record.c | 55 +++++++++++++++++++++++++++ dll/win32/msi/winemsi.idl | 1 + modules/rostests/winetests/msi/custom.c | 67 ++++++++++++++++++++++++++++++++- 5 files changed, 151 insertions(+), 3 deletions(-) diff --git a/dll/win32/msi/msipriv.h b/dll/win32/msi/msipriv.h index cc2b8bec790..936ed4d7241 100644 --- a/dll/win32/msi/msipriv.h +++ b/dll/win32/msi/msipriv.h @@ -831,6 +831,8 @@ extern UINT msi_record_set_string(MSIRECORD *, UINT, const WCHAR *, int) DECLSPE extern const WCHAR *msi_record_get_string(const MSIRECORD *, UINT, int *) DECLSPEC_HIDDEN; extern void dump_record(MSIRECORD *) DECLSPEC_HIDDEN; extern UINT unmarshal_record(const struct wire_record *in, MSIHANDLE *out) DECLSPEC_HIDDEN; +extern struct wire_record *marshal_record(MSIHANDLE handle) DECLSPEC_HIDDEN; +extern void free_remote_record(struct wire_record *rec) DECLSPEC_HIDDEN; /* stream internals */ extern void enum_stream_names( IStorage *stg ) DECLSPEC_HIDDEN; diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c index bfc239a53d5..6eddf7a8219 100644 --- a/dll/win32/msi/msiquery.c +++ b/dll/win32/msi/msiquery.c @@ -389,8 +389,22 @@ UINT WINAPI MsiViewFetch(MSIHANDLE hView, MSIHANDLE *record) *record = 0; query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW ); - if( !query ) - return ERROR_INVALID_HANDLE; + if (!query) + { + struct wire_record *wire_rec = NULL; + MSIHANDLE remote; + + if (!(remote = msi_get_remote(hView))) + return ERROR_INVALID_HANDLE; + + ret = remote_ViewFetch(remote, &wire_rec); + if (!ret) + { + ret = unmarshal_record(wire_rec, record); + free_remote_record(wire_rec); + } + return ret; + } ret = MSI_ViewFetch( query, &rec ); if( ret == ERROR_SUCCESS ) { @@ -1054,3 +1068,14 @@ UINT __cdecl remote_ViewExecute(MSIHANDLE view, struct wire_record *remote_rec) MsiCloseHandle(rec); return r; } + +UINT __cdecl remote_ViewFetch(MSIHANDLE view, struct wire_record **rec) +{ + MSIHANDLE handle; + UINT r = MsiViewFetch(view, &handle); + *rec = NULL; + if (!r) + *rec = marshal_record(handle); + MsiCloseHandle(handle); + return r; +} diff --git a/dll/win32/msi/record.c b/dll/win32/msi/record.c index 4c504eac472..91892d7377f 100644 --- a/dll/win32/msi/record.c +++ b/dll/win32/msi/record.c @@ -1103,3 +1103,58 @@ UINT unmarshal_record(const struct wire_record *in, MSIHANDLE *out) msiobj_release(&rec->hdr); return ERROR_SUCCESS; } + +struct wire_record *marshal_record(MSIHANDLE handle) +{ + struct wire_record *ret; + unsigned int i, count; + MSIRECORD *rec; + + if (!(rec = msihandle2msiinfo(handle, MSIHANDLETYPE_RECORD))) + return NULL; + + count = MSI_RecordGetFieldCount(rec); + ret = midl_user_allocate(sizeof(*ret) + count * sizeof(ret->fields[0])); + ret->count = count; + + for (i = 0; i <= count; i++) + { + switch (rec->fields[i].type) + { + case MSIFIELD_NULL: + break; + case MSIFIELD_INT: + ret->fields[i].u.iVal = rec->fields[i].u.iVal; + break; + case MSIFIELD_WSTR: + ret->fields[i].u.szwVal = strdupW(rec->fields[i].u.szwVal); + break; + case MSIFIELD_STREAM: + IStream_AddRef(rec->fields[i].u.stream); + ret->fields[i].u.stream = rec->fields[i].u.stream; + break; + default: + ERR("invalid field type %d\n", rec->fields[i].type); + break; + } + ret->fields[i].type = rec->fields[i].type; + } + + msiobj_release(&rec->hdr); + return ret; +} + +void free_remote_record(struct wire_record *rec) +{ + int i; + + for (i = 0; i <= rec->count; i++) + { + if (rec->fields[i].type == MSIFIELD_WSTR) + midl_user_free(rec->fields[i].u.szwVal); + else if (rec->fields[i].type == MSIFIELD_STREAM) + IStream_Release(rec->fields[i].u.stream); + } + + midl_user_free(rec); +} diff --git a/dll/win32/msi/winemsi.idl b/dll/win32/msi/winemsi.idl index e698f76e202..b892f34bfea 100644 --- a/dll/win32/msi/winemsi.idl +++ b/dll/win32/msi/winemsi.idl @@ -57,6 +57,7 @@ struct wire_record { interface IWineMsiRemote { UINT remote_ViewExecute( [in] MSIHANDLE view, [in, unique] struct wire_record *record ); + UINT remote_ViewFetch( [in] MSIHANDLE view, [out] struct wire_record **record ); MSICONDITION remote_DatabaseIsTablePersistent( [in] MSIHANDLE db, [in] LPCWSTR table ); HRESULT remote_DatabaseGetPrimaryKeys( [in] MSIHANDLE db, [in] LPCWSTR table, [out] MSIHANDLE *keys ); diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index 8a0a20aff05..479cb930de4 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -243,7 +243,9 @@ static void test_props(MSIHANDLE hinst) static void test_db(MSIHANDLE hinst) { - MSIHANDLE hdb, view, rec; + MSIHANDLE hdb, view, rec, rec2; + char buffer[10]; + DWORD sz; UINT r; hdb = MsiGetActiveDatabase(hinst); @@ -264,6 +266,56 @@ static void test_db(MSIHANDLE hinst) r = MsiViewExecute(view, 0); ok(hinst, !r, "got %u\n", r); + r = MsiViewFetch(view, &rec2); + ok(hinst, !r, "got %u\n", r); + + r = MsiRecordGetFieldCount(rec2); + ok(hinst, r == 3, "got %u\n", r); + + sz = sizeof(buffer); + r = MsiRecordGetStringA(rec2, 1, buffer, &sz); + ok(hinst, !r, "got %u\n", r); + ok(hinst, sz == strlen(buffer), "got size %u\n", sz); + ok(hinst, !strcmp(buffer, "one"), "got '%s'\n", buffer); + + r = MsiRecordGetInteger(rec2, 2); + ok(hinst, r == 1, "got %d\n", r); + + sz = sizeof(buffer); + r = MsiRecordReadStream(rec2, 3, buffer, &sz); + ok(hinst, !r, "got %u\n", r); + ok(hinst, !memcmp(buffer, "unus", 4), "wrong data\n"); + + r = MsiCloseHandle(rec2); + ok(hinst, !r, "got %u\n", r); + + r = MsiViewFetch(view, &rec2); + ok(hinst, !r, "got %u\n", r); + + r = MsiRecordGetFieldCount(rec2); + ok(hinst, r == 3, "got %u\n", r); + + sz = sizeof(buffer); + r = MsiRecordGetStringA(rec2, 1, buffer, &sz); + ok(hinst, !r, "got %u\n", r); + ok(hinst, sz == strlen(buffer), "got size %u\n", sz); + ok(hinst, !strcmp(buffer, "two"), "got '%s'\n", buffer); + + r = MsiRecordGetInteger(rec2, 2); + ok(hinst, r == 2, "got %d\n", r); + + sz = sizeof(buffer); + r = MsiRecordReadStream(rec2, 3, buffer, &sz); + ok(hinst, !r, "got %u\n", r); + ok(hinst, !memcmp(buffer, "duo", 3), "wrong data\n"); + + r = MsiCloseHandle(rec2); + ok(hinst, !r, "got %u\n", r); + + r = MsiViewFetch(view, &rec2); + ok(hinst, r == ERROR_NO_MORE_ITEMS, "got %u\n", r); + ok(hinst, !rec2, "got %u\n", rec2); + r = MsiCloseHandle(view); ok(hinst, !r, "got %u\n", r); @@ -276,6 +328,19 @@ static void test_db(MSIHANDLE hinst) r = MsiViewExecute(view, rec); ok(hinst, !r, "got %u\n", r); + r = MsiViewFetch(view, &rec2); + ok(hinst, !r, "got %u\n", r); + + r = MsiRecordGetInteger(rec2, 2); + ok(hinst, r == 1, "got %d\n", r); + + r = MsiCloseHandle(rec2); + ok(hinst, !r, "got %u\n", r); + + r = MsiViewFetch(view, &rec2); + ok(hinst, r == ERROR_NO_MORE_ITEMS, "got %u\n", r); + ok(hinst, !rec2, "got %u\n", rec2); + r = MsiCloseHandle(rec); ok(hinst, !r, "got %u\n", r);
2 years, 9 months
1
0
0
0
[reactos] 18/360: [WINESYNC] msi: Make MsiViewExecute() RPC-compatible.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ce495d7a38ee058588cd1…
commit ce495d7a38ee058588cd1a1895530c0204e5a1f1 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:11:53 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:37 2022 +0100 [WINESYNC] msi: Make MsiViewExecute() RPC-compatible. 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 afb5eede24c35308d2370fd3b492545aed607ce6 by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/msiquery.c | 39 +++++++++++++++++++++++++-------- dll/win32/msi/record.c | 6 +++++ dll/win32/msi/winemsi.idl | 2 ++ modules/rostests/winetests/msi/custom.c | 20 ++++++++++++++++- 4 files changed, 57 insertions(+), 10 deletions(-) diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c index 9518c5958ae..bfc239a53d5 100644 --- a/dll/win32/msi/msiquery.c +++ b/dll/win32/msi/msiquery.c @@ -458,25 +458,32 @@ UINT WINAPI MsiViewExecute(MSIHANDLE hView, MSIHANDLE hRec) TRACE("%d %d\n", hView, hRec); - query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW ); - if( !query ) - return ERROR_INVALID_HANDLE; - if( hRec ) { rec = msihandle2msiinfo( hRec, MSIHANDLETYPE_RECORD ); if( !rec ) - { - ret = ERROR_INVALID_HANDLE; - goto out; - } + return ERROR_INVALID_HANDLE; + } + + query = msihandle2msiinfo( hView, MSIHANDLETYPE_VIEW ); + if( !query ) + { + MSIHANDLE remote; + + if (!(remote = msi_get_remote(hView))) + return ERROR_INVALID_HANDLE; + + ret = remote_ViewExecute(remote, rec ? (struct wire_record *)&rec->count : NULL); + + if (rec) + msiobj_release(&rec->hdr); + return ret; } msiobj_lock( &rec->hdr ); ret = MSI_ViewExecute( query, rec ); msiobj_unlock( &rec->hdr ); -out: msiobj_release( &query->hdr ); if( rec ) msiobj_release( &rec->hdr ); @@ -1033,3 +1040,17 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentW( return r; } + +UINT __cdecl remote_ViewExecute(MSIHANDLE view, struct wire_record *remote_rec) +{ + MSIHANDLE rec = 0; + UINT r; + + if ((r = unmarshal_record(remote_rec, &rec))) + return r; + + r = MsiViewExecute(view, rec); + + MsiCloseHandle(rec); + return r; +} diff --git a/dll/win32/msi/record.c b/dll/win32/msi/record.c index 7b53d86edfe..4c504eac472 100644 --- a/dll/win32/msi/record.c +++ b/dll/win32/msi/record.c @@ -1061,6 +1061,12 @@ UINT unmarshal_record(const struct wire_record *in, MSIHANDLE *out) unsigned int i; UINT r; + if (!in) + { + *out = 0; + return ERROR_SUCCESS; + } + rec = MSI_CreateRecord(in->count); if (!rec) return ERROR_OUTOFMEMORY; diff --git a/dll/win32/msi/winemsi.idl b/dll/win32/msi/winemsi.idl index 54e6eb890b3..e698f76e202 100644 --- a/dll/win32/msi/winemsi.idl +++ b/dll/win32/msi/winemsi.idl @@ -56,6 +56,8 @@ struct wire_record { ] interface IWineMsiRemote { + UINT remote_ViewExecute( [in] MSIHANDLE view, [in, unique] struct wire_record *record ); + MSICONDITION remote_DatabaseIsTablePersistent( [in] MSIHANDLE db, [in] LPCWSTR table ); HRESULT remote_DatabaseGetPrimaryKeys( [in] MSIHANDLE db, [in] LPCWSTR table, [out] MSIHANDLE *keys ); HRESULT remote_DatabaseGetSummaryInformation( [in] MSIHANDLE db, [in] UINT updatecount, [out] MSIHANDLE *suminfo ); diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index e7a56ae1cee..8a0a20aff05 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -243,7 +243,7 @@ static void test_props(MSIHANDLE hinst) static void test_db(MSIHANDLE hinst) { - MSIHANDLE hdb, view; + MSIHANDLE hdb, view, rec; UINT r; hdb = MsiGetActiveDatabase(hinst); @@ -261,6 +261,24 @@ static void test_db(MSIHANDLE hinst) r = MsiDatabaseOpenViewA(hdb, "SELECT * FROM `Test`", &view); ok(hinst, !r, "got %u\n", r); + r = MsiViewExecute(view, 0); + ok(hinst, !r, "got %u\n", r); + + r = MsiCloseHandle(view); + ok(hinst, !r, "got %u\n", r); + + r = MsiDatabaseOpenViewA(hdb, "SELECT * FROM `Test` WHERE `Name` = ?", &view); + ok(hinst, !r, "got %u\n", r); + + rec = MsiCreateRecord(1); + MsiRecordSetStringA(rec, 1, "one"); + + r = MsiViewExecute(view, rec); + ok(hinst, !r, "got %u\n", r); + + r = MsiCloseHandle(rec); + ok(hinst, !r, "got %u\n", r); + r = MsiCloseHandle(view); ok(hinst, !r, "got %u\n", r);
2 years, 9 months
1
0
0
0
[reactos] 17/360: [WINESYNC] msi: Make MsiDatabaseOpenView() RPC-compatible.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=00684fb4104d5591a4046…
commit 00684fb4104d5591a40460042cdd37367eb80ef5 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:11:52 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:37 2022 +0100 [WINESYNC] msi: Make MsiDatabaseOpenView() RPC-compatible. 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 c6bd4d8c35de1ae452a5b5bec69d4779c813b37f by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/database.c | 5 ++--- dll/win32/msi/msiquery.c | 27 +++++++++++---------------- dll/win32/msi/winemsi.idl | 2 +- modules/rostests/winetests/msi/custom.c | 14 +++++++++++++- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/dll/win32/msi/database.c b/dll/win32/msi/database.c index 01680d8627f..5ea4ec47261 100644 --- a/dll/win32/msi/database.c +++ b/dll/win32/msi/database.c @@ -2034,8 +2034,7 @@ HRESULT __cdecl remote_DatabaseGetSummaryInformation(MSIHANDLE db, UINT updateco return HRESULT_FROM_WIN32(r); } -HRESULT __cdecl remote_DatabaseOpenView(MSIHANDLE db, LPCWSTR query, MSIHANDLE *view) +UINT __cdecl remote_DatabaseOpenView(MSIHANDLE db, LPCWSTR query, MSIHANDLE *view) { - UINT r = MsiDatabaseOpenViewW(db, query, view); - return HRESULT_FROM_WIN32(r); + return MsiDatabaseOpenViewW(db, query, view); } diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c index fb99c961b2b..9518c5958ae 100644 --- a/dll/win32/msi/msiquery.c +++ b/dll/win32/msi/msiquery.c @@ -116,9 +116,6 @@ UINT MSI_DatabaseOpenViewW(MSIDATABASE *db, TRACE("%s %p\n", debugstr_w(szQuery), pView); - if( !szQuery) - return ERROR_INVALID_PARAMETER; - /* pre allocate a handle to hold a pointer to the view */ query = alloc_msiobject( MSIHANDLETYPE_VIEW, sizeof (MSIQUERY), MSI_CloseView ); @@ -247,26 +244,24 @@ UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE hdb, TRACE("%s %p\n", debugstr_w(szQuery), phView); + if (!phView) + return ERROR_INVALID_PARAMETER; + + if (!szQuery) + return ERROR_BAD_QUERY_SYNTAX; + db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE ); if( !db ) { - MSIHANDLE remote; - HRESULT hr; + MSIHANDLE remote, remote_view; if (!(remote = msi_get_remote(hdb))) return ERROR_INVALID_HANDLE; - hr = remote_DatabaseOpenView(remote, szQuery, phView); - - if (FAILED(hr)) - { - if (HRESULT_FACILITY(hr) == FACILITY_WIN32) - return HRESULT_CODE(hr); - - return ERROR_FUNCTION_FAILED; - } - - return ERROR_SUCCESS; + ret = remote_DatabaseOpenView(remote, szQuery, &remote_view); + if (!ret) + *phView = alloc_msi_remote_handle(remote_view); + return ret; } ret = MSI_DatabaseOpenViewW( db, szQuery, &query ); diff --git a/dll/win32/msi/winemsi.idl b/dll/win32/msi/winemsi.idl index 86f03e3daa0..54e6eb890b3 100644 --- a/dll/win32/msi/winemsi.idl +++ b/dll/win32/msi/winemsi.idl @@ -59,7 +59,7 @@ interface IWineMsiRemote MSICONDITION remote_DatabaseIsTablePersistent( [in] MSIHANDLE db, [in] LPCWSTR table ); HRESULT remote_DatabaseGetPrimaryKeys( [in] MSIHANDLE db, [in] LPCWSTR table, [out] MSIHANDLE *keys ); HRESULT remote_DatabaseGetSummaryInformation( [in] MSIHANDLE db, [in] UINT updatecount, [out] MSIHANDLE *suminfo ); - HRESULT remote_DatabaseOpenView( [in] MSIHANDLE db, [in] LPCWSTR query, [out] MSIHANDLE *view ); + UINT remote_DatabaseOpenView( [in] MSIHANDLE db, [in, string] LPCWSTR query, [out] MSIHANDLE *view ); MSIHANDLE remote_GetActiveDatabase( [in] MSIHANDLE hinst ); UINT remote_GetProperty( [in] MSIHANDLE hinst, [in, string] LPCWSTR property, [out, string] LPWSTR *value, [out] DWORD *size ); diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index 07569946623..e7a56ae1cee 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -243,7 +243,7 @@ static void test_props(MSIHANDLE hinst) static void test_db(MSIHANDLE hinst) { - MSIHANDLE hdb; + MSIHANDLE hdb, view; UINT r; hdb = MsiGetActiveDatabase(hinst); @@ -252,6 +252,18 @@ static void test_db(MSIHANDLE hinst) r = MsiDatabaseIsTablePersistentA(hdb, "Test"); ok(hinst, r == MSICONDITION_TRUE, "got %u\n", r); + r = MsiDatabaseOpenViewA(hdb, NULL, &view); + ok(hinst, r == ERROR_BAD_QUERY_SYNTAX, "got %u\n", r); + + r = MsiDatabaseOpenViewA(hdb, "SELECT * FROM `Test`", NULL); + ok(hinst, r == ERROR_INVALID_PARAMETER, "got %u\n", r); + + r = MsiDatabaseOpenViewA(hdb, "SELECT * FROM `Test`", &view); + ok(hinst, !r, "got %u\n", r); + + r = MsiCloseHandle(view); + ok(hinst, !r, "got %u\n", r); + r = MsiCloseHandle(hdb); ok(hinst, !r, "got %u\n", r); }
2 years, 9 months
1
0
0
0
[reactos] 16/360: [WINESYNC] msi: Make MsiDatabaseIsTablePersistent() RPC-compatible.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b4fb97827024f9c09e62b…
commit b4fb97827024f9c09e62b1784759d3e74e329ee8 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:11:52 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:36 2022 +0100 [WINESYNC] msi: Make MsiDatabaseIsTablePersistent() RPC-compatible. 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 252dd11f20a7ac2285d4f082f3ab3f3168f494dc by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/database.c | 5 ++--- dll/win32/msi/msiquery.c | 9 +-------- dll/win32/msi/winemsi.idl | 2 +- modules/rostests/winetests/msi/custom.c | 3 +++ modules/rostests/winetests/msi/install.c | 16 ++++++++++++++++ 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/dll/win32/msi/database.c b/dll/win32/msi/database.c index 08b47c05068..01680d8627f 100644 --- a/dll/win32/msi/database.c +++ b/dll/win32/msi/database.c @@ -2017,10 +2017,9 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle ) return ret; } -HRESULT __cdecl remote_DatabaseIsTablePersistent(MSIHANDLE db, LPCWSTR table, MSICONDITION *persistent) +MSICONDITION __cdecl remote_DatabaseIsTablePersistent(MSIHANDLE db, LPCWSTR table) { - *persistent = MsiDatabaseIsTablePersistentW(db, table); - return S_OK; + return MsiDatabaseIsTablePersistentW(db, table); } HRESULT __cdecl remote_DatabaseGetPrimaryKeys(MSIHANDLE db, LPCWSTR table, MSIHANDLE *keys) diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c index 1ba30763f71..fb99c961b2b 100644 --- a/dll/win32/msi/msiquery.c +++ b/dll/win32/msi/msiquery.c @@ -1024,19 +1024,12 @@ MSICONDITION WINAPI MsiDatabaseIsTablePersistentW( db = msihandle2msiinfo( hDatabase, MSIHANDLETYPE_DATABASE ); if( !db ) { - HRESULT hr; - MSICONDITION condition; MSIHANDLE remote; if (!(remote = msi_get_remote(hDatabase))) return MSICONDITION_ERROR; - hr = remote_DatabaseIsTablePersistent(remote, szTableName, &condition); - - if (FAILED(hr)) - return MSICONDITION_ERROR; - - return condition; + return remote_DatabaseIsTablePersistent(remote, szTableName); } r = MSI_DatabaseIsTablePersistent( db, szTableName ); diff --git a/dll/win32/msi/winemsi.idl b/dll/win32/msi/winemsi.idl index c1585834db8..86f03e3daa0 100644 --- a/dll/win32/msi/winemsi.idl +++ b/dll/win32/msi/winemsi.idl @@ -56,7 +56,7 @@ struct wire_record { ] interface IWineMsiRemote { - HRESULT remote_DatabaseIsTablePersistent( [in] MSIHANDLE db, [in] LPCWSTR table, [out] MSICONDITION *persistent ); + MSICONDITION remote_DatabaseIsTablePersistent( [in] MSIHANDLE db, [in] LPCWSTR table ); HRESULT remote_DatabaseGetPrimaryKeys( [in] MSIHANDLE db, [in] LPCWSTR table, [out] MSIHANDLE *keys ); HRESULT remote_DatabaseGetSummaryInformation( [in] MSIHANDLE db, [in] UINT updatecount, [out] MSIHANDLE *suminfo ); HRESULT remote_DatabaseOpenView( [in] MSIHANDLE db, [in] LPCWSTR query, [out] MSIHANDLE *view ); diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index 00dcab36b0d..07569946623 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -249,6 +249,9 @@ static void test_db(MSIHANDLE hinst) hdb = MsiGetActiveDatabase(hinst); ok(hinst, hdb, "MsiGetActiveDatabase failed\n"); + r = MsiDatabaseIsTablePersistentA(hdb, "Test"); + ok(hinst, r == MSICONDITION_TRUE, "got %u\n", r); + r = MsiCloseHandle(hdb); ok(hinst, !r, "got %u\n", r); } diff --git a/modules/rostests/winetests/msi/install.c b/modules/rostests/winetests/msi/install.c index 62fb81f9fc4..41a77cdb4ed 100644 --- a/modules/rostests/winetests/msi/install.c +++ b/modules/rostests/winetests/msi/install.c @@ -4108,11 +4108,25 @@ static INT CALLBACK ok_callback(void *context, UINT message_type, MSIHANDLE reco static void test_customaction1(void) { + MSIHANDLE hdb, record; UINT r; create_database(msifile, ca1_tables, sizeof(ca1_tables) / sizeof(msi_table)); add_custom_dll(); + /* create a test table */ + MsiOpenDatabaseW(msifileW, MSIDBOPEN_TRANSACT, &hdb); + run_query(hdb, 0, "CREATE TABLE `Test` (`Name` CHAR(10), `Number` INTEGER, `Data` OBJECT PRIMARY KEY `Name`)"); + create_file("unus", 10); + create_file("duo", 10); + record = MsiCreateRecord(1); + MsiRecordSetStreamA(record, 1, "unus"); + run_query(hdb, record, "INSERT INTO `Test` (`Name`, `Number`, `Data`) VALUES ('one', 1, ?)"); + MsiRecordSetStreamA(record, 1, "duo"); + run_query(hdb, record, "INSERT INTO `Test` (`Name`, `Number`, `Data`) VALUES ('two', 2, ?)"); + MsiDatabaseCommit(hdb); + MsiCloseHandle(hdb); + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); r = MsiInstallProductA(msifile, "MAIN_TEST=1"); @@ -4136,6 +4150,8 @@ static void test_customaction1(void) ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); DeleteFileA(msifile); + DeleteFileA("unus"); + DeleteFileA("duo"); } static void test_customaction51(void)
2 years, 9 months
1
0
0
0
[reactos] 15/360: [WINESYNC] msi: Make MsiGetActiveDatabase() RPC-compatible.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7cc54a4f487cd38668332…
commit 7cc54a4f487cd38668332c02a405459f15856b60 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:11:51 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:36 2022 +0100 [WINESYNC] msi: Make MsiGetActiveDatabase() RPC-compatible. 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 a6934768d1070d91c764d5c88fe276a9d6163683 by Zebediah Figura <z.figura12(a)gmail.com> --- dll/win32/msi/package.c | 9 ++++----- dll/win32/msi/winemsi.idl | 2 +- modules/rostests/winetests/msi/custom.c | 13 +++++++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c index 49fe7900412..b4379fe81a3 100644 --- a/dll/win32/msi/package.c +++ b/dll/win32/msi/package.c @@ -1693,7 +1693,8 @@ MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall) } else if ((remote = msi_get_remote(hInstall))) { - remote_GetActiveDatabase(remote, &handle); + handle = remote_GetActiveDatabase(remote); + handle = alloc_msi_remote_handle(handle); } return handle; @@ -2427,11 +2428,9 @@ UINT WINAPI MsiGetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, return MSI_GetProperty( hInstall, szName, &val, pchValueBuf ); } -HRESULT __cdecl remote_GetActiveDatabase(MSIHANDLE hinst, MSIHANDLE *handle) +MSIHANDLE __cdecl remote_GetActiveDatabase(MSIHANDLE hinst) { - *handle = MsiGetActiveDatabase(hinst); - - return S_OK; + return MsiGetActiveDatabase(hinst); } UINT __cdecl remote_GetProperty(MSIHANDLE hinst, LPCWSTR property, LPWSTR *value, DWORD *size) diff --git a/dll/win32/msi/winemsi.idl b/dll/win32/msi/winemsi.idl index d97db4c0571..c1585834db8 100644 --- a/dll/win32/msi/winemsi.idl +++ b/dll/win32/msi/winemsi.idl @@ -61,7 +61,7 @@ interface IWineMsiRemote HRESULT remote_DatabaseGetSummaryInformation( [in] MSIHANDLE db, [in] UINT updatecount, [out] MSIHANDLE *suminfo ); HRESULT remote_DatabaseOpenView( [in] MSIHANDLE db, [in] LPCWSTR query, [out] MSIHANDLE *view ); - HRESULT remote_GetActiveDatabase( [in] MSIHANDLE hinst, [out] MSIHANDLE *handle ); + MSIHANDLE remote_GetActiveDatabase( [in] MSIHANDLE hinst ); UINT remote_GetProperty( [in] MSIHANDLE hinst, [in, string] LPCWSTR property, [out, string] LPWSTR *value, [out] DWORD *size ); UINT remote_SetProperty( [in] MSIHANDLE hinst, [in, string, unique] LPCWSTR property, [in, string, unique] LPCWSTR value ); int remote_ProcessMessage( [in] MSIHANDLE hinst, [in] INSTALLMESSAGE message, [in] struct wire_record *record ); diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index 8d3234876ce..00dcab36b0d 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -241,6 +241,18 @@ static void test_props(MSIHANDLE hinst) ok(hinst, !memcmp(buffer, "a\0\0\0\xcc", 5), "wrong data\n"); } +static void test_db(MSIHANDLE hinst) +{ + MSIHANDLE hdb; + UINT r; + + hdb = MsiGetActiveDatabase(hinst); + ok(hinst, hdb, "MsiGetActiveDatabase failed\n"); + + r = MsiCloseHandle(hdb); + ok(hinst, !r, "got %u\n", r); +} + /* Main test. Anything that doesn't depend on a specific install configuration * or have undesired side effects should go here. */ UINT WINAPI main_test(MSIHANDLE hinst) @@ -265,6 +277,7 @@ UINT WINAPI main_test(MSIHANDLE hinst) todo_wine_ok(hinst, res == MSIDBSTATE_ERROR, "expected MSIDBSTATE_ERROR, got %u\n", res); test_props(hinst); + test_db(hinst); return ERROR_SUCCESS; }
2 years, 9 months
1
0
0
0
[reactos] 14/360: [WINESYNC] msi/tests: Improve COM test.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cd631b7912deacc77a802…
commit cd631b7912deacc77a802a7c816faa2c76781aef Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:11:51 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:36 2022 +0100 [WINESYNC] msi/tests: Improve COM test. Test for a class that Wine actually supports, and also make sure our apartment is uninitialized. 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 fdb9bdc88b27ffdaea5ad31256f250b66bdf6b78 by Zebediah Figura <z.figura12(a)gmail.com> --- modules/rostests/winetests/msi/custom.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index 9cf90dc25ad..8d3234876ce 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -24,8 +24,7 @@ #include <windef.h> #include <winbase.h> #define COBJMACROS -#include <objbase.h> -#include <unknwn.h> +#include <msxml.h> #include <msi.h> #include <msiquery.h> @@ -248,14 +247,19 @@ UINT WINAPI main_test(MSIHANDLE hinst) { UINT res; IUnknown *unk = NULL; - HRESULT hres; + HRESULT hr; /* Test for an MTA apartment */ - hres = CoCreateInstance(&CLSID_Picture_Metafile, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - todo_wine_ok(hinst, hres == S_OK, "CoCreateInstance failed with %08x\n", hres); + hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); + todo_wine_ok(hinst, hr == S_OK, "CoCreateInstance failed with %08x\n", hr); if (unk) IUnknown_Release(unk); + /* but ours is uninitialized */ + hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + ok(hinst, hr == S_OK, "got %#x\n", hr); + CoUninitialize(); + /* Test MsiGetDatabaseState() */ res = MsiGetDatabaseState(hinst); todo_wine_ok(hinst, res == MSIDBSTATE_ERROR, "expected MSIDBSTATE_ERROR, got %u\n", res);
2 years, 9 months
1
0
0
0
[reactos] 13/360: [WINESYNC] msi: Support NULL value in INSERT query.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=18123440c07d5787de37b…
commit 18123440c07d5787de37bd097701513fc5b9d43e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:11:50 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:36 2022 +0100 [WINESYNC] msi: Support NULL value in INSERT query. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 63ccdfeaaab56aca42d21a884789eb5048064276 by Piotr Caban <piotr(a)codeweavers.com> --- dll/win32/msi/sql.y | 9 ++++++++- modules/rostests/winetests/msi/package.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dll/win32/msi/sql.y b/dll/win32/msi/sql.y index 366764d5aeb..2101c680eb3 100644 --- a/dll/win32/msi/sql.y +++ b/dll/win32/msi/sql.y @@ -658,6 +658,12 @@ const_val: if( !$$ ) YYABORT; } + | TK_NULL + { + $$ = EXPR_sval( info, NULL ); + if ( !$$ ) + YYABORT; + } ; column_val: @@ -921,7 +927,8 @@ static struct expr * EXPR_sval( void *info, const struct sql_str *str ) if( e ) { e->type = EXPR_SVAL; - if( SQL_getstring( info, str, (LPWSTR *)&e->u.sval ) != ERROR_SUCCESS ) + if( !str) e->u.sval = NULL; + else if( SQL_getstring( info, str, (LPWSTR *)&e->u.sval ) != ERROR_SUCCESS ) return NULL; /* e will be freed by query destructor */ } return e; diff --git a/modules/rostests/winetests/msi/package.c b/modules/rostests/winetests/msi/package.c index e3a08944d51..c2e2106c38b 100644 --- a/modules/rostests/winetests/msi/package.c +++ b/modules/rostests/winetests/msi/package.c @@ -3705,7 +3705,7 @@ static void test_states(void) add_custom_action_entry( hdb, "'ConditionCheck7', 19, '', 'Condition check failed (7)'" ); add_custom_action_entry( hdb, "'ConditionCheck8', 19, '', 'Condition check failed (8)'" ); add_custom_action_entry( hdb, - "'VBFeatureRequest', 38, '', 'Session.FeatureRequestState(\"three\") = 3'" ); + "'VBFeatureRequest', 38, NULL, 'Session.FeatureRequestState(\"three\") = 3'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck1', 'REINSTALL', '798'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck2', 'NOT REMOVE AND Preselected', '799'" );
2 years, 9 months
1
0
0
0
[reactos] 12/360: [WINESYNC] msi: Only mark non-registered features as absent if we haven't done anything with them.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2dce4ee7d2bad6a20a1fe…
commit 2dce4ee7d2bad6a20a1feb2da1cd1f56f34bddd2 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Mar 12 15:11:50 2022 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Mar 20 19:27:36 2022 +0100 [WINESYNC] msi: Only mark non-registered features as absent if we haven't done anything with them. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id b052fc3c893a0fa946c1dd6065047f4b5538cbe0 by Piotr Caban <piotr(a)codeweavers.com> --- dll/win32/msi/action.c | 2 ++ modules/rostests/winetests/msi/package.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c index 0eef96a89c6..f58a53d4558 100644 --- a/dll/win32/msi/action.c +++ b/dll/win32/msi/action.c @@ -4945,6 +4945,8 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) MSIRECORD *uirow; if (feature->Level <= 0) continue; + if (feature->Action == INSTALLSTATE_UNKNOWN && + feature->Installed != INSTALLSTATE_ABSENT) continue; if (feature->Action != INSTALLSTATE_LOCAL && feature->Action != INSTALLSTATE_SOURCE && diff --git a/modules/rostests/winetests/msi/package.c b/modules/rostests/winetests/msi/package.c index b85a3a810dc..e3a08944d51 100644 --- a/modules/rostests/winetests/msi/package.c +++ b/modules/rostests/winetests/msi/package.c @@ -3704,9 +3704,12 @@ static void test_states(void) add_custom_action_entry( hdb, "'ConditionCheck6', 19, '', 'Condition check failed (6)'" ); add_custom_action_entry( hdb, "'ConditionCheck7', 19, '', 'Condition check failed (7)'" ); add_custom_action_entry( hdb, "'ConditionCheck8', 19, '', 'Condition check failed (8)'" ); + add_custom_action_entry( hdb, + "'VBFeatureRequest', 38, '', 'Session.FeatureRequestState(\"three\") = 3'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck1', 'REINSTALL', '798'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck2', 'NOT REMOVE AND Preselected', '799'" ); + add_install_execute_sequence_entry( hdb, "'VBFeatureRequest', 'NOT REMOVE', '1001'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck3', 'REINSTALL', '6598'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck4', 'NOT REMOVE AND Preselected', '6599'" ); add_install_execute_sequence_entry( hdb, "'ConditionCheck5', 'REINSTALL', '6601'" ); @@ -3773,6 +3776,8 @@ static void test_states(void) ok(state == INSTALLSTATE_SOURCE, "state = %d\n", state); state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "two"); ok(state == INSTALLSTATE_ABSENT, "state = %d\n", state); + state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", "three"); + ok(state == INSTALLSTATE_LOCAL, "state = %d\n", state); /* uninstall the product */ r = MsiInstallProductA(msifile4, "REMOVE=ALL");
2 years, 9 months
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
43
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200