Beispiel #1
0
        private static IntPtr[] Begin(string transactionName, TransactionAttributes attributes)
        {
            int    hTransaction;
            IntPtr hChangeOfOwnerEvent;
            uint   ret = NativeMethods.MsiBeginTransaction(transactionName, (int)attributes, out hTransaction, out hChangeOfOwnerEvent);

            if (ret != 0)
            {
                throw InstallerException.ExceptionFromReturnCode(ret);
            }

            return(new IntPtr[] { (IntPtr)hTransaction, hChangeOfOwnerEvent });
        }