From 523c66a62a619e6aa9f30070173ea33edfb5e328 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 29 Dec 2024 18:01:20 -0800 Subject: 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 +- src/api/burn/balutil/BalBootstrapperEngine.cpp | 8 +-- src/api/burn/balutil/balutil.cpp | 10 +-- .../burn/balutil/inc/BootstrapperApplicationBase.h | 14 ++-- .../burn/balutil/inc/IBootstrapperApplication.h | 14 ++-- src/api/burn/balutil/inc/IBootstrapperEngine.h | 2 +- src/api/burn/balutil/inc/balutil.h | 4 +- src/api/burn/balutil/msg.cpp | 78 +++++++++++----------- .../bextutil/BextBootstrapperExtensionEngine.cpp | 4 +- .../bextutil/inc/IBootstrapperExtensionEngine.h | 2 +- src/api/burn/inc/BootstrapperApplicationTypes.h | 14 ++-- src/api/burn/inc/BootstrapperEngineTypes.h | 2 +- .../burn/inc/BootstrapperExtensionEngineTypes.h | 2 +- .../Symbols/WixBundleBundlePackageSymbol.cs | 17 +++-- .../WixBundleHarvestedBundlePackageSymbol.cs | 17 +++-- .../Symbols/WixBundlePackageRelatedBundleSymbol.cs | 19 ++++-- .../wix/WixToolset.Data/Symbols/WixBundleSymbol.cs | 17 +++-- .../Symbols/WixRelatedBundleSymbol.cs | 21 ++++-- 24 files changed, 205 insertions(+), 136 deletions(-) (limited to 'src/api') diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs index 25257554..b4497d07 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs @@ -38,7 +38,7 @@ namespace WixToolset.BootstrapperApplicationApi [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 f9fca748..515a68b4 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplication.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplication.cs @@ -1449,9 +1449,9 @@ namespace WixToolset.BootstrapperApplicationApi 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 @@ namespace WixToolset.BootstrapperApplicationApi 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 @@ namespace WixToolset.BootstrapperApplicationApi 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 @@ namespace WixToolset.BootstrapperApplicationApi 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 @@ namespace WixToolset.BootstrapperApplicationApi 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 487858e0..44d77359 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs @@ -209,12 +209,12 @@ namespace WixToolset.BootstrapperApplicationApi } /// - 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 e1649d43..4df07e57 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/EventArgs.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/EventArgs.cs @@ -325,10 +325,10 @@ namespace WixToolset.BootstrapperApplicationApi /// 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 @@ namespace WixToolset.BootstrapperApplicationApi /// /// 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 @@ namespace WixToolset.BootstrapperApplicationApi /// 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 @@ namespace WixToolset.BootstrapperApplicationApi /// /// 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 @@ namespace WixToolset.BootstrapperApplicationApi /// 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 @@ namespace WixToolset.BootstrapperApplicationApi /// /// 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 @@ namespace WixToolset.BootstrapperApplicationApi /// 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 @@ namespace WixToolset.BootstrapperApplicationApi /// /// 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 @@ namespace WixToolset.BootstrapperApplicationApi /// 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 @@ namespace WixToolset.BootstrapperApplicationApi /// /// 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 ad7f8dd7..c2b43c15 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplication.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplication.cs @@ -80,7 +80,7 @@ namespace WixToolset.BootstrapperApplicationApi [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 @@ namespace WixToolset.BootstrapperApplicationApi [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 @@ namespace WixToolset.BootstrapperApplicationApi [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 @@ namespace WixToolset.BootstrapperApplicationApi [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 @@ namespace WixToolset.BootstrapperApplicationApi [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 @@ namespace WixToolset.BootstrapperApplicationApi [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 @@ namespace WixToolset.BootstrapperApplicationApi [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 1e91cd31..c7b0c003 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs @@ -236,7 +236,7 @@ namespace WixToolset.BootstrapperApplicationApi /// [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 8e6a293b..bd78409b 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs @@ -107,9 +107,9 @@ namespace WixToolset.BootstrapperApplicationApi /// /// 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 28608cb9..61e7e31b 100644 --- a/src/api/burn/balutil/BalBootstrapperEngine.cpp +++ b/src/api/burn/balutil/BalBootstrapperEngine.cpp @@ -319,7 +319,7 @@ 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 @@ 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 @@ 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 716f82d3..3cca38a4 100644 --- a/src/api/burn/balutil/balutil.cpp +++ b/src/api/burn/balutil/balutil.cpp @@ -551,7 +551,7 @@ LExit: } 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 @@ LExit: 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 a3a3643f..80bfd361 100644 --- a/src/api/burn/balutil/inc/BootstrapperApplicationBase.h +++ b/src/api/burn/balutil/inc/BootstrapperApplicationBase.h @@ -129,7 +129,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 a08f6863..a3b24bc3 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 02094aa5..57fc9be9 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 03575883..4c8550ee 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 690108a5..b728cc83 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 a5e40c8e..f9e1802a 100644 --- a/src/api/burn/bextutil/BextBootstrapperExtensionEngine.cpp +++ b/src/api/burn/bextutil/BextBootstrapperExtensionEngine.cpp @@ -307,7 +307,7 @@ 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 @@ 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 a78868f2..31fe9ef8 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 c7eaa3d3..2ece1b7b 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 e2634383..f89238c0 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 24c304c6..66dabe88 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 8d930580..2313e0a8 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs @@ -11,7 +11,7 @@ namespace WixToolset.Data 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 @@ namespace WixToolset.Data.Symbols 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 9f205ce6..8c969e77 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs @@ -11,7 +11,7 @@ namespace WixToolset.Data 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 @@ namespace WixToolset.Data.Symbols 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 31f4f713..c4586601 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageRelatedBundleSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageRelatedBundleSymbol.cs @@ -11,7 +11,7 @@ namespace WixToolset.Data 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 @@ namespace WixToolset.Data namespace WixToolset.Data.Symbols { + using System; + public enum WixBundlePackageRelatedBundleSymbolFields { PackagePayloadRef, - BundleId, + BundleCode, + [Obsolete("Use BundleCode instead.")] + BundleId = BundleCode, Action, } @@ -45,10 +49,17 @@ namespace WixToolset.Data.Symbols 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 ffeb5f3b..f16cdbb8 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs @@ -30,7 +30,7 @@ namespace WixToolset.Data 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 @@ namespace WixToolset.Data.Symbols Tag, Platform, ParentName, - BundleId, + BundleCode, + [Obsolete("Use BundleCode instead.")] + BundleId = BundleCode, ProviderKey, InProgressName, DisableModify, @@ -218,10 +220,17 @@ namespace WixToolset.Data.Symbols 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 dc544e29..02db0da4 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixRelatedBundleSymbol.cs @@ -10,7 +10,7 @@ namespace WixToolset.Data 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 @@ namespace WixToolset.Data namespace WixToolset.Data.Symbols { + using System; + public enum WixRelatedBundleSymbolFields { - BundleId, + BundleCode, + [Obsolete("Use BundleCode instead.")] + BundleId = BundleCode, Action, } @@ -45,10 +49,17 @@ namespace WixToolset.Data.Symbols 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 @@ namespace WixToolset.Data.Symbols set => this.Set((int)WixRelatedBundleSymbolFields.Action, (int)value); } } -} \ No newline at end of file +} -- cgit v1.2.3-55-g6feb