[PATCH 1/13] msidb: Add stub tool for manipulating MSI databases.
Erich E. Hoover
erich.e.hoover at wine-staging.com
Thu Apr 27 08:47:59 CDT 2017
On Wed, Apr 26, 2017 at 3:39 AM, Hans Leidekker <hans at codeweavers.com> wrote:
> On Sun, 2017-04-09 at 13:12 -0600, Erich E. Hoover wrote:
>> +static int open_database( struct msidb_state *state )
>> + LPCWSTR db_mode = state->create_database ? MSIDBOPEN_CREATEDIRECT : MSIDBOPEN_DIRECT;
>> + UINT ret;
>> + ret = MsiOpenDatabaseW( state->database_file, db_mode, &state->database_handle );
> Databases opened in direct mode should always be committed. You should either do that
> in following patches, or open them in transacted mode.
Thanks for the review! MsiDatabaseCommit is called by the
close_database routine (called as long as we actually open a
database). I did things this way so that if any of the requested
operations (in the next patches) fail then the database does not get
committed (to prevent creating "partially updated" databases). Is
there something that I can do to improve this or make that clearer?
More information about the wine-devel