diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-11-17 14:11:30 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-11-17 19:06:00 -0600 |
| commit | 643293e48d176ff78282670512f45b4cf889b0a5 (patch) | |
| tree | 663433bb793e6dfef5d043cea4ba24b6ee3fb03d /src/engine/userexperience.cpp | |
| parent | 4ca0a5b2a8711cae9e60cb4075799bffef4ce75a (diff) | |
| download | wix-643293e48d176ff78282670512f45b4cf889b0a5.tar.gz wix-643293e48d176ff78282670512f45b4cf889b0a5.tar.bz2 wix-643293e48d176ff78282670512f45b4cf889b0a5.zip | |
Allow E_IMPL from BA/bext and check all cbSizes from BA/bext.
Diffstat (limited to 'src/engine/userexperience.cpp')
| -rw-r--r-- | src/engine/userexperience.cpp | 159 |
1 files changed, 92 insertions, 67 deletions
diff --git a/src/engine/userexperience.cpp b/src/engine/userexperience.cpp index b5bdc623..ce1662b8 100644 --- a/src/engine/userexperience.cpp +++ b/src/engine/userexperience.cpp | |||
| @@ -17,6 +17,13 @@ static HRESULT FilterExecuteResult( | |||
| 17 | __in LPCWSTR sczEventName | 17 | __in LPCWSTR sczEventName |
| 18 | ); | 18 | ); |
| 19 | 19 | ||
| 20 | static HRESULT SendBAMessage( | ||
| 21 | __in BURN_USER_EXPERIENCE* pUserExperience, | ||
| 22 | __in BOOTSTRAPPER_APPLICATION_MESSAGE message, | ||
| 23 | __in const LPVOID pvArgs, | ||
| 24 | __inout LPVOID pvResults | ||
| 25 | ); | ||
| 26 | |||
| 20 | 27 | ||
| 21 | // function definitions | 28 | // function definitions |
| 22 | 29 | ||
| @@ -97,7 +104,7 @@ extern "C" HRESULT UserExperienceLoad( | |||
| 97 | args.pCommand = pCommand; | 104 | args.pCommand = pCommand; |
| 98 | args.pfnBootstrapperEngineProc = EngineForApplicationProc; | 105 | args.pfnBootstrapperEngineProc = EngineForApplicationProc; |
| 99 | args.pvBootstrapperEngineProcContext = pEngineContext; | 106 | args.pvBootstrapperEngineProcContext = pEngineContext; |
| 100 | args.qwEngineAPIVersion = MAKEQWORDVERSION(2020, 8, 31, 0); | 107 | args.qwEngineAPIVersion = MAKEQWORDVERSION(2020, 11, 17, 0); |
| 101 | 108 | ||
| 102 | results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); | 109 | results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); |
| 103 | 110 | ||
| @@ -308,7 +315,7 @@ EXTERN_C BAAPI UserExperienceOnApplyBegin( | |||
| 308 | 315 | ||
| 309 | results.cbSize = sizeof(results); | 316 | results.cbSize = sizeof(results); |
| 310 | 317 | ||
| 311 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 318 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN, &args, &results); |
| 312 | ExitOnFailure(hr, "BA OnApplyBegin failed."); | 319 | ExitOnFailure(hr, "BA OnApplyBegin failed."); |
| 313 | 320 | ||
| 314 | if (results.fCancel) | 321 | if (results.fCancel) |
| @@ -339,7 +346,7 @@ EXTERN_C BAAPI UserExperienceOnApplyComplete( | |||
| 339 | results.cbSize = sizeof(results); | 346 | results.cbSize = sizeof(results); |
| 340 | results.action = *pAction; | 347 | results.action = *pAction; |
| 341 | 348 | ||
| 342 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 349 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE, &args, &results); |
| 343 | ExitOnFailure(hr, "BA OnApplyComplete failed."); | 350 | ExitOnFailure(hr, "BA OnApplyComplete failed."); |
| 344 | 351 | ||
| 345 | *pAction = results.action; | 352 | *pAction = results.action; |
| @@ -362,7 +369,7 @@ EXTERN_C BAAPI UserExperienceOnBeginMsiTransactionBegin( | |||
| 362 | 369 | ||
| 363 | results.cbSize = sizeof(results); | 370 | results.cbSize = sizeof(results); |
| 364 | 371 | ||
| 365 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 372 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN, &args, &results); |
| 366 | ExitOnFailure(hr, "BA OnBeginMsiTransactionBegin failed."); | 373 | ExitOnFailure(hr, "BA OnBeginMsiTransactionBegin failed."); |
| 367 | 374 | ||
| 368 | if (results.fCancel) | 375 | if (results.fCancel) |
| @@ -390,7 +397,7 @@ EXTERN_C BAAPI UserExperienceOnBeginMsiTransactionComplete( | |||
| 390 | 397 | ||
| 391 | results.cbSize = sizeof(results); | 398 | results.cbSize = sizeof(results); |
| 392 | 399 | ||
| 393 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 400 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE, &args, &results); |
| 394 | ExitOnFailure(hr, "BA OnBeginMsiTransactionComplete failed."); | 401 | ExitOnFailure(hr, "BA OnBeginMsiTransactionComplete failed."); |
| 395 | 402 | ||
| 396 | LExit: | 403 | LExit: |
| @@ -417,7 +424,7 @@ EXTERN_C BAAPI UserExperienceOnCacheAcquireBegin( | |||
| 417 | 424 | ||
| 418 | results.cbSize = sizeof(results); | 425 | results.cbSize = sizeof(results); |
| 419 | 426 | ||
| 420 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 427 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN, &args, &results); |
| 421 | ExitOnFailure(hr, "BA OnCacheAcquireBegin failed."); | 428 | ExitOnFailure(hr, "BA OnCacheAcquireBegin failed."); |
| 422 | 429 | ||
| 423 | if (results.fCancel) | 430 | if (results.fCancel) |
| @@ -450,7 +457,7 @@ EXTERN_C BAAPI UserExperienceOnCacheAcquireComplete( | |||
| 450 | results.cbSize = sizeof(results); | 457 | results.cbSize = sizeof(results); |
| 451 | results.action = args.recommendation; | 458 | results.action = args.recommendation; |
| 452 | 459 | ||
| 453 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 460 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE, &args, &results); |
| 454 | ExitOnFailure(hr, "BA OnCacheAcquireComplete failed."); | 461 | ExitOnFailure(hr, "BA OnCacheAcquireComplete failed."); |
| 455 | 462 | ||
| 456 | if (FAILED(hrStatus)) | 463 | if (FAILED(hrStatus)) |
| @@ -484,7 +491,7 @@ EXTERN_C BAAPI UserExperienceOnCacheAcquireProgress( | |||
| 484 | 491 | ||
| 485 | results.cbSize = sizeof(results); | 492 | results.cbSize = sizeof(results); |
| 486 | 493 | ||
| 487 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS, &args, &results, pUserExperience->pvBAProcContext); | 494 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS, &args, &results); |
| 488 | ExitOnFailure(hr, "BA OnCacheAcquireProgress failed."); | 495 | ExitOnFailure(hr, "BA OnCacheAcquireProgress failed."); |
| 489 | 496 | ||
| 490 | if (results.fCancel) | 497 | if (results.fCancel) |
| @@ -508,7 +515,7 @@ EXTERN_C BAAPI UserExperienceOnCacheBegin( | |||
| 508 | 515 | ||
| 509 | results.cbSize = sizeof(results); | 516 | results.cbSize = sizeof(results); |
| 510 | 517 | ||
| 511 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 518 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN, &args, &results); |
| 512 | ExitOnFailure(hr, "BA OnCacheBegin failed."); | 519 | ExitOnFailure(hr, "BA OnCacheBegin failed."); |
| 513 | 520 | ||
| 514 | if (results.fCancel) | 521 | if (results.fCancel) |
| @@ -534,7 +541,7 @@ EXTERN_C BAAPI UserExperienceOnCacheComplete( | |||
| 534 | 541 | ||
| 535 | results.cbSize = sizeof(results); | 542 | results.cbSize = sizeof(results); |
| 536 | 543 | ||
| 537 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 544 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE, &args, &results); |
| 538 | ExitOnFailure(hr, "BA OnCacheComplete failed."); | 545 | ExitOnFailure(hr, "BA OnCacheComplete failed."); |
| 539 | 546 | ||
| 540 | LExit: | 547 | LExit: |
| @@ -559,7 +566,7 @@ EXTERN_C BAAPI UserExperienceOnCachePackageBegin( | |||
| 559 | 566 | ||
| 560 | results.cbSize = sizeof(results); | 567 | results.cbSize = sizeof(results); |
| 561 | 568 | ||
| 562 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 569 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN, &args, &results); |
| 563 | ExitOnFailure(hr, "BA OnCachePackageBegin failed."); | 570 | ExitOnFailure(hr, "BA OnCachePackageBegin failed."); |
| 564 | 571 | ||
| 565 | if (results.fCancel) | 572 | if (results.fCancel) |
| @@ -590,7 +597,7 @@ EXTERN_C BAAPI UserExperienceOnCachePackageComplete( | |||
| 590 | results.cbSize = sizeof(results); | 597 | results.cbSize = sizeof(results); |
| 591 | results.action = *pAction; | 598 | results.action = *pAction; |
| 592 | 599 | ||
| 593 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 600 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE, &args, &results); |
| 594 | ExitOnFailure(hr, "BA OnCachePackageComplete failed."); | 601 | ExitOnFailure(hr, "BA OnCachePackageComplete failed."); |
| 595 | 602 | ||
| 596 | if (FAILED(hrStatus)) | 603 | if (FAILED(hrStatus)) |
| @@ -618,7 +625,7 @@ EXTERN_C BAAPI UserExperienceOnCacheVerifyBegin( | |||
| 618 | 625 | ||
| 619 | results.cbSize = sizeof(results); | 626 | results.cbSize = sizeof(results); |
| 620 | 627 | ||
| 621 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 628 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN, &args, &results); |
| 622 | ExitOnFailure(hr, "BA OnCacheVerifyBegin failed."); | 629 | ExitOnFailure(hr, "BA OnCacheVerifyBegin failed."); |
| 623 | 630 | ||
| 624 | if (results.fCancel) | 631 | if (results.fCancel) |
| @@ -651,7 +658,7 @@ EXTERN_C BAAPI UserExperienceOnCacheVerifyComplete( | |||
| 651 | results.cbSize = sizeof(results); | 658 | results.cbSize = sizeof(results); |
| 652 | results.action = *pAction; | 659 | results.action = *pAction; |
| 653 | 660 | ||
| 654 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 661 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE, &args, &results); |
| 655 | ExitOnFailure(hr, "BA OnCacheVerifyComplete failed."); | 662 | ExitOnFailure(hr, "BA OnCacheVerifyComplete failed."); |
| 656 | 663 | ||
| 657 | if (FAILED(hrStatus)) | 664 | if (FAILED(hrStatus)) |
| @@ -677,7 +684,7 @@ EXTERN_C BAAPI UserExperienceOnCommitMsiTransactionBegin( | |||
| 677 | 684 | ||
| 678 | results.cbSize = sizeof(results); | 685 | results.cbSize = sizeof(results); |
| 679 | 686 | ||
| 680 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 687 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN, &args, &results); |
| 681 | ExitOnFailure(hr, "BA OnCommitMsiTransactionBegin failed."); | 688 | ExitOnFailure(hr, "BA OnCommitMsiTransactionBegin failed."); |
| 682 | 689 | ||
| 683 | if (results.fCancel) | 690 | if (results.fCancel) |
| @@ -705,7 +712,7 @@ EXTERN_C BAAPI UserExperienceOnCommitMsiTransactionComplete( | |||
| 705 | 712 | ||
| 706 | results.cbSize = sizeof(results); | 713 | results.cbSize = sizeof(results); |
| 707 | 714 | ||
| 708 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 715 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE, &args, &results); |
| 709 | ExitOnFailure(hr, "BA OnCommitMsiTransactionComplete failed."); | 716 | ExitOnFailure(hr, "BA OnCommitMsiTransactionComplete failed."); |
| 710 | 717 | ||
| 711 | LExit: | 718 | LExit: |
| @@ -728,7 +735,7 @@ EXTERN_C BAAPI UserExperienceOnDetectBegin( | |||
| 728 | 735 | ||
| 729 | results.cbSize = sizeof(results); | 736 | results.cbSize = sizeof(results); |
| 730 | 737 | ||
| 731 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 738 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN, &args, &results); |
| 732 | ExitOnFailure(hr, "BA OnDetectBegin failed."); | 739 | ExitOnFailure(hr, "BA OnDetectBegin failed."); |
| 733 | 740 | ||
| 734 | if (results.fCancel) | 741 | if (results.fCancel) |
| @@ -758,7 +765,7 @@ EXTERN_C BAAPI UserExperienceOnDetectCompatibleMsiPackage( | |||
| 758 | 765 | ||
| 759 | results.cbSize = sizeof(results); | 766 | results.cbSize = sizeof(results); |
| 760 | 767 | ||
| 761 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE, &args, &results, pUserExperience->pvBAProcContext); | 768 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE, &args, &results); |
| 762 | ExitOnFailure(hr, "BA OnDetectCompatibleMsiPackage failed."); | 769 | ExitOnFailure(hr, "BA OnDetectCompatibleMsiPackage failed."); |
| 763 | 770 | ||
| 764 | if (results.fCancel) | 771 | if (results.fCancel) |
| @@ -784,7 +791,7 @@ EXTERN_C BAAPI UserExperienceOnDetectComplete( | |||
| 784 | 791 | ||
| 785 | results.cbSize = sizeof(results); | 792 | results.cbSize = sizeof(results); |
| 786 | 793 | ||
| 787 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 794 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE, &args, &results); |
| 788 | ExitOnFailure(hr, "BA OnDetectComplete failed."); | 795 | ExitOnFailure(hr, "BA OnDetectComplete failed."); |
| 789 | 796 | ||
| 790 | LExit: | 797 | LExit: |
| @@ -815,7 +822,7 @@ EXTERN_C BAAPI UserExperienceOnDetectForwardCompatibleBundle( | |||
| 815 | results.cbSize = sizeof(results); | 822 | results.cbSize = sizeof(results); |
| 816 | results.fIgnoreBundle = *pfIgnoreBundle; | 823 | results.fIgnoreBundle = *pfIgnoreBundle; |
| 817 | 824 | ||
| 818 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, &args, &results, pUserExperience->pvBAProcContext); | 825 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, &args, &results); |
| 819 | ExitOnFailure(hr, "BA OnDetectForwardCompatibleBundle failed."); | 826 | ExitOnFailure(hr, "BA OnDetectForwardCompatibleBundle failed."); |
| 820 | 827 | ||
| 821 | if (results.fCancel) | 828 | if (results.fCancel) |
| @@ -846,7 +853,7 @@ EXTERN_C BAAPI UserExperienceOnDetectMsiFeature( | |||
| 846 | 853 | ||
| 847 | results.cbSize = sizeof(results); | 854 | results.cbSize = sizeof(results); |
| 848 | 855 | ||
| 849 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE, &args, &results, pUserExperience->pvBAProcContext); | 856 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE, &args, &results); |
| 850 | ExitOnFailure(hr, "BA OnDetectMsiFeature failed."); | 857 | ExitOnFailure(hr, "BA OnDetectMsiFeature failed."); |
| 851 | 858 | ||
| 852 | if (results.fCancel) | 859 | if (results.fCancel) |
| @@ -872,7 +879,7 @@ EXTERN_C BAAPI UserExperienceOnDetectPackageBegin( | |||
| 872 | 879 | ||
| 873 | results.cbSize = sizeof(results); | 880 | results.cbSize = sizeof(results); |
| 874 | 881 | ||
| 875 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 882 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN, &args, &results); |
| 876 | ExitOnFailure(hr, "BA OnDetectPackageBegin failed."); | 883 | ExitOnFailure(hr, "BA OnDetectPackageBegin failed."); |
| 877 | 884 | ||
| 878 | if (results.fCancel) | 885 | if (results.fCancel) |
| @@ -902,7 +909,7 @@ EXTERN_C BAAPI UserExperienceOnDetectPackageComplete( | |||
| 902 | 909 | ||
| 903 | results.cbSize = sizeof(results); | 910 | results.cbSize = sizeof(results); |
| 904 | 911 | ||
| 905 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 912 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE, &args, &results); |
| 906 | ExitOnFailure(hr, "BA OnDetectPackageComplete failed."); | 913 | ExitOnFailure(hr, "BA OnDetectPackageComplete failed."); |
| 907 | 914 | ||
| 908 | LExit: | 915 | LExit: |
| @@ -933,7 +940,7 @@ EXTERN_C BAAPI UserExperienceOnDetectRelatedBundle( | |||
| 933 | 940 | ||
| 934 | results.cbSize = sizeof(results); | 941 | results.cbSize = sizeof(results); |
| 935 | 942 | ||
| 936 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE, &args, &results, pUserExperience->pvBAProcContext); | 943 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE, &args, &results); |
| 937 | ExitOnFailure(hr, "BA OnDetectRelatedBundle failed."); | 944 | ExitOnFailure(hr, "BA OnDetectRelatedBundle failed."); |
| 938 | 945 | ||
| 939 | if (results.fCancel) | 946 | if (results.fCancel) |
| @@ -969,7 +976,7 @@ EXTERN_C BAAPI UserExperienceOnDetectRelatedMsiPackage( | |||
| 969 | 976 | ||
| 970 | results.cbSize = sizeof(results); | 977 | results.cbSize = sizeof(results); |
| 971 | 978 | ||
| 972 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE, &args, &results, pUserExperience->pvBAProcContext); | 979 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE, &args, &results); |
| 973 | ExitOnFailure(hr, "BA OnDetectRelatedMsiPackage failed."); | 980 | ExitOnFailure(hr, "BA OnDetectRelatedMsiPackage failed."); |
| 974 | 981 | ||
| 975 | if (results.fCancel) | 982 | if (results.fCancel) |
| @@ -999,7 +1006,7 @@ EXTERN_C BAAPI UserExperienceOnDetectTargetMsiPackage( | |||
| 999 | 1006 | ||
| 1000 | results.cbSize = sizeof(results); | 1007 | results.cbSize = sizeof(results); |
| 1001 | 1008 | ||
| 1002 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTTARGETMSIPACKAGE, &args, &results, pUserExperience->pvBAProcContext); | 1009 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTTARGETMSIPACKAGE, &args, &results); |
| 1003 | ExitOnFailure(hr, "BA OnDetectTargetMsiPackage failed."); | 1010 | ExitOnFailure(hr, "BA OnDetectTargetMsiPackage failed."); |
| 1004 | 1011 | ||
| 1005 | if (results.fCancel) | 1012 | if (results.fCancel) |
| @@ -1039,7 +1046,7 @@ EXTERN_C BAAPI UserExperienceOnDetectUpdate( | |||
| 1039 | results.cbSize = sizeof(results); | 1046 | results.cbSize = sizeof(results); |
| 1040 | results.fStopProcessingUpdates = *pfStopProcessingUpdates; | 1047 | results.fStopProcessingUpdates = *pfStopProcessingUpdates; |
| 1041 | 1048 | ||
| 1042 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, &args, &results, pUserExperience->pvBAProcContext); | 1049 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, &args, &results); |
| 1043 | ExitOnFailure(hr, "BA OnDetectUpdate failed."); | 1050 | ExitOnFailure(hr, "BA OnDetectUpdate failed."); |
| 1044 | 1051 | ||
| 1045 | if (results.fCancel) | 1052 | if (results.fCancel) |
| @@ -1068,7 +1075,7 @@ EXTERN_C BAAPI UserExperienceOnDetectUpdateBegin( | |||
| 1068 | results.cbSize = sizeof(results); | 1075 | results.cbSize = sizeof(results); |
| 1069 | results.fSkip = *pfSkip; | 1076 | results.fSkip = *pfSkip; |
| 1070 | 1077 | ||
| 1071 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1078 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, &args, &results); |
| 1072 | ExitOnFailure(hr, "BA OnDetectUpdateBegin failed."); | 1079 | ExitOnFailure(hr, "BA OnDetectUpdateBegin failed."); |
| 1073 | 1080 | ||
| 1074 | if (results.fCancel) | 1081 | if (results.fCancel) |
| @@ -1097,7 +1104,7 @@ EXTERN_C BAAPI UserExperienceOnDetectUpdateComplete( | |||
| 1097 | results.cbSize = sizeof(results); | 1104 | results.cbSize = sizeof(results); |
| 1098 | results.fIgnoreError = *pfIgnoreError; | 1105 | results.fIgnoreError = *pfIgnoreError; |
| 1099 | 1106 | ||
| 1100 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1107 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE, &args, &results); |
| 1101 | ExitOnFailure(hr, "BA OnDetectUpdateComplete failed."); | 1108 | ExitOnFailure(hr, "BA OnDetectUpdateComplete failed."); |
| 1102 | 1109 | ||
| 1103 | if (FAILED(hrStatus)) | 1110 | if (FAILED(hrStatus)) |
| @@ -1121,7 +1128,7 @@ EXTERN_C BAAPI UserExperienceOnElevateBegin( | |||
| 1121 | 1128 | ||
| 1122 | results.cbSize = sizeof(results); | 1129 | results.cbSize = sizeof(results); |
| 1123 | 1130 | ||
| 1124 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1131 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN, &args, &results); |
| 1125 | ExitOnFailure(hr, "BA OnElevateBegin failed."); | 1132 | ExitOnFailure(hr, "BA OnElevateBegin failed."); |
| 1126 | 1133 | ||
| 1127 | if (results.fCancel) | 1134 | if (results.fCancel) |
| @@ -1147,7 +1154,7 @@ EXTERN_C BAAPI UserExperienceOnElevateComplete( | |||
| 1147 | 1154 | ||
| 1148 | results.cbSize = sizeof(results); | 1155 | results.cbSize = sizeof(results); |
| 1149 | 1156 | ||
| 1150 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1157 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE, &args, &results); |
| 1151 | ExitOnFailure(hr, "BA OnElevateComplete failed."); | 1158 | ExitOnFailure(hr, "BA OnElevateComplete failed."); |
| 1152 | 1159 | ||
| 1153 | LExit: | 1160 | LExit: |
| @@ -1183,7 +1190,7 @@ EXTERN_C BAAPI UserExperienceOnError( | |||
| 1183 | results.cbSize = sizeof(results); | 1190 | results.cbSize = sizeof(results); |
| 1184 | results.nResult = *pnResult; | 1191 | results.nResult = *pnResult; |
| 1185 | 1192 | ||
| 1186 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR, &args, &results, pUserExperience->pvBAProcContext); | 1193 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR, &args, &results); |
| 1187 | ExitOnFailure(hr, "BA OnError failed."); | 1194 | ExitOnFailure(hr, "BA OnError failed."); |
| 1188 | 1195 | ||
| 1189 | *pnResult = results.nResult; | 1196 | *pnResult = results.nResult; |
| @@ -1206,7 +1213,7 @@ EXTERN_C BAAPI UserExperienceOnExecuteBegin( | |||
| 1206 | 1213 | ||
| 1207 | results.cbSize = sizeof(results); | 1214 | results.cbSize = sizeof(results); |
| 1208 | 1215 | ||
| 1209 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1216 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN, &args, &results); |
| 1210 | ExitOnFailure(hr, "BA OnExecuteBegin failed."); | 1217 | ExitOnFailure(hr, "BA OnExecuteBegin failed."); |
| 1211 | 1218 | ||
| 1212 | if (results.fCancel) | 1219 | if (results.fCancel) |
| @@ -1232,7 +1239,7 @@ EXTERN_C BAAPI UserExperienceOnExecuteComplete( | |||
| 1232 | 1239 | ||
| 1233 | results.cbSize = sizeof(results); | 1240 | results.cbSize = sizeof(results); |
| 1234 | 1241 | ||
| 1235 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1242 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE, &args, &results); |
| 1236 | ExitOnFailure(hr, "BA OnExecuteComplete failed."); | 1243 | ExitOnFailure(hr, "BA OnExecuteComplete failed."); |
| 1237 | 1244 | ||
| 1238 | LExit: | 1245 | LExit: |
| @@ -1260,7 +1267,7 @@ EXTERN_C BAAPI UserExperienceOnExecuteFilesInUse( | |||
| 1260 | results.cbSize = sizeof(results); | 1267 | results.cbSize = sizeof(results); |
| 1261 | results.nResult = *pnResult; | 1268 | results.nResult = *pnResult; |
| 1262 | 1269 | ||
| 1263 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE, &args, &results, pUserExperience->pvBAProcContext); | 1270 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE, &args, &results); |
| 1264 | ExitOnFailure(hr, "BA OnExecuteFilesInUse failed."); | 1271 | ExitOnFailure(hr, "BA OnExecuteFilesInUse failed."); |
| 1265 | 1272 | ||
| 1266 | *pnResult = results.nResult; | 1273 | *pnResult = results.nResult; |
| @@ -1296,7 +1303,7 @@ EXTERN_C BAAPI UserExperienceOnExecuteMsiMessage( | |||
| 1296 | results.cbSize = sizeof(results); | 1303 | results.cbSize = sizeof(results); |
| 1297 | results.nResult = *pnResult; | 1304 | results.nResult = *pnResult; |
| 1298 | 1305 | ||
| 1299 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE, &args, &results, pUserExperience->pvBAProcContext); | 1306 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE, &args, &results); |
| 1300 | ExitOnFailure(hr, "BA OnExecuteMsiMessage failed."); | 1307 | ExitOnFailure(hr, "BA OnExecuteMsiMessage failed."); |
| 1301 | 1308 | ||
| 1302 | *pnResult = results.nResult; | 1309 | *pnResult = results.nResult; |
| @@ -1327,7 +1334,7 @@ EXTERN_C BAAPI UserExperienceOnExecutePackageBegin( | |||
| 1327 | 1334 | ||
| 1328 | results.cbSize = sizeof(results); | 1335 | results.cbSize = sizeof(results); |
| 1329 | 1336 | ||
| 1330 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1337 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN, &args, &results); |
| 1331 | ExitOnFailure(hr, "BA OnExecutePackageBegin failed."); | 1338 | ExitOnFailure(hr, "BA OnExecutePackageBegin failed."); |
| 1332 | 1339 | ||
| 1333 | if (results.fCancel) | 1340 | if (results.fCancel) |
| @@ -1360,7 +1367,7 @@ EXTERN_C BAAPI UserExperienceOnExecutePackageComplete( | |||
| 1360 | results.cbSize = sizeof(results); | 1367 | results.cbSize = sizeof(results); |
| 1361 | results.action = *pAction; | 1368 | results.action = *pAction; |
| 1362 | 1369 | ||
| 1363 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1370 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE, &args, &results); |
| 1364 | ExitOnFailure(hr, "BA OnExecutePackageComplete failed."); | 1371 | ExitOnFailure(hr, "BA OnExecutePackageComplete failed."); |
| 1365 | 1372 | ||
| 1366 | *pAction = results.action; | 1373 | *pAction = results.action; |
| @@ -1385,7 +1392,7 @@ EXTERN_C BAAPI UserExperienceOnExecutePatchTarget( | |||
| 1385 | 1392 | ||
| 1386 | results.cbSize = sizeof(results); | 1393 | results.cbSize = sizeof(results); |
| 1387 | 1394 | ||
| 1388 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET, &args, &results, pUserExperience->pvBAProcContext); | 1395 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET, &args, &results); |
| 1389 | ExitOnFailure(hr, "BA OnExecutePatchTarget failed."); | 1396 | ExitOnFailure(hr, "BA OnExecutePatchTarget failed."); |
| 1390 | 1397 | ||
| 1391 | if (results.fCancel) | 1398 | if (results.fCancel) |
| @@ -1416,7 +1423,7 @@ EXTERN_C BAAPI UserExperienceOnExecuteProgress( | |||
| 1416 | 1423 | ||
| 1417 | results.cbSize = sizeof(results); | 1424 | results.cbSize = sizeof(results); |
| 1418 | 1425 | ||
| 1419 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS, &args, &results, pUserExperience->pvBAProcContext); | 1426 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS, &args, &results); |
| 1420 | ExitOnFailure(hr, "BA OnExecuteProgress failed."); | 1427 | ExitOnFailure(hr, "BA OnExecuteProgress failed."); |
| 1421 | 1428 | ||
| 1422 | LExit: | 1429 | LExit: |
| @@ -1447,7 +1454,7 @@ EXTERN_C BAAPI UserExperienceOnLaunchApprovedExeBegin( | |||
| 1447 | 1454 | ||
| 1448 | results.cbSize = sizeof(results); | 1455 | results.cbSize = sizeof(results); |
| 1449 | 1456 | ||
| 1450 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1457 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, &args, &results); |
| 1451 | ExitOnFailure(hr, "BA OnLaunchApprovedExeBegin failed."); | 1458 | ExitOnFailure(hr, "BA OnLaunchApprovedExeBegin failed."); |
| 1452 | 1459 | ||
| 1453 | if (results.fCancel) | 1460 | if (results.fCancel) |
| @@ -1475,7 +1482,7 @@ EXTERN_C BAAPI UserExperienceOnLaunchApprovedExeComplete( | |||
| 1475 | 1482 | ||
| 1476 | results.cbSize = sizeof(results); | 1483 | results.cbSize = sizeof(results); |
| 1477 | 1484 | ||
| 1478 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1485 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, &args, &results); |
| 1479 | ExitOnFailure(hr, "BA OnLaunchApprovedExeComplete failed."); | 1486 | ExitOnFailure(hr, "BA OnLaunchApprovedExeComplete failed."); |
| 1480 | 1487 | ||
| 1481 | LExit: | 1488 | LExit: |
| @@ -1494,7 +1501,7 @@ EXTERN_C BAAPI UserExperienceOnPauseAUBegin( | |||
| 1494 | 1501 | ||
| 1495 | results.cbSize = sizeof(results); | 1502 | results.cbSize = sizeof(results); |
| 1496 | 1503 | ||
| 1497 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1504 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN, &args, &results); |
| 1498 | ExitOnFailure(hr, "BA OnPauseAUBegin failed."); | 1505 | ExitOnFailure(hr, "BA OnPauseAUBegin failed."); |
| 1499 | 1506 | ||
| 1500 | LExit: | 1507 | LExit: |
| @@ -1515,7 +1522,7 @@ EXTERN_C BAAPI UserExperienceOnPauseAUComplete( | |||
| 1515 | 1522 | ||
| 1516 | results.cbSize = sizeof(results); | 1523 | results.cbSize = sizeof(results); |
| 1517 | 1524 | ||
| 1518 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1525 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE, &args, &results); |
| 1519 | ExitOnFailure(hr, "BA OnPauseAUComplete failed."); | 1526 | ExitOnFailure(hr, "BA OnPauseAUComplete failed."); |
| 1520 | 1527 | ||
| 1521 | LExit: | 1528 | LExit: |
| @@ -1536,7 +1543,7 @@ EXTERN_C BAAPI UserExperienceOnPlanBegin( | |||
| 1536 | 1543 | ||
| 1537 | results.cbSize = sizeof(results); | 1544 | results.cbSize = sizeof(results); |
| 1538 | 1545 | ||
| 1539 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1546 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN, &args, &results); |
| 1540 | ExitOnFailure(hr, "BA OnPlanBegin failed."); | 1547 | ExitOnFailure(hr, "BA OnPlanBegin failed."); |
| 1541 | 1548 | ||
| 1542 | if (results.fCancel) | 1549 | if (results.fCancel) |
| @@ -1569,7 +1576,7 @@ EXTERN_C BAAPI UserExperienceOnPlanCompatibleMsiPackageBegin( | |||
| 1569 | results.cbSize = sizeof(results); | 1576 | results.cbSize = sizeof(results); |
| 1570 | results.requestedState = *pRequestedState; | 1577 | results.requestedState = *pRequestedState; |
| 1571 | 1578 | ||
| 1572 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1579 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN, &args, &results); |
| 1573 | ExitOnFailure(hr, "BA OnPlanCompatibleMsiPackageBegin failed."); | 1580 | ExitOnFailure(hr, "BA OnPlanCompatibleMsiPackageBegin failed."); |
| 1574 | 1581 | ||
| 1575 | if (results.fCancel) | 1582 | if (results.fCancel) |
| @@ -1608,7 +1615,7 @@ EXTERN_C BAAPI UserExperienceOnPlanCompatibleMsiPackageComplete( | |||
| 1608 | 1615 | ||
| 1609 | results.cbSize = sizeof(results); | 1616 | results.cbSize = sizeof(results); |
| 1610 | 1617 | ||
| 1611 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1618 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, &args, &results); |
| 1612 | ExitOnFailure(hr, "BA OnPlanCompatibleMsiPackageComplete failed."); | 1619 | ExitOnFailure(hr, "BA OnPlanCompatibleMsiPackageComplete failed."); |
| 1613 | 1620 | ||
| 1614 | LExit: | 1621 | LExit: |
| @@ -1634,7 +1641,7 @@ EXTERN_C BAAPI UserExperienceOnPlanMsiFeature( | |||
| 1634 | results.cbSize = sizeof(results); | 1641 | results.cbSize = sizeof(results); |
| 1635 | results.requestedState = *pRequestedState; | 1642 | results.requestedState = *pRequestedState; |
| 1636 | 1643 | ||
| 1637 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE, &args, &results, pUserExperience->pvBAProcContext); | 1644 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE, &args, &results); |
| 1638 | ExitOnFailure(hr, "BA OnPlanMsiFeature failed."); | 1645 | ExitOnFailure(hr, "BA OnPlanMsiFeature failed."); |
| 1639 | 1646 | ||
| 1640 | if (results.fCancel) | 1647 | if (results.fCancel) |
| @@ -1661,7 +1668,7 @@ EXTERN_C BAAPI UserExperienceOnPlanComplete( | |||
| 1661 | 1668 | ||
| 1662 | results.cbSize = sizeof(results); | 1669 | results.cbSize = sizeof(results); |
| 1663 | 1670 | ||
| 1664 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1671 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, &args, &results); |
| 1665 | ExitOnFailure(hr, "BA OnPlanComplete failed."); | 1672 | ExitOnFailure(hr, "BA OnPlanComplete failed."); |
| 1666 | 1673 | ||
| 1667 | LExit: | 1674 | LExit: |
| @@ -1692,7 +1699,7 @@ EXTERN_C BAAPI UserExperienceOnPlanMsiPackage( | |||
| 1692 | results.uiLevel = *pUiLevel; | 1699 | results.uiLevel = *pUiLevel; |
| 1693 | results.fDisableExternalUiHandler = *pfDisableExternalUiHandler; | 1700 | results.fDisableExternalUiHandler = *pfDisableExternalUiHandler; |
| 1694 | 1701 | ||
| 1695 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, &args, &results, pUserExperience->pvBAProcContext); | 1702 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, &args, &results); |
| 1696 | ExitOnFailure(hr, "BA OnPlanMsiPackage failed."); | 1703 | ExitOnFailure(hr, "BA OnPlanMsiPackage failed."); |
| 1697 | 1704 | ||
| 1698 | if (results.fCancel) | 1705 | if (results.fCancel) |
| @@ -1724,7 +1731,7 @@ EXTERN_C BAAPI UserExperienceOnPlanPackageBegin( | |||
| 1724 | results.cbSize = sizeof(results); | 1731 | results.cbSize = sizeof(results); |
| 1725 | results.requestedState = *pRequestedState; | 1732 | results.requestedState = *pRequestedState; |
| 1726 | 1733 | ||
| 1727 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1734 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN, &args, &results); |
| 1728 | ExitOnFailure(hr, "BA OnPlanPackageBegin failed."); | 1735 | ExitOnFailure(hr, "BA OnPlanPackageBegin failed."); |
| 1729 | 1736 | ||
| 1730 | if (results.fCancel) | 1737 | if (results.fCancel) |
| @@ -1761,7 +1768,7 @@ EXTERN_C BAAPI UserExperienceOnPlanPackageComplete( | |||
| 1761 | 1768 | ||
| 1762 | results.cbSize = sizeof(results); | 1769 | results.cbSize = sizeof(results); |
| 1763 | 1770 | ||
| 1764 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1771 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE, &args, &results); |
| 1765 | ExitOnFailure(hr, "BA OnPlanPackageComplete failed."); | 1772 | ExitOnFailure(hr, "BA OnPlanPackageComplete failed."); |
| 1766 | 1773 | ||
| 1767 | LExit: | 1774 | LExit: |
| @@ -1785,7 +1792,7 @@ EXTERN_C BAAPI UserExperienceOnPlanRelatedBundle( | |||
| 1785 | results.cbSize = sizeof(results); | 1792 | results.cbSize = sizeof(results); |
| 1786 | results.requestedState = *pRequestedState; | 1793 | results.requestedState = *pRequestedState; |
| 1787 | 1794 | ||
| 1788 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE, &args, &results, pUserExperience->pvBAProcContext); | 1795 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE, &args, &results); |
| 1789 | ExitOnFailure(hr, "BA OnPlanRelatedBundle failed."); | 1796 | ExitOnFailure(hr, "BA OnPlanRelatedBundle failed."); |
| 1790 | 1797 | ||
| 1791 | if (results.fCancel) | 1798 | if (results.fCancel) |
| @@ -1817,7 +1824,7 @@ EXTERN_C BAAPI UserExperienceOnPlanTargetMsiPackage( | |||
| 1817 | results.cbSize = sizeof(results); | 1824 | results.cbSize = sizeof(results); |
| 1818 | results.requestedState = *pRequestedState; | 1825 | results.requestedState = *pRequestedState; |
| 1819 | 1826 | ||
| 1820 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANTARGETMSIPACKAGE, &args, &results, pUserExperience->pvBAProcContext); | 1827 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANTARGETMSIPACKAGE, &args, &results); |
| 1821 | ExitOnFailure(hr, "BA OnPlanTargetMsiPackage failed."); | 1828 | ExitOnFailure(hr, "BA OnPlanTargetMsiPackage failed."); |
| 1822 | 1829 | ||
| 1823 | if (results.fCancel) | 1830 | if (results.fCancel) |
| @@ -1847,7 +1854,7 @@ EXTERN_C BAAPI UserExperienceOnProgress( | |||
| 1847 | 1854 | ||
| 1848 | results.cbSize = sizeof(results); | 1855 | results.cbSize = sizeof(results); |
| 1849 | 1856 | ||
| 1850 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS, &args, &results, pUserExperience->pvBAProcContext); | 1857 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS, &args, &results); |
| 1851 | hr = FilterExecuteResult(pUserExperience, hr, fRollback, results.fCancel, L"OnProgress"); | 1858 | hr = FilterExecuteResult(pUserExperience, hr, fRollback, results.fCancel, L"OnProgress"); |
| 1852 | 1859 | ||
| 1853 | return hr; | 1860 | return hr; |
| @@ -1865,7 +1872,7 @@ EXTERN_C BAAPI UserExperienceOnRegisterBegin( | |||
| 1865 | 1872 | ||
| 1866 | results.cbSize = sizeof(results); | 1873 | results.cbSize = sizeof(results); |
| 1867 | 1874 | ||
| 1868 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1875 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN, &args, &results); |
| 1869 | ExitOnFailure(hr, "BA OnRegisterBegin failed."); | 1876 | ExitOnFailure(hr, "BA OnRegisterBegin failed."); |
| 1870 | 1877 | ||
| 1871 | if (results.fCancel) | 1878 | if (results.fCancel) |
| @@ -1891,7 +1898,7 @@ EXTERN_C BAAPI UserExperienceOnRegisterComplete( | |||
| 1891 | 1898 | ||
| 1892 | results.cbSize = sizeof(results); | 1899 | results.cbSize = sizeof(results); |
| 1893 | 1900 | ||
| 1894 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1901 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE, &args, &results); |
| 1895 | ExitOnFailure(hr, "BA OnRegisterComplete failed."); | 1902 | ExitOnFailure(hr, "BA OnRegisterComplete failed."); |
| 1896 | 1903 | ||
| 1897 | LExit: | 1904 | LExit: |
| @@ -1921,7 +1928,7 @@ EXTERN_C BAAPI UserExperienceOnResolveSource( | |||
| 1921 | results.cbSize = sizeof(results); | 1928 | results.cbSize = sizeof(results); |
| 1922 | results.action = *pAction; | 1929 | results.action = *pAction; |
| 1923 | 1930 | ||
| 1924 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONRESOLVESOURCE, &args, &results, pUserExperience->pvBAProcContext); | 1931 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONRESOLVESOURCE, &args, &results); |
| 1925 | ExitOnFailure(hr, "BA OnResolveSource failed."); | 1932 | ExitOnFailure(hr, "BA OnResolveSource failed."); |
| 1926 | 1933 | ||
| 1927 | if (results.fCancel) | 1934 | if (results.fCancel) |
| @@ -1951,7 +1958,7 @@ EXTERN_C BAAPI UserExperienceOnRollbackMsiTransactionBegin( | |||
| 1951 | 1958 | ||
| 1952 | results.cbSize = sizeof(results); | 1959 | results.cbSize = sizeof(results); |
| 1953 | 1960 | ||
| 1954 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 1961 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN, &args, &results); |
| 1955 | ExitOnFailure(hr, "BA OnRollbackMsiTransactionBegin failed."); | 1962 | ExitOnFailure(hr, "BA OnRollbackMsiTransactionBegin failed."); |
| 1956 | 1963 | ||
| 1957 | LExit: | 1964 | LExit: |
| @@ -1974,7 +1981,7 @@ EXTERN_C BAAPI UserExperienceOnRollbackMsiTransactionComplete( | |||
| 1974 | 1981 | ||
| 1975 | results.cbSize = sizeof(results); | 1982 | results.cbSize = sizeof(results); |
| 1976 | 1983 | ||
| 1977 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 1984 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE, &args, &results); |
| 1978 | ExitOnFailure(hr, "BA OnRollbackMsiTransactionComplete failed."); | 1985 | ExitOnFailure(hr, "BA OnRollbackMsiTransactionComplete failed."); |
| 1979 | 1986 | ||
| 1980 | LExit: | 1987 | LExit: |
| @@ -1995,7 +2002,7 @@ EXTERN_C BAAPI UserExperienceOnShutdown( | |||
| 1995 | results.cbSize = sizeof(results); | 2002 | results.cbSize = sizeof(results); |
| 1996 | results.action = *pAction; | 2003 | results.action = *pAction; |
| 1997 | 2004 | ||
| 1998 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, &args, &results, pUserExperience->pvBAProcContext); | 2005 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, &args, &results); |
| 1999 | ExitOnFailure(hr, "BA OnShutdown failed."); | 2006 | ExitOnFailure(hr, "BA OnShutdown failed."); |
| 2000 | 2007 | ||
| 2001 | *pAction = results.action; | 2008 | *pAction = results.action; |
| @@ -2016,7 +2023,7 @@ EXTERN_C BAAPI UserExperienceOnStartup( | |||
| 2016 | 2023 | ||
| 2017 | results.cbSize = sizeof(results); | 2024 | results.cbSize = sizeof(results); |
| 2018 | 2025 | ||
| 2019 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, &args, &results, pUserExperience->pvBAProcContext); | 2026 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, &args, &results); |
| 2020 | ExitOnFailure(hr, "BA OnStartup failed."); | 2027 | ExitOnFailure(hr, "BA OnStartup failed."); |
| 2021 | 2028 | ||
| 2022 | LExit: | 2029 | LExit: |
| @@ -2035,7 +2042,7 @@ EXTERN_C BAAPI UserExperienceOnSystemRestorePointBegin( | |||
| 2035 | 2042 | ||
| 2036 | results.cbSize = sizeof(results); | 2043 | results.cbSize = sizeof(results); |
| 2037 | 2044 | ||
| 2038 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 2045 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN, &args, &results); |
| 2039 | ExitOnFailure(hr, "BA OnSystemRestorePointBegin failed."); | 2046 | ExitOnFailure(hr, "BA OnSystemRestorePointBegin failed."); |
| 2040 | 2047 | ||
| 2041 | LExit: | 2048 | LExit: |
| @@ -2056,7 +2063,7 @@ EXTERN_C BAAPI UserExperienceOnSystemRestorePointComplete( | |||
| 2056 | 2063 | ||
| 2057 | results.cbSize = sizeof(results); | 2064 | results.cbSize = sizeof(results); |
| 2058 | 2065 | ||
| 2059 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 2066 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, &args, &results); |
| 2060 | ExitOnFailure(hr, "BA OnSystemRestorePointComplete failed."); | 2067 | ExitOnFailure(hr, "BA OnSystemRestorePointComplete failed."); |
| 2061 | 2068 | ||
| 2062 | LExit: | 2069 | LExit: |
| @@ -2079,7 +2086,7 @@ EXTERN_C BAAPI UserExperienceOnSystemShutdown( | |||
| 2079 | results.cbSize = sizeof(results); | 2086 | results.cbSize = sizeof(results); |
| 2080 | results.fCancel = *pfCancel; | 2087 | results.fCancel = *pfCancel; |
| 2081 | 2088 | ||
| 2082 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMSHUTDOWN, &args, &results, pUserExperience->pvBAProcContext); | 2089 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMSHUTDOWN, &args, &results); |
| 2083 | ExitOnFailure(hr, "BA OnSystemShutdown failed."); | 2090 | ExitOnFailure(hr, "BA OnSystemShutdown failed."); |
| 2084 | 2091 | ||
| 2085 | *pfCancel = results.fCancel; | 2092 | *pfCancel = results.fCancel; |
| @@ -2100,7 +2107,7 @@ EXTERN_C BAAPI UserExperienceOnUnregisterBegin( | |||
| 2100 | 2107 | ||
| 2101 | results.cbSize = sizeof(results); | 2108 | results.cbSize = sizeof(results); |
| 2102 | 2109 | ||
| 2103 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN, &args, &results, pUserExperience->pvBAProcContext); | 2110 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN, &args, &results); |
| 2104 | ExitOnFailure(hr, "BA OnUnregisterBegin failed."); | 2111 | ExitOnFailure(hr, "BA OnUnregisterBegin failed."); |
| 2105 | 2112 | ||
| 2106 | if (results.fCancel) | 2113 | if (results.fCancel) |
| @@ -2126,7 +2133,7 @@ EXTERN_C BAAPI UserExperienceOnUnregisterComplete( | |||
| 2126 | 2133 | ||
| 2127 | results.cbSize = sizeof(results); | 2134 | results.cbSize = sizeof(results); |
| 2128 | 2135 | ||
| 2129 | hr = pUserExperience->pfnBAProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE, &args, &results, pUserExperience->pvBAProcContext); | 2136 | hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE, &args, &results); |
| 2130 | ExitOnFailure(hr, "BA OnUnregisterComplete failed."); | 2137 | ExitOnFailure(hr, "BA OnUnregisterComplete failed."); |
| 2131 | 2138 | ||
| 2132 | LExit: | 2139 | LExit: |
| @@ -2389,3 +2396,21 @@ static HRESULT FilterExecuteResult( | |||
| 2389 | LExit: | 2396 | LExit: |
| 2390 | return hr; | 2397 | return hr; |
| 2391 | } | 2398 | } |
| 2399 | |||
| 2400 | static HRESULT SendBAMessage( | ||
| 2401 | __in BURN_USER_EXPERIENCE* pUserExperience, | ||
| 2402 | __in BOOTSTRAPPER_APPLICATION_MESSAGE message, | ||
| 2403 | __in const LPVOID pvArgs, | ||
| 2404 | __inout LPVOID pvResults | ||
| 2405 | ) | ||
| 2406 | { | ||
| 2407 | HRESULT hr = S_OK; | ||
| 2408 | |||
| 2409 | hr = pUserExperience->pfnBAProc(message, pvArgs, pvResults, pUserExperience->pvBAProcContext); | ||
| 2410 | if (hr == E_NOTIMPL) | ||
| 2411 | { | ||
| 2412 | hr = S_OK; | ||
| 2413 | } | ||
| 2414 | |||
| 2415 | return hr; | ||
| 2416 | } | ||
