From dea25ba9bcfd65200b60339c2e4bc060cdf20723 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 7 Mar 2024 01:44:51 -0800 Subject: Move wixstdba functions to Bal.wixext build --- src/api/burn/balutil/BalBaseBAFunctionsProc.cpp | 1099 -------------------- src/api/burn/balutil/balutil.vcxproj | 5 - src/api/burn/balutil/inc/BAFunctions.h | 243 ----- src/api/burn/balutil/inc/BalBaseBAFunctions.h | 1020 ------------------ src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h | 15 - src/api/burn/balutil/inc/IBAFunctions.h | 75 -- src/api/burn/balutil/precomp.h | 4 +- src/api/burn/inc/BootstrapperApplication.h | 15 - .../burn/test/BalUtilUnitTest/BAFunctionsTests.cpp | 47 - .../test/BalUtilUnitTest/BalUtilUnitTest.vcxproj | 3 - .../burn/test/BalUtilUnitTest/TestBAFunctions.cpp | 39 - .../burn/test/BalUtilUnitTest/TestBAFunctions.h | 8 - src/api/burn/test/BalUtilUnitTest/precomp.h | 2 - 13 files changed, 1 insertion(+), 2574 deletions(-) delete mode 100644 src/api/burn/balutil/BalBaseBAFunctionsProc.cpp delete mode 100644 src/api/burn/balutil/inc/BAFunctions.h delete mode 100644 src/api/burn/balutil/inc/BalBaseBAFunctions.h delete mode 100644 src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h delete mode 100644 src/api/burn/balutil/inc/IBAFunctions.h delete mode 100644 src/api/burn/test/BalUtilUnitTest/BAFunctionsTests.cpp delete mode 100644 src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp delete mode 100644 src/api/burn/test/BalUtilUnitTest/TestBAFunctions.h (limited to 'src/api') diff --git a/src/api/burn/balutil/BalBaseBAFunctionsProc.cpp b/src/api/burn/balutil/BalBaseBAFunctionsProc.cpp deleted file mode 100644 index 38ebf65c..00000000 --- a/src/api/burn/balutil/BalBaseBAFunctionsProc.cpp +++ /dev/null @@ -1,1099 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "precomp.h" - -static HRESULT BalBaseBAFunctionsProcOnDestroy( - __in IBAFunctions* pBAFunctions, - __in BA_ONDESTROY_ARGS* pArgs, - __inout BA_ONDESTROY_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnDestroy(pArgs->fReload); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTBEGIN_ARGS* pArgs, - __inout BA_ONDETECTBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectBegin(pArgs->fCached, pArgs->registrationType, pArgs->cPackages, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTCOMPLETE_ARGS* pArgs, - __inout BA_ONDETECTCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnDetectComplete(pArgs->hrStatus, pArgs->fEligibleForCleanup); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANBEGIN_ARGS* pArgs, - __inout BA_ONPLANBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanBegin(pArgs->cPackages, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANCOMPLETE_ARGS* pArgs, - __inout BA_ONPLANCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnPlanComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnStartup( - __in IBAFunctions* pBAFunctions, - __in BA_ONSTARTUP_ARGS* /*pArgs*/, - __inout BA_ONSTARTUP_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnStartup(); -} - -static HRESULT BalBaseBAFunctionsProcOnShutdown( - __in IBAFunctions* pBAFunctions, - __in BA_ONSHUTDOWN_ARGS* /*pArgs*/, - __inout BA_ONSHUTDOWN_RESULTS* pResults - ) -{ - return pBAFunctions->OnShutdown(&pResults->action); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectForwardCompatibleBundle( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, - __inout BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fMissingFromCache, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectUpdateBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTUPDATEBEGIN_ARGS* pArgs, - __inout BA_ONDETECTUPDATEBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectUpdateBegin(pArgs->wzUpdateLocation, &pResults->fCancel, &pResults->fSkip); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectUpdate( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTUPDATE_ARGS* pArgs, - __inout BA_ONDETECTUPDATE_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectUpdate(pArgs->wzUpdateLocation, pArgs->dw64Size, pArgs->wzHash, pArgs->hashAlgorithm, pArgs->wzVersion, pArgs->wzTitle, pArgs->wzSummary, pArgs->wzContentType, pArgs->wzContent, &pResults->fCancel, &pResults->fStopProcessingUpdates); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectUpdateComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTUPDATECOMPLETE_ARGS* pArgs, - __inout BA_ONDETECTUPDATECOMPLETE_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectUpdateComplete(pArgs->hrStatus, &pResults->fIgnoreError); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectRelatedBundle( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTRELATEDBUNDLE_ARGS* pArgs, - __inout BA_ONDETECTRELATEDBUNDLE_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectRelatedBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fMissingFromCache, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectPackageBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTPACKAGEBEGIN_ARGS* pArgs, - __inout BA_ONDETECTPACKAGEBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectPackageBegin(pArgs->wzPackageId, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectCompatiblePackage( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS* pArgs, - __inout BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectCompatibleMsiPackage(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->wzCompatiblePackageVersion, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectRelatedMsiPackage( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTRELATEDMSIPACKAGE_ARGS* pArgs, - __inout BA_ONDETECTRELATEDMSIPACKAGE_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectRelatedMsiPackage(pArgs->wzPackageId, pArgs->wzUpgradeCode, pArgs->wzProductCode, pArgs->fPerMachine, pArgs->wzVersion, pArgs->operation, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectPatchTarget( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTPATCHTARGET_ARGS* pArgs, - __inout BA_ONDETECTPATCHTARGET_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectPatchTarget(pArgs->wzPackageId, pArgs->wzProductCode, pArgs->patchState, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectMsiFeature( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTMSIFEATURE_ARGS* pArgs, - __inout BA_ONDETECTMSIFEATURE_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectMsiFeature(pArgs->wzPackageId, pArgs->wzFeatureId, pArgs->state, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectPackageComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTPACKAGECOMPLETE_ARGS* pArgs, - __inout BA_ONDETECTPACKAGECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnDetectPackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->state, pArgs->fCached); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanRelatedBundle( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANRELATEDBUNDLE_ARGS* pArgs, - __inout BA_ONPLANRELATEDBUNDLE_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanRelatedBundle(pArgs->wzBundleId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanRollbackBoundary( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANROLLBACKBOUNDARY_ARGS* pArgs, - __inout BA_ONPLANROLLBACKBOUNDARY_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanRollbackBoundary(pArgs->wzRollbackBoundaryId, pArgs->fRecommendedTransaction, &pResults->fTransaction, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanPackageBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANPACKAGEBEGIN_ARGS* pArgs, - __inout BA_ONPLANPACKAGEBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanPackageBegin(pArgs->wzPackageId, pArgs->state, pArgs->fCached, pArgs->installCondition, pArgs->repairCondition, pArgs->recommendedState, pArgs->recommendedCacheType, &pResults->requestedState, &pResults->requestedCacheType, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanCompatibleMsiPackageBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS* pArgs, - __inout BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanCompatibleMsiPackageBegin(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->wzCompatiblePackageVersion, pArgs->fRecommendedRemove, &pResults->fRequestRemove, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanCompatibleMsiPackageComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS* pArgs, - __inout BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnPlanCompatibleMsiPackageComplete(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->hrStatus, pArgs->fRequestedRemove); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanPatchTarget( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANPATCHTARGET_ARGS* pArgs, - __inout BA_ONPLANPATCHTARGET_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanPatchTarget(pArgs->wzPackageId, pArgs->wzProductCode, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanMsiFeature( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANMSIFEATURE_ARGS* pArgs, - __inout BA_ONPLANMSIFEATURE_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanMsiFeature(pArgs->wzPackageId, pArgs->wzFeatureId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanPackageComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANPACKAGECOMPLETE_ARGS* pArgs, - __inout BA_ONPLANPACKAGECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnPlanPackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->requested); -} - -static HRESULT BalBaseBAFunctionsProcOnPlannedCompatiblePackage( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANNEDCOMPATIBLEPACKAGE_ARGS* pArgs, - __inout BA_ONPLANNEDCOMPATIBLEPACKAGE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnPlannedCompatiblePackage(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->fRemove); -} - -static HRESULT BalBaseBAFunctionsProcOnPlannedPackage( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANNEDPACKAGE_ARGS* pArgs, - __inout BA_ONPLANNEDPACKAGE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnPlannedPackage(pArgs->wzPackageId, pArgs->execute, pArgs->rollback, pArgs->fPlannedCache, pArgs->fPlannedUncache); -} - -static HRESULT BalBaseBAFunctionsProcOnApplyBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONAPPLYBEGIN_ARGS* pArgs, - __inout BA_ONAPPLYBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnApplyBegin(pArgs->dwPhaseCount, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnElevateBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONELEVATEBEGIN_ARGS* /*pArgs*/, - __inout BA_ONELEVATEBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnElevateBegin(&pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnElevateComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONELEVATECOMPLETE_ARGS* pArgs, - __inout BA_ONELEVATECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnElevateComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnProgress( - __in IBAFunctions* pBAFunctions, - __in BA_ONPROGRESS_ARGS* pArgs, - __inout BA_ONPROGRESS_RESULTS* pResults - ) -{ - return pBAFunctions->OnProgress(pArgs->dwProgressPercentage, pArgs->dwOverallPercentage, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnError( - __in IBAFunctions* pBAFunctions, - __in BA_ONERROR_ARGS* pArgs, - __inout BA_ONERROR_RESULTS* pResults - ) -{ - return pBAFunctions->OnError(pArgs->errorType, pArgs->wzPackageId, pArgs->dwCode, pArgs->wzError, pArgs->dwUIHint, pArgs->cData, pArgs->rgwzData, pArgs->nRecommendation, &pResults->nResult); -} - -static HRESULT BalBaseBAFunctionsProcOnRegisterBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONREGISTERBEGIN_ARGS* pArgs, - __inout BA_ONREGISTERBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnRegisterBegin(pArgs->recommendedRegistrationType, &pResults->fCancel, &pResults->registrationType); -} - -static HRESULT BalBaseBAFunctionsProcOnRegisterComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONREGISTERCOMPLETE_ARGS* pArgs, - __inout BA_ONREGISTERCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnRegisterComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEBEGIN_ARGS* /*pArgs*/, - __inout BA_ONCACHEBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnCacheBegin(&pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCachePackageBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEPACKAGEBEGIN_ARGS* pArgs, - __inout BA_ONCACHEPACKAGEBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnCachePackageBegin(pArgs->wzPackageId, pArgs->cCachePayloads, pArgs->dw64PackageCacheSize, pArgs->fVital, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheAcquireBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEACQUIREBEGIN_ARGS* pArgs, - __inout BA_ONCACHEACQUIREBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnCacheAcquireBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->wzSource, pArgs->wzDownloadUrl, pArgs->wzPayloadContainerId, pArgs->recommendation, &pResults->action, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheAcquireProgress( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEACQUIREPROGRESS_ARGS* pArgs, - __inout BA_ONCACHEACQUIREPROGRESS_RESULTS* pResults - ) -{ - return pBAFunctions->OnCacheAcquireProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheAcquireResolving( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEACQUIRERESOLVING_ARGS* pArgs, - __inout BA_ONCACHEACQUIRERESOLVING_RESULTS* pResults - ) -{ - return pBAFunctions->OnCacheAcquireResolving(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->rgSearchPaths, pArgs->cSearchPaths, pArgs->fFoundLocal, pArgs->dwRecommendedSearchPath, pArgs->wzDownloadUrl, pArgs->wzPayloadContainerId, pArgs->recommendation, &pResults->dwChosenSearchPath, &pResults->action, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheAcquireComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEACQUIRECOMPLETE_ARGS* pArgs, - __inout BA_ONCACHEACQUIRECOMPLETE_RESULTS* pResults - ) -{ - return pBAFunctions->OnCacheAcquireComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheVerifyBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEVERIFYBEGIN_ARGS* pArgs, - __inout BA_ONCACHEVERIFYBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnCacheVerifyBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheVerifyProgress( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEVERIFYPROGRESS_ARGS* pArgs, - __inout BA_ONCACHEVERIFYPROGRESS_RESULTS* pResults - ) -{ - return pBAFunctions->OnCacheVerifyProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, pArgs->verifyStep, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheVerifyComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEVERIFYCOMPLETE_ARGS* pArgs, - __inout BA_ONCACHEVERIFYCOMPLETE_RESULTS* pResults - ) -{ - return pBAFunctions->OnCacheVerifyComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAFunctionsProcOnCachePackageComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEPACKAGECOMPLETE_ARGS* pArgs, - __inout BA_ONCACHEPACKAGECOMPLETE_RESULTS* pResults - ) -{ - return pBAFunctions->OnCachePackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHECOMPLETE_ARGS* pArgs, - __inout BA_ONCACHECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnCacheComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnExecuteBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONEXECUTEBEGIN_ARGS* pArgs, - __inout BA_ONEXECUTEBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnExecuteBegin(pArgs->cExecutingPackages, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnExecutePackageBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONEXECUTEPACKAGEBEGIN_ARGS* pArgs, - __inout BA_ONEXECUTEPACKAGEBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnExecutePackageBegin(pArgs->wzPackageId, pArgs->fExecute, pArgs->action, pArgs->uiLevel, pArgs->fDisableExternalUiHandler, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnExecutePatchTarget( - __in IBAFunctions* pBAFunctions, - __in BA_ONEXECUTEPATCHTARGET_ARGS* pArgs, - __inout BA_ONEXECUTEPATCHTARGET_RESULTS* pResults - ) -{ - return pBAFunctions->OnExecutePatchTarget(pArgs->wzPackageId, pArgs->wzTargetProductCode, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnExecuteProgress( - __in IBAFunctions* pBAFunctions, - __in BA_ONEXECUTEPROGRESS_ARGS* pArgs, - __inout BA_ONEXECUTEPROGRESS_RESULTS* pResults - ) -{ - return pBAFunctions->OnExecuteProgress(pArgs->wzPackageId, pArgs->dwProgressPercentage, pArgs->dwOverallPercentage, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnExecuteMsiMessage( - __in IBAFunctions* pBAFunctions, - __in BA_ONEXECUTEMSIMESSAGE_ARGS* pArgs, - __inout BA_ONEXECUTEMSIMESSAGE_RESULTS* pResults - ) -{ - return pBAFunctions->OnExecuteMsiMessage(pArgs->wzPackageId, pArgs->messageType, pArgs->dwUIHint, pArgs->wzMessage, pArgs->cData, pArgs->rgwzData, pArgs->nRecommendation, &pResults->nResult); -} - -static HRESULT BalBaseBAFunctionsProcOnExecuteFilesInUse( - __in IBAFunctions* pBAFunctions, - __in BA_ONEXECUTEFILESINUSE_ARGS* pArgs, - __inout BA_ONEXECUTEFILESINUSE_RESULTS* pResults - ) -{ - return pBAFunctions->OnExecuteFilesInUse(pArgs->wzPackageId, pArgs->cFiles, pArgs->rgwzFiles, pArgs->nRecommendation, pArgs->source, &pResults->nResult); -} - -static HRESULT BalBaseBAFunctionsProcOnExecutePackageComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONEXECUTEPACKAGECOMPLETE_ARGS* pArgs, - __inout BA_ONEXECUTEPACKAGECOMPLETE_RESULTS* pResults - ) -{ - return pBAFunctions->OnExecutePackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAFunctionsProcOnExecuteProcessCancel( - __in IBAFunctions* pBAFunctions, - __in BA_ONEXECUTEPROCESSCANCEL_ARGS* pArgs, - __inout BA_ONEXECUTEPROCESSCANCEL_RESULTS* pResults - ) -{ - return pBAFunctions->OnExecuteProcessCancel(pArgs->wzPackageId, pArgs->dwProcessId, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAFunctionsProcOnExecuteComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONEXECUTECOMPLETE_ARGS* pArgs, - __inout BA_ONEXECUTECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnExecuteComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnUnregisterBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONUNREGISTERBEGIN_ARGS* pArgs, - __inout BA_ONUNREGISTERBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnUnregisterBegin(pArgs->recommendedRegistrationType, &pResults->registrationType); -} - -static HRESULT BalBaseBAFunctionsProcOnUnregisterComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONUNREGISTERCOMPLETE_ARGS* pArgs, - __inout BA_ONUNREGISTERCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnUnregisterComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnApplyComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONAPPLYCOMPLETE_ARGS* pArgs, - __inout BA_ONAPPLYCOMPLETE_RESULTS* pResults - ) -{ - return pBAFunctions->OnApplyComplete(pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAFunctionsProcOnLaunchApprovedExeBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS* /*pArgs*/, - __inout BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnLaunchApprovedExeBegin(&pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnLaunchApprovedExeComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS* pArgs, - __inout BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnLaunchApprovedExeComplete(pArgs->hrStatus, pArgs->dwProcessId); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanMsiPackage( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANMSIPACKAGE_ARGS* pArgs, - __inout BA_ONPLANMSIPACKAGE_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanMsiPackage(pArgs->wzPackageId, pArgs->fExecute, pArgs->action, pArgs->recommendedFileVersioning, &pResults->fCancel, &pResults->actionMsiProperty, &pResults->uiLevel, &pResults->fDisableExternalUiHandler, &pResults->fileVersioning); -} - -static HRESULT BalBaseBAFunctionsProcOnBeginMsiTransactionBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONBEGINMSITRANSACTIONBEGIN_ARGS* pArgs, - __inout BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnBeginMsiTransactionBegin(pArgs->wzTransactionId, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnBeginMsiTransactionComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS* pArgs, - __inout BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnBeginMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnCommitMsiTransactionBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS* pArgs, - __inout BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnCommitMsiTransactionBegin(pArgs->wzTransactionId, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCommitMsiTransactionComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS* pArgs, - __inout BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS* pResults - ) -{ - return pBAFunctions->OnCommitMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAFunctionsProcOnRollbackMsiTransactionBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS* pArgs, - __inout BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnRollbackMsiTransactionBegin(pArgs->wzTransactionId); -} - -static HRESULT BalBaseBAFunctionsProcOnRollbackMsiTransactionComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS* pArgs, - __inout BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS* pResults - ) -{ - return pBAFunctions->OnRollbackMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAFunctionsProcOnPauseAutomaticUpdatesBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS* /*pArgs*/, - __inout BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnPauseAutomaticUpdatesBegin(); -} - -static HRESULT BalBaseBAFunctionsProcOnPauseAutomaticUpdatesComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS* pArgs, - __inout BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnPauseAutomaticUpdatesComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnSystemRestorePointBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS* /*pArgs*/, - __inout BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnSystemRestorePointBegin(); -} - -static HRESULT BalBaseBAFunctionsProcOnSystemRestorePointComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS* pArgs, - __inout BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnSystemRestorePointComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanForwardCompatibleBundle( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, - __inout BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fRecommendedIgnoreBundle, &pResults->fCancel, &pResults->fIgnoreBundle); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS* pArgs, - __inout BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnCacheContainerOrPayloadVerifyBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyProgress( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS* pArgs, - __inout BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS* pResults - ) -{ - return pBAFunctions->OnCacheContainerOrPayloadVerifyProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS* pArgs, - __inout BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnCacheContainerOrPayloadVerifyComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnCachePayloadExtractBegin( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS* pArgs, - __inout BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS* pResults - ) -{ - return pBAFunctions->OnCachePayloadExtractBegin(pArgs->wzContainerId, pArgs->wzPayloadId, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCachePayloadExtractProgress( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS* pArgs, - __inout BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS* pResults - ) -{ - return pBAFunctions->OnCachePayloadExtractProgress(pArgs->wzContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCachePayloadExtractComplete( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS* pArgs, - __inout BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnCachePayloadExtractComplete(pArgs->wzContainerId, pArgs->wzPayloadId, pArgs->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanRestoreRelatedBundle( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANRESTORERELATEDBUNDLE_ARGS* pArgs, - __inout BA_ONPLANRESTORERELATEDBUNDLE_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanRestoreRelatedBundle(pArgs->wzBundleId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnPlanRelatedBundleType( - __in IBAFunctions* pBAFunctions, - __in BA_ONPLANRELATEDBUNDLETYPE_ARGS* pArgs, - __inout BA_ONPLANRELATEDBUNDLETYPE_RESULTS* pResults - ) -{ - return pBAFunctions->OnPlanRelatedBundleType(pArgs->wzBundleId, pArgs->recommendedType, &pResults->requestedType, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnApplyDowngrade( - __in IBAFunctions* pBAFunctions, - __in BA_ONAPPLYDOWNGRADE_ARGS* pArgs, - __inout BA_ONAPPLYDOWNGRADE_RESULTS* pResults - ) -{ - return pBAFunctions->OnApplyDowngrade(pArgs->hrRecommended, &pResults->hrStatus); -} - -static HRESULT BalBaseBAFunctionsProcOnDetectRelatedBundlePackage( - __in IBAFunctions* pBAFunctions, - __in BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS* pArgs, - __inout BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS* pResults - ) -{ - return pBAFunctions->OnDetectRelatedBundlePackage(pArgs->wzPackageId, pArgs->wzBundleId, pArgs->relationType, pArgs->fPerMachine, pArgs->wzVersion, &pResults->fCancel); -} - -static HRESULT BalBaseBAFunctionsProcOnCachePackageNonVitalValidationFailure( - __in IBAFunctions* pBAFunctions, - __in BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_ARGS* pArgs, - __inout BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_RESULTS* pResults - ) -{ - return pBAFunctions->OnCachePackageNonVitalValidationFailure(pArgs->wzPackageId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAFunctionsProcOnThemeLoaded( - __in IBAFunctions* pBAFunctions, - __in BA_FUNCTIONS_ONTHEMELOADED_ARGS* pArgs, - __inout BA_FUNCTIONS_ONTHEMELOADED_RESULTS* /*pResults*/ - ) -{ - return pBAFunctions->OnThemeLoaded(pArgs->hWnd); -} - -static HRESULT BalBaseBAFunctionsProcWndProc( - __in IBAFunctions* pBAFunctions, - __in BA_FUNCTIONS_WNDPROC_ARGS* pArgs, - __inout BA_FUNCTIONS_WNDPROC_RESULTS* pResults - ) -{ - return pBAFunctions->WndProc(pArgs->hWnd, pArgs->uMsg, pArgs->wParam, pArgs->lParam, &pResults->fProcessed, &pResults->lResult); -} - -static HRESULT BalBaseBAFunctionsProcOnThemeControlLoading( - __in IBAFunctions* pBAFunctions, - __in BA_FUNCTIONS_ONTHEMECONTROLLOADING_ARGS* pArgs, - __inout BA_FUNCTIONS_ONTHEMECONTROLLOADING_RESULTS* pResults - ) -{ - return pBAFunctions->OnThemeControlLoading(pArgs->wzName, &pResults->fProcessed, &pResults->wId, &pResults->dwAutomaticBehaviorType); -} - -static HRESULT BalBaseBAFunctionsProcOnThemeControlWmCommand( - __in IBAFunctions* pBAFunctions, - __in BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_ARGS* pArgs, - __inout BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_RESULTS* pResults - ) -{ - return pBAFunctions->OnThemeControlWmCommand(pArgs->wParam, pArgs->wzName, pArgs->wId, pArgs->hWnd, &pResults->fProcessed, &pResults->lResult); -} - -static HRESULT BalBaseBAFunctionsProcOnThemeControlWmNotify( - __in IBAFunctions* pBAFunctions, - __in BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_ARGS* pArgs, - __inout BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS* pResults - ) -{ - return pBAFunctions->OnThemeControlWmNotify(pArgs->lParam, pArgs->wzName, pArgs->wId, pArgs->hWnd, &pResults->fProcessed, &pResults->lResult); -} - -static HRESULT BalBaseBAFunctionsProcOnThemeControlLoaded( - __in IBAFunctions* pBAFunctions, - __in BA_FUNCTIONS_ONTHEMECONTROLLOADED_ARGS* pArgs, - __inout BA_FUNCTIONS_ONTHEMECONTROLLOADED_RESULTS* pResults - ) -{ - return pBAFunctions->OnThemeControlLoaded(pArgs->wzName, pArgs->wId, pArgs->hWnd, &pResults->fProcessed); -} - -/******************************************************************* -BalBaseBAFunctionsProc - requires pvContext to be of type IBAFunctions. -Provides a default mapping between the message based BAFunctions interface and -the COM-based BAFunctions interface. - -*******************************************************************/ -HRESULT WINAPI BalBaseBAFunctionsProc( - __in BA_FUNCTIONS_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ) -{ - IBAFunctions* pBAFunctions = reinterpret_cast(pvContext); - HRESULT hr = pBAFunctions->BAFunctionsProc(message, pvArgs, pvResults, pvContext); - - if (E_NOTIMPL == hr) - { - switch (message) - { - case BA_FUNCTIONS_MESSAGE_ONCREATE: - // ONCREATE is handled when the function is created, not via callback. - break; - case BA_FUNCTIONS_MESSAGE_ONDESTROY: - hr = BalBaseBAFunctionsProcOnDestroy(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONSTARTUP: - hr = BalBaseBAFunctionsProcOnStartup(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONSHUTDOWN: - hr = BalBaseBAFunctionsProcOnShutdown(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTBEGIN: - hr = BalBaseBAFunctionsProcOnDetectBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTCOMPLETE: - hr = BalBaseBAFunctionsProcOnDetectComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANBEGIN: - hr = BalBaseBAFunctionsProcOnPlanBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE: - hr = BalBaseBAFunctionsProcOnPlanComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE: - hr = BalBaseBAFunctionsProcOnDetectForwardCompatibleBundle(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTUPDATEBEGIN: - hr = BalBaseBAFunctionsProcOnDetectUpdateBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTUPDATE: - hr = BalBaseBAFunctionsProcOnDetectUpdate(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTUPDATECOMPLETE: - hr = BalBaseBAFunctionsProcOnDetectUpdateComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLE: - hr = BalBaseBAFunctionsProcOnDetectRelatedBundle(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGEBEGIN: - hr = BalBaseBAFunctionsProcOnDetectPackageBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDMSIPACKAGE: - hr = BalBaseBAFunctionsProcOnDetectRelatedMsiPackage(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTPATCHTARGET: - hr = BalBaseBAFunctionsProcOnDetectPatchTarget(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTMSIFEATURE: - hr = BalBaseBAFunctionsProcOnDetectMsiFeature(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGECOMPLETE: - hr = BalBaseBAFunctionsProcOnDetectPackageComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLE: - hr = BalBaseBAFunctionsProcOnPlanRelatedBundle(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANPACKAGEBEGIN: - hr = BalBaseBAFunctionsProcOnPlanPackageBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANPATCHTARGET: - hr = BalBaseBAFunctionsProcOnPlanPatchTarget(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANMSIFEATURE: - hr = BalBaseBAFunctionsProcOnPlanMsiFeature(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANPACKAGECOMPLETE: - hr = BalBaseBAFunctionsProcOnPlanPackageComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONAPPLYBEGIN: - hr = BalBaseBAFunctionsProcOnApplyBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONELEVATEBEGIN: - hr = BalBaseBAFunctionsProcOnElevateBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONELEVATECOMPLETE: - hr = BalBaseBAFunctionsProcOnElevateComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPROGRESS: - hr = BalBaseBAFunctionsProcOnProgress(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONERROR: - hr = BalBaseBAFunctionsProcOnError(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONREGISTERBEGIN: - hr = BalBaseBAFunctionsProcOnRegisterBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONREGISTERCOMPLETE: - hr = BalBaseBAFunctionsProcOnRegisterComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEBEGIN: - hr = BalBaseBAFunctionsProcOnCacheBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGEBEGIN: - hr = BalBaseBAFunctionsProcOnCachePackageBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREBEGIN: - hr = BalBaseBAFunctionsProcOnCacheAcquireBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREPROGRESS: - hr = BalBaseBAFunctionsProcOnCacheAcquireProgress(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRERESOLVING: - hr = BalBaseBAFunctionsProcOnCacheAcquireResolving(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRECOMPLETE: - hr = BalBaseBAFunctionsProcOnCacheAcquireComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYBEGIN: - hr = BalBaseBAFunctionsProcOnCacheVerifyBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYPROGRESS: - hr = BalBaseBAFunctionsProcOnCacheVerifyProgress(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYCOMPLETE: - hr = BalBaseBAFunctionsProcOnCacheVerifyComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGECOMPLETE: - hr = BalBaseBAFunctionsProcOnCachePackageComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHECOMPLETE: - hr = BalBaseBAFunctionsProcOnCacheComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONEXECUTEBEGIN: - hr = BalBaseBAFunctionsProcOnExecuteBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGEBEGIN: - hr = BalBaseBAFunctionsProcOnExecutePackageBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONEXECUTEPATCHTARGET: - hr = BalBaseBAFunctionsProcOnExecutePatchTarget(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONEXECUTEPROGRESS: - hr = BalBaseBAFunctionsProcOnExecuteProgress(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONEXECUTEMSIMESSAGE: - hr = BalBaseBAFunctionsProcOnExecuteMsiMessage(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONEXECUTEFILESINUSE: - hr = BalBaseBAFunctionsProcOnExecuteFilesInUse(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGECOMPLETE: - hr = BalBaseBAFunctionsProcOnExecutePackageComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONEXECUTECOMPLETE: - hr = BalBaseBAFunctionsProcOnExecuteComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONUNREGISTERBEGIN: - hr = BalBaseBAFunctionsProcOnUnregisterBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONUNREGISTERCOMPLETE: - hr = BalBaseBAFunctionsProcOnUnregisterComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONAPPLYCOMPLETE: - hr = BalBaseBAFunctionsProcOnApplyComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN: - hr = BalBaseBAFunctionsProcOnLaunchApprovedExeBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE: - hr = BalBaseBAFunctionsProcOnLaunchApprovedExeComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANMSIPACKAGE: - hr = BalBaseBAFunctionsProcOnPlanMsiPackage(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONBEGIN: - hr = BalBaseBAFunctionsProcOnBeginMsiTransactionBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE: - hr = BalBaseBAFunctionsProcOnBeginMsiTransactionComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN: - hr = BalBaseBAFunctionsProcOnCommitMsiTransactionBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE: - hr = BalBaseBAFunctionsProcOnCommitMsiTransactionComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN: - hr = BalBaseBAFunctionsProcOnRollbackMsiTransactionBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE: - hr = BalBaseBAFunctionsProcOnRollbackMsiTransactionComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - case BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN: - hr = BalBaseBAFunctionsProcOnPauseAutomaticUpdatesBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE: - hr = BalBaseBAFunctionsProcOnPauseAutomaticUpdatesComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN: - hr = BalBaseBAFunctionsProcOnSystemRestorePointBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE: - hr = BalBaseBAFunctionsProcOnSystemRestorePointComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANNEDPACKAGE: - hr = BalBaseBAFunctionsProcOnPlannedPackage(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE: - hr = BalBaseBAFunctionsProcOnPlanForwardCompatibleBundle(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN: - hr = BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS: - hr = BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyProgress(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE: - hr = BalBaseBAFunctionsProcOnCacheContainerOrPayloadVerifyComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN: - hr = BalBaseBAFunctionsProcOnCachePayloadExtractBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS: - hr = BalBaseBAFunctionsProcOnCachePayloadExtractProgress(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE: - hr = BalBaseBAFunctionsProcOnCachePayloadExtractComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANROLLBACKBOUNDARY: - hr = BalBaseBAFunctionsProcOnPlanRollbackBoundary(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE: - hr = BalBaseBAFunctionsProcOnDetectCompatiblePackage(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN: - hr = BalBaseBAFunctionsProcOnPlanCompatibleMsiPackageBegin(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE: - hr = BalBaseBAFunctionsProcOnPlanCompatibleMsiPackageComplete(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE: - hr = BalBaseBAFunctionsProcOnPlannedCompatiblePackage(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANRESTORERELATEDBUNDLE: - hr = BalBaseBAFunctionsProcOnPlanRestoreRelatedBundle(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE: - hr = BalBaseBAFunctionsProcOnPlanRelatedBundleType(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONAPPLYDOWNGRADE: - hr = BalBaseBAFunctionsProcOnApplyDowngrade(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONEXECUTEPROCESSCANCEL: - hr = BalBaseBAFunctionsProcOnExecuteProcessCancel(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE: - hr = BalBaseBAFunctionsProcOnDetectRelatedBundlePackage(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE: - hr = BalBaseBAFunctionsProcOnCachePackageNonVitalValidationFailure(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONTHEMELOADED: - hr = BalBaseBAFunctionsProcOnThemeLoaded(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_WNDPROC: - hr = BalBaseBAFunctionsProcWndProc(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADING: - hr = BalBaseBAFunctionsProcOnThemeControlLoading(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMCOMMAND: - hr = BalBaseBAFunctionsProcOnThemeControlWmCommand(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMNOTIFY: - hr = BalBaseBAFunctionsProcOnThemeControlWmNotify(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADED: - hr = BalBaseBAFunctionsProcOnThemeControlLoaded(pBAFunctions, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - } - } - - return hr; -} diff --git a/src/api/burn/balutil/balutil.vcxproj b/src/api/burn/balutil/balutil.vcxproj index 280f21b8..7d539b5b 100644 --- a/src/api/burn/balutil/balutil.vcxproj +++ b/src/api/burn/balutil/balutil.vcxproj @@ -52,7 +52,6 @@ - @@ -64,15 +63,11 @@ - - - - diff --git a/src/api/burn/balutil/inc/BAFunctions.h b/src/api/burn/balutil/inc/BAFunctions.h deleted file mode 100644 index 7908a74c..00000000 --- a/src/api/burn/balutil/inc/BAFunctions.h +++ /dev/null @@ -1,243 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "IBootstrapperEngine.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// The first 1024 messages are reserved so that the BA messages have the same value here. -enum BA_FUNCTIONS_MESSAGE -{ - BA_FUNCTIONS_MESSAGE_ONCREATE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCREATE, - BA_FUNCTIONS_MESSAGE_ONDESTROY = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDESTROY, - BA_FUNCTIONS_MESSAGE_ONSTARTUP = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, - BA_FUNCTIONS_MESSAGE_ONSHUTDOWN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, - BA_FUNCTIONS_MESSAGE_ONDETECTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN, - BA_FUNCTIONS_MESSAGE_ONDETECTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONPLANBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN, - BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, - BA_FUNCTIONS_MESSAGE_ONDETECTUPDATEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, - BA_FUNCTIONS_MESSAGE_ONDETECTUPDATE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, - BA_FUNCTIONS_MESSAGE_ONDETECTUPDATECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE, - BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN, - BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDMSIPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE, - BA_FUNCTIONS_MESSAGE_ONDETECTPATCHTARGET = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPATCHTARGET, - BA_FUNCTIONS_MESSAGE_ONDETECTMSIFEATURE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE, - BA_FUNCTIONS_MESSAGE_ONDETECTPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE, - BA_FUNCTIONS_MESSAGE_ONPLANPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN, - BA_FUNCTIONS_MESSAGE_ONPLANPATCHTARGET = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPATCHTARGET, - BA_FUNCTIONS_MESSAGE_ONPLANMSIFEATURE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE, - BA_FUNCTIONS_MESSAGE_ONPLANPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONAPPLYBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN, - BA_FUNCTIONS_MESSAGE_ONELEVATEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN, - BA_FUNCTIONS_MESSAGE_ONELEVATECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS, - BA_FUNCTIONS_MESSAGE_ONERROR = BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR, - BA_FUNCTIONS_MESSAGE_ONREGISTERBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN, - BA_FUNCTIONS_MESSAGE_ONREGISTERCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONCACHEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN, - BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN, - BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN, - BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS, - BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRERESOLVING = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRERESOLVING, - BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN, - BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONCACHECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONEXECUTEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN, - BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN, - BA_FUNCTIONS_MESSAGE_ONEXECUTEPATCHTARGET = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET, - BA_FUNCTIONS_MESSAGE_ONEXECUTEPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS, - BA_FUNCTIONS_MESSAGE_ONEXECUTEMSIMESSAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE, - BA_FUNCTIONS_MESSAGE_ONEXECUTEFILESINUSE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE, - BA_FUNCTIONS_MESSAGE_ONEXECUTEPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONEXECUTECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONUNREGISTERBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN, - BA_FUNCTIONS_MESSAGE_ONUNREGISTERCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONAPPLYCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, - BA_FUNCTIONS_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONPLANMSIPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, - BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN, - BA_FUNCTIONS_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN, - BA_FUNCTIONS_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN, - BA_FUNCTIONS_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN, - BA_FUNCTIONS_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN, - BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONPLANNEDPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE, - BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE, - BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS, - BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN, - BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS, - BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN, - BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE, - BA_FUNCTIONS_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS, - BA_FUNCTIONS_MESSAGE_ONPLANROLLBACKBOUNDARY = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANROLLBACKBOUNDARY, - BA_FUNCTIONS_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE, - BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN, - BA_FUNCTIONS_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, - BA_FUNCTIONS_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE, - BA_FUNCTIONS_MESSAGE_ONPLANRESTORERELATEDBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE, - BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, - BA_FUNCTIONS_MESSAGE_ONAPPLYDOWNGRADE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE, - BA_FUNCTIONS_MESSAGE_ONEXECUTEPROCESSCANCEL = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL, - BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE, - BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE, - - BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, - BA_FUNCTIONS_MESSAGE_WNDPROC, - BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADING, - BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMCOMMAND, - BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLWMNOTIFY, - BA_FUNCTIONS_MESSAGE_ONTHEMECONTROLLOADED, -}; - -typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_PROC)( - __in BA_FUNCTIONS_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ); - -// Should be the same as THEME_FIRST_ASSIGN_CONTROL_ID. -// BAFunctions must only assign ids in the range [BAFUNCTIONS_FIRST_ASSIGN_CONTROL_ID, 0x8000) to avoid collisions. -const WORD BAFUNCTIONS_FIRST_ASSIGN_CONTROL_ID = 0x4000; - -struct BA_FUNCTIONS_CREATE_ARGS -{ - DWORD cbSize; - DWORD64 qwBAFunctionsAPIVersion; - IBootstrapperEngine* pEngine; - BOOTSTRAPPER_COMMAND* pCommand; -}; - -struct BA_FUNCTIONS_CREATE_RESULTS -{ - DWORD cbSize; - PFN_BA_FUNCTIONS_PROC pfnBAFunctionsProc; - LPVOID pvBAFunctionsProcContext; -}; - -struct BA_FUNCTIONS_DESTROY_ARGS -{ - DWORD cbSize; - BOOL fReload; -}; - -struct BA_FUNCTIONS_DESTROY_RESULTS -{ - DWORD cbSize; - BOOL fDisableUnloading; // indicates the BAFunctions dll must not be unloaded after BAFunctionsDestroy. -}; - -struct BA_FUNCTIONS_ONTHEMECONTROLLOADED_ARGS -{ - DWORD cbSize; - LPCWSTR wzName; - WORD wId; - HWND hWnd; -}; - -struct BA_FUNCTIONS_ONTHEMECONTROLLOADED_RESULTS -{ - DWORD cbSize; - BOOL fProcessed; -}; - -struct BA_FUNCTIONS_ONTHEMECONTROLLOADING_ARGS -{ - DWORD cbSize; - LPCWSTR wzName; -}; - -struct BA_FUNCTIONS_ONTHEMECONTROLLOADING_RESULTS -{ - DWORD cbSize; - BOOL fProcessed; - WORD wId; - DWORD dwAutomaticBehaviorType; -}; - -struct BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_ARGS -{ - DWORD cbSize; - WPARAM wParam; - LPCWSTR wzName; - WORD wId; - HWND hWnd; -}; - -struct BA_FUNCTIONS_ONTHEMECONTROLWMCOMMAND_RESULTS -{ - DWORD cbSize; - BOOL fProcessed; - LRESULT lResult; -}; - -struct BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_ARGS -{ - DWORD cbSize; - LPNMHDR lParam; - LPCWSTR wzName; - WORD wId; - HWND hWnd; -}; - -struct BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS -{ - DWORD cbSize; - BOOL fProcessed; - LRESULT lResult; -}; - -struct BA_FUNCTIONS_ONTHEMELOADED_ARGS -{ - DWORD cbSize; - HWND hWnd; -}; - -struct BA_FUNCTIONS_ONTHEMELOADED_RESULTS -{ - DWORD cbSize; -}; - -struct BA_FUNCTIONS_WNDPROC_ARGS -{ - DWORD cbSize; - HWND hWnd; - UINT uMsg; - WPARAM wParam; - LPARAM lParam; -}; - -struct BA_FUNCTIONS_WNDPROC_RESULTS -{ - DWORD cbSize; - BOOL fProcessed; - LRESULT lResult; -}; - -typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_CREATE)( - __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, - __inout BA_FUNCTIONS_CREATE_RESULTS* pResults - ); - -typedef void (WINAPI *PFN_BA_FUNCTIONS_DESTROY)( - __in const BA_FUNCTIONS_DESTROY_ARGS* pArgs, - __inout BA_FUNCTIONS_DESTROY_RESULTS* pResults - ); - -#ifdef __cplusplus -} -#endif diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctions.h b/src/api/burn/balutil/inc/BalBaseBAFunctions.h deleted file mode 100644 index df0b7006..00000000 --- a/src/api/burn/balutil/inc/BalBaseBAFunctions.h +++ /dev/null @@ -1,1020 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include -#include - -#include - -#include "IBAFunctions.h" - -class CBalBaseBAFunctions : public IBAFunctions -{ -public: // IUnknown - virtual STDMETHODIMP QueryInterface( - __in REFIID riid, - __out LPVOID *ppvObject - ) - { - if (!ppvObject) - { - return E_INVALIDARG; - } - - *ppvObject = NULL; - - if (::IsEqualIID(__uuidof(IBAFunctions), riid)) - { - *ppvObject = static_cast(this); - } - else if (::IsEqualIID(__uuidof(IBootstrapperApplication), riid)) - { - *ppvObject = static_cast(this); - } - else if (::IsEqualIID(IID_IUnknown, riid)) - { - *ppvObject = static_cast(this); - } - else // no interface for requested iid - { - return E_NOINTERFACE; - } - - AddRef(); - return S_OK; - } - - virtual STDMETHODIMP_(ULONG) AddRef() - { - return ::InterlockedIncrement(&this->m_cReferences); - } - - virtual STDMETHODIMP_(ULONG) Release() - { - long l = ::InterlockedDecrement(&this->m_cReferences); - if (0 < l) - { - return l; - } - - delete this; - return 0; - } - -public: // IBootstrapperApplication - virtual STDMETHODIMP_(HRESULT) BAProc( - __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, - __in const LPVOID /*pvArgs*/, - __inout LPVOID /*pvResults*/ - ) - { - return E_NOTIMPL; - } - - virtual STDMETHODIMP_(void) BAProcFallback( - __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/, - __in const LPVOID /*pvArgs*/, - __inout LPVOID /*pvResults*/, - __inout HRESULT* /*phr*/ - ) - { - } - - virtual STDMETHODIMP OnCreate( - __in IBootstrapperEngine* pEngine, - __in BOOTSTRAPPER_COMMAND* /*pCommand*/ - ) - { - HRESULT hr = S_OK; - - pEngine->AddRef(); - m_pEngine = pEngine; - - return hr; - } - - virtual STDMETHODIMP OnDestroy( - __in BOOL /*fReload*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnStartup() - { - return S_OK; - } - - virtual STDMETHODIMP OnShutdown( - __inout BOOTSTRAPPER_SHUTDOWN_ACTION* /*pAction*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectBegin( - __in BOOL /*fCached*/, - __in BOOTSTRAPPER_REGISTRATION_TYPE /*registrationType*/, - __in DWORD /*cPackages*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectForwardCompatibleBundle( - __in_z LPCWSTR /*wzBundleId*/, - __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, - __in_z LPCWSTR /*wzBundleTag*/, - __in BOOL /*fPerMachine*/, - __in LPCWSTR /*wzVersion*/, - __in BOOL /*fMissingFromCache*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectUpdateBegin( - __in_z LPCWSTR /*wzUpdateLocation*/, - __inout BOOL* /*pfCancel*/, - __inout BOOL* /*pfSkip*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectUpdate( - __in_z LPCWSTR /*wzUpdateLocation*/, - __in DWORD64 /*dw64Size*/, - __in_z_opt LPCWSTR /*wzHash*/, - __in BOOTSTRAPPER_UPDATE_HASH_TYPE /*hashAlgorithm*/, - __in LPCWSTR /*wzVersion*/, - __in_z LPCWSTR /*wzTitle*/, - __in_z LPCWSTR /*wzSummary*/, - __in_z LPCWSTR /*wzContentType*/, - __in_z LPCWSTR /*wzContent*/, - __inout BOOL* /*pfCancel*/, - __inout BOOL* /*pfStopProcessingUpdates*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectUpdateComplete( - __in HRESULT /*hrStatus*/, - __inout BOOL* /*pfIgnoreError*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectRelatedBundle( - __in_z LPCWSTR /*wzBundleId*/, - __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, - __in_z LPCWSTR /*wzBundleTag*/, - __in BOOL /*fPerMachine*/, - __in LPCWSTR /*wzVersion*/, - __in BOOL /*fMissingFromCache*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectPackageBegin( - __in_z LPCWSTR /*wzPackageId*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectCompatibleMsiPackage( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzCompatiblePackageId*/, - __in LPCWSTR /*wzCompatiblePackageVersion*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectRelatedMsiPackage( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzUpgradeCode*/, - __in_z LPCWSTR /*wzProductCode*/, - __in BOOL /*fPerMachine*/, - __in LPCWSTR /*wzVersion*/, - __in BOOTSTRAPPER_RELATED_OPERATION /*operation*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectPatchTarget( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzProductCode*/, - __in BOOTSTRAPPER_PACKAGE_STATE /*patchState*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectMsiFeature( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzFeatureId*/, - __in BOOTSTRAPPER_FEATURE_STATE /*state*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectPackageComplete( - __in_z LPCWSTR /*wzPackageId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, - __in BOOL /*fCached*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectComplete( - __in HRESULT /*hrStatus*/, - __in BOOL /*fEligibleForCleanup*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanBegin( - __in DWORD /*cPackages*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanRelatedBundle( - __in_z LPCWSTR /*wzBundleId*/, - __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, - __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestedState*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanRollbackBoundary( - __in_z LPCWSTR /*wzRollbackBoundaryId*/, - __in BOOL /*fRecommendedTransaction*/, - __inout BOOL* /*pfTransaction*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanPackageBegin( - __in_z LPCWSTR /*wzPackageId*/, - __in BOOTSTRAPPER_PACKAGE_STATE /*state*/, - __in BOOL /*fCached*/, - __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*installCondition*/, - __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT /*repairCondition*/, - __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, - __in BOOTSTRAPPER_CACHE_TYPE /*recommendedCacheType*/, - __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestState*/, - __inout BOOTSTRAPPER_CACHE_TYPE* /*pRequestedCacheType*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanCompatibleMsiPackageBegin( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzCompatiblePackageId*/, - __in LPCWSTR /*wzCompatiblePackageVersion*/, - __in BOOL /*fRecommendedRemove*/, - __inout BOOL* /*pfRequestRemove*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanCompatibleMsiPackageComplete( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzCompatiblePackageId*/, - __in HRESULT /*hrStatus*/, - __in BOOL /*fRequestedRemove*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanPatchTarget( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzProductCode*/, - __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, - __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestedState*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanMsiFeature( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzFeatureId*/, - __in BOOTSTRAPPER_FEATURE_STATE /*recommendedState*/, - __inout BOOTSTRAPPER_FEATURE_STATE* /*pRequestedState*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanMsiPackage( - __in_z LPCWSTR /*wzPackageId*/, - __in BOOL /*fExecute*/, - __in BOOTSTRAPPER_ACTION_STATE /*action*/, - __in BOOTSTRAPPER_MSI_FILE_VERSIONING /*recommendedFileVersioning*/, - __inout BOOL* /*pfCancel*/, - __inout BURN_MSI_PROPERTY* /*pActionMsiProperty*/, - __inout INSTALLUILEVEL* /*pUiLevel*/, - __inout BOOL* /*pfDisableExternalUiHandler*/, - __inout BOOTSTRAPPER_MSI_FILE_VERSIONING* /*pFileVersioning*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanPackageComplete( - __in_z LPCWSTR /*wzPackageId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_REQUEST_STATE /*requested*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlannedCompatiblePackage( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzCompatiblePackageId*/, - __in BOOL /*fRemove*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlannedPackage( - __in_z LPCWSTR /*wzPackageId*/, - __in BOOTSTRAPPER_ACTION_STATE /*execute*/, - __in BOOTSTRAPPER_ACTION_STATE /*rollback*/, - __in BOOL /*fPlannedCache*/, - __in BOOL /*fPlannedUncache*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanComplete( - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnApplyBegin( - __in DWORD /*dwPhaseCount*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnElevateBegin( - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnElevateComplete( - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnProgress( - __in DWORD /*dwProgressPercentage*/, - __in DWORD /*dwOverallProgressPercentage*/, - __inout BOOL* /*pfCancel*/ - ) - { - return IDNOACTION; - } - - virtual STDMETHODIMP OnError( - __in BOOTSTRAPPER_ERROR_TYPE /*errorType*/, - __in_z LPCWSTR /*wzPackageId*/, - __in DWORD /*dwCode*/, - __in_z LPCWSTR /*wzError*/, - __in DWORD /*dwUIHint*/, - __in DWORD /*cData*/, - __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, - __in int /*nRecommendation*/, - __inout int* /*pResult*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnRegisterBegin( - __in BOOTSTRAPPER_REGISTRATION_TYPE /*recommendedRegistrationType*/, - __inout BOOL* /*pfCancel*/, - __inout BOOTSTRAPPER_REGISTRATION_TYPE* /*pRegistrationType*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnRegisterComplete( - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheBegin( - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCachePackageBegin( - __in_z LPCWSTR /*wzPackageId*/, - __in DWORD /*cCachePayloads*/, - __in DWORD64 /*dw64PackageCacheSize*/, - __in BOOL /*fVital*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheAcquireBegin( - __in_z LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in_z LPCWSTR /*wzSource*/, - __in_z_opt LPCWSTR /*wzDownloadUrl*/, - __in_z_opt LPCWSTR /*wzPayloadContainerId*/, - __in BOOTSTRAPPER_CACHE_OPERATION /*recommendation*/, - __inout BOOTSTRAPPER_CACHE_OPERATION* /*pAction*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheAcquireProgress( - __in_z LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in DWORD64 /*dw64Progress*/, - __in DWORD64 /*dw64Total*/, - __in DWORD /*dwOverallPercentage*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheAcquireResolving( - __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in_z LPCWSTR* /*rgSearchPaths*/, - __in DWORD /*cSearchPaths*/, - __in BOOL /*fFoundLocal*/, - __in DWORD /*dwRecommendedSearchPath*/, - __in_z_opt LPCWSTR /*wzDownloadUrl*/, - __in_z_opt LPCWSTR /*wzPayloadContainerId*/, - __in BOOTSTRAPPER_CACHE_RESOLVE_OPERATION /*recommendation*/, - __inout DWORD* /*pdwChosenSearchPath*/, - __inout BOOTSTRAPPER_CACHE_RESOLVE_OPERATION* /*pAction*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheAcquireComplete( - __in_z LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION /*recommendation*/, - __inout BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION* /*pAction*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheVerifyBegin( - __in_z LPCWSTR /*wzPackageOrContainerId*/, - __in_z LPCWSTR /*wzPayloadId*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheVerifyProgress( - __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in DWORD64 /*dw64Progress*/, - __in DWORD64 /*dw64Total*/, - __in DWORD /*dwOverallPercentage*/, - __in BOOTSTRAPPER_CACHE_VERIFY_STEP /*verifyStep*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheVerifyComplete( - __in_z LPCWSTR /*wzPackageOrContainerId*/, - __in_z LPCWSTR /*wzPayloadId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION /*recommendation*/, - __inout BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION* /*pAction*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCachePackageComplete( - __in_z LPCWSTR /*wzPackageId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION /*recommendation*/, - __inout BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION* /*pAction*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheComplete( - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnExecuteBegin( - __in DWORD /*cExecutingPackages*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnExecutePackageBegin( - __in_z LPCWSTR /*wzPackageId*/, - __in BOOL /*fExecute*/, - __in BOOTSTRAPPER_ACTION_STATE /*action*/, - __in INSTALLUILEVEL /*uiLevel*/, - __in BOOL /*fDisableExternalUiHandler*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnExecutePatchTarget( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzTargetProductCode*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnExecuteProgress( - __in_z LPCWSTR /*wzPackageId*/, - __in DWORD /*dwProgressPercentage*/, - __in DWORD /*dwOverallProgressPercentage*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnExecuteMsiMessage( - __in_z LPCWSTR /*wzPackageId*/, - __in INSTALLMESSAGE /*messageType*/, - __in DWORD /*dwUIHint*/, - __in_z LPCWSTR /*wzMessage*/, - __in DWORD /*cData*/, - __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, - __in int /*nRecommendation*/, - __inout int* /*pResult*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnExecuteFilesInUse( - __in_z LPCWSTR /*wzPackageId*/, - __in DWORD /*cFiles*/, - __in_ecount_z(cFiles) LPCWSTR* /*rgwzFiles*/, - __in int /*nRecommendation*/, - __in BOOTSTRAPPER_FILES_IN_USE_TYPE /*source*/, - __inout int* /*pResult*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnExecutePackageComplete( - __in_z LPCWSTR /*wzPackageId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_APPLY_RESTART /*restart*/, - __in BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION /*recommendation*/, - __inout BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION* /*pAction*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnExecuteComplete( - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnUnregisterBegin( - __in BOOTSTRAPPER_REGISTRATION_TYPE /*recommendedRegistrationType*/, - __inout BOOTSTRAPPER_REGISTRATION_TYPE* /*pRegistrationType*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnUnregisterComplete( - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnApplyComplete( - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_APPLY_RESTART /*restart*/, - __in BOOTSTRAPPER_APPLYCOMPLETE_ACTION /*recommendation*/, - __inout BOOTSTRAPPER_APPLYCOMPLETE_ACTION* /*pAction*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnLaunchApprovedExeBegin( - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnLaunchApprovedExeComplete( - __in HRESULT /*hrStatus*/, - __in DWORD /*dwProcessId*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnBeginMsiTransactionBegin( - __in_z LPCWSTR /*wzTransactionId*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnBeginMsiTransactionComplete( - __in_z LPCWSTR /*wzTransactionId*/, - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCommitMsiTransactionBegin( - __in_z LPCWSTR /*wzTransactionId*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCommitMsiTransactionComplete( - __in_z LPCWSTR /*wzTransactionId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_APPLY_RESTART /*restart*/, - __in BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION /*recommendation*/, - __inout BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION* /*pAction*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnRollbackMsiTransactionBegin( - __in_z LPCWSTR /*wzTransactionId*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnRollbackMsiTransactionComplete( - __in_z LPCWSTR /*wzTransactionId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_APPLY_RESTART /*restart*/, - __in BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION /*recommendation*/, - __inout BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION* /*pAction*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPauseAutomaticUpdatesBegin( - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPauseAutomaticUpdatesComplete( - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnSystemRestorePointBegin( - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnSystemRestorePointComplete( - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanForwardCompatibleBundle( - __in_z LPCWSTR /*wzBundleId*/, - __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, - __in_z LPCWSTR /*wzBundleTag*/, - __in BOOL /*fPerMachine*/, - __in LPCWSTR /*wzVersion*/, - __in BOOL /*fRecommendedIgnoreBundle*/, - __inout BOOL* /*pfCancel*/, - __inout BOOL* /*pfIgnoreBundle*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyBegin( - __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyProgress( - __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in DWORD64 /*dw64Progress*/, - __in DWORD64 /*dw64Total*/, - __in DWORD /*dwOverallPercentage*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCacheContainerOrPayloadVerifyComplete( - __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCachePayloadExtractBegin( - __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCachePayloadExtractProgress( - __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in DWORD64 /*dw64Progress*/, - __in DWORD64 /*dw64Total*/, - __in DWORD /*dwOverallPercentage*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCachePayloadExtractComplete( - __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, - __in_z_opt LPCWSTR /*wzPayloadId*/, - __in HRESULT /*hrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanRestoreRelatedBundle( - __in_z LPCWSTR /*wzBundleId*/, - __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, - __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestedState*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnPlanRelatedBundleType( - __in_z LPCWSTR /*wzBundleId*/, - __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE /*recommendedType*/, - __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* /*pRequestedType*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnApplyDowngrade( - __in HRESULT /*hrRecommended*/, - __in HRESULT* /*phrStatus*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnExecuteProcessCancel( - __in_z LPCWSTR /*wzPackageId*/, - __in DWORD /*dwProcessId*/, - __in BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION /*recommendation*/, - __inout BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION* /*pAction*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnDetectRelatedBundlePackage( - __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzBundleId*/, - __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, - __in BOOL /*fPerMachine*/, - __in LPCWSTR /*wzVersion*/, - __inout BOOL* /*pfCancel*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnCachePackageNonVitalValidationFailure( - __in_z LPCWSTR /*wzPackageId*/, - __in HRESULT /*hrStatus*/, - __in BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION /*recommendation*/, - __inout BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION* /*pAction*/ - ) - { - return S_OK; - } - -public: // IBAFunctions - virtual STDMETHODIMP OnPlan( - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnThemeLoaded( - __in HWND hWnd - ) - { - HRESULT hr = S_OK; - - m_hwndParent = hWnd; - - return hr; - } - - virtual STDMETHODIMP WndProc( - __in HWND /*hWnd*/, - __in UINT /*uMsg*/, - __in WPARAM /*wParam*/, - __in LPARAM /*lParam*/, - __inout BOOL* /*pfProcessed*/, - __inout LRESULT* /*plResult*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP BAFunctionsProc( - __in BA_FUNCTIONS_MESSAGE /*message*/, - __in const LPVOID /*pvArgs*/, - __inout LPVOID /*pvResults*/, - __in_opt LPVOID /*pvContext*/ - ) - { - return E_NOTIMPL; - } - - virtual STDMETHODIMP OnThemeControlLoading( - __in LPCWSTR /*wzName*/, - __inout BOOL* /*pfProcessed*/, - __inout WORD* /*pwId*/, - __inout DWORD* /*pdwAutomaticBehaviorType*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnThemeControlWmCommand( - __in WPARAM /*wParam*/, - __in LPCWSTR /*wzName*/, - __in WORD /*wId*/, - __in HWND /*hWnd*/, - __inout BOOL* /*pfProcessed*/, - __inout LRESULT* /*plResult*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnThemeControlWmNotify( - __in LPNMHDR /*lParam*/, - __in LPCWSTR /*wzName*/, - __in WORD /*wId*/, - __in HWND /*hWnd*/, - __inout BOOL* /*pfProcessed*/, - __inout LRESULT* /*plResult*/ - ) - { - return S_OK; - } - - virtual STDMETHODIMP OnThemeControlLoaded( - __in LPCWSTR /*wzName*/, - __in WORD /*wId*/, - __in HWND /*hWnd*/, - __inout BOOL* /*pfProcessed*/ - ) - { - return S_OK; - } - -protected: - CBalBaseBAFunctions(HMODULE hModule) - { - m_cReferences = 1; - m_hModule = hModule; - - m_hwndParent = NULL; - m_pEngine = NULL; - } - - virtual ~CBalBaseBAFunctions() - { - ReleaseNullObject(m_pEngine); - } - -private: - long m_cReferences; - -protected: - IBootstrapperEngine* m_pEngine; - HMODULE m_hModule; - HWND m_hwndParent; -}; diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h deleted file mode 100644 index 65eeb0b4..00000000 --- a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -/******************************************************************* -BalBaseBAFunctionsProc - requires pvContext to be of type IBAFunctions. -Provides a default mapping between the message based BAFunctions interface and -the COM-based BAFunctions interface. - -*******************************************************************/ -HRESULT WINAPI BalBaseBAFunctionsProc( - __in BA_FUNCTIONS_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ); diff --git a/src/api/burn/balutil/inc/IBAFunctions.h b/src/api/burn/balutil/inc/IBAFunctions.h deleted file mode 100644 index 42b64f9b..00000000 --- a/src/api/burn/balutil/inc/IBAFunctions.h +++ /dev/null @@ -1,75 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - - -#include "IBootstrapperApplication.h" -#include "BAFunctions.h" - -DECLARE_INTERFACE_IID_(IBAFunctions, IBootstrapperApplication, "0FB445ED-17BD-49C7-BE19-479776F8AE96") -{ - // OnThemeLoaded - Called after the BA finished loading all the controls for the theme. - // - STDMETHOD(OnThemeLoaded)( - __in HWND hWnd - ) = 0; - - // WndProc - Called if the BA hasn't handled the message. - // - STDMETHOD(WndProc)( - __in HWND hWnd, - __in UINT uMsg, - __in WPARAM wParam, - __in LPARAM lParam, - __inout BOOL* pfProcessed, - __inout LRESULT* plResult - ) = 0; - - // BAFunctionsProc - The PFN_BA_FUNCTIONS_PROC can call this method to give the BAFunctions raw access to the callback from WixStdBA. - // This might be used to help the BAFunctions support more than one version of the engine/WixStdBA. - STDMETHOD(BAFunctionsProc)( - __in BA_FUNCTIONS_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ) = 0; - - // OnThemeControlLoading - Called while creating a control for the theme. - // - STDMETHOD(OnThemeControlLoading)( - __in LPCWSTR wzName, - __inout BOOL* pfProcessed, - __inout WORD* pwId, - __inout DWORD* pdwAutomaticBehaviorType - ) = 0; - - // OnThemeControlWmCommand - Called when WM_COMMAND is received for a control. - // - STDMETHOD(OnThemeControlWmCommand)( - __in WPARAM wParam, - __in LPCWSTR wzName, - __in WORD wId, - __in HWND hWnd, - __inout BOOL* pfProcessed, - __inout LRESULT* plResult - ) = 0; - - // OnThemeControlWmNotify - Called when WM_NOTIFY is received for a control. - // - STDMETHOD(OnThemeControlWmNotify)( - __in LPNMHDR lParam, - __in LPCWSTR wzName, - __in WORD wId, - __in HWND hWnd, - __inout BOOL* pfProcessed, - __inout LRESULT* plResult - ) = 0; - - // OnThemeControlLoaded - Called after a control was created for the theme. - // - STDMETHOD(OnThemeControlLoaded)( - __in LPCWSTR wzName, - __in WORD wId, - __in HWND hWnd, - __inout BOOL* pfProcessed - ) = 0; -}; diff --git a/src/api/burn/balutil/precomp.h b/src/api/burn/balutil/precomp.h index 68e07a44..753bc21f 100644 --- a/src/api/burn/balutil/precomp.h +++ b/src/api/burn/balutil/precomp.h @@ -30,13 +30,11 @@ #include #include -#include "IBAFunctions.h" +#include "IBootstrapperApplication.h" #include "balutil.h" #include "BalBootstrapperEngine.h" #include "balcondition.h" #include "balinfo.h" #include "balretry.h" - -#include "BalBaseBAFunctionsProc.h" #include "msg.h" diff --git a/src/api/burn/inc/BootstrapperApplication.h b/src/api/burn/inc/BootstrapperApplication.h index 79b1df80..8b945b77 100644 --- a/src/api/burn/inc/BootstrapperApplication.h +++ b/src/api/burn/inc/BootstrapperApplication.h @@ -729,21 +729,6 @@ struct BA_ONCREATE_ARGS { DWORD dwApiVersion; BOOTSTRAPPER_COMMAND command; - // BOOTSTRAPPER_ACTION action; - // BOOTSTRAPPER_DISPLAY display; - - // LPWSTR wzCommandLine; - // INT32 nCmdShow; - - // BOOTSTRAPPER_RESUME_TYPE resumeType; - // HWND hwndSplashScreen; - - // BOOTSTRAPPER_RELATION_TYPE relationType; - // BOOL fPassthrough; - - // LPWSTR wzLayoutDirectory; - // LPWSTR wzBootstrapperWorkingFolder; - // LPWSTR wzBootstrapperApplicationDataPath; }; struct BA_ONCREATE_RESULTS diff --git a/src/api/burn/test/BalUtilUnitTest/BAFunctionsTests.cpp b/src/api/burn/test/BalUtilUnitTest/BAFunctionsTests.cpp deleted file mode 100644 index ba04c1bb..00000000 --- a/src/api/burn/test/BalUtilUnitTest/BAFunctionsTests.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "precomp.h" - -using namespace System; -using namespace Xunit; -using namespace WixInternal::TestSupport; -using namespace WixInternal::TestSupport::XunitExtensions; - -namespace BalUtilTests -{ - public ref class BAFunctions - { - public: - [Fact(Skip = "Need a mock implementation of IBootstrapperEngine to test BAFunctions.")] - void CanCreateTestBAFunctions() - { - HRESULT hr = S_OK; - BA_FUNCTIONS_CREATE_ARGS args = { }; - BA_FUNCTIONS_CREATE_RESULTS results = { }; - IBootstrapperEngine* pEngine = NULL; - BOOTSTRAPPER_COMMAND command = { }; - IBAFunctions* pBAFunctions = NULL; - - args.cbSize = sizeof(args); - args.pEngine = pEngine; - args.pCommand = &command; - - results.cbSize = sizeof(results); - - try - { - BalInitialize(pEngine); - - hr = CreateBAFunctions(NULL, &args, &results); - NativeAssert::Succeeded(hr, "Failed to create BAFunctions."); - - pBAFunctions = reinterpret_cast(results.pvBAFunctionsProcContext); - } - finally - { - ReleaseObject(pEngine); - ReleaseObject(pBAFunctions); - } - } - }; -} diff --git a/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj b/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj index de79fe33..114ab26d 100644 --- a/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj +++ b/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj @@ -37,20 +37,17 @@ - Create 4564;4691 - - diff --git a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp b/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp deleted file mode 100644 index 3e850442..00000000 --- a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "precomp.h" -#include "BalBaseBAFunctions.h" -#include "BalBaseBAFunctionsProc.h" - -class CTestBAFunctions : public CBalBaseBAFunctions -{ -public: - CTestBAFunctions( - __in HMODULE hModule - ) : CBalBaseBAFunctions(hModule) - { - } -}; - -HRESULT CreateBAFunctions( - __in HMODULE hModule, - __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, - __inout BA_FUNCTIONS_CREATE_RESULTS* pResults - ) -{ - HRESULT hr = S_OK; - CTestBAFunctions* pFunction = NULL; - - pFunction = new CTestBAFunctions(hModule); - ExitOnNull(pFunction, hr, E_OUTOFMEMORY, "Failed to create new test bafunctions object."); - - hr = pFunction->OnCreate(pArgs->pEngine, pArgs->pCommand); - ExitOnFailure(hr, "Failed to initialize new test bafunctions."); - - pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; - pResults->pvBAFunctionsProcContext = pFunction; - pFunction = NULL; - -LExit: - ReleaseObject(pFunction); - return hr; -} diff --git a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.h b/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.h deleted file mode 100644 index e25e40c3..00000000 --- a/src/api/burn/test/BalUtilUnitTest/TestBAFunctions.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -HRESULT CreateBAFunctions( - __in HMODULE hModule, - __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, - __inout BA_FUNCTIONS_CREATE_RESULTS* pResults - ); diff --git a/src/api/burn/test/BalUtilUnitTest/precomp.h b/src/api/burn/test/BalUtilUnitTest/precomp.h index 4cdd262c..78add593 100644 --- a/src/api/burn/test/BalUtilUnitTest/precomp.h +++ b/src/api/burn/test/BalUtilUnitTest/precomp.h @@ -16,11 +16,9 @@ #include #include -#include #include #include -#include "TestBAFunctions.h" #include "TestBootstrapperApplication.h" #pragma managed -- cgit v1.2.3-55-g6feb