IMsmMerge::CloseDatabase Method

Windows Installer

IMsmMerge::CloseDatabase Method

The CloseDatabase method closes the currently open Windows Installer database. For more information, see the CloseDatabase method of the Merge object.

IMsmMerge2::CloseDatabase    Mergemod.dll version 2.0 or later.
IMsmMerge::CloseDatabase      All Mergemod.dll versions.

Syntax

C++HRESULT CloseDatabase(
    VARIANT_BOOL bCommit
);

Parameters

bCommit

TRUE if changes should be saved, FALSE otherwise.

Return Value

The CloseDatabase function returns the following values.

Value Meaning
E_FAIL

There was an error closing the database. The state of the IMsmMerge or IMsmMerge2 interface is now in an undefined state.

S_FALSE

No database was open.

S_OK

The function succeeded.

STG_E_CANTSAVE as HRESULT

Unable to save database. This error is not generated if bCommit is FALSE.

 

Remarks

This function closes the currently open database. Closing a database clears all dependency information but does not affect any errors that have not been retrieved.

Requirements

VersionMergemod.dll 1.0 or later
HeaderMergemod.h
DLLMergemod.dll
IIDIID_IMsmMerge is defined as 0ADDA82E-2C26-11D2-AD65-00A0C9AF11A6

See Also

Merge Module Automation

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.