From c294fb860ed7710c80fc004af6c9ebb09779c70c Mon Sep 17 00:00:00 2001 From: Nir Bar Date: Mon, 11 Jan 2021 20:07:38 +0200 Subject: Add functions to start/end MSI transactions and check whether or not it is supported on the target machine (#22) * Add functions to start/end MSI transactions and check whether or not it is supported on the target machine * Add log mode parameter to MSI transaction functions. * No default log mode for WiuEndTransaction --- src/dutil/inc/wiutil.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/dutil/inc') diff --git a/src/dutil/inc/wiutil.h b/src/dutil/inc/wiutil.h index 07f6b56c..10d003b0 100644 --- a/src/dutil/inc/wiutil.h +++ b/src/dutil/inc/wiutil.h @@ -226,6 +226,15 @@ typedef UINT (WINAPI *PFN_MSISOURCELISTADDSOURCEEXW)( __in LPCWSTR szSource, __in_opt DWORD dwIndex ); +typedef UINT(WINAPI* PFN_MSIBEGINTRANSACTIONW)( + __in LPCWSTR szName, + __in DWORD dwTransactionAttributes, + __out MSIHANDLE* phTransactionHandle, + __out HANDLE* phChangeOfOwnerEvent + ); +typedef UINT(WINAPI* PFN_MSIENDTRANSACTION)( + __in DWORD dwTransactionState + ); HRESULT DAPI WiuInitialize( @@ -372,6 +381,21 @@ HRESULT DAPI WiuSourceListAddSourceEx( __in_z LPCWSTR wzSource, __in_opt DWORD dwIndex ); +HRESULT DAPI WiuBeginTransaction( + __in_z LPCWSTR szName, + __in DWORD dwTransactionAttributes, + __out MSIHANDLE* phTransactionHandle, + __out HANDLE* phChangeOfOwnerEvent, + __in DWORD dwLogMode, + __in_z LPCWSTR szLogPath + ); +HRESULT DAPI WiuEndTransaction( + __in DWORD dwTransactionState, + __in DWORD dwLogMode, + __in_z LPCWSTR szLogPath + ); +BOOL DAPI WiuIsMsiTransactionSupported( + ); #ifdef __cplusplus } -- cgit v1.2.3-55-g6feb