aboutsummaryrefslogtreecommitdiff
path: root/src/engine/msiengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/msiengine.cpp')
-rw-r--r--src/engine/msiengine.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/engine/msiengine.cpp b/src/engine/msiengine.cpp
index c20e2ef8..fcd8817d 100644
--- a/src/engine/msiengine.cpp
+++ b/src/engine/msiengine.cpp
@@ -1137,6 +1137,48 @@ LExit:
1137 return hr; 1137 return hr;
1138} 1138}
1139 1139
1140extern "C" HRESULT MsiEngineBeginTransaction(
1141 __in LPCWSTR wzName
1142 )
1143{
1144 HRESULT hr = S_OK;
1145 UINT uResult = ERROR_SUCCESS;
1146 MSIHANDLE hTransactionHandle = NULL;
1147 HANDLE hChangeOfOwnerEvent = NULL;
1148
1149 uResult = ::MsiBeginTransaction(wzName, 0, &hTransactionHandle, &hChangeOfOwnerEvent);
1150 ExitOnWin32Error(uResult, hr, "Failed to begin an MSI transaction");
1151
1152LExit:
1153 return hr;
1154}
1155
1156extern "C" HRESULT MsiEngineCommitTransaction()
1157{
1158 HRESULT hr = S_OK;
1159 UINT uResult = ERROR_SUCCESS;
1160
1161 uResult = ::MsiEndTransaction(MSITRANSACTIONSTATE_COMMIT);
1162 ExitOnWin32Error(uResult, hr, "Failed to commit the MSI transaction");
1163
1164LExit:
1165
1166 return hr;
1167}
1168
1169extern "C" HRESULT MsiEngineRollbackTransaction()
1170{
1171 HRESULT hr = S_OK;
1172 UINT uResult = ERROR_SUCCESS;
1173
1174 uResult = ::MsiEndTransaction(MSITRANSACTIONSTATE_ROLLBACK);
1175 ExitOnWin32Error(uResult, hr, "Failed to rollback the MSI transaction");
1176
1177LExit:
1178
1179 return hr;
1180}
1181
1140extern "C" HRESULT MsiEngineExecutePackage( 1182extern "C" HRESULT MsiEngineExecutePackage(
1141 __in_opt HWND hwndParent, 1183 __in_opt HWND hwndParent,
1142 __in BURN_EXECUTE_ACTION* pExecuteAction, 1184 __in BURN_EXECUTE_ACTION* pExecuteAction,