Skip to content

Latest commit

 

History

History
170 lines (140 loc) · 5.13 KB

nf-msi-msibegintransactiona.md

File metadata and controls

170 lines (140 loc) · 5.13 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:msi.MsiBeginTransactionA
MsiBeginTransactionA function (msi.h)
The MsiBeginTransaction function starts transaction processing of a multiple-package installation and returns an identifier for the transaction. (ANSI)
MsiBeginTransactionA
msi/MsiBeginTransactionA
setup\msibegintransaction.htm
setup
05904e58-b24d-4d2c-8b59-a66ad71b494a
12/05/2018
MsiBeginTransaction, MsiBeginTransaction function [Setup API], MsiBeginTransactionA, MsiBeginTransactionW, msi/MsiBeginTransaction, msi/MsiBeginTransactionA, msi/MsiBeginTransactionW, setup.msibegintransaction
msi.h
Windows
Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.5 on Windows Vista, Windows XP, Windows Server 2003, and Windows Server 2008. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version.
MsiBeginTransactionW (Unicode) and MsiBeginTransactionA (ANSI)
Msi.lib
Msi.dll
Windows
19H1
MsiBeginTransactionA
msi/MsiBeginTransactionA
c++
APIRef
kbSyntax
DllExport
Msi.dll
MsiBeginTransaction
MsiBeginTransactionA
MsiBeginTransactionW

MsiBeginTransactionA function

-description

The MsiBeginTransaction function starts transaction processing of a multiple-package installation and returns an identifier for the transaction. The MsiEndTransaction function ends the transaction.

Windows Installer 4.0 and earlier:  Not supported. This function is available beginning with Windows Installer 4.5.

-parameters

-param szName [in]

Name of the multiple-package installation.

-param dwTransactionAttributes [in]

Attributes of the multiple-package installation.

Value Meaning
0
When 0 or no value is set it Windows Installer closes the UI from the previous installation.
MSITRANSACTION_CHAIN_EMBEDDEDUI
Set this attribute to request that the Windows Installer not shutdown the embedded UI until the transaction is complete.

-param phTransactionHandle [out]

Transaction ID is a MSIHANDLE value that identifies the transaction. Only one process can own a transaction at a time.

-param phChangeOfOwnerEvent [out]

This parameter returns a handle to an event that is set when the MsiJoinTransaction function changes the owner of the transaction to a new owner. The current owner can use this to determine when ownership of the transaction has changed. Leaving a transaction without an owner will roll back the transaction.

-returns

The MsiBeginTransaction function returns the following values.

Value Meaning
ERROR_INSTALL_SERVICE_FAILURE
The installation service could not be accessed. This function requires the Windows Installer service.
ERROR_INSTALL_ALREADY_RUNNING
Only one transaction can be open on a system at a time. The function returns this error if called while another transaction is running.
ERROR_INVALID_PARAMETER
An invalid parameter is passed to the function.
ERROR_ROLLBACK_DISABLED

Rollback Installations have been disabled by the DISABLEROLLBACK property or DisableRollback policy.

-see-also

Multiple Package Installations

-remarks

Note

The msi.h header defines MsiBeginTransaction as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.