From 523c66a62a619e6aa9f30070173ea33edfb5e328 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 29 Dec 2024 18:01:20 -0800 Subject: [PATCH] Rename "bundle id" concept to "bundle code" The "bundle id" always had more in common with the PackageCode from the Windows Installer. With the introduction of an actual Id attribute on the Bundle element, there is potential for confusion, so there is finally real motivation to rename "bundle id" to "bundle code". --- .../BalUtil.cs | 2 +- .../BootstrapperApplication.cs | 20 +- .../Engine.cs | 4 +- .../EventArgs.cs | 50 +- .../IBootstrapperApplication.cs | 14 +- .../IBootstrapperEngine.cs | 2 +- .../IEngine.cs | 4 +- .../burn/balutil/BalBootstrapperEngine.cpp | 8 +- src/api/burn/balutil/balutil.cpp | 10 +- .../balutil/inc/BootstrapperApplicationBase.h | 14 +- .../balutil/inc/IBootstrapperApplication.h | 14 +- .../burn/balutil/inc/IBootstrapperEngine.h | 2 +- src/api/burn/balutil/inc/balutil.h | 4 +- src/api/burn/balutil/msg.cpp | 78 +- .../BextBootstrapperExtensionEngine.cpp | 4 +- .../inc/IBootstrapperExtensionEngine.h | 2 +- .../burn/inc/BootstrapperApplicationTypes.h | 14 +- src/api/burn/inc/BootstrapperEngineTypes.h | 2 +- .../inc/BootstrapperExtensionEngineTypes.h | 2 +- .../Symbols/WixBundleBundlePackageSymbol.cs | 17 +- .../WixBundleHarvestedBundlePackageSymbol.cs | 17 +- .../WixBundlePackageRelatedBundleSymbol.cs | 19 +- .../Symbols/WixBundleSymbol.cs | 17 +- .../Symbols/WixRelatedBundleSymbol.cs | 21 +- src/burn/engine/EngineForExtension.cpp | 2 +- src/burn/engine/apply.cpp | 4 +- src/burn/engine/bacallback.cpp | 56 +- src/burn/engine/bacallback.h | 14 +- src/burn/engine/baengine.cpp | 12 +- src/burn/engine/bundlepackageengine.cpp | 46 +- src/burn/engine/cache.cpp | 18 +- src/burn/engine/cache.h | 4 +- src/burn/engine/core.cpp | 10 +- src/burn/engine/dependency.cpp | 38 +- src/burn/engine/dependency.h | 4 +- src/burn/engine/detect.cpp | 24 +- src/burn/engine/detect.h | 2 +- src/burn/engine/elevation.cpp | 24 +- src/burn/engine/elevation.h | 4 +- src/burn/engine/externalengine.cpp | 4 +- src/burn/engine/externalengine.h | 2 +- src/burn/engine/package.h | 2 +- src/burn/engine/plan.cpp | 24 +- src/burn/engine/plan.h | 4 +- src/burn/engine/registration.cpp | 22 +- src/burn/engine/registration.h | 6 +- src/burn/engine/relatedbundle.cpp | 58 +- src/burn/engine/section.cpp | 8 +- src/burn/stub/StubSection.cpp | 2 +- src/burn/test/BurnUnitTest/ManifestTest.cpp | 2 +- src/burn/test/BurnUnitTest/PlanTest.cpp | 70 +- .../test/BurnUnitTest/RegistrationTest.cpp | 26 +- .../test/BurnUnitTest/RelatedBundleTest.cpp | 14 +- .../BasicFunctionality_BundleA_manifest.xml | 4 +- .../BundlePackage_Multiple_manifest.xml | 12 +- .../ExePackage_PerUserArpEntry_manifest.xml | 4 +- .../PlanTest/Failure_BundleD_manifest.xml | 4 +- .../MsiTransaction_BundleAv1_manifest.xml | 4 +- .../PlanTest/MsuPackageFixture_manifest.xml | 4 +- .../PlanTest/Slipstream_BundleA_manifest.xml | 4 +- .../Slipstream_BundleA_modified_manifest.xml | 4 +- .../WixStandardBootstrapperApplication.cpp | 18 +- .../Bal/wixstdfn/BalBaseBAFunctionsProc.cpp | 14 +- src/ext/Bal/wixstdfn/inc/BalBaseBAFunctions.h | 14 +- src/libs/dutil/WixToolset.DUtil/butil.cpp | 80 +- src/libs/dutil/WixToolset.DUtil/inc/butil.h | 19 +- src/setup/MetadataTask/GenerateMetadata.cs | 2 +- .../ForTestingUseOnlyBurnBackendExtension.cs | 2 +- .../ForTestingUseOnlyCompiler.cs | 10 +- .../Symbols/ForTestingUseOnlyBundleSymbol.cs | 10 +- .../BafRelatedBundleVariableTesting.cpp | 8 +- ...MultipleBundlePackagesWithRemoteBundle.wxs | 4 +- .../DependencyTests/BundleF/BundleF.wxs | 24 +- .../BundleF_AddOnA/BundleF_AddOnA.wxs | 2 +- .../BundleF_AddOnB/BundleF_AddOnB.wxs | 2 +- .../BundleF_PatchAv1_0_1.wxs | 2 +- .../BundleF_PatchAv1_0_2.wxs | 2 +- .../DependencyTests/BundleFv2/BundleFv2.wxs | 2 +- .../DependencyTests/BundleJ/BundleJ.wxs | 2 +- .../BundleJ_Patch/BundleJ_Patch.wxs | 2 +- src/test/burn/WixTestTools/BundleVerifier.cs | 12 +- src/tools/heat/Serialize/wix.cs | 3306 ++++++++--------- src/wix/WixToolset.Converters/WixConverter.cs | 14 +- .../Bind/BindBundleCommand.cs | 2 +- .../Bind/GenerateManifestDataFromIRCommand.cs | 1 - .../Bind/NormalizeRelatedBundlesCommand.cs | 16 +- .../Bind/ProcessBundleSoftwareTagsCommand.cs | 4 +- .../Bundles/BurnCommon.cs | 4 +- .../Bundles/BurnWriter.cs | 10 +- .../Bundles/CacheIdGenerator.cs | 2 +- ...eBootstrapperApplicationManifestCommand.cs | 7 +- .../Bundles/CreateBundleExeCommand.cs | 2 +- .../Bundles/CreateBurnManifestCommand.cs | 15 +- .../Bundles/HarvestBundlePackageCommand.cs | 17 +- .../Bundles/ProcessBundlePackageCommand.cs | 2 +- .../CommandLine/RemotePayloadSubcommand.cs | 8 +- src/wix/WixToolset.Core/Compiler_Bundle.cs | 32 +- .../RelatedBundleFixture.cs | 62 +- .../BundleFixture.cs | 2 +- .../BundleManifestFixture.cs | 6 +- .../BundlePackageFixture.cs | 45 +- .../BurnRemotePayloadSubcommandFixture.cs | 18 +- .../DependencyExtensionFixture.cs | 4 +- .../BundleWithAllUsersPackage.wxs | 2 +- .../BundleWithBootstrapperApplicationDll.wxs | 2 +- ...ionSourceAndBootstrapperApplicationDll.wxs | 2 +- .../BindVarBundleVersion.wxs | 2 +- .../BundleWithLocalizedUpgradeCode.wxs | 3 +- .../TestData/BundlePackage/BundlePackage.wxs | 2 +- .../BundlePackage/PermanentBundlePackage.wxs | 2 +- .../BundlePackage/RemoteBundlePackage.wxs | 4 +- .../TestData/BundleTag/BundleWithTag.wxs | 2 +- .../BundleUncompressed/UncompressedBundle.wxs | 2 +- .../TestData/BundleWithApprovedExe/Bundle.wxs | 4 +- .../BundleWithApprovedExe/Bundle64.wxs | 4 +- .../BundleWithInvalidIcon.wxs | 4 +- .../BundleWithInvalid/BundleWithMissingBA.wxs | 2 +- .../BundleMissingMsiSource.wxs | 4 +- .../BundleMissingMsuSource.wxs | 4 +- .../BundleWithPackageGroupRef/Bundle.wxs | 2 +- .../Container/LayoutPayloadInContainer.wxs | 2 +- .../Dependency/CustomProviderKeyBundle.wxs | 2 +- .../SimpleMsiPackage/SimpleBundle/Bundle.wxs | 2 +- .../UncompressedBundle/Bundle.wxs | 2 +- src/wix/wix.v3.ncrunchsolution | 2 + 125 files changed, 2452 insertions(+), 2302 deletions(-) diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs index 252575545..b4497d079 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs @@ -38,7 +38,7 @@ ref StrUtil.StrHandle psczOut [DllImport("mbanative.dll", ExactSpelling = true)] internal static extern int BalGetRelatedBundleVariableFromEngine( [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleCode, [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, ref StrUtil.StrHandle psczOut ); diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplication.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplication.cs index f9fca7489..515a68b48 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplication.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplication.cs @@ -1449,9 +1449,9 @@ int IBootstrapperApplication.OnDetectBegin(bool fCached, RegistrationType regist return args.HResult; } - int IBootstrapperApplication.OnDetectForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fMissingFromCache, ref bool fCancel) + int IBootstrapperApplication.OnDetectForwardCompatibleBundle(string wzBundleCode, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fMissingFromCache, ref bool fCancel) { - DetectForwardCompatibleBundleEventArgs args = new DetectForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, fCancel); + DetectForwardCompatibleBundleEventArgs args = new DetectForwardCompatibleBundleEventArgs(wzBundleCode, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, fCancel); this.OnDetectForwardCompatibleBundle(args); fCancel = args.Cancel; @@ -1566,9 +1566,9 @@ int IBootstrapperApplication.OnPlanBegin(int cPackages, ref bool fCancel) return args.HResult; } - int IBootstrapperApplication.OnPlanRelatedBundle(string wzBundleId, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) + int IBootstrapperApplication.OnPlanRelatedBundle(string wzBundleCode, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) { - PlanRelatedBundleEventArgs args = new PlanRelatedBundleEventArgs(wzBundleId, recommendedState, pRequestedState, fCancel); + PlanRelatedBundleEventArgs args = new PlanRelatedBundleEventArgs(wzBundleCode, recommendedState, pRequestedState, fCancel); this.OnPlanRelatedBundle(args); pRequestedState = args.State; @@ -1576,9 +1576,9 @@ int IBootstrapperApplication.OnPlanRelatedBundle(string wzBundleId, RequestState return args.HResult; } - int IBootstrapperApplication.OnPlanRelatedBundleType(string wzBundleId, RelatedBundlePlanType recommendedType, ref RelatedBundlePlanType pRequestedType, ref bool fCancel) + int IBootstrapperApplication.OnPlanRelatedBundleType(string wzBundleCode, RelatedBundlePlanType recommendedType, ref RelatedBundlePlanType pRequestedType, ref bool fCancel) { - PlanRelatedBundleTypeEventArgs args = new PlanRelatedBundleTypeEventArgs(wzBundleId, recommendedType, pRequestedType, fCancel); + PlanRelatedBundleTypeEventArgs args = new PlanRelatedBundleTypeEventArgs(wzBundleCode, recommendedType, pRequestedType, fCancel); this.OnPlanRelatedBundleType(args); pRequestedType = args.Type; @@ -2060,9 +2060,9 @@ int IBootstrapperApplication.OnSystemRestorePointComplete(int hrStatus) return args.HResult; } - int IBootstrapperApplication.OnPlanForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fRecommendedIgnoreBundle, ref bool fCancel, ref bool fIgnoreBundle) + int IBootstrapperApplication.OnPlanForwardCompatibleBundle(string wzBundleCode, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fRecommendedIgnoreBundle, ref bool fCancel, ref bool fIgnoreBundle) { - PlanForwardCompatibleBundleEventArgs args = new PlanForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fRecommendedIgnoreBundle, fCancel, fIgnoreBundle); + PlanForwardCompatibleBundleEventArgs args = new PlanForwardCompatibleBundleEventArgs(wzBundleCode, relationType, wzBundleTag, fPerMachine, wzVersion, fRecommendedIgnoreBundle, fCancel, fIgnoreBundle); this.OnPlanForwardCompatibleBundle(args); fCancel = args.Cancel; @@ -2122,9 +2122,9 @@ int IBootstrapperApplication.OnCachePayloadExtractComplete(string wzContainerId, return args.HResult; } - int IBootstrapperApplication.OnPlanRestoreRelatedBundle(string wzBundleId, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) + int IBootstrapperApplication.OnPlanRestoreRelatedBundle(string wzBundleCode, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) { - PlanRestoreRelatedBundleEventArgs args = new PlanRestoreRelatedBundleEventArgs(wzBundleId, recommendedState, pRequestedState, fCancel); + PlanRestoreRelatedBundleEventArgs args = new PlanRestoreRelatedBundleEventArgs(wzBundleCode, recommendedState, pRequestedState, fCancel); this.OnPlanRestoreRelatedBundle(args); pRequestedState = args.State; diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs index 487858e0e..44d77359d 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs @@ -209,12 +209,12 @@ public string GetVariableVersion(string name) } /// - public string GetRelatedBundleVariable(string bundleId, string name) + public string GetRelatedBundleVariable(string bundleCode, string name) { StrUtil.StrHandle handle = new StrUtil.StrHandle(); try { - int ret = BalUtil.BalGetRelatedBundleVariableFromEngine(this.engine, bundleId, name, ref handle); + int ret = BalUtil.BalGetRelatedBundleVariableFromEngine(this.engine, bundleCode, name, ref handle); if (ret != NativeMethods.S_OK) { throw new Win32Exception(ret); diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/EventArgs.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/EventArgs.cs index e1649d43b..4df07e575 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/EventArgs.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/EventArgs.cs @@ -325,10 +325,10 @@ public class DetectForwardCompatibleBundleEventArgs : CancellableHResultEventArg /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// - public DetectForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool missingFromCache, bool cancelRecommendation) + public DetectForwardCompatibleBundleEventArgs(string bundleCode, RelationType relationType, string bundleTag, bool perMachine, string version, bool missingFromCache, bool cancelRecommendation) : base(cancelRecommendation) { - this.BundleId = bundleId; + this.BundleCode = bundleCode; this.RelationType = relationType; this.BundleTag = bundleTag; this.PerMachine = perMachine; @@ -339,7 +339,11 @@ public DetectForwardCompatibleBundleEventArgs(string bundleId, RelationType rela /// /// Gets the identity of the forward compatible bundle detected. /// - public string BundleId { get; private set; } + public string BundleCode { get; private set; } + + /// + [Obsolete("Use BundleCode instead.")] + public string BundleId => this.BundleCode; /// /// Gets the relationship type of the forward compatible bundle. @@ -807,10 +811,10 @@ public class PlanRelatedBundleEventArgs : CancellableHResultEventArgs /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// - public PlanRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation) + public PlanRelatedBundleEventArgs(string bundleCode, RequestState recommendedState, RequestState state, bool cancelRecommendation) : base(cancelRecommendation) { - this.BundleId = bundleId; + this.BundleCode = bundleCode; this.RecommendedState = recommendedState; this.State = state; } @@ -818,7 +822,11 @@ public PlanRelatedBundleEventArgs(string bundleId, RequestState recommendedState /// /// Gets the identity of the bundle to plan for. /// - public string BundleId { get; private set; } + public string BundleCode { get; private set; } + + /// + [Obsolete("Use BundleCode instead.")] + public string BundleId => this.BundleCode; /// /// Gets the recommended requested state for the bundle. @@ -841,10 +849,10 @@ public class PlanRelatedBundleTypeEventArgs : CancellableHResultEventArgs /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// - public PlanRelatedBundleTypeEventArgs(string bundleId, RelatedBundlePlanType recommendedType, RelatedBundlePlanType type, bool cancelRecommendation) + public PlanRelatedBundleTypeEventArgs(string bundleCode, RelatedBundlePlanType recommendedType, RelatedBundlePlanType type, bool cancelRecommendation) : base(cancelRecommendation) { - this.BundleId = bundleId; + this.BundleCode = bundleCode; this.RecommendedType = recommendedType; this.Type = type; } @@ -852,7 +860,11 @@ public PlanRelatedBundleTypeEventArgs(string bundleId, RelatedBundlePlanType rec /// /// Gets the identity of the bundle to plan for. /// - public string BundleId { get; private set; } + public string BundleCode { get; private set; } + + /// + [Obsolete("Use BundleCode instead.")] + public string BundleId => this.BundleCode; /// /// Gets the recommended plan type for the bundle. @@ -1327,10 +1339,10 @@ public class PlanForwardCompatibleBundleEventArgs : CancellableHResultEventArgs /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// - public PlanForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool recommendedIgnoreBundle, bool cancelRecommendation, bool ignoreBundle) + public PlanForwardCompatibleBundleEventArgs(string bundleCode, RelationType relationType, string bundleTag, bool perMachine, string version, bool recommendedIgnoreBundle, bool cancelRecommendation, bool ignoreBundle) : base(cancelRecommendation) { - this.BundleId = bundleId; + this.BundleCode = bundleCode; this.RelationType = relationType; this.BundleTag = bundleTag; this.PerMachine = perMachine; @@ -1342,7 +1354,11 @@ public PlanForwardCompatibleBundleEventArgs(string bundleId, RelationType relati /// /// Gets the identity of the forward compatible bundle detected. /// - public string BundleId { get; private set; } + public string BundleCode { get; private set; } + + /// + [Obsolete("Use BundleCode instead.")] + public string BundleId => this.BundleCode; /// /// Gets the relationship type of the forward compatible bundle. @@ -2624,10 +2640,10 @@ public class PlanRestoreRelatedBundleEventArgs : CancellableHResultEventArgs /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// - public PlanRestoreRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation) + public PlanRestoreRelatedBundleEventArgs(string bundleCode, RequestState recommendedState, RequestState state, bool cancelRecommendation) : base(cancelRecommendation) { - this.BundleId = bundleId; + this.BundleCode = bundleCode; this.RecommendedState = recommendedState; this.State = state; } @@ -2635,7 +2651,11 @@ public PlanRestoreRelatedBundleEventArgs(string bundleId, RequestState recommend /// /// Gets the identity of the bundle to plan for. /// - public string BundleId { get; private set; } + public string BundleCode { get; private set; } + + /// + [Obsolete("Use BundleCode instead.")] + public string BundleId => this.BundleCode; /// /// Gets the recommended requested state for the bundle. diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplication.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplication.cs index ad7f8dd77..c2b43c150 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplication.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplication.cs @@ -80,7 +80,7 @@ int OnDetectBegin( [PreserveSig] [return: MarshalAs(UnmanagedType.I4)] int OnDetectForwardCompatibleBundle( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleCode, [MarshalAs(UnmanagedType.U4)] RelationType relationType, [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, @@ -135,7 +135,7 @@ int OnDetectUpdateComplete( [PreserveSig] [return: MarshalAs(UnmanagedType.I4)] int OnDetectRelatedBundle( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleCode, [MarshalAs(UnmanagedType.U4)] RelationType relationType, [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, @@ -243,7 +243,7 @@ int OnPlanBegin( [PreserveSig] [return: MarshalAs(UnmanagedType.I4)] int OnPlanRelatedBundle( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleCode, [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, [MarshalAs(UnmanagedType.Bool)] ref bool fCancel @@ -869,7 +869,7 @@ int hrStatus [PreserveSig] [return: MarshalAs(UnmanagedType.I4)] int OnPlanForwardCompatibleBundle( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleCode, [MarshalAs(UnmanagedType.U4)] RelationType relationType, [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, @@ -957,7 +957,7 @@ int hrStatus [PreserveSig] [return: MarshalAs(UnmanagedType.I4)] int OnPlanRestoreRelatedBundle( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleCode, [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, [MarshalAs(UnmanagedType.Bool)] ref bool fCancel @@ -969,7 +969,7 @@ int OnPlanRestoreRelatedBundle( [PreserveSig] [return: MarshalAs(UnmanagedType.I4)] int OnPlanRelatedBundleType( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleCode, [MarshalAs(UnmanagedType.U4)] RelatedBundlePlanType recommendedType, [MarshalAs(UnmanagedType.U4)] ref RelatedBundlePlanType pRequestedType, [MarshalAs(UnmanagedType.Bool)] ref bool fCancel @@ -1004,7 +1004,7 @@ int OnExecuteProcessCancel( [return: MarshalAs(UnmanagedType.I4)] int OnDetectRelatedBundlePackage( [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleCode, [MarshalAs(UnmanagedType.U4)] RelationType relationType, [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs index 1e91cd316..c7b0c0030 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs @@ -236,7 +236,7 @@ void CompareVersions( /// [PreserveSig] int GetRelatedBundleVariable( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleCode, [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, IntPtr wzValue, ref IntPtr pcchValue diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs index 8e6a293be..bd78409bd 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs @@ -107,9 +107,9 @@ public interface IEngine /// /// Gets persisted variables from a related bundle. /// - /// The BundleId of the related bundle. + /// The bundle code of the related bundle. /// The name of the variable. - string GetRelatedBundleVariable(string bundleId, string name); + string GetRelatedBundleVariable(string bundleCode, string name); /// /// Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt. diff --git a/src/api/burn/balutil/BalBootstrapperEngine.cpp b/src/api/burn/balutil/BalBootstrapperEngine.cpp index 28608cb9b..61e7e31b6 100644 --- a/src/api/burn/balutil/BalBootstrapperEngine.cpp +++ b/src/api/burn/balutil/BalBootstrapperEngine.cpp @@ -319,7 +319,7 @@ class CBalBootstrapperEngine : public IBootstrapperEngine } virtual STDMETHODIMP GetRelatedBundleVariable( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzVariable, __out_ecount_opt(*pcchValue) LPWSTR wzValue, __inout SIZE_T* pcchValue @@ -338,7 +338,7 @@ class CBalBootstrapperEngine : public IBootstrapperEngine // Init send structs. args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; - args.wzBundleId = wzBundleId; + args.wzBundleCode = wzBundleCode; args.wzVariable = wzVariable; results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; @@ -349,8 +349,8 @@ class CBalBootstrapperEngine : public IBootstrapperEngine hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); ExitOnFailure(hr, "Failed to write API version of GetRelatedBundleVariable args."); - hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); - ExitOnFailure(hr, "Failed to write bundle id of GetRelatedBundleVariable args."); + hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode); + ExitOnFailure(hr, "Failed to write bundle code of GetRelatedBundleVariable args."); hr = BuffWriteStringToBuffer(&bufferArgs, args.wzVariable); ExitOnFailure(hr, "Failed to write variable name of GetRelatedBundleVariable args."); diff --git a/src/api/burn/balutil/balutil.cpp b/src/api/burn/balutil/balutil.cpp index 716f82d31..3cca38a46 100644 --- a/src/api/burn/balutil/balutil.cpp +++ b/src/api/burn/balutil/balutil.cpp @@ -551,7 +551,7 @@ DAPI_(HRESULT) BalGetVersionVariableFromEngine( } DAPI_(HRESULT) BalGetRelatedBundleVariable( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzVariable, __inout LPWSTR* psczValue ) @@ -564,7 +564,7 @@ DAPI_(HRESULT) BalGetRelatedBundleVariable( ExitOnRootFailure(hr, "BalInitialize() must be called first."); } - hr = BalGetRelatedBundleVariableFromEngine(vpEngine, wzBundleId, wzVariable, psczValue); + hr = BalGetRelatedBundleVariableFromEngine(vpEngine, wzBundleCode, wzVariable, psczValue); LExit: return hr; @@ -572,7 +572,7 @@ DAPI_(HRESULT) BalGetRelatedBundleVariable( DAPI_(HRESULT) BalGetRelatedBundleVariableFromEngine( __in IBootstrapperEngine* pEngine, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzVariable, __inout LPWSTR* psczValue ) @@ -586,7 +586,7 @@ DAPI_(HRESULT) BalGetRelatedBundleVariableFromEngine( ExitOnFailure(hr, "Failed to determine length of value."); } - hr = pEngine->GetRelatedBundleVariable(wzBundleId, wzVariable, *psczValue, &cch); + hr = pEngine->GetRelatedBundleVariable(wzBundleCode, wzVariable, *psczValue, &cch); if (E_MOREDATA == hr) { ++cch; @@ -594,7 +594,7 @@ DAPI_(HRESULT) BalGetRelatedBundleVariableFromEngine( hr = StrAllocSecure(psczValue, cch); ExitOnFailure(hr, "Failed to allocate value."); - hr = pEngine->GetRelatedBundleVariable(wzBundleId, wzVariable, *psczValue, &cch); + hr = pEngine->GetRelatedBundleVariable(wzBundleCode, wzVariable, *psczValue, &cch); } LExit: diff --git a/src/api/burn/balutil/inc/BootstrapperApplicationBase.h b/src/api/burn/balutil/inc/BootstrapperApplicationBase.h index a3a3643fa..80bfd3613 100644 --- a/src/api/burn/balutil/inc/BootstrapperApplicationBase.h +++ b/src/api/burn/balutil/inc/BootstrapperApplicationBase.h @@ -129,7 +129,7 @@ class CBootstrapperApplicationBase : public IBootstrapperApplication } virtual STDMETHODIMP OnDetectForwardCompatibleBundle( - __in_z LPCWSTR /*wzBundleId*/, + __in_z LPCWSTR /*wzBundleCode*/, __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, __in_z LPCWSTR /*wzBundleTag*/, __in BOOL /*fPerMachine*/, @@ -179,7 +179,7 @@ class CBootstrapperApplicationBase : public IBootstrapperApplication } virtual STDMETHODIMP OnDetectRelatedBundle( - __in_z LPCWSTR /*wzBundleId*/, + __in_z LPCWSTR /*wzBundleCode*/, __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, __in_z LPCWSTR /*wzBundleTag*/, __in BOOL /*fPerMachine*/, @@ -276,7 +276,7 @@ class CBootstrapperApplicationBase : public IBootstrapperApplication } virtual STDMETHODIMP OnPlanRelatedBundle( - __in_z LPCWSTR /*wzBundleId*/, + __in_z LPCWSTR /*wzBundleCode*/, __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestedState*/, __inout BOOL* pfCancel @@ -995,7 +995,7 @@ class CBootstrapperApplicationBase : public IBootstrapperApplication } virtual STDMETHODIMP OnPlanForwardCompatibleBundle( - __in_z LPCWSTR /*wzBundleId*/, + __in_z LPCWSTR /*wzBundleCode*/, __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, __in_z LPCWSTR /*wzBundleTag*/, __in BOOL /*fPerMachine*/, @@ -1074,7 +1074,7 @@ class CBootstrapperApplicationBase : public IBootstrapperApplication } virtual STDMETHODIMP OnPlanRestoreRelatedBundle( - __in_z LPCWSTR /*wzBundleId*/, + __in_z LPCWSTR /*wzBundleCode*/, __in BOOTSTRAPPER_REQUEST_STATE /*recommendedState*/, __inout BOOTSTRAPPER_REQUEST_STATE* /*pRequestedState*/, __inout BOOL* pfCancel @@ -1085,7 +1085,7 @@ class CBootstrapperApplicationBase : public IBootstrapperApplication } virtual STDMETHODIMP OnPlanRelatedBundleType( - __in_z LPCWSTR /*wzBundleId*/, + __in_z LPCWSTR /*wzBundleCode*/, __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE /*recommendedType*/, __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* /*pRequestedType*/, __inout BOOL* pfCancel @@ -1115,7 +1115,7 @@ class CBootstrapperApplicationBase : public IBootstrapperApplication virtual STDMETHODIMP OnDetectRelatedBundlePackage( __in_z LPCWSTR /*wzPackageId*/, - __in_z LPCWSTR /*wzBundleId*/, + __in_z LPCWSTR /*wzBundleCode*/, __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, __in BOOL /*fPerMachine*/, __in_z LPCWSTR /*wzVersion*/, diff --git a/src/api/burn/balutil/inc/IBootstrapperApplication.h b/src/api/burn/balutil/inc/IBootstrapperApplication.h index a08f68639..a3b24bc3a 100644 --- a/src/api/burn/balutil/inc/IBootstrapperApplication.h +++ b/src/api/burn/balutil/inc/IBootstrapperApplication.h @@ -56,7 +56,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A // OnDetectForwardCompatibleBundle - called when the engine detects a forward compatible bundle. STDMETHOD(OnDetectForwardCompatibleBundle)( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in_z LPCWSTR wzBundleTag, __in BOOL fPerMachine, @@ -95,7 +95,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A // OnDetectRelatedBundle - called when the engine detects a related bundle. STDMETHOD(OnDetectRelatedBundle)( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in_z LPCWSTR wzBundleTag, __in BOOL fPerMachine, @@ -170,7 +170,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A // OnPlanRelatedBundle - called when the engine begins planning a related bundle. STDMETHOD(OnPlanRelatedBundle)( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_REQUEST_STATE recommendedState, __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, __inout BOOL* pfCancel @@ -649,7 +649,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A ) = 0; STDMETHOD(OnPlanForwardCompatibleBundle)( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in_z LPCWSTR wzBundleTag, __in BOOL fPerMachine, @@ -703,7 +703,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A // OnPlanRestoreRelatedBundle - called when the engine begins planning an upgrade related bundle for restoring in case of failure. STDMETHOD(OnPlanRestoreRelatedBundle)( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_REQUEST_STATE recommendedState, __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, __inout BOOL* pfCancel @@ -711,7 +711,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A // OnPlanRelatedBundleType - called when the engine begins planning the related bundle relation type. STDMETHOD(OnPlanRelatedBundleType)( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE recommendedType, __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType, __inout BOOL* pfCancel @@ -736,7 +736,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A // OnDetectRelatedBundlePackage - called when the engine detects a related bundle for a BundlePackage. STDMETHOD(OnDetectRelatedBundlePackage)( __in_z LPCWSTR wzPackageId, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in BOOL fPerMachine, __in_z LPCWSTR wzVersion, diff --git a/src/api/burn/balutil/inc/IBootstrapperEngine.h b/src/api/burn/balutil/inc/IBootstrapperEngine.h index 02094aa50..57fc9be9b 100644 --- a/src/api/burn/balutil/inc/IBootstrapperEngine.h +++ b/src/api/burn/balutil/inc/IBootstrapperEngine.h @@ -142,7 +142,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-8 ) = 0; STDMETHOD(GetRelatedBundleVariable)( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzVariable, __out_ecount_opt(*pcchValue) LPWSTR wzValue, __inout SIZE_T* pcchValue diff --git a/src/api/burn/balutil/inc/balutil.h b/src/api/burn/balutil/inc/balutil.h index 03575883a..4c8550ee2 100644 --- a/src/api/burn/balutil/inc/balutil.h +++ b/src/api/burn/balutil/inc/balutil.h @@ -141,7 +141,7 @@ BalGetRelatedBundleVariable - gets a string from a shared variable in the engine Note: Use StrFree() to release psczValue. ********************************************************************/ DAPI_(HRESULT) BalGetRelatedBundleVariable( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzVariable, __inout LPWSTR* psczValue ); @@ -153,7 +153,7 @@ BalGetRelatedBundleVariableFromEngine - gets a string from a shared variable in ********************************************************************/ DAPI_(HRESULT) BalGetRelatedBundleVariableFromEngine( __in IBootstrapperEngine* pEngine, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzVariable, __inout LPWSTR* psczValue ); diff --git a/src/api/burn/balutil/msg.cpp b/src/api/burn/balutil/msg.cpp index 690108a57..b728cc830 100644 --- a/src/api/burn/balutil/msg.cpp +++ b/src/api/burn/balutil/msg.cpp @@ -1768,7 +1768,7 @@ static HRESULT OnDetectForwardCompatibleBundle( HRESULT hr = S_OK; BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS args = { }; BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS results = { }; - LPWSTR sczBundleId = NULL; + LPWSTR sczBundleCode = NULL; LPWSTR sczBundleTag = NULL; LPWSTR sczVersion = NULL; @@ -1776,10 +1776,10 @@ static HRESULT OnDetectForwardCompatibleBundle( hr = BuffReaderReadNumber(pReaderArgs, &args.dwApiVersion); ExitOnFailure(hr, "Failed to read API version of OnDetectForwardCompatibleBundle args."); - hr = BuffReaderReadString(pReaderArgs, &sczBundleId); - ExitOnFailure(hr, "Failed to read bundle id of OnDetectForwardCompatibleBundle args."); + hr = BuffReaderReadString(pReaderArgs, &sczBundleCode); + ExitOnFailure(hr, "Failed to read bundle code of OnDetectForwardCompatibleBundle args."); - args.wzBundleId = sczBundleId; + args.wzBundleCode = sczBundleCode; hr = BuffReaderReadNumber(pReaderArgs, reinterpret_cast(&args.relationType)); ExitOnFailure(hr, "Failed to read relation type of OnDetectForwardCompatibleBundle args."); @@ -1809,7 +1809,7 @@ static HRESULT OnDetectForwardCompatibleBundle( if (E_NOTIMPL == hr) { - hr = pApplication->OnDetectForwardCompatibleBundle(args.wzBundleId, args.relationType, args.wzBundleTag, args.fPerMachine, args.wzVersion, args.fMissingFromCache, &results.fCancel); + hr = pApplication->OnDetectForwardCompatibleBundle(args.wzBundleCode, args.relationType, args.wzBundleTag, args.fPerMachine, args.wzVersion, args.fMissingFromCache, &results.fCancel); } pApplication->BAProcFallback(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, &args, &results, &hr); @@ -1825,7 +1825,7 @@ static HRESULT OnDetectForwardCompatibleBundle( LExit: ReleaseStr(sczVersion); ReleaseStr(sczBundleTag); - ReleaseStr(sczBundleId); + ReleaseStr(sczBundleCode); return hr; } @@ -1999,7 +1999,7 @@ static HRESULT OnDetectRelatedBundle( HRESULT hr = S_OK; BA_ONDETECTRELATEDBUNDLE_ARGS args = { }; BA_ONDETECTRELATEDBUNDLE_RESULTS results = { }; - LPWSTR sczBundleId = NULL; + LPWSTR sczBundleCode = NULL; LPWSTR sczBundleTag = NULL; LPWSTR sczVersion = NULL; @@ -2007,10 +2007,10 @@ static HRESULT OnDetectRelatedBundle( hr = BuffReaderReadNumber(pReaderArgs, &args.dwApiVersion); ExitOnFailure(hr, "Failed to read API version of OnDetectRelatedBundle args."); - hr = BuffReaderReadString(pReaderArgs, &sczBundleId); - ExitOnFailure(hr, "Failed to read bundle id of OnDetectRelatedBundle args."); + hr = BuffReaderReadString(pReaderArgs, &sczBundleCode); + ExitOnFailure(hr, "Failed to read bundle code of OnDetectRelatedBundle args."); - args.wzBundleId = sczBundleId; + args.wzBundleCode = sczBundleCode; hr = BuffReaderReadNumber(pReaderArgs, reinterpret_cast(&args.relationType)); ExitOnFailure(hr, "Failed to read relation type of OnDetectRelatedBundle args."); @@ -2040,7 +2040,7 @@ static HRESULT OnDetectRelatedBundle( if (E_NOTIMPL == hr) { - hr = pApplication->OnDetectRelatedBundle(args.wzBundleId, args.relationType, args.wzBundleTag, args.fPerMachine, args.wzVersion, args.fMissingFromCache, &results.fCancel); + hr = pApplication->OnDetectRelatedBundle(args.wzBundleCode, args.relationType, args.wzBundleTag, args.fPerMachine, args.wzVersion, args.fMissingFromCache, &results.fCancel); } pApplication->BAProcFallback(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE, &args, &results, &hr); @@ -2056,7 +2056,7 @@ static HRESULT OnDetectRelatedBundle( LExit: ReleaseStr(sczVersion); ReleaseStr(sczBundleTag); - ReleaseStr(sczBundleId); + ReleaseStr(sczBundleCode); return hr; } @@ -2071,7 +2071,7 @@ static HRESULT OnDetectRelatedBundlePackage( BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS args = { }; BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS results = { }; LPWSTR sczPackageId = NULL; - LPWSTR sczBundleId = NULL; + LPWSTR sczBundleCode = NULL; LPWSTR sczVersion = NULL; // Read args. @@ -2083,10 +2083,10 @@ static HRESULT OnDetectRelatedBundlePackage( args.wzPackageId = sczPackageId; - hr = BuffReaderReadString(pReaderArgs, &sczBundleId); - ExitOnFailure(hr, "Failed to read bundle id of OnDetectRelatedBundlePackage args."); + hr = BuffReaderReadString(pReaderArgs, &sczBundleCode); + ExitOnFailure(hr, "Failed to read bundle code of OnDetectRelatedBundlePackage args."); - args.wzBundleId = sczBundleId; + args.wzBundleCode = sczBundleCode; hr = BuffReaderReadNumber(pReaderArgs, reinterpret_cast(&args.relationType)); ExitOnFailure(hr, "Failed to read relation type of OnDetectRelatedBundlePackage args."); @@ -2108,7 +2108,7 @@ static HRESULT OnDetectRelatedBundlePackage( if (E_NOTIMPL == hr) { - hr = pApplication->OnDetectRelatedBundlePackage(args.wzPackageId, args.wzBundleId, args.relationType, args.fPerMachine, args.wzVersion, &results.fCancel); + hr = pApplication->OnDetectRelatedBundlePackage(args.wzPackageId, args.wzBundleCode, args.relationType, args.fPerMachine, args.wzVersion, &results.fCancel); } pApplication->BAProcFallback(BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE, &args, &results, &hr); @@ -2123,7 +2123,7 @@ static HRESULT OnDetectRelatedBundlePackage( LExit: ReleaseStr(sczVersion); - ReleaseStr(sczBundleId); + ReleaseStr(sczBundleCode); ReleaseStr(sczPackageId); return hr; } @@ -3650,7 +3650,7 @@ static HRESULT OnPlanForwardCompatibleBundle( HRESULT hr = S_OK; BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS args = { }; BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS results = { }; - LPWSTR sczBundleId = NULL; + LPWSTR sczBundleCode = NULL; LPWSTR sczBundleTag = NULL; LPWSTR sczVersion = NULL; @@ -3658,10 +3658,10 @@ static HRESULT OnPlanForwardCompatibleBundle( hr = BuffReaderReadNumber(pReaderArgs, &args.dwApiVersion); ExitOnFailure(hr, "Failed to read API version of OnPlanForwardCompatibleBundle args."); - hr = BuffReaderReadString(pReaderArgs, &sczBundleId); - ExitOnFailure(hr, "Failed to read bundle id of OnPlanForwardCompatibleBundle args."); + hr = BuffReaderReadString(pReaderArgs, &sczBundleCode); + ExitOnFailure(hr, "Failed to read bundle code of OnPlanForwardCompatibleBundle args."); - args.wzBundleId = sczBundleId; + args.wzBundleCode = sczBundleCode; hr = BuffReaderReadNumber(pReaderArgs, reinterpret_cast(&args.relationType)); ExitOnFailure(hr, "Failed to read relation type of OnPlanForwardCompatibleBundle args."); @@ -3694,7 +3694,7 @@ static HRESULT OnPlanForwardCompatibleBundle( if (E_NOTIMPL == hr) { - hr = pApplication->OnPlanForwardCompatibleBundle(args.wzBundleId, args.relationType, args.wzBundleTag, args.fPerMachine, args.wzVersion, args.fRecommendedIgnoreBundle, &results.fCancel, &results.fIgnoreBundle); + hr = pApplication->OnPlanForwardCompatibleBundle(args.wzBundleCode, args.relationType, args.wzBundleTag, args.fPerMachine, args.wzVersion, args.fRecommendedIgnoreBundle, &results.fCancel, &results.fIgnoreBundle); } pApplication->BAProcFallback(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE, &args, &results, &hr); @@ -3713,7 +3713,7 @@ static HRESULT OnPlanForwardCompatibleBundle( LExit: ReleaseStr(sczVersion); ReleaseStr(sczBundleTag); - ReleaseStr(sczBundleId); + ReleaseStr(sczBundleCode); return hr; } @@ -4049,16 +4049,16 @@ static HRESULT OnPlanRelatedBundle( HRESULT hr = S_OK; BA_ONPLANRELATEDBUNDLE_ARGS args = { }; BA_ONPLANRELATEDBUNDLE_RESULTS results = { }; - LPWSTR sczBundleId = NULL; + LPWSTR sczBundleCode = NULL; // Read args. hr = BuffReaderReadNumber(pReaderArgs, &args.dwApiVersion); ExitOnFailure(hr, "Failed to read API version of OnPlanRelatedBundle args."); - hr = BuffReaderReadString(pReaderArgs, &sczBundleId); + hr = BuffReaderReadString(pReaderArgs, &sczBundleCode); ExitOnFailure(hr, "Failed to read package id of OnPlanRelatedBundle args."); - args.wzBundleId = sczBundleId; + args.wzBundleCode = sczBundleCode; hr = BuffReaderReadNumber(pReaderArgs, reinterpret_cast(&args.recommendedState)); ExitOnFailure(hr, "Failed to read recommended state of OnPlanRelatedBundle args."); @@ -4075,7 +4075,7 @@ static HRESULT OnPlanRelatedBundle( if (E_NOTIMPL == hr) { - hr = pApplication->OnPlanRelatedBundle(args.wzBundleId, args.recommendedState, &results.requestedState, &results.fCancel); + hr = pApplication->OnPlanRelatedBundle(args.wzBundleCode, args.recommendedState, &results.requestedState, &results.fCancel); } pApplication->BAProcFallback(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE, &args, &results, &hr); @@ -4092,7 +4092,7 @@ static HRESULT OnPlanRelatedBundle( ExitOnFailure(hr, "Failed to write requested state of OnPlanRelatedBundle struct."); LExit: - ReleaseStr(sczBundleId); + ReleaseStr(sczBundleCode); return hr; } @@ -4106,16 +4106,16 @@ static HRESULT OnPlanRelatedBundleType( HRESULT hr = S_OK; BA_ONPLANRELATEDBUNDLETYPE_ARGS args = { }; BA_ONPLANRELATEDBUNDLETYPE_RESULTS results = { }; - LPWSTR sczBundleId = NULL; + LPWSTR sczBundleCode = NULL; // Read args. hr = BuffReaderReadNumber(pReaderArgs, &args.dwApiVersion); ExitOnFailure(hr, "Failed to read API version of OnPlanRelatedBundleType args."); - hr = BuffReaderReadString(pReaderArgs, &sczBundleId); + hr = BuffReaderReadString(pReaderArgs, &sczBundleCode); ExitOnFailure(hr, "Failed to read package id of OnPlanRelatedBundleType args."); - args.wzBundleId = sczBundleId; + args.wzBundleCode = sczBundleCode; hr = BuffReaderReadNumber(pReaderArgs, reinterpret_cast(&args.recommendedType)); ExitOnFailure(hr, "Failed to read recommended type of OnPlanRelatedBundleType args."); @@ -4132,7 +4132,7 @@ static HRESULT OnPlanRelatedBundleType( if (E_NOTIMPL == hr) { - hr = pApplication->OnPlanRelatedBundleType(args.wzBundleId, args.recommendedType, &results.requestedType, &results.fCancel); + hr = pApplication->OnPlanRelatedBundleType(args.wzBundleCode, args.recommendedType, &results.requestedType, &results.fCancel); } pApplication->BAProcFallback(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, &args, &results, &hr); @@ -4149,7 +4149,7 @@ static HRESULT OnPlanRelatedBundleType( ExitOnFailure(hr, "Failed to write requested type of OnPlanRelatedBundleType struct."); LExit: - ReleaseStr(sczBundleId); + ReleaseStr(sczBundleCode); return hr; } @@ -4163,16 +4163,16 @@ static HRESULT OnPlanRestoreRelatedBundle( HRESULT hr = S_OK; BA_ONPLANRESTORERELATEDBUNDLE_ARGS args = { }; BA_ONPLANRESTORERELATEDBUNDLE_RESULTS results = { }; - LPWSTR sczBundleId = NULL; + LPWSTR sczBundleCode = NULL; // Read args. hr = BuffReaderReadNumber(pReaderArgs, &args.dwApiVersion); ExitOnFailure(hr, "Failed to read API version of OnPlanRestoreRelatedBundle args."); - hr = BuffReaderReadString(pReaderArgs, &sczBundleId); + hr = BuffReaderReadString(pReaderArgs, &sczBundleCode); ExitOnFailure(hr, "Failed to read package id of OnPlanRestoreRelatedBundle args."); - args.wzBundleId = sczBundleId; + args.wzBundleCode = sczBundleCode; hr = BuffReaderReadNumber(pReaderArgs, reinterpret_cast(&args.recommendedState)); ExitOnFailure(hr, "Failed to read recommended state of OnPlanRestoreRelatedBundle args."); @@ -4189,7 +4189,7 @@ static HRESULT OnPlanRestoreRelatedBundle( if (E_NOTIMPL == hr) { - hr = pApplication->OnPlanRestoreRelatedBundle(args.wzBundleId, args.recommendedState, &results.requestedState, &results.fCancel); + hr = pApplication->OnPlanRestoreRelatedBundle(args.wzBundleCode, args.recommendedState, &results.requestedState, &results.fCancel); } pApplication->BAProcFallback(BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE, &args, &results, &hr); @@ -4206,7 +4206,7 @@ static HRESULT OnPlanRestoreRelatedBundle( ExitOnFailure(hr, "Failed to write requested state of OnPlanRestoreRelatedBundle struct."); LExit: - ReleaseStr(sczBundleId); + ReleaseStr(sczBundleCode); return hr; } diff --git a/src/api/burn/bextutil/BextBootstrapperExtensionEngine.cpp b/src/api/burn/bextutil/BextBootstrapperExtensionEngine.cpp index a5e40c8e8..f9e1802a5 100644 --- a/src/api/burn/bextutil/BextBootstrapperExtensionEngine.cpp +++ b/src/api/burn/bextutil/BextBootstrapperExtensionEngine.cpp @@ -307,7 +307,7 @@ class CBextBootstrapperExtensionEngine : public IBootstrapperExtensionEngine } virtual STDMETHODIMP GetRelatedBundleVariable( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzVariable, __out_ecount_opt(*pcchValue) LPWSTR wzValue, __inout SIZE_T* pcchValue @@ -320,7 +320,7 @@ class CBextBootstrapperExtensionEngine : public IBootstrapperExtensionEngine ExitOnNull(pcchValue, hr, E_INVALIDARG, "pcchValue is required"); args.cbSize = sizeof(args); - args.wzBundleId = wzBundleId; + args.wzBundleCode = wzBundleCode; args.wzVariable = wzVariable; results.cbSize = sizeof(results); diff --git a/src/api/burn/bextutil/inc/IBootstrapperExtensionEngine.h b/src/api/burn/bextutil/inc/IBootstrapperExtensionEngine.h index a78868f29..31fe9ef8b 100644 --- a/src/api/burn/bextutil/inc/IBootstrapperExtensionEngine.h +++ b/src/api/burn/bextutil/inc/IBootstrapperExtensionEngine.h @@ -67,7 +67,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperExtensionEngine, IUnknown, "9D027A39-F6B6-42 ) = 0; STDMETHOD(GetRelatedBundleVariable)( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzVariable, __out_ecount_opt(*pcchValue) LPWSTR wzValue, __inout SIZE_T * pcchValue diff --git a/src/api/burn/inc/BootstrapperApplicationTypes.h b/src/api/burn/inc/BootstrapperApplicationTypes.h index c7eaa3d3a..2ece1b7b9 100644 --- a/src/api/burn/inc/BootstrapperApplicationTypes.h +++ b/src/api/burn/inc/BootstrapperApplicationTypes.h @@ -790,7 +790,7 @@ struct BA_ONDETECTCOMPLETE_RESULTS struct BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS { DWORD dwApiVersion; - LPCWSTR wzBundleId; + LPCWSTR wzBundleCode; BOOTSTRAPPER_RELATION_TYPE relationType; LPCWSTR wzBundleTag; BOOL fPerMachine; @@ -847,7 +847,7 @@ struct BA_ONDETECTPACKAGECOMPLETE_RESULTS struct BA_ONDETECTRELATEDBUNDLE_ARGS { DWORD dwApiVersion; - LPCWSTR wzBundleId; + LPCWSTR wzBundleCode; BOOTSTRAPPER_RELATION_TYPE relationType; LPCWSTR wzBundleTag; BOOL fPerMachine; @@ -865,7 +865,7 @@ struct BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS { DWORD dwApiVersion; LPCWSTR wzPackageId; - LPCWSTR wzBundleId; + LPCWSTR wzBundleCode; BOOTSTRAPPER_RELATION_TYPE relationType; BOOL fPerMachine; LPCWSTR wzVersion; @@ -1226,7 +1226,7 @@ struct BA_ONPLANCOMPLETE_RESULTS struct BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS { DWORD dwApiVersion; - LPCWSTR wzBundleId; + LPCWSTR wzBundleCode; BOOTSTRAPPER_RELATION_TYPE relationType; LPCWSTR wzBundleTag; BOOL fPerMachine; @@ -1339,7 +1339,7 @@ struct BA_ONPLANPACKAGECOMPLETE_RESULTS struct BA_ONPLANRELATEDBUNDLE_ARGS { DWORD dwApiVersion; - LPCWSTR wzBundleId; + LPCWSTR wzBundleCode; BOOTSTRAPPER_REQUEST_STATE recommendedState; }; @@ -1353,7 +1353,7 @@ struct BA_ONPLANRELATEDBUNDLE_RESULTS struct BA_ONPLANRELATEDBUNDLETYPE_ARGS { DWORD dwApiVersion; - LPCWSTR wzBundleId; + LPCWSTR wzBundleCode; BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE recommendedType; }; @@ -1367,7 +1367,7 @@ struct BA_ONPLANRELATEDBUNDLETYPE_RESULTS struct BA_ONPLANRESTORERELATEDBUNDLE_ARGS { DWORD dwApiVersion; - LPCWSTR wzBundleId; + LPCWSTR wzBundleCode; BOOTSTRAPPER_REQUEST_STATE recommendedState; }; diff --git a/src/api/burn/inc/BootstrapperEngineTypes.h b/src/api/burn/inc/BootstrapperEngineTypes.h index e26343834..f89238c07 100644 --- a/src/api/burn/inc/BootstrapperEngineTypes.h +++ b/src/api/burn/inc/BootstrapperEngineTypes.h @@ -436,7 +436,7 @@ typedef struct _BAENGINE_SETVARIABLEVERSION_RESULTS typedef struct _BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS { DWORD dwApiVersion; - LPCWSTR wzBundleId; + LPCWSTR wzBundleCode; LPCWSTR wzVariable; } BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS; diff --git a/src/api/burn/inc/BootstrapperExtensionEngineTypes.h b/src/api/burn/inc/BootstrapperExtensionEngineTypes.h index 24c304c67..66dabe883 100644 --- a/src/api/burn/inc/BootstrapperExtensionEngineTypes.h +++ b/src/api/burn/inc/BootstrapperExtensionEngineTypes.h @@ -176,7 +176,7 @@ typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS { DWORD cbSize; - LPCWSTR wzBundleId; + LPCWSTR wzBundleCode; LPCWSTR wzVariable; } BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS; diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs index 8d9305800..2313e0a81 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs @@ -11,7 +11,7 @@ public static partial class SymbolDefinitions new[] { new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.Attributes), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.BundleId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.BundleCode), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.EngineVersion), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.Version), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.InstallCommand), IntermediateFieldType.String), @@ -29,7 +29,9 @@ namespace WixToolset.Data.Symbols public enum WixBundleBundlePackageSymbolFields { Attributes, - BundleId, + BundleCode, + [Obsolete("Use BundleCode instead.")] + BundleId = BundleCode, EngineVersion, Version, InstallCommand, @@ -62,10 +64,17 @@ public WixBundleBundlePackageAttributes Attributes set => this.Set((int)WixBundleBundlePackageSymbolFields.Attributes, (int)value); } + public string BundleCode + { + get => (string)this.Fields[(int)WixBundleBundlePackageSymbolFields.BundleCode]; + set => this.Set((int)WixBundleBundlePackageSymbolFields.BundleCode, value); + } + + [Obsolete("Use BundleCode instead.")] public string BundleId { - get => (string)this.Fields[(int)WixBundleBundlePackageSymbolFields.BundleId]; - set => this.Set((int)WixBundleBundlePackageSymbolFields.BundleId, value); + get => (string)this.Fields[(int)WixBundleBundlePackageSymbolFields.BundleCode]; + set => this.Set((int)WixBundleBundlePackageSymbolFields.BundleCode, value); } public string EngineVersion diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs index 9f205ce6a..8c969e77a 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs @@ -11,7 +11,7 @@ public static partial class SymbolDefinitions new[] { new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.Attributes), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.BundleId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.BundleCode), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.EngineVersion), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.ManifestNamespace), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.ProtocolVersion), IntermediateFieldType.Number), @@ -30,7 +30,9 @@ namespace WixToolset.Data.Symbols public enum WixBundleHarvestedBundlePackageSymbolFields { Attributes, - BundleId, + BundleCode, + [Obsolete("Use BundleCode instead.")] + BundleId = BundleCode, EngineVersion, ManifestNamespace, ProtocolVersion, @@ -65,10 +67,17 @@ public WixBundleHarvestedBundlePackageAttributes Attributes set => this.Set((int)WixBundleHarvestedBundlePackageSymbolFields.Attributes, (int)value); } + public string BundleCode + { + get => this.Fields[(int)WixBundleHarvestedBundlePackageSymbolFields.BundleCode].AsString(); + set => this.Set((int)WixBundleHarvestedBundlePackageSymbolFields.BundleCode, value); + } + + [Obsolete("Use BundleCode instead.")] public string BundleId { - get => this.Fields[(int)WixBundleHarvestedBundlePackageSymbolFields.BundleId].AsString(); - set => this.Set((int)WixBundleHarvestedBundlePackageSymbolFields.BundleId, value); + get => this.Fields[(int)WixBundleHarvestedBundlePackageSymbolFields.BundleCode].AsString(); + set => this.Set((int)WixBundleHarvestedBundlePackageSymbolFields.BundleCode, value); } public string EngineVersion diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageRelatedBundleSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageRelatedBundleSymbol.cs index 31f4f713b..c4586601f 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageRelatedBundleSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageRelatedBundleSymbol.cs @@ -11,7 +11,7 @@ public static partial class SymbolDefinitions new[] { new IntermediateFieldDefinition(nameof(WixBundlePackageRelatedBundleSymbolFields.PackagePayloadRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixBundlePackageRelatedBundleSymbolFields.BundleId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageRelatedBundleSymbolFields.BundleCode), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundlePackageRelatedBundleSymbolFields.Action), IntermediateFieldType.Number), }, typeof(WixBundlePackageRelatedBundleSymbol)); @@ -20,10 +20,14 @@ public static partial class SymbolDefinitions namespace WixToolset.Data.Symbols { + using System; + public enum WixBundlePackageRelatedBundleSymbolFields { PackagePayloadRef, - BundleId, + BundleCode, + [Obsolete("Use BundleCode instead.")] + BundleId = BundleCode, Action, } @@ -45,10 +49,17 @@ public string PackagePayloadRef set => this.Set((int)WixBundlePackageRelatedBundleSymbolFields.PackagePayloadRef, value); } + public string BundleCode + { + get => (string)this.Fields[(int)WixBundlePackageRelatedBundleSymbolFields.BundleCode]; + set => this.Set((int)WixBundlePackageRelatedBundleSymbolFields.BundleCode, value); + } + + [Obsolete("Use BundleCode instead.")] public string BundleId { - get => (string)this.Fields[(int)WixBundlePackageRelatedBundleSymbolFields.BundleId]; - set => this.Set((int)WixBundlePackageRelatedBundleSymbolFields.BundleId, value); + get => (string)this.Fields[(int)WixBundlePackageRelatedBundleSymbolFields.BundleCode]; + set => this.Set((int)WixBundlePackageRelatedBundleSymbolFields.BundleCode, value); } public RelatedBundleActionType Action diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs index ffeb5f3be..f16cdbb8c 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs @@ -30,7 +30,7 @@ public static partial class SymbolDefinitions new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.Tag), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.Platform), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.ParentName), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.BundleId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.BundleCode), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.ProviderKey), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.InProgressName), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.DisableModify), IntermediateFieldType.String), @@ -65,7 +65,9 @@ public enum WixBundleSymbolFields Tag, Platform, ParentName, - BundleId, + BundleCode, + [Obsolete("Use BundleCode instead.")] + BundleId = BundleCode, ProviderKey, InProgressName, DisableModify, @@ -218,10 +220,17 @@ public string ParentName set => this.Set((int)WixBundleSymbolFields.ParentName, value); } + public string BundleCode + { + get => (string)this.Fields[(int)WixBundleSymbolFields.BundleCode]; + set => this.Set((int)WixBundleSymbolFields.BundleCode, value); + } + + [Obsolete("Use BundleCode instead.")] public string BundleId { - get => (string)this.Fields[(int)WixBundleSymbolFields.BundleId]; - set => this.Set((int)WixBundleSymbolFields.BundleId, value); + get => (string)this.Fields[(int)WixBundleSymbolFields.BundleCode]; + set => this.Set((int)WixBundleSymbolFields.BundleCode, value); } public string ProviderKey diff --git a/src/api/wix/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs index dc544e295..02db0da44 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs @@ -10,7 +10,7 @@ public static partial class SymbolDefinitions SymbolDefinitionType.WixRelatedBundle, new[] { - new IntermediateFieldDefinition(nameof(WixRelatedBundleSymbolFields.BundleId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixRelatedBundleSymbolFields.BundleCode), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixRelatedBundleSymbolFields.Action), IntermediateFieldType.Number), }, typeof(WixRelatedBundleSymbol)); @@ -19,9 +19,13 @@ public static partial class SymbolDefinitions namespace WixToolset.Data.Symbols { + using System; + public enum WixRelatedBundleSymbolFields { - BundleId, + BundleCode, + [Obsolete("Use BundleCode instead.")] + BundleId = BundleCode, Action, } @@ -45,10 +49,17 @@ public WixRelatedBundleSymbol(SourceLineNumber sourceLineNumber, Identifier id = public IntermediateField this[WixRelatedBundleSymbolFields index] => this.Fields[(int)index]; + public string BundleCode + { + get => (string)this.Fields[(int)WixRelatedBundleSymbolFields.BundleCode]; + set => this.Set((int)WixRelatedBundleSymbolFields.BundleCode, value); + } + + [Obsolete("Use BundleCode instead.")] public string BundleId { - get => (string)this.Fields[(int)WixRelatedBundleSymbolFields.BundleId]; - set => this.Set((int)WixRelatedBundleSymbolFields.BundleId, value); + get => (string)this.Fields[(int)WixRelatedBundleSymbolFields.BundleCode]; + set => this.Set((int)WixRelatedBundleSymbolFields.BundleCode, value); } public RelatedBundleActionType Action @@ -57,4 +68,4 @@ public RelatedBundleActionType Action set => this.Set((int)WixRelatedBundleSymbolFields.Action, (int)value); } } -} \ No newline at end of file +} diff --git a/src/burn/engine/EngineForExtension.cpp b/src/burn/engine/EngineForExtension.cpp index e19cb802d..3f7db0d42 100644 --- a/src/burn/engine/EngineForExtension.cpp +++ b/src/burn/engine/EngineForExtension.cpp @@ -213,7 +213,7 @@ static HRESULT BEEngineGetRelatedBundleVariable( ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS, pArgs); ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS, pResults); - hr = ExternalEngineGetRelatedBundleVariable(pContext->pEngineState, pArgs->wzBundleId, pArgs->wzVariable, pResults->wzValue, &pResults->cchValue); + hr = ExternalEngineGetRelatedBundleVariable(pContext->pEngineState, pArgs->wzBundleCode, pArgs->wzVariable, pResults->wzValue, &pResults->cchValue); LExit: return hr; diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index 0f65b0ad1..e4e76a6c8 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp @@ -452,7 +452,7 @@ extern "C" HRESULT ApplyRegister( if (pEngineState->registration.fPerMachine) { - hr = ElevationSessionBegin(pEngineState->companionConnection.hPipe, sczEngineWorkingPath, pEngineState->registration.sczResumeCommandLine, pEngineState->registration.fDisableResume, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->registration.fDetectedForeignProviderKeyBundleId, qwEstimatedSize, registrationType); + hr = ElevationSessionBegin(pEngineState->companionConnection.hPipe, sczEngineWorkingPath, pEngineState->registration.sczResumeCommandLine, pEngineState->registration.fDisableResume, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->registration.fDetectedForeignProviderKeyBundleCode, qwEstimatedSize, registrationType); ExitOnFailure(hr, "Failed to begin registration session in per-machine process."); } else @@ -548,7 +548,7 @@ extern "C" HRESULT ApplyUnregister( if (pEngineState->registration.fPerMachine) { - hr = ElevationSessionEnd(pEngineState->companionConnection.hPipe, resumeMode, restart, pEngineState->registration.fDetectedForeignProviderKeyBundleId, qwEstimatedSize, registrationType); + hr = ElevationSessionEnd(pEngineState->companionConnection.hPipe, resumeMode, restart, pEngineState->registration.fDetectedForeignProviderKeyBundleCode, qwEstimatedSize, registrationType); ExitOnFailure(hr, "Failed to end session in per-machine process."); } else diff --git a/src/burn/engine/bacallback.cpp b/src/burn/engine/bacallback.cpp index f4e6894d0..72ca27ea4 100644 --- a/src/burn/engine/bacallback.cpp +++ b/src/burn/engine/bacallback.cpp @@ -2120,7 +2120,7 @@ EXTERN_C HRESULT BACallbackOnDetectComplete( EXTERN_C HRESULT BACallbackOnDetectForwardCompatibleBundle( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in_z LPCWSTR wzBundleTag, __in BOOL fPerMachine, @@ -2138,7 +2138,7 @@ EXTERN_C HRESULT BACallbackOnDetectForwardCompatibleBundle( // Init structs. args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; - args.wzBundleId = wzBundleId; + args.wzBundleCode = wzBundleCode; args.relationType = relationType; args.wzBundleTag = wzBundleTag; args.fPerMachine = fPerMachine; @@ -2151,8 +2151,8 @@ EXTERN_C HRESULT BACallbackOnDetectForwardCompatibleBundle( hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); ExitOnFailure(hr, "Failed to write API version of OnDetectForwardCompatibleBundle args."); - hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); - ExitOnFailure(hr, "Failed to write bundle id of OnDetectForwardCompatibleBundle args."); + hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode); + ExitOnFailure(hr, "Failed to write bundle code of OnDetectForwardCompatibleBundle args."); hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType); ExitOnFailure(hr, "Failed to write relation type of OnDetectForwardCompatibleBundle args."); @@ -2393,7 +2393,7 @@ EXTERN_C HRESULT BACallbackOnDetectPackageComplete( EXTERN_C HRESULT BACallbackOnDetectRelatedBundle( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in_z LPCWSTR wzBundleTag, __in BOOL fPerMachine, @@ -2411,7 +2411,7 @@ EXTERN_C HRESULT BACallbackOnDetectRelatedBundle( // Init structs. args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; - args.wzBundleId = wzBundleId; + args.wzBundleCode = wzBundleCode; args.relationType = relationType; args.wzBundleTag = wzBundleTag; args.fPerMachine = fPerMachine; @@ -2424,8 +2424,8 @@ EXTERN_C HRESULT BACallbackOnDetectRelatedBundle( hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); ExitOnFailure(hr, "Failed to write API version of OnDetectRelatedBundle args."); - hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); - ExitOnFailure(hr, "Failed to write bundle id of OnDetectRelatedBundle args."); + hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode); + ExitOnFailure(hr, "Failed to write bundle code of OnDetectRelatedBundle args."); hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType); ExitOnFailure(hr, "Failed to write relation type of OnDetectRelatedBundle args."); @@ -2478,7 +2478,7 @@ EXTERN_C HRESULT BACallbackOnDetectRelatedBundle( EXTERN_C HRESULT BACallbackOnDetectRelatedBundlePackage( __in BURN_USER_EXPERIENCE* pUserExperience, __in_z LPCWSTR wzPackageId, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in BOOL fPerMachine, __in VERUTIL_VERSION* pVersion @@ -2495,7 +2495,7 @@ EXTERN_C HRESULT BACallbackOnDetectRelatedBundlePackage( // Init structs. args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; args.wzPackageId = wzPackageId; - args.wzBundleId = wzBundleId; + args.wzBundleCode = wzBundleCode; args.relationType = relationType; args.fPerMachine = fPerMachine; args.wzVersion = pVersion->sczVersion; @@ -2509,8 +2509,8 @@ EXTERN_C HRESULT BACallbackOnDetectRelatedBundlePackage( hr = BuffWriteStringToBuffer(&bufferArgs, args.wzPackageId); ExitOnFailure(hr, "Failed to write package id of OnDetectRelatedBundlePackage args."); - hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); - ExitOnFailure(hr, "Failed to write bundle id of OnDetectRelatedBundlePackage args."); + hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode); + ExitOnFailure(hr, "Failed to write bundle code of OnDetectRelatedBundlePackage args."); hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType); ExitOnFailure(hr, "Failed to write relation type of OnDetectRelatedBundlePackage args."); @@ -4315,7 +4315,7 @@ EXTERN_C HRESULT BACallbackOnPlanComplete( EXTERN_C HRESULT BACallbackOnPlanForwardCompatibleBundle( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in_z LPCWSTR wzBundleTag, __in BOOL fPerMachine, @@ -4333,7 +4333,7 @@ EXTERN_C HRESULT BACallbackOnPlanForwardCompatibleBundle( // Init structs. args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; - args.wzBundleId = wzBundleId; + args.wzBundleCode = wzBundleCode; args.relationType = relationType; args.wzBundleTag = wzBundleTag; args.fPerMachine = fPerMachine; @@ -4347,8 +4347,8 @@ EXTERN_C HRESULT BACallbackOnPlanForwardCompatibleBundle( hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); ExitOnFailure(hr, "Failed to write API version of OnPlanForwardCompatibleBundle args."); - hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); - ExitOnFailure(hr, "Failed to write bundle id of OnPlanForwardCompatibleBundle args."); + hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode); + ExitOnFailure(hr, "Failed to write bundle code of OnPlanForwardCompatibleBundle args."); hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType); ExitOnFailure(hr, "Failed to write relation type of OnPlanForwardCompatibleBundle args."); @@ -4806,7 +4806,7 @@ EXTERN_C HRESULT BACallbackOnPlanPackageComplete( EXTERN_C HRESULT BACallbackOnPlanRelatedBundle( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState ) { @@ -4820,7 +4820,7 @@ EXTERN_C HRESULT BACallbackOnPlanRelatedBundle( // Init structs. args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; - args.wzBundleId = wzBundleId; + args.wzBundleCode = wzBundleCode; args.recommendedState = *pRequestedState; results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; @@ -4830,8 +4830,8 @@ EXTERN_C HRESULT BACallbackOnPlanRelatedBundle( hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); ExitOnFailure(hr, "Failed to write API version of OnPlanRelatedBundle args."); - hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); - ExitOnFailure(hr, "Failed to write bundle id of OnPlanRelatedBundle args."); + hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode); + ExitOnFailure(hr, "Failed to write bundle code of OnPlanRelatedBundle args."); hr = BuffWriteNumberToBuffer(&bufferArgs, args.recommendedState); ExitOnFailure(hr, "Failed to write recommended state of OnPlanRelatedBundle args."); @@ -4879,7 +4879,7 @@ EXTERN_C HRESULT BACallbackOnPlanRelatedBundle( EXTERN_C HRESULT BACallbackOnPlanRelatedBundleType( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType ) { @@ -4893,7 +4893,7 @@ EXTERN_C HRESULT BACallbackOnPlanRelatedBundleType( // Init structs. args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; - args.wzBundleId = wzBundleId; + args.wzBundleCode = wzBundleCode; args.recommendedType = *pRequestedType; results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; @@ -4903,8 +4903,8 @@ EXTERN_C HRESULT BACallbackOnPlanRelatedBundleType( hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); ExitOnFailure(hr, "Failed to write API version of OnPlanRelatedBundleType args."); - hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); - ExitOnFailure(hr, "Failed to write bundle id of OnPlanRelatedBundleType args."); + hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode); + ExitOnFailure(hr, "Failed to write bundle code of OnPlanRelatedBundleType args."); hr = BuffWriteNumberToBuffer(&bufferArgs, args.recommendedType); ExitOnFailure(hr, "Failed to write recommended type of OnPlanRelatedBundleType args."); @@ -4952,7 +4952,7 @@ EXTERN_C HRESULT BACallbackOnPlanRelatedBundleType( EXTERN_C HRESULT BACallbackOnPlanRestoreRelatedBundle( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState ) { @@ -4966,7 +4966,7 @@ EXTERN_C HRESULT BACallbackOnPlanRestoreRelatedBundle( // Init structs. args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; - args.wzBundleId = wzBundleId; + args.wzBundleCode = wzBundleCode; args.recommendedState = *pRequestedState; results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; @@ -4976,8 +4976,8 @@ EXTERN_C HRESULT BACallbackOnPlanRestoreRelatedBundle( hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); ExitOnFailure(hr, "Failed to write API version of OnPlanRestoreRelatedBundle args."); - hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); - ExitOnFailure(hr, "Failed to write bundle id of OnPlanRestoreRelatedBundle args."); + hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode); + ExitOnFailure(hr, "Failed to write bundle code of OnPlanRestoreRelatedBundle args."); hr = BuffWriteNumberToBuffer(&bufferArgs, args.recommendedState); ExitOnFailure(hr, "Failed to write recommended state of OnPlanRestoreRelatedBundle args."); diff --git a/src/burn/engine/bacallback.h b/src/burn/engine/bacallback.h index 8d1f41c41..cd363b6e2 100644 --- a/src/burn/engine/bacallback.h +++ b/src/burn/engine/bacallback.h @@ -193,7 +193,7 @@ HRESULT BACallbackOnDetectComplete( ); HRESULT BACallbackOnDetectForwardCompatibleBundle( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in_z LPCWSTR wzBundleTag, __in BOOL fPerMachine, @@ -219,7 +219,7 @@ HRESULT BACallbackOnDetectPackageComplete( ); HRESULT BACallbackOnDetectRelatedBundle( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in_z LPCWSTR wzBundleTag, __in BOOL fPerMachine, @@ -229,7 +229,7 @@ HRESULT BACallbackOnDetectRelatedBundle( HRESULT BACallbackOnDetectRelatedBundlePackage( __in BURN_USER_EXPERIENCE* pUserExperience, __in_z LPCWSTR wzPackageId, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in BOOL fPerMachine, __in VERUTIL_VERSION* pVersion @@ -388,7 +388,7 @@ HRESULT BACallbackOnPlanComplete( ); HRESULT BACallbackOnPlanForwardCompatibleBundle( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in_z LPCWSTR wzBundleTag, __in BOOL fPerMachine, @@ -443,17 +443,17 @@ HRESULT BACallbackOnPlanPackageComplete( ); HRESULT BACallbackOnPlanRelatedBundle( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState ); HRESULT BACallbackOnPlanRelatedBundleType( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType ); HRESULT BACallbackOnPlanRestoreRelatedBundle( __in BURN_USER_EXPERIENCE* pUserExperience, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState ); HRESULT BACallbackOnPlanRollbackBoundary( diff --git a/src/burn/engine/baengine.cpp b/src/burn/engine/baengine.cpp index e63836f4d..d1704ad9e 100644 --- a/src/burn/engine/baengine.cpp +++ b/src/burn/engine/baengine.cpp @@ -330,7 +330,7 @@ static HRESULT BAEngineGetRelatedBundleVariable( HRESULT hr = S_OK; BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS args = { }; BAENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS results = { }; - LPWSTR sczBundleId = NULL; + LPWSTR sczBundleCode = NULL; LPWSTR sczVariable = NULL; LPWSTR sczValue = NULL; @@ -338,13 +338,13 @@ static HRESULT BAEngineGetRelatedBundleVariable( hr = BuffReaderReadNumber(pReaderArgs, &args.dwApiVersion); ExitOnFailure(hr, "Failed to read API version of BAEngineGetRelatedBundleVariable args."); - hr = BuffReaderReadString(pReaderArgs, &sczBundleId); - ExitOnFailure(hr, "Failed to read bundle id of BAEngineGetRelatedBundleVariable args."); + hr = BuffReaderReadString(pReaderArgs, &sczBundleCode); + ExitOnFailure(hr, "Failed to read bundle code of BAEngineGetRelatedBundleVariable args."); hr = BuffReaderReadString(pReaderArgs, &sczVariable); ExitOnFailure(hr, "Failed to read variable name of BAEngineGetRelatedBundleVariable args."); - args.wzBundleId = sczBundleId; + args.wzBundleCode = sczBundleCode; args.wzVariable = sczVariable; // Read results. @@ -355,7 +355,7 @@ static HRESULT BAEngineGetRelatedBundleVariable( ExitOnFailure(hr, "Failed to read API version of BAEngineGetRelatedBundleVariable results."); // Execute. - hr = BundleGetBundleVariable(args.wzBundleId, args.wzVariable, &sczValue); + hr = BundleGetBundleVariable(args.wzBundleCode, args.wzVariable, &sczValue); ExitOnFailure(hr, "Failed to get related bundle variable: %ls", sczVariable); results.cchValue = lstrlenW(sczValue); @@ -374,7 +374,7 @@ static HRESULT BAEngineGetRelatedBundleVariable( LExit: ReleaseStr(sczValue); ReleaseStr(sczVariable); - ReleaseStr(sczBundleId); + ReleaseStr(sczBundleCode); return hr; } diff --git a/src/burn/engine/bundlepackageengine.cpp b/src/burn/engine/bundlepackageengine.cpp index 902626385..612da389d 100644 --- a/src/burn/engine/bundlepackageengine.cpp +++ b/src/burn/engine/bundlepackageengine.cpp @@ -52,8 +52,8 @@ extern "C" HRESULT BundlePackageEngineParsePackageFromXml( LPWSTR scz = NULL; // @DetectCondition - hr = XmlGetAttributeEx(pixnBundlePackage, L"BundleId", &pPackage->Bundle.sczBundleId); - ExitOnRequiredXmlQueryFailure(hr, "Failed to get @BundleId."); + hr = XmlGetAttributeEx(pixnBundlePackage, L"BundleCode", &pPackage->Bundle.sczBundleCode); + ExitOnRequiredXmlQueryFailure(hr, "Failed to get @BundleCode."); // @Version hr = XmlGetAttributeEx(pixnBundlePackage, L"Version", &scz); @@ -100,7 +100,7 @@ extern "C" HRESULT BundlePackageEngineParsePackageFromXml( hr = ExeEngineParseCommandLineArgumentsFromXml(pixnBundlePackage, &pPackage->Bundle.rgCommandLineArguments, &pPackage->Bundle.cCommandLineArguments); ExitOnFailure(hr, "Failed to parse command lines."); - hr = StrAllocFormatted(&pPackage->Bundle.sczRegistrationKey, L"%ls\\%ls", BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY, pPackage->Bundle.sczBundleId); + hr = StrAllocFormatted(&pPackage->Bundle.sczRegistrationKey, L"%ls\\%ls", BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY, pPackage->Bundle.sczBundleCode); ExitOnFailure(hr, "Failed to build uninstall registry key path."); LExit: @@ -126,7 +126,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( IXMLDOMNodeList* pixnNodes = NULL; IXMLDOMNode* pixnElement = NULL; LPWSTR sczAction = NULL; - LPWSTR sczId = NULL; + LPWSTR sczCode = NULL; DWORD cElements = 0; hr = XmlSelectNodes(pixnBundle, L"RelatedBundle", &pixnNodes); @@ -143,16 +143,16 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( hr = XmlGetAttributeEx(pixnElement, L"Action", &sczAction); ExitOnFailure(hr, "Failed to get @Action."); - hr = XmlGetAttributeEx(pixnElement, L"Id", &sczId); - ExitOnFailure(hr, "Failed to get @Id."); + hr = XmlGetAttributeEx(pixnElement, L"Code", &sczCode); + ExitOnFailure(hr, "Failed to get @Code."); if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Detect", -1)) { hr = MemEnsureArraySizeForNewItems(reinterpret_cast(prgsczDetectCodes), *pcDetectCodes, 1, sizeof(LPWSTR), 5); ExitOnFailure(hr, "Failed to resize Detect code array"); - (*prgsczDetectCodes)[*pcDetectCodes] = sczId; - sczId = NULL; + (*prgsczDetectCodes)[*pcDetectCodes] = sczCode; + sczCode = NULL; *pcDetectCodes += 1; } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Upgrade", -1)) @@ -160,8 +160,8 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( hr = MemEnsureArraySizeForNewItems(reinterpret_cast(prgsczUpgradeCodes), *pcUpgradeCodes, 1, sizeof(LPWSTR), 5); ExitOnFailure(hr, "Failed to resize Upgrade code array"); - (*prgsczUpgradeCodes)[*pcUpgradeCodes] = sczId; - sczId = NULL; + (*prgsczUpgradeCodes)[*pcUpgradeCodes] = sczCode; + sczCode = NULL; *pcUpgradeCodes += 1; } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Addon", -1)) @@ -169,8 +169,8 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( hr = MemEnsureArraySizeForNewItems(reinterpret_cast(prgsczAddonCodes), *pcAddonCodes, 1, sizeof(LPWSTR), 5); ExitOnFailure(hr, "Failed to resize Addon code array"); - (*prgsczAddonCodes)[*pcAddonCodes] = sczId; - sczId = NULL; + (*prgsczAddonCodes)[*pcAddonCodes] = sczCode; + sczCode = NULL; *pcAddonCodes += 1; } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Patch", -1)) @@ -178,8 +178,8 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( hr = MemEnsureArraySizeForNewItems(reinterpret_cast(prgsczPatchCodes), *pcPatchCodes, 1, sizeof(LPWSTR), 5); ExitOnFailure(hr, "Failed to resize Patch code array"); - (*prgsczPatchCodes)[*pcPatchCodes] = sczId; - sczId = NULL; + (*prgsczPatchCodes)[*pcPatchCodes] = sczCode; + sczCode = NULL; *pcPatchCodes += 1; } else @@ -193,7 +193,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes( ReleaseObject(pixnNodes); ReleaseObject(pixnElement); ReleaseStr(sczAction); - ReleaseStr(sczId); + ReleaseStr(sczCode); return hr; } @@ -202,7 +202,7 @@ extern "C" void BundlePackageEnginePackageUninitialize( __in BURN_PACKAGE* pPackage ) { - ReleaseStr(pPackage->Bundle.sczBundleId); + ReleaseStr(pPackage->Bundle.sczBundleCode); ReleaseStr(pPackage->Bundle.sczArpKeyPath); ReleaseVerutilVersion(pPackage->Bundle.pVersion); ReleaseStr(pPackage->Bundle.sczRegistrationKey); @@ -457,7 +457,7 @@ extern "C" HRESULT BundlePackageEnginePlanAddPackage( pAction->bundlePackage.pPackage = pPackage; pAction->bundlePackage.action = pPackage->rollback; - hr = StrAllocString(&pAction->bundlePackage.sczParent, pPlan->wzBundleId, 0); + hr = StrAllocString(&pAction->bundlePackage.sczParent, pPlan->wzBundleCode, 0); ExitOnFailure(hr, "Failed to allocate the parent."); if (pPackage->Bundle.wzAncestors) @@ -488,7 +488,7 @@ extern "C" HRESULT BundlePackageEnginePlanAddPackage( pAction->bundlePackage.pPackage = pPackage; pAction->bundlePackage.action = pPackage->execute; - hr = StrAllocString(&pAction->bundlePackage.sczParent, pPlan->wzBundleId, 0); + hr = StrAllocString(&pAction->bundlePackage.sczParent, pPlan->wzBundleCode, 0); ExitOnFailure(hr, "Failed to allocate the parent."); if (pPackage->Bundle.wzAncestors) @@ -686,7 +686,7 @@ static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback( BOOTSTRAPPER_RELATION_TYPE relationType = RelatedBundleConvertRelationType(pBundle->relationType); BOOL fPerMachine = BUNDLE_INSTALL_CONTEXT_MACHINE == pBundle->installContext; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pBundle->wzBundleId, -1, pPackage->Bundle.sczBundleId, -1) && + if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pBundle->wzBundleCode, -1, pPackage->Bundle.sczBundleCode, -1) && pPackage->Bundle.fWin64 == (REG_KEY_64BIT == pBundle->regBitness)) { Assert(BOOTSTRAPPER_RELATION_UPGRADE == relationType); @@ -695,14 +695,14 @@ static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback( } hr = RegReadString(pBundle->hkBundle, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, &sczBundleVersion); - ExitOnFailure(hr, "Failed to read version from registry for related bundle package: %ls", pBundle->wzBundleId); + ExitOnFailure(hr, "Failed to read version from registry for related bundle package: %ls", pBundle->wzBundleCode); hr = VerParseVersion(sczBundleVersion, 0, FALSE, &pVersion); ExitOnFailure(hr, "Failed to parse related bundle package version: %ls", sczBundleVersion); if (pVersion->fInvalid) { - LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, pBundle->wzBundleId, sczBundleVersion); + LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, pBundle->wzBundleCode, sczBundleVersion); } if (BOOTSTRAPPER_RELATION_UPGRADE == relationType) @@ -719,7 +719,7 @@ static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback( result = BUNDLE_QUERY_CALLBACK_RESULT_CANCEL; // Pass to BA. - hr = BACallbackOnDetectRelatedBundlePackage(pContext->pUserExperience, pPackage->sczId, pBundle->wzBundleId, relationType, fPerMachine, pVersion); + hr = BACallbackOnDetectRelatedBundlePackage(pContext->pUserExperience, pPackage->sczId, pBundle->wzBundleCode, relationType, fPerMachine, pVersion); ExitOnRootFailure(hr, "BA aborted detect related BUNDLE package."); result = BUNDLE_QUERY_CALLBACK_RESULT_CONTINUE; @@ -1064,7 +1064,7 @@ static HRESULT DetectArpEntry( if (!pPackage->Bundle.sczArpKeyPath) { - hr = PathConcatRelativeToBase(L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\", pPackage->Bundle.sczBundleId, &pPackage->Bundle.sczArpKeyPath); + hr = PathConcatRelativeToBase(L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\", pPackage->Bundle.sczBundleCode, &pPackage->Bundle.sczArpKeyPath); ExitOnFailure(hr, "Failed to build full key path."); } diff --git a/src/burn/engine/cache.cpp b/src/burn/engine/cache.cpp index 358327a26..5a8388c41 100644 --- a/src/burn/engine/cache.cpp +++ b/src/burn/engine/cache.cpp @@ -259,7 +259,7 @@ extern "C" HRESULT CacheInitializeSources( ExitOnFailure(hr, "Failed to get current process path."); // Determine if we are running from the package cache or not. - hr = CacheGetCompletedPath(pCache, pRegistration->fPerMachine, pRegistration->sczId, &sczCompletedFolder); + hr = CacheGetCompletedPath(pCache, pRegistration->fPerMachine, pRegistration->sczCode, &sczCompletedFolder); ExitOnFailure(hr, "Failed to get completed path for bundle."); hr = PathConcatRelativeToFullyQualifiedBase(sczCompletedFolder, pRegistration->sczExecutableName, &sczCompletedPath); @@ -432,7 +432,7 @@ extern "C" HRESULT CacheCalculateBundleWorkingPath( extern "C" HRESULT CacheCalculateBundleLayoutWorkingPath( __in BURN_CACHE* pCache, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __deref_out_z LPWSTR* psczWorkingPath ) { @@ -440,8 +440,8 @@ extern "C" HRESULT CacheCalculateBundleLayoutWorkingPath( HRESULT hr = S_OK; - hr = PathConcatRelativeToFullyQualifiedBase(pCache->sczAcquisitionFolder, wzBundleId, psczWorkingPath); - ExitOnFailure(hr, "Failed to append bundle id for bundle layout working path."); + hr = PathConcatRelativeToFullyQualifiedBase(pCache->sczAcquisitionFolder, wzBundleCode, psczWorkingPath); + ExitOnFailure(hr, "Failed to append bundle code for bundle layout working path."); LExit: return hr; @@ -978,7 +978,7 @@ extern "C" HRESULT CacheCompleteBundle( __in BURN_CACHE* pCache, __in BOOL fPerMachine, __in_z LPCWSTR wzExecutableName, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzSourceBundlePath #ifdef DEBUG , __in_z LPCWSTR wzExecutablePath @@ -990,7 +990,7 @@ extern "C" HRESULT CacheCompleteBundle( LPWSTR sczTargetDirectory = NULL; LPWSTR sczTargetPath = NULL; - hr = CreateCompletedPath(pCache, fPerMachine, wzBundleId, NULL, &sczTargetDirectory); + hr = CreateCompletedPath(pCache, fPerMachine, wzBundleCode, NULL, &sczTargetDirectory); ExitOnFailure(hr, "Failed to create completed cache path for bundle."); hr = PathConcatRelativeToFullyQualifiedBase(sczTargetDirectory, wzExecutableName, &sczTargetPath); @@ -1217,13 +1217,13 @@ extern "C" HRESULT CacheRemoveBaseWorkingFolder( extern "C" HRESULT CacheRemoveBundle( __in BURN_CACHE* pCache, __in BOOL fPerMachine, - __in_z LPCWSTR wzBundleId + __in_z LPCWSTR wzBundleCode ) { HRESULT hr = S_OK; - hr = RemoveBundleOrPackage(pCache, TRUE, fPerMachine, wzBundleId, wzBundleId); - ExitOnFailure(hr, "Failed to remove bundle id: %ls.", wzBundleId); + hr = RemoveBundleOrPackage(pCache, TRUE, fPerMachine, wzBundleCode, wzBundleCode); + ExitOnFailure(hr, "Failed to remove bundle code: %ls.", wzBundleCode); LExit: return hr; diff --git a/src/burn/engine/cache.h b/src/burn/engine/cache.h index 7c4dfaa1d..cce35df04 100644 --- a/src/burn/engine/cache.h +++ b/src/burn/engine/cache.h @@ -107,7 +107,7 @@ HRESULT CacheCalculateBundleWorkingPath( ); HRESULT CacheCalculateBundleLayoutWorkingPath( __in BURN_CACHE* pCache, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __deref_out_z LPWSTR* psczWorkingPath ); HRESULT CacheCalculatePayloadWorkingPath( @@ -191,7 +191,7 @@ HRESULT CacheCompleteBundle( __in BURN_CACHE* pCache, __in BOOL fPerMachine, __in_z LPCWSTR wzExecutableName, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzSourceBundlePath #ifdef DEBUG , __in_z LPCWSTR wzExecutablePath diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp index a85e6f188..3fe9b5863 100644 --- a/src/burn/engine/core.cpp +++ b/src/burn/engine/core.cpp @@ -202,12 +202,12 @@ extern "C" HRESULT CoreInitializeConstants( // Support passing Ancestors to embedded burn bundles. if (pInternalCommand->sczAncestors && *pInternalCommand->sczAncestors) { - hr = StrAllocFormatted(&pRegistration->sczBundlePackageAncestors, L"%ls;%ls", pInternalCommand->sczAncestors, pRegistration->sczId); + hr = StrAllocFormatted(&pRegistration->sczBundlePackageAncestors, L"%ls;%ls", pInternalCommand->sczAncestors, pRegistration->sczCode); ExitOnFailure(hr, "Failed to copy ancestors and self to bundle package ancestors."); } else { - hr = StrAllocString(&pRegistration->sczBundlePackageAncestors, pRegistration->sczId, 0); + hr = StrAllocString(&pRegistration->sczBundlePackageAncestors, pRegistration->sczCode, 0); ExitOnFailure(hr, "Failed to copy self to bundle package ancestors."); } @@ -330,7 +330,7 @@ extern "C" HRESULT CoreDetect( ExitOnFailure(hr, "Failed to report detected related bundles."); // Do update detection. - hr = DetectUpdate(pEngineState->registration.sczId, &pEngineState->userExperience, &pEngineState->update); + hr = DetectUpdate(pEngineState->registration.sczCode, &pEngineState->userExperience, &pEngineState->update); ExitOnFailure(hr, "Failed to detect update."); // Detecting MSPs requires special initialization before processing each package but @@ -462,8 +462,8 @@ extern "C" HRESULT CorePlan( pEngineState->plan.pCommand = &pEngineState->command; pEngineState->plan.pInternalCommand = &pEngineState->internalCommand; pEngineState->plan.pPayloads = &pEngineState->payloads; - pEngineState->plan.wzBundleId = pEngineState->registration.sczId; - pEngineState->plan.wzBundleProviderKey = pEngineState->registration.sczId; + pEngineState->plan.wzBundleCode = pEngineState->registration.sczCode; + pEngineState->plan.wzBundleProviderKey = pEngineState->registration.sczCode; pEngineState->plan.fDisableRollback = pEngineState->fDisableRollback || BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pEngineState->plan.action; pEngineState->plan.fPlanPackageCacheRollback = BOOTSTRAPPER_REGISTRATION_TYPE_NONE == pEngineState->registration.detectedRegistrationType; diff --git a/src/burn/engine/dependency.cpp b/src/burn/engine/dependency.cpp index d66986800..f398a0705 100644 --- a/src/burn/engine/dependency.cpp +++ b/src/burn/engine/dependency.cpp @@ -200,10 +200,10 @@ extern "C" HRESULT DependencyInitialize( HRESULT hr = S_OK; - // If no parent was specified at all, use the bundle id as the self dependent. + // If no parent was specified at all, use the bundle code as the self dependent. if (!pInternalCommand->sczActiveParent) { - pDependencies->wzSelfDependent = pRegistration->sczId; + pDependencies->wzSelfDependent = pRegistration->sczCode; } else if (*pInternalCommand->sczActiveParent) // if parent was specified use that as the self dependent. { @@ -243,30 +243,30 @@ extern "C" void DependencyUninitialize( memset(pDependencies, 0, sizeof(BURN_DEPENDENCIES)); } -extern "C" HRESULT DependencyDetectProviderKeyBundleId( +extern "C" HRESULT DependencyDetectProviderKeyBundleCode( __in BURN_REGISTRATION* pRegistration ) { HRESULT hr = S_OK; - hr = DepGetProviderInformation(pRegistration->hkRoot, pRegistration->sczProviderKey, &pRegistration->sczDetectedProviderKeyBundleId, NULL, NULL); + hr = DepGetProviderInformation(pRegistration->hkRoot, pRegistration->sczProviderKey, &pRegistration->sczDetectedProviderKeyBundleCode, NULL, NULL); if (E_NOTFOUND == hr) { - ReleaseNullStr(pRegistration->sczDetectedProviderKeyBundleId); + ReleaseNullStr(pRegistration->sczDetectedProviderKeyBundleCode); ExitFunction1(hr = S_OK); } - ExitOnFailure(hr, "Failed to get provider key bundle id."); + ExitOnFailure(hr, "Failed to get provider key bundle code."); - // If a bundle id was not explicitly set, default the provider key bundle id to this bundle's provider key. - if (!pRegistration->sczDetectedProviderKeyBundleId || !*pRegistration->sczDetectedProviderKeyBundleId) + // If a bundle code was not explicitly set, default the provider key bundle code to this bundle's provider key. + if (!pRegistration->sczDetectedProviderKeyBundleCode || !*pRegistration->sczDetectedProviderKeyBundleCode) { - hr = StrAllocString(&pRegistration->sczDetectedProviderKeyBundleId, pRegistration->sczProviderKey, 0); - ExitOnFailure(hr, "Failed to initialize provider key bundle id."); + hr = StrAllocString(&pRegistration->sczDetectedProviderKeyBundleCode, pRegistration->sczProviderKey, 0); + ExitOnFailure(hr, "Failed to initialize provider key bundle code."); } - else if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczId, -1, pRegistration->sczDetectedProviderKeyBundleId, -1)) + else if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczCode, -1, pRegistration->sczDetectedProviderKeyBundleCode, -1)) { - pRegistration->fDetectedForeignProviderKeyBundleId = TRUE; - LogId(REPORT_STANDARD, MSG_DETECTED_FOREIGN_BUNDLE_PROVIDER_REGISTRATION, pRegistration->sczProviderKey, pRegistration->sczDetectedProviderKeyBundleId); + pRegistration->fDetectedForeignProviderKeyBundleCode = TRUE; + LogId(REPORT_STANDARD, MSG_DETECTED_FOREIGN_BUNDLE_PROVIDER_REGISTRATION, pRegistration->sczProviderKey, pRegistration->sczDetectedProviderKeyBundleCode); } LExit: @@ -281,8 +281,8 @@ extern "C" HRESULT DependencyDetectBundle( HRESULT hr = S_OK; BOOL fExists = FALSE; - hr = DependencyDetectProviderKeyBundleId(pRegistration); - ExitOnFailure(hr, "Failed to detect provider key bundle id."); + hr = DependencyDetectProviderKeyBundleCode(pRegistration); + ExitOnFailure(hr, "Failed to detect provider key bundle code."); hr = DepCheckDependents(pRegistration->hkRoot, pRegistration->sczProviderKey, 0, NULL, &pRegistration->rgDependents, &pRegistration->cDependents); ExitOnPathFailure(hr, fExists, "Failed dependents check on bundle."); @@ -794,7 +794,7 @@ extern "C" HRESULT DependencyRegisterBundle( LogId(REPORT_VERBOSE, MSG_DEPENDENCY_BUNDLE_REGISTER, pRegistration->sczProviderKey, pRegistration->pVersion->sczVersion); // Register the bundle provider key. - hr = DepRegisterDependency(pRegistration->hkRoot, pRegistration->sczProviderKey, pRegistration->pVersion->sczVersion, pRegistration->sczDisplayName, pRegistration->sczId, 0); + hr = DepRegisterDependency(pRegistration->hkRoot, pRegistration->sczProviderKey, pRegistration->pVersion->sczVersion, pRegistration->sczDisplayName, pRegistration->sczCode, 0); ExitOnFailure(hr, "Failed to register the bundle dependency provider."); LExit: @@ -835,10 +835,10 @@ extern "C" void DependencyUnregisterBundle( ) { HRESULT hr = S_OK; - LPCWSTR wzDependentProviderKey = pRegistration->sczId; + LPCWSTR wzDependentProviderKey = pRegistration->sczCode; // If we own the bundle dependency then remove it. - if (!pRegistration->fDetectedForeignProviderKeyBundleId) + if (!pRegistration->fDetectedForeignProviderKeyBundleCode) { // Remove the bundle provider key. hr = DepUnregisterDependency(pRegistration->hkRoot, pRegistration->sczProviderKey); @@ -969,7 +969,7 @@ static HRESULT DetectPackageDependents( { DEPENDENCY* pDependent = pProvider->rgDependents + iDependent; - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczId, -1, pDependent->sczKey, -1)) + if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczCode, -1, pDependent->sczKey, -1)) { pProvider->fBundleRegisteredAsDependent = TRUE; fBundleRegisteredAsDependent = TRUE; diff --git a/src/burn/engine/dependency.h b/src/burn/engine/dependency.h index b5e4050fe..d539e9b58 100644 --- a/src/burn/engine/dependency.h +++ b/src/burn/engine/dependency.h @@ -55,12 +55,12 @@ void DependencyUninitialize( ); /******************************************************************** - DependencyDetectProviderKeyBundleId - Detect if the provider key is + DependencyDetectProviderKeyBundleCode - Detect if the provider key is registered and if so what bundle is registered. Note: Returns E_NOTFOUND if the provider key is not registered. *********************************************************************/ -HRESULT DependencyDetectProviderKeyBundleId( +HRESULT DependencyDetectProviderKeyBundleCode( __in BURN_REGISTRATION* pRegistration ); diff --git a/src/burn/engine/detect.cpp b/src/burn/engine/detect.cpp index 18820c5d2..08f6b57c5 100644 --- a/src/burn/engine/detect.cpp +++ b/src/burn/engine/detect.cpp @@ -18,13 +18,13 @@ static HRESULT WINAPI AuthenticationRequired( ); static HRESULT DetectAtomFeedUpdate( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BURN_USER_EXPERIENCE* pUX, __in BURN_UPDATE* pUpdate ); static HRESULT DownloadUpdateFeed( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BURN_USER_EXPERIENCE* pUX, __in BURN_UPDATE* pUpdate, __deref_inout_z LPWSTR* psczTempFile @@ -38,8 +38,8 @@ extern "C" void DetectReset( ) { RelatedBundlesUninitialize(&pRegistration->relatedBundles); - ReleaseNullStr(pRegistration->sczDetectedProviderKeyBundleId); - pRegistration->fDetectedForeignProviderKeyBundleId = FALSE; + ReleaseNullStr(pRegistration->sczDetectedProviderKeyBundleCode); + pRegistration->fDetectedForeignProviderKeyBundleCode = FALSE; pRegistration->fSelfRegisteredAsDependent = FALSE; pRegistration->fParentRegisteredAsDependent = FALSE; pRegistration->fForwardCompatibleBundleExists = FALSE; @@ -123,14 +123,14 @@ extern "C" HRESULT DetectForwardCompatibleBundles( HRESULT hr = S_OK; int nCompareResult = 0; - if (pRegistration->fDetectedForeignProviderKeyBundleId) + if (pRegistration->fDetectedForeignProviderKeyBundleCode) { for (DWORD iRelatedBundle = 0; iRelatedBundle < pRegistration->relatedBundles.cRelatedBundles; ++iRelatedBundle) { BURN_RELATED_BUNDLE* pRelatedBundle = pRegistration->relatedBundles.rgRelatedBundles + iRelatedBundle; if (BOOTSTRAPPER_RELATION_UPGRADE == pRelatedBundle->detectRelationType && - CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczDetectedProviderKeyBundleId, -1, pRelatedBundle->package.sczId, -1)) + CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczDetectedProviderKeyBundleCode, -1, pRelatedBundle->package.sczId, -1)) { hr = VerCompareParsedVersions(pRegistration->pVersion, pRelatedBundle->pVersion, &nCompareResult); ExitOnFailure(hr, "Failed to compare bundle version '%ls' to related bundle version '%ls'", pRegistration->pVersion->sczVersion, pRelatedBundle->pVersion->sczVersion); @@ -201,7 +201,7 @@ extern "C" HRESULT DetectReportRelatedBundles( } extern "C" HRESULT DetectUpdate( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BURN_USER_EXPERIENCE* pUX, __in BURN_UPDATE* pUpdate ) @@ -228,7 +228,7 @@ extern "C" HRESULT DetectUpdate( if (!fSkip) { - hr = DetectAtomFeedUpdate(wzBundleId, pUX, pUpdate); + hr = DetectAtomFeedUpdate(wzBundleCode, pUX, pUpdate); ExitOnFailure(hr, "Failed to detect atom feed update."); } @@ -306,7 +306,7 @@ static HRESULT WINAPI AuthenticationRequired( } static HRESULT DownloadUpdateFeed( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BURN_USER_EXPERIENCE* pUX, __in BURN_UPDATE* pUpdate, __deref_inout_z LPWSTR* psczTempFile @@ -334,7 +334,7 @@ static HRESULT DownloadUpdateFeed( cacheCallback.pv = NULL; //pProgress; authenticationData.pUX = pUX; - authenticationData.wzPackageOrContainerId = wzBundleId; + authenticationData.wzPackageOrContainerId = wzBundleCode; authenticationCallback.pv = static_cast(&authenticationData); authenticationCallback.pfnAuthenticate = &AuthenticationRequired; @@ -364,7 +364,7 @@ static HRESULT DownloadUpdateFeed( static HRESULT DetectAtomFeedUpdate( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BURN_USER_EXPERIENCE* pUX, __in BURN_UPDATE* pUpdate ) @@ -385,7 +385,7 @@ static HRESULT DetectAtomFeedUpdate( hr = AtomInitialize(); ExitOnFailure(hr, "Failed to initialize Atom."); - hr = DownloadUpdateFeed(wzBundleId, pUX, pUpdate, &sczUpdateFeedTempFile); + hr = DownloadUpdateFeed(wzBundleCode, pUX, pUpdate, &sczUpdateFeedTempFile); ExitOnFailure(hr, "Failed to download update feed."); hr = AtomParseFromFile(sczUpdateFeedTempFile, &pAtomFeed); diff --git a/src/burn/engine/detect.h b/src/burn/engine/detect.h index cdca2777d..a0562ba25 100644 --- a/src/burn/engine/detect.h +++ b/src/burn/engine/detect.h @@ -33,7 +33,7 @@ HRESULT DetectReportRelatedBundles( ); HRESULT DetectUpdate( - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in BURN_USER_EXPERIENCE* pUX, __in BURN_UPDATE* pUpdate ); diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index 924d21845..85d5a5434 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp @@ -556,7 +556,7 @@ extern "C" HRESULT ElevationSessionBegin( __in BOOL fDisableResume, __in BURN_VARIABLES* pVariables, __in DWORD dwRegistrationOperations, - __in BOOL fDetectedForeignProviderKeyBundleId, + __in BOOL fDetectedForeignProviderKeyBundleCode, __in DWORD64 qwEstimatedSize, __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType ) @@ -579,7 +579,7 @@ extern "C" HRESULT ElevationSessionBegin( hr = BuffWriteNumber(&pbData, &cbData, dwRegistrationOperations); ExitOnFailure(hr, "Failed to write registration operations to message buffer."); - hr = BuffWriteNumber(&pbData, &cbData, (DWORD)fDetectedForeignProviderKeyBundleId); + hr = BuffWriteNumber(&pbData, &cbData, (DWORD)fDetectedForeignProviderKeyBundleCode); ExitOnFailure(hr, "Failed to write dependency registration action to message buffer."); hr = BuffWriteNumber64(&pbData, &cbData, qwEstimatedSize); @@ -611,7 +611,7 @@ extern "C" HRESULT ElevationSessionEnd( __in HANDLE hPipe, __in BURN_RESUME_MODE resumeMode, __in BOOTSTRAPPER_APPLY_RESTART restart, - __in BOOL fDetectedForeignProviderKeyBundleId, + __in BOOL fDetectedForeignProviderKeyBundleCode, __in DWORD64 qwEstimatedSize, __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType ) @@ -628,7 +628,7 @@ extern "C" HRESULT ElevationSessionEnd( hr = BuffWriteNumber(&pbData, &cbData, (DWORD)restart); ExitOnFailure(hr, "Failed to write restart enum to message buffer."); - hr = BuffWriteNumber(&pbData, &cbData, (DWORD)fDetectedForeignProviderKeyBundleId); + hr = BuffWriteNumber(&pbData, &cbData, (DWORD)fDetectedForeignProviderKeyBundleCode); ExitOnFailure(hr, "Failed to write dependency registration action to message buffer."); hr = BuffWriteNumber64(&pbData, &cbData, qwEstimatedSize); @@ -821,8 +821,8 @@ extern "C" HRESULT ElevationProcessDependentRegistration( hr = BuffWriteNumber(&pbData, &cbData, pAction->type); ExitOnFailure(hr, "Failed to write action type to message buffer."); - hr = BuffWriteString(&pbData, &cbData, pAction->sczBundleId); - ExitOnFailure(hr, "Failed to write bundle id to message buffer."); + hr = BuffWriteString(&pbData, &cbData, pAction->sczBundleCode); + ExitOnFailure(hr, "Failed to write bundle code to message buffer."); hr = BuffWriteString(&pbData, &cbData, pAction->sczDependentProviderKey); ExitOnFailure(hr, "Failed to write dependent provider key to message buffer."); @@ -2559,7 +2559,7 @@ static HRESULT OnSessionBegin( hr = BuffReadNumber(pbData, cbData, &iData, &dwRegistrationOperations); ExitOnFailure(hr, "Failed to read registration operations."); - hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&pRegistration->fDetectedForeignProviderKeyBundleId); + hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&pRegistration->fDetectedForeignProviderKeyBundleCode); ExitOnFailure(hr, "Failed to read dependency registration action."); hr = BuffReadNumber64(pbData, cbData, &iData, &qwEstimatedSize); @@ -2604,7 +2604,7 @@ static HRESULT OnSessionEnd( hr = BuffReadNumber(pbData, cbData, &iData, &dwRestart); ExitOnFailure(hr, "Failed to read restart enum."); - hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&pRegistration->fDetectedForeignProviderKeyBundleId); + hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&pRegistration->fDetectedForeignProviderKeyBundleCode); ExitOnFailure(hr, "Failed to read dependency registration action."); hr = BuffReadNumber64(pbData, cbData, &iData, &qwEstimatedSize); @@ -2810,8 +2810,8 @@ static HRESULT OnProcessDependentRegistration( hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&action.type); ExitOnFailure(hr, "Failed to read action type."); - hr = BuffReadString(pbData, cbData, &iData, &action.sczBundleId); - ExitOnFailure(hr, "Failed to read bundle id."); + hr = BuffReadString(pbData, cbData, &iData, &action.sczBundleCode); + ExitOnFailure(hr, "Failed to read bundle code."); hr = BuffReadString(pbData, cbData, &iData, &action.sczDependentProviderKey); ExitOnFailure(hr, "Failed to read dependent provider key."); @@ -2824,7 +2824,7 @@ static HRESULT OnProcessDependentRegistration( // TODO: do the right thing here. //DependencyUninitializeRegistrationAction(&action); ReleaseStr(action.sczDependentProviderKey); - ReleaseStr(action.sczBundleId) + ReleaseStr(action.sczBundleCode) return hr; } @@ -2854,7 +2854,7 @@ static HRESULT OnExecuteRelatedBundle( // Deserialize message data. hr = BuffReadString(pbData, cbData, &iData, &sczPackage); - ExitOnFailure(hr, "Failed to read related bundle id."); + ExitOnFailure(hr, "Failed to read related bundle code."); hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.relatedBundle.action); ExitOnFailure(hr, "Failed to read action."); diff --git a/src/burn/engine/elevation.h b/src/burn/engine/elevation.h index 020199779..04ad244c4 100644 --- a/src/burn/engine/elevation.h +++ b/src/burn/engine/elevation.h @@ -29,7 +29,7 @@ HRESULT ElevationSessionBegin( __in BOOL fDisableResume, __in BURN_VARIABLES* pVariables, __in DWORD dwRegistrationOperations, - __in BOOL fDetectedForeignProviderKeyBundleId, + __in BOOL fDetectedForeignProviderKeyBundleCode, __in DWORD64 qwEstimatedSize, __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType ); @@ -37,7 +37,7 @@ HRESULT ElevationSessionEnd( __in HANDLE hPipe, __in BURN_RESUME_MODE resumeMode, __in BOOTSTRAPPER_APPLY_RESTART restart, - __in BOOL fDetectedForeignProviderKeyBundleId, + __in BOOL fDetectedForeignProviderKeyBundleCode, __in DWORD64 qwEstimatedSize, __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType ); diff --git a/src/burn/engine/externalengine.cpp b/src/burn/engine/externalengine.cpp index 1c775e238..352d184cc 100644 --- a/src/burn/engine/externalengine.cpp +++ b/src/burn/engine/externalengine.cpp @@ -837,7 +837,7 @@ HRESULT ExternalEngineSetUpdateSource( HRESULT ExternalEngineGetRelatedBundleVariable( __in BURN_ENGINE_STATE* /*pEngineState*/, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzVariable, __out_ecount_opt(*pcchValue) LPWSTR wzValue, __inout SIZE_T* pcchValue @@ -848,7 +848,7 @@ HRESULT ExternalEngineGetRelatedBundleVariable( if (wzVariable && *wzVariable && pcchValue) { - hr = BundleGetBundleVariable(wzBundleId, wzVariable, &sczValue); + hr = BundleGetBundleVariable(wzBundleCode, wzVariable, &sczValue); if (SUCCEEDED(hr)) { hr = CopyStringToExternal(sczValue, wzValue, pcchValue); diff --git a/src/burn/engine/externalengine.h b/src/burn/engine/externalengine.h index 3569392de..9b95e645e 100644 --- a/src/burn/engine/externalengine.h +++ b/src/burn/engine/externalengine.h @@ -133,7 +133,7 @@ HRESULT ExternalEngineCompareVersions( HRESULT ExternalEngineGetRelatedBundleVariable( __in BURN_ENGINE_STATE* pEngineState, - __in_z LPCWSTR wzBundleId, + __in_z LPCWSTR wzBundleCode, __in_z LPCWSTR wzVariable, __out_ecount_opt(*pcchValue) LPWSTR wzValue, __inout SIZE_T* pcchValue diff --git a/src/burn/engine/package.h b/src/burn/engine/package.h index 1ea169e69..d596d7c0d 100644 --- a/src/burn/engine/package.h +++ b/src/burn/engine/package.h @@ -323,7 +323,7 @@ typedef struct _BURN_PACKAGE { struct { - LPWSTR sczBundleId; + LPWSTR sczBundleCode; LPWSTR sczArpKeyPath; VERUTIL_VERSION* pVersion; LPWSTR sczRegistrationKey; diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index be281827b..47b1c6212 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp @@ -74,7 +74,7 @@ static HRESULT AddRegistrationAction( __in BURN_PLAN* pPlan, __in BURN_DEPENDENT_REGISTRATION_ACTION_TYPE type, __in_z LPCWSTR wzDependentProviderKey, - __in_z LPCWSTR wzOwnerBundleId + __in_z LPCWSTR wzOwnerBundleCode ); static HRESULT AddCachePackage( __in BURN_PLAN* pPlan, @@ -467,7 +467,7 @@ extern "C" HRESULT PlanLayoutBundle( hr = StrAllocString(&pCacheAction->bundleLayout.sczExecutableName, wzExecutableName, 0); ExitOnFailure(hr, "Failed to to copy executable name for bundle."); - hr = CacheCalculateBundleLayoutWorkingPath(pPlan->pCache, pPlan->wzBundleId, &pCacheAction->bundleLayout.sczUnverifiedPath); + hr = CacheCalculateBundleLayoutWorkingPath(pPlan->pCache, pPlan->wzBundleCode, &pCacheAction->bundleLayout.sczUnverifiedPath); ExitOnFailure(hr, "Failed to calculate bundle layout working path."); pCacheAction->bundleLayout.qwBundleSize = qwBundleSize; @@ -599,7 +599,7 @@ extern "C" HRESULT PlanRegistration( // If our provider key was not owned by a different bundle, // then plan to write our provider key registration to "fix it" if broken // in case the bundle isn't successfully uninstalled. - if (!pRegistration->fDetectedForeignProviderKeyBundleId) + if (!pRegistration->fDetectedForeignProviderKeyBundleCode) { pPlan->dwRegistrationOperations |= BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY; } @@ -612,7 +612,7 @@ extern "C" HRESULT PlanRegistration( // would prevent self-removal. if (pRegistration->fSelfRegisteredAsDependent) { - hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_UNREGISTER, pDependencies->wzSelfDependent, pRegistration->sczId); + hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_UNREGISTER, pDependencies->wzSelfDependent, pRegistration->sczCode); ExitOnFailure(hr, "Failed to allocate registration action."); hr = DependencyAddIgnoreDependencies(sdIgnoreDependents, pDependencies->wzSelfDependent); @@ -758,7 +758,7 @@ extern "C" HRESULT PlanRegistration( // as our own dependent. if (pDependencies->wzSelfDependent && !pRegistration->fSelfRegisteredAsDependent && (pDependencies->wzActiveParent || !fAddonOrPatchBundle)) { - hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_REGISTER, pDependencies->wzSelfDependent, pRegistration->sczId); + hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_REGISTER, pDependencies->wzSelfDependent, pRegistration->sczCode); ExitOnFailure(hr, "Failed to add registration action for self dependent."); } } @@ -1439,7 +1439,7 @@ extern "C" HRESULT PlanRelatedBundlesBegin( } else if (E_NOTFOUND != hr) { - ExitOnFailure(hr, "Failed to lookup the bundle ID in the ancestors dictionary."); + ExitOnFailure(hr, "Failed to lookup the bundle code in the ancestors dictionary."); } } else if (fDependent && BOOTSTRAPPER_RELATION_NONE != relationType) @@ -2076,7 +2076,7 @@ static void UninitializeRegistrationAction( ) { ReleaseStr(pAction->sczDependentProviderKey); - ReleaseStr(pAction->sczBundleId); + ReleaseStr(pAction->sczBundleCode); memset(pAction, 0, sizeof(BURN_DEPENDENT_REGISTRATION_ACTION)); } @@ -2271,7 +2271,7 @@ static HRESULT AddRegistrationAction( __in BURN_PLAN* pPlan, __in BURN_DEPENDENT_REGISTRATION_ACTION_TYPE type, __in_z LPCWSTR wzDependentProviderKey, - __in_z LPCWSTR wzOwnerBundleId + __in_z LPCWSTR wzOwnerBundleCode ) { HRESULT hr = S_OK; @@ -2287,7 +2287,7 @@ static HRESULT AddRegistrationAction( pAction->type = type; - hr = StrAllocString(&pAction->sczBundleId, wzOwnerBundleId, 0); + hr = StrAllocString(&pAction->sczBundleCode, wzOwnerBundleCode, 0); ExitOnFailure(hr, "Failed to copy owner bundle to registration action."); hr = StrAllocString(&pAction->sczDependentProviderKey, wzDependentProviderKey, 0); @@ -2302,7 +2302,7 @@ static HRESULT AddRegistrationAction( pAction->type = rollbackType; - hr = StrAllocString(&pAction->sczBundleId, wzOwnerBundleId, 0); + hr = StrAllocString(&pAction->sczBundleCode, wzOwnerBundleCode, 0); ExitOnFailure(hr, "Failed to copy owner bundle to registration action."); hr = StrAllocString(&pAction->sczDependentProviderKey, wzDependentProviderKey, 0); @@ -2880,7 +2880,7 @@ static void DependentRegistrationActionLog( if (wzType) { - LogStringLine(PlanDumpLevel, "%ls action[%u]: %ls bundle id: %ls, provider key: %ls", wzBase, iAction, wzType, pAction->sczBundleId, pAction->sczDependentProviderKey); + LogStringLine(PlanDumpLevel, "%ls action[%u]: %ls bundle code: %ls, provider key: %ls", wzBase, iAction, wzType, pAction->sczBundleCode, pAction->sczDependentProviderKey); } } @@ -3076,7 +3076,7 @@ extern "C" void PlanDump( LogStringLine(PlanDumpLevel, "--- Begin plan dump ---"); LogStringLine(PlanDumpLevel, "Plan action: %hs", LoggingBurnActionToString(pPlan->action)); - LogStringLine(PlanDumpLevel, " bundle id: %ls", pPlan->wzBundleId); + LogStringLine(PlanDumpLevel, " bundle code: %ls", pPlan->wzBundleCode); LogStringLine(PlanDumpLevel, " bundle provider key: %ls", pPlan->wzBundleProviderKey); LogStringLine(PlanDumpLevel, " use-forward-compatible: %hs", LoggingTrueFalseToString(pPlan->fEnabledForwardCompatibleBundle)); LogStringLine(PlanDumpLevel, " per-machine: %hs", LoggingTrueFalseToString(pPlan->fPerMachine)); diff --git a/src/burn/engine/plan.h b/src/burn/engine/plan.h index 386de2c63..03b1423d5 100644 --- a/src/burn/engine/plan.h +++ b/src/burn/engine/plan.h @@ -71,7 +71,7 @@ enum BURN_CLEAN_ACTION_TYPE typedef struct _BURN_DEPENDENT_REGISTRATION_ACTION { BURN_DEPENDENT_REGISTRATION_ACTION_TYPE type; - LPWSTR sczBundleId; + LPWSTR sczBundleCode; LPWSTR sczDependentProviderKey; } BURN_DEPENDENT_REGISTRATION_ACTION; @@ -253,7 +253,7 @@ typedef struct _BURN_PLAN BOOTSTRAPPER_COMMAND* pCommand; BURN_ENGINE_COMMAND* pInternalCommand; BURN_PAYLOADS* pPayloads; - LPWSTR wzBundleId; // points directly into parent the ENGINE_STATE. + LPWSTR wzBundleCode; // points directly into parent the ENGINE_STATE. LPWSTR wzBundleProviderKey; // points directly into parent the ENGINE_STATE. BOOL fPerMachine; BOOL fCanAffectMachineState; diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp index 771b94255..85c006f7f 100644 --- a/src/burn/engine/registration.cpp +++ b/src/burn/engine/registration.cpp @@ -132,9 +132,9 @@ extern "C" HRESULT RegistrationParseFromXml( hr = XmlSelectSingleNode(pixnBundle, L"Registration", &pixnRegistrationNode); ExitOnRequiredXmlQueryFailure(hr, "Failed to select registration node."); - // @Id - hr = XmlGetAttributeEx(pixnRegistrationNode, L"Id", &pRegistration->sczId); - ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Id."); + // @Code + hr = XmlGetAttributeEx(pixnRegistrationNode, L"Code", &pRegistration->sczCode); + ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Code."); // @Tag hr = XmlGetAttributeEx(pixnRegistrationNode, L"Tag", &pRegistration->sczTag); @@ -305,7 +305,7 @@ extern "C" void RegistrationUninitialize( __in BURN_REGISTRATION* pRegistration ) { - ReleaseStr(pRegistration->sczId); + ReleaseStr(pRegistration->sczCode); ReleaseStr(pRegistration->sczTag); for (DWORD i = 0; i < pRegistration->cDetectCodes; ++i) @@ -371,7 +371,7 @@ extern "C" void RegistrationUninitialize( MemFree(pRegistration->softwareTags.rgSoftwareTags); } - ReleaseStr(pRegistration->sczDetectedProviderKeyBundleId); + ReleaseStr(pRegistration->sczDetectedProviderKeyBundleCode); ReleaseStr(pRegistration->sczBundlePackageAncestors); RelatedBundlesUninitialize(&pRegistration->relatedBundles); @@ -620,7 +620,7 @@ extern "C" HRESULT RegistrationSessionBegin( // Cache bundle executable. if (dwRegistrationOptions & BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE) { - hr = CacheCompleteBundle(pCache, pRegistration->fPerMachine, pRegistration->sczExecutableName, pRegistration->sczId, wzEngineWorkingPath + hr = CacheCompleteBundle(pCache, pRegistration->fPerMachine, pRegistration->sczExecutableName, pRegistration->sczCode, wzEngineWorkingPath #ifdef DEBUG , pRegistration->sczCacheExecutablePath #endif @@ -888,7 +888,7 @@ extern "C" HRESULT RegistrationSessionEnd( hr = RegDelete(pRegistration->hkRoot, pRegistration->sczRegistrationKey, REG_KEY_DEFAULT, TRUE); ExitOnPathFailure(hr, fDeleted, "Failed to delete registration key: %ls", pRegistration->sczRegistrationKey); - CacheRemoveBundle(pCache, pRegistration->fPerMachine, pRegistration->sczId); + CacheRemoveBundle(pCache, pRegistration->fPerMachine, pRegistration->sczCode); } else // the mode needs to be updated so open the registration key. { @@ -1153,11 +1153,11 @@ static HRESULT SetPaths( pRegistration->hkRoot = pRegistration->fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; // build uninstall registry key path - hr = StrAllocFormatted(&pRegistration->sczRegistrationKey, L"%ls\\%ls", BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY, pRegistration->sczId); + hr = StrAllocFormatted(&pRegistration->sczRegistrationKey, L"%ls\\%ls", BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY, pRegistration->sczCode); ExitOnFailure(hr, "Failed to build uninstall registry key path."); // build cache directory - hr = CacheGetCompletedPath(pCache, pRegistration->fPerMachine, pRegistration->sczId, &sczCacheDirectory); + hr = CacheGetCompletedPath(pCache, pRegistration->fPerMachine, pRegistration->sczCode, &sczCacheDirectory); ExitOnFailure(hr, "Failed to build cache directory."); // build cached executable path @@ -1287,7 +1287,7 @@ static HRESULT UpdateResumeMode( hr = RegCreate(pRegistration->hkRoot, sczResumeKey, KEY_WRITE, &hkRun); ExitOnFailure(hr, "Failed to create run key."); - hr = RegWriteString(hkRun, pRegistration->sczId, sczRunOnceCommandLine); + hr = RegWriteString(hkRun, pRegistration->sczCode, sczRunOnceCommandLine); ExitOnFailure(hr, "Failed to write run key value."); hr = RegWriteString(hkRegistration, REGISTRY_BUNDLE_RESUME_COMMAND_LINE, pRegistration->sczResumeCommandLine); @@ -1304,7 +1304,7 @@ static HRESULT UpdateResumeMode( { ExitOnFailure(hr, "Failed to open run key."); - er = ::RegDeleteValueW(hkRun, pRegistration->sczId); + er = ::RegDeleteValueW(hkRun, pRegistration->sczCode); if (ERROR_FILE_NOT_FOUND == er) { er = ERROR_SUCCESS; diff --git a/src/burn/engine/registration.h b/src/burn/engine/registration.h index 91c3fdcd7..326f21c63 100644 --- a/src/burn/engine/registration.h +++ b/src/burn/engine/registration.h @@ -99,7 +99,7 @@ typedef struct _BURN_REGISTRATION BOOL fDisableResume; BOOL fCached; BOOTSTRAPPER_REGISTRATION_TYPE detectedRegistrationType; - LPWSTR sczId; + LPWSTR sczCode; LPWSTR sczTag; LPWSTR *rgsczDetectCodes; @@ -155,8 +155,8 @@ typedef struct _BURN_REGISTRATION BOOL fForwardCompatibleBundleExists; // Only valid after detect. BOOL fEligibleForCleanup; // Only valid after detect. - BOOL fDetectedForeignProviderKeyBundleId; - LPWSTR sczDetectedProviderKeyBundleId; + BOOL fDetectedForeignProviderKeyBundleCode; + LPWSTR sczDetectedProviderKeyBundleCode; LPWSTR sczBundlePackageAncestors; } BURN_REGISTRATION; diff --git a/src/burn/engine/relatedbundle.cpp b/src/burn/engine/relatedbundle.cpp index 23e0f3528..938b24d73 100644 --- a/src/burn/engine/relatedbundle.cpp +++ b/src/burn/engine/relatedbundle.cpp @@ -30,8 +30,8 @@ static HRESULT LoadIfRelatedBundle( __in BURN_RELATED_BUNDLES* pRelatedBundles ); static HRESULT LoadRelatedBundleFromKey( - __in_z LPCWSTR wzRelatedBundleId, - __in HKEY hkBundleId, + __in_z LPCWSTR wzRelatedBundleCode, + __in HKEY hkBundleCode, __in BOOL fPerMachine, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in BURN_RELATED_BUNDLE *pRelatedBundle @@ -108,7 +108,7 @@ extern "C" HRESULT RelatedBundleFindById( HRESULT hr = S_OK; BURN_RELATED_BUNDLE* pRelatedBundle = NULL; BURN_PACKAGE* pPackage = NULL; - + *ppRelatedBundle = NULL; for (DWORD i = 0; i < pRelatedBundles->cRelatedBundles; ++i) @@ -180,7 +180,7 @@ static __callback int __cdecl CompareRelatedBundlesDetect( const BURN_RELATED_BUNDLE* pBundleLeft = static_cast(pvLeft); const BURN_RELATED_BUNDLE* pBundleRight = static_cast(pvRight); - // Sort by relation type, then version, then bundle id. + // Sort by relation type, then version, then bundle code. if (pBundleLeft->detectRelationType != pBundleRight->detectRelationType) { // Upgrade bundles last, everything else according to the enum. @@ -223,7 +223,7 @@ static __callback int __cdecl CompareRelatedBundlesPlan( const BURN_RELATED_BUNDLE* pBundleLeft = *reinterpret_cast(const_cast(pvLeft)); const BURN_RELATED_BUNDLE* pBundleRight = *reinterpret_cast(const_cast(pvRight)); - // Sort by relation type, then version, then bundle id. + // Sort by relation type, then version, then bundle code. if (pBundleLeft->planRelationType != pBundleRight->planRelationType) { // Upgrade bundles last, everything else according to the enum. @@ -266,7 +266,7 @@ static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback( BUNDLE_QUERY_CONTEXT* pContext = reinterpret_cast(pvContext); hr = LoadIfRelatedBundle(pBundle, pContext->pRegistration, pContext->pRelatedBundles); - ExitOnFailure(hr, "Failed to load related bundle: %ls", pBundle->wzBundleId); + ExitOnFailure(hr, "Failed to load related bundle: %ls", pBundle->wzBundleCode); LExit: return result; @@ -283,8 +283,8 @@ static HRESULT LoadIfRelatedBundle( BOOTSTRAPPER_RELATION_TYPE relationType = RelatedBundleConvertRelationType(pBundle->relationType); BURN_RELATED_BUNDLE* pRelatedBundle = NULL; - // If we found our bundle id, it's not a related bundle. - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pBundle->wzBundleId, -1, pRegistration->sczId, -1)) + // If we found our bundle code, it's not a related bundle. + if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pBundle->wzBundleCode, -1, pRegistration->sczCode, -1)) { ExitFunction1(hr = S_FALSE); } @@ -294,8 +294,8 @@ static HRESULT LoadIfRelatedBundle( pRelatedBundle = pRelatedBundles->rgRelatedBundles + pRelatedBundles->cRelatedBundles; - hr = LoadRelatedBundleFromKey(pBundle->wzBundleId, pBundle->hkBundle, fPerMachine, relationType, pRelatedBundle); - ExitOnFailure(hr, "Failed to initialize package from related bundle id: %ls", pBundle->wzBundleId); + hr = LoadRelatedBundleFromKey(pBundle->wzBundleCode, pBundle->hkBundle, fPerMachine, relationType, pRelatedBundle); + ExitOnFailure(hr, "Failed to initialize package from related bundle code: %ls", pBundle->wzBundleCode); hr = DependencyDetectRelatedBundle(pRelatedBundle, pRegistration); ExitOnFailure(hr, "Failed to detect dependencies for related bundle."); @@ -307,8 +307,8 @@ static HRESULT LoadIfRelatedBundle( } static HRESULT LoadRelatedBundleFromKey( - __in_z LPCWSTR wzRelatedBundleId, - __in HKEY hkBundleId, + __in_z LPCWSTR wzRelatedBundleCode, + __in HKEY hkBundleCode, __in BOOL fPerMachine, __in BOOTSTRAPPER_RELATION_TYPE relationType, __in BURN_RELATED_BUNDLE* pRelatedBundle @@ -327,7 +327,7 @@ static HRESULT LoadRelatedBundleFromKey( BURN_DEPENDENCY_PROVIDER* pBundleDependencyProvider = NULL; // Only support progress from engines that are compatible. - hr = RegReadNumber(hkBundleId, BURN_REGISTRATION_REGISTRY_ENGINE_PROTOCOL_VERSION, &dwEngineProtocolVersion); + hr = RegReadNumber(hkBundleCode, BURN_REGISTRATION_REGISTRY_ENGINE_PROTOCOL_VERSION, &dwEngineProtocolVersion); if (SUCCEEDED(hr)) { fSupportsBurnProtocol = BURN_PROTOCOL_VERSION == dwEngineProtocolVersion; @@ -335,7 +335,7 @@ static HRESULT LoadRelatedBundleFromKey( else { // Rely on version checking (aka: version greater than or equal to last protocol breaking change *and* versions that are older or the same as this engine) - hr = RegReadVersion(hkBundleId, BURN_REGISTRATION_REGISTRY_ENGINE_VERSION, &qwEngineVersion); + hr = RegReadVersion(hkBundleCode, BURN_REGISTRATION_REGISTRY_ENGINE_VERSION, &qwEngineVersion); if (SUCCEEDED(hr)) { fSupportsBurnProtocol = (FILEMAKEVERSION(3, 6, 2221, 0) <= qwEngineVersion && qwEngineVersion <= FILEMAKEVERSION(rmj, rmm, rup, rpr)); @@ -344,19 +344,19 @@ static HRESULT LoadRelatedBundleFromKey( hr = S_OK; } - hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, &sczBundleVersion); - ExitOnFailure(hr, "Failed to read version from registry for bundle: %ls", wzRelatedBundleId); + hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, &sczBundleVersion); + ExitOnFailure(hr, "Failed to read version from registry for bundle: %ls", wzRelatedBundleCode); hr = VerParseVersion(sczBundleVersion, 0, FALSE, &pRelatedBundle->pVersion); ExitOnFailure(hr, "Failed to parse pseudo bundle version: %ls", sczBundleVersion); if (pRelatedBundle->pVersion->fInvalid) { - LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, wzRelatedBundleId, sczBundleVersion); + LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, wzRelatedBundleCode, sczBundleVersion); } - hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH, &sczCachePath); - ExitOnFailure(hr, "Failed to read cache path from registry for bundle: %ls", wzRelatedBundleId); + hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH, &sczCachePath); + ExitOnFailure(hr, "Failed to read cache path from registry for bundle: %ls", wzRelatedBundleCode); if (FileExistsEx(sczCachePath, NULL)) { @@ -364,13 +364,13 @@ static HRESULT LoadRelatedBundleFromKey( } else { - LogId(REPORT_STANDARD, MSG_DETECT_RELATED_BUNDLE_NOT_CACHED, wzRelatedBundleId, sczCachePath); + LogId(REPORT_STANDARD, MSG_DETECT_RELATED_BUNDLE_NOT_CACHED, wzRelatedBundleCode, sczCachePath); } pRelatedBundle->fPlannable = fCached; - hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY, &dependencyProvider.sczKey); - ExitOnPathFailure(hr, fExists, "Failed to read provider key from registry for bundle: %ls", wzRelatedBundleId); + hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY, &dependencyProvider.sczKey); + ExitOnPathFailure(hr, fExists, "Failed to read provider key from registry for bundle: %ls", wzRelatedBundleCode); if (dependencyProvider.sczKey && *dependencyProvider.sczKey) { @@ -379,23 +379,23 @@ static HRESULT LoadRelatedBundleFromKey( dependencyProvider.fImported = TRUE; hr = StrAllocString(&dependencyProvider.sczVersion, pRelatedBundle->pVersion->sczVersion, 0); - ExitOnFailure(hr, "Failed to copy version for bundle: %ls", wzRelatedBundleId); + ExitOnFailure(hr, "Failed to copy version for bundle: %ls", wzRelatedBundleCode); - hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME, &dependencyProvider.sczDisplayName); - ExitOnPathFailure(hr, fExists, "Failed to copy display name for bundle: %ls", wzRelatedBundleId); + hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME, &dependencyProvider.sczDisplayName); + ExitOnPathFailure(hr, fExists, "Failed to copy display name for bundle: %ls", wzRelatedBundleCode); } - hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_TAG, &pRelatedBundle->sczTag); - ExitOnPathFailure(hr, fExists, "Failed to read tag from registry for bundle: %ls", wzRelatedBundleId); + hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_TAG, &pRelatedBundle->sczTag); + ExitOnPathFailure(hr, fExists, "Failed to read tag from registry for bundle: %ls", wzRelatedBundleCode); pRelatedBundle->detectRelationType = relationType; - hr = PseudoBundleInitializeRelated(&pRelatedBundle->package, fSupportsBurnProtocol, fPerMachine, wzRelatedBundleId, + hr = PseudoBundleInitializeRelated(&pRelatedBundle->package, fSupportsBurnProtocol, fPerMachine, wzRelatedBundleCode, #ifdef DEBUG pRelatedBundle->detectRelationType, #endif fCached, sczCachePath, qwFileSize, pBundleDependencyProvider); - ExitOnFailure(hr, "Failed to initialize related bundle to represent bundle: %ls", wzRelatedBundleId); + ExitOnFailure(hr, "Failed to initialize related bundle to represent bundle: %ls", wzRelatedBundleCode); LExit: DependencyUninitializeProvider(&dependencyProvider); diff --git a/src/burn/engine/section.cpp b/src/burn/engine/section.cpp index fd3ce92cc..f7c508f3e 100644 --- a/src/burn/engine/section.cpp +++ b/src/burn/engine/section.cpp @@ -9,7 +9,7 @@ typedef struct _BURN_SECTION_HEADER DWORD dwMagic; DWORD dwVersion; - GUID guidBundleId; + GUID guidBundleCode; DWORD dwStubSize; DWORD dwOriginalChecksum; @@ -235,7 +235,7 @@ extern "C" HRESULT SectionInitialize( memcpy(pSection->rgcbContainers, pBurnSectionHeader->rgcbContainers, sizeof(DWORD) * pSection->cContainers); // TODO: verify more than just the GUID. - hr = VerifySectionMatchesMemoryPEHeader(pBurnSectionHeader->guidBundleId); + hr = VerifySectionMatchesMemoryPEHeader(pBurnSectionHeader->guidBundleCode); ExitOnRootFailure(hr, "PE Header from file didn't match PE Header in memory."); LExit: @@ -299,7 +299,7 @@ extern "C" HRESULT SectionGetAttachedContainerInfo( } HRESULT VerifySectionMatchesMemoryPEHeader( - __in REFGUID pBundleId + __in REFGUID pBundleCode ) { HRESULT hr = S_OK; @@ -382,7 +382,7 @@ HRESULT VerifySectionMatchesMemoryPEHeader( ExitOnRootFailure(hr, "Failed to read section info, unsupported version: %08x", pBurnSectionHeader->dwVersion); } - if (!::IsEqualGUID(pBundleId, pBurnSectionHeader->guidBundleId)) + if (!::IsEqualGUID(pBundleCode, pBurnSectionHeader->guidBundleCode)) { hr = E_INVALIDDATA; ExitOnRootFailure(hr, "Bundle guid didn't match the guid in the PE Header in memory."); diff --git a/src/burn/stub/StubSection.cpp b/src/burn/stub/StubSection.cpp index 62d3e91ed..fc3ed1823 100644 --- a/src/burn/stub/StubSection.cpp +++ b/src/burn/stub/StubSection.cpp @@ -8,7 +8,7 @@ static DWORD dwMagic = BURN_SECTION_MAGIC; static DWORD dwVersion = BURN_SECTION_VERSION; -static GUID guidBundleId = { }; +static GUID guidBundleCode = { }; static DWORD dwStubSize = 0; static DWORD dwOriginalChecksum = 0; diff --git a/src/burn/test/BurnUnitTest/ManifestTest.cpp b/src/burn/test/BurnUnitTest/ManifestTest.cpp index 874844727..4959cee07 100644 --- a/src/burn/test/BurnUnitTest/ManifestTest.cpp +++ b/src/burn/test/BurnUnitTest/ManifestTest.cpp @@ -40,7 +40,7 @@ namespace Bootstrapper " " " " " " - " " + " " "