diff options
Diffstat (limited to 'src/engine/userexperience.cpp')
| -rw-r--r-- | src/engine/userexperience.cpp | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/src/engine/userexperience.cpp b/src/engine/userexperience.cpp index 5f18cdbc..08451f93 100644 --- a/src/engine/userexperience.cpp +++ b/src/engine/userexperience.cpp | |||
| @@ -348,6 +348,55 @@ LExit: | |||
| 348 | return hr; | 348 | return hr; |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | EXTERN_C BAAPI UserExperienceOnBeginMsiTransactionBegin( | ||
| 352 | __in BURN_USER_EXPERIENCE* pUserExperience, | ||
| 353 | __in LPCWSTR wzTransactionId | ||
| 354 | ) | ||
| 355 | { | ||
| 356 | HRESULT hr = S_OK; | ||
| 357 | BA_ONBEGINMSITRANSACTIONBEGIN_ARGS args = { }; | ||
| 358 | BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS results = { }; | ||
| 359 | |||
| 360 | args.cbSize = sizeof(args); | ||
| 361 | args.wzTransactionId = wzTransactionId; | ||
| 362 | |||
| 363 | results.cbSize = sizeof(results); | ||
| 364 | |||
| 365 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN, &args, &results, pUserExperience->pvBAProcContext); | ||
| 366 | ExitOnFailure(hr, "BA OnBeginMsiTransactionBegin failed."); | ||
| 367 | |||
| 368 | if (results.fCancel) | ||
| 369 | { | ||
| 370 | hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT); | ||
| 371 | } | ||
| 372 | |||
| 373 | LExit: | ||
| 374 | return hr; | ||
| 375 | } | ||
| 376 | |||
| 377 | EXTERN_C BAAPI UserExperienceOnBeginMsiTransactionComplete( | ||
| 378 | __in BURN_USER_EXPERIENCE* pUserExperience, | ||
| 379 | __in LPCWSTR wzTransactionId, | ||
| 380 | __in HRESULT hrStatus | ||
| 381 | ) | ||
| 382 | { | ||
| 383 | HRESULT hr = S_OK; | ||
| 384 | BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS args = { }; | ||
| 385 | BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS results = { }; | ||
| 386 | |||
| 387 | args.cbSize = sizeof(args); | ||
| 388 | args.wzTransactionId = wzTransactionId; | ||
| 389 | args.hrStatus = hrStatus; | ||
| 390 | |||
| 391 | results.cbSize = sizeof(results); | ||
| 392 | |||
| 393 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | ||
| 394 | ExitOnFailure(hr, "BA OnBeginMsiTransactionComplete failed."); | ||
| 395 | |||
| 396 | LExit: | ||
| 397 | return hr; | ||
| 398 | } | ||
| 399 | |||
| 351 | EXTERN_C BAAPI UserExperienceOnCacheAcquireBegin( | 400 | EXTERN_C BAAPI UserExperienceOnCacheAcquireBegin( |
| 352 | __in BURN_USER_EXPERIENCE* pUserExperience, | 401 | __in BURN_USER_EXPERIENCE* pUserExperience, |
| 353 | __in_z_opt LPCWSTR wzPackageOrContainerId, | 402 | __in_z_opt LPCWSTR wzPackageOrContainerId, |
| @@ -614,6 +663,55 @@ LExit: | |||
| 614 | return hr; | 663 | return hr; |
| 615 | } | 664 | } |
| 616 | 665 | ||
| 666 | EXTERN_C BAAPI UserExperienceOnCommitMsiTransactionBegin( | ||
| 667 | __in BURN_USER_EXPERIENCE* pUserExperience, | ||
| 668 | __in LPCWSTR wzTransactionId | ||
| 669 | ) | ||
| 670 | { | ||
| 671 | HRESULT hr = S_OK; | ||
| 672 | BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS args = { }; | ||
| 673 | BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS results = { }; | ||
| 674 | |||
| 675 | args.cbSize = sizeof(args); | ||
| 676 | args.wzTransactionId = wzTransactionId; | ||
| 677 | |||
| 678 | results.cbSize = sizeof(results); | ||
| 679 | |||
| 680 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN, &args, &results, pUserExperience->pvBAProcContext); | ||
| 681 | ExitOnFailure(hr, "BA OnCommitMsiTransactionBegin failed."); | ||
| 682 | |||
| 683 | if (results.fCancel) | ||
| 684 | { | ||
| 685 | hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT); | ||
| 686 | } | ||
| 687 | |||
| 688 | LExit: | ||
| 689 | return hr; | ||
| 690 | } | ||
| 691 | |||
| 692 | EXTERN_C BAAPI UserExperienceOnCommitMsiTransactionComplete( | ||
| 693 | __in BURN_USER_EXPERIENCE* pUserExperience, | ||
| 694 | __in LPCWSTR wzTransactionId, | ||
| 695 | __in HRESULT hrStatus | ||
| 696 | ) | ||
| 697 | { | ||
| 698 | HRESULT hr = S_OK; | ||
| 699 | BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS args = { }; | ||
| 700 | BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS results = { }; | ||
| 701 | |||
| 702 | args.cbSize = sizeof(args); | ||
| 703 | args.wzTransactionId = wzTransactionId; | ||
| 704 | args.hrStatus = hrStatus; | ||
| 705 | |||
| 706 | results.cbSize = sizeof(results); | ||
| 707 | |||
| 708 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | ||
| 709 | ExitOnFailure(hr, "BA OnCommitMsiTransactionComplete failed."); | ||
| 710 | |||
| 711 | LExit: | ||
| 712 | return hr; | ||
| 713 | } | ||
| 714 | |||
| 617 | EXTERN_C BAAPI UserExperienceOnDetectBegin( | 715 | EXTERN_C BAAPI UserExperienceOnDetectBegin( |
| 618 | __in BURN_USER_EXPERIENCE* pUserExperience, | 716 | __in BURN_USER_EXPERIENCE* pUserExperience, |
| 619 | __in BOOL fInstalled, | 717 | __in BOOL fInstalled, |
| @@ -1799,6 +1897,50 @@ LExit: | |||
| 1799 | return hr; | 1897 | return hr; |
| 1800 | } | 1898 | } |
| 1801 | 1899 | ||
| 1900 | EXTERN_C BAAPI UserExperienceOnRollbackMsiTransactionBegin( | ||
| 1901 | __in BURN_USER_EXPERIENCE* pUserExperience, | ||
| 1902 | __in LPCWSTR wzTransactionId | ||
| 1903 | ) | ||
| 1904 | { | ||
| 1905 | HRESULT hr = S_OK; | ||
| 1906 | BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS args = { }; | ||
| 1907 | BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS results = { }; | ||
| 1908 | |||
| 1909 | args.cbSize = sizeof(args); | ||
| 1910 | args.wzTransactionId = wzTransactionId; | ||
| 1911 | |||
| 1912 | results.cbSize = sizeof(results); | ||
| 1913 | |||
| 1914 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN, &args, &results, pUserExperience->pvBAProcContext); | ||
| 1915 | ExitOnFailure(hr, "BA OnRollbackMsiTransactionBegin failed."); | ||
| 1916 | |||
| 1917 | LExit: | ||
| 1918 | return hr; | ||
| 1919 | } | ||
| 1920 | |||
| 1921 | EXTERN_C BAAPI UserExperienceOnRollbackMsiTransactionComplete( | ||
| 1922 | __in BURN_USER_EXPERIENCE* pUserExperience, | ||
| 1923 | __in LPCWSTR wzTransactionId, | ||
| 1924 | __in HRESULT hrStatus | ||
| 1925 | ) | ||
| 1926 | { | ||
| 1927 | HRESULT hr = S_OK; | ||
| 1928 | BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS args = { }; | ||
| 1929 | BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS results = { }; | ||
| 1930 | |||
| 1931 | args.cbSize = sizeof(args); | ||
| 1932 | args.wzTransactionId = wzTransactionId; | ||
| 1933 | args.hrStatus = hrStatus; | ||
| 1934 | |||
| 1935 | results.cbSize = sizeof(results); | ||
| 1936 | |||
| 1937 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | ||
| 1938 | ExitOnFailure(hr, "BA OnRollbackMsiTransactionComplete failed."); | ||
| 1939 | |||
| 1940 | LExit: | ||
| 1941 | return hr; | ||
| 1942 | } | ||
| 1943 | |||
| 1802 | EXTERN_C BAAPI UserExperienceOnShutdown( | 1944 | EXTERN_C BAAPI UserExperienceOnShutdown( |
| 1803 | __in BURN_USER_EXPERIENCE* pUserExperience, | 1945 | __in BURN_USER_EXPERIENCE* pUserExperience, |
| 1804 | __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction | 1946 | __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction |
