summaryrefslogtreecommitdiff
path: root/src/burn/engine
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2024-12-29 18:01:20 -0800
committerRob Mensching <rob@firegiant.com>2024-12-30 06:45:49 -0800
commit523c66a62a619e6aa9f30070173ea33edfb5e328 (patch)
tree04fa3146250b7eeaa6864b0f71e37905a2d77be1 /src/burn/engine
parent6edc5d1e2a289eac50c6d59a29e195353bb023cb (diff)
downloadwix-523c66a62a619e6aa9f30070173ea33edfb5e328.tar.gz
wix-523c66a62a619e6aa9f30070173ea33edfb5e328.tar.bz2
wix-523c66a62a619e6aa9f30070173ea33edfb5e328.zip
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".
Diffstat (limited to 'src/burn/engine')
-rw-r--r--src/burn/engine/EngineForExtension.cpp2
-rw-r--r--src/burn/engine/apply.cpp4
-rw-r--r--src/burn/engine/bacallback.cpp56
-rw-r--r--src/burn/engine/bacallback.h14
-rw-r--r--src/burn/engine/baengine.cpp12
-rw-r--r--src/burn/engine/bundlepackageengine.cpp46
-rw-r--r--src/burn/engine/cache.cpp18
-rw-r--r--src/burn/engine/cache.h4
-rw-r--r--src/burn/engine/core.cpp10
-rw-r--r--src/burn/engine/dependency.cpp38
-rw-r--r--src/burn/engine/dependency.h4
-rw-r--r--src/burn/engine/detect.cpp24
-rw-r--r--src/burn/engine/detect.h2
-rw-r--r--src/burn/engine/elevation.cpp24
-rw-r--r--src/burn/engine/elevation.h4
-rw-r--r--src/burn/engine/externalengine.cpp4
-rw-r--r--src/burn/engine/externalengine.h2
-rw-r--r--src/burn/engine/package.h2
-rw-r--r--src/burn/engine/plan.cpp24
-rw-r--r--src/burn/engine/plan.h4
-rw-r--r--src/burn/engine/registration.cpp22
-rw-r--r--src/burn/engine/registration.h6
-rw-r--r--src/burn/engine/relatedbundle.cpp58
-rw-r--r--src/burn/engine/section.cpp8
24 files changed, 196 insertions, 196 deletions
diff --git a/src/burn/engine/EngineForExtension.cpp b/src/burn/engine/EngineForExtension.cpp
index e19cb802..3f7db0d4 100644
--- a/src/burn/engine/EngineForExtension.cpp
+++ b/src/burn/engine/EngineForExtension.cpp
@@ -213,7 +213,7 @@ static HRESULT BEEngineGetRelatedBundleVariable(
213 ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS, pArgs); 213 ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS, pArgs);
214 ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS, pResults); 214 ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS, pResults);
215 215
216 hr = ExternalEngineGetRelatedBundleVariable(pContext->pEngineState, pArgs->wzBundleId, pArgs->wzVariable, pResults->wzValue, &pResults->cchValue); 216 hr = ExternalEngineGetRelatedBundleVariable(pContext->pEngineState, pArgs->wzBundleCode, pArgs->wzVariable, pResults->wzValue, &pResults->cchValue);
217 217
218LExit: 218LExit:
219 return hr; 219 return hr;
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp
index 0f65b0ad..e4e76a6c 100644
--- a/src/burn/engine/apply.cpp
+++ b/src/burn/engine/apply.cpp
@@ -452,7 +452,7 @@ extern "C" HRESULT ApplyRegister(
452 452
453 if (pEngineState->registration.fPerMachine) 453 if (pEngineState->registration.fPerMachine)
454 { 454 {
455 hr = ElevationSessionBegin(pEngineState->companionConnection.hPipe, sczEngineWorkingPath, pEngineState->registration.sczResumeCommandLine, pEngineState->registration.fDisableResume, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->registration.fDetectedForeignProviderKeyBundleId, qwEstimatedSize, registrationType); 455 hr = ElevationSessionBegin(pEngineState->companionConnection.hPipe, sczEngineWorkingPath, pEngineState->registration.sczResumeCommandLine, pEngineState->registration.fDisableResume, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->registration.fDetectedForeignProviderKeyBundleCode, qwEstimatedSize, registrationType);
456 ExitOnFailure(hr, "Failed to begin registration session in per-machine process."); 456 ExitOnFailure(hr, "Failed to begin registration session in per-machine process.");
457 } 457 }
458 else 458 else
@@ -548,7 +548,7 @@ extern "C" HRESULT ApplyUnregister(
548 548
549 if (pEngineState->registration.fPerMachine) 549 if (pEngineState->registration.fPerMachine)
550 { 550 {
551 hr = ElevationSessionEnd(pEngineState->companionConnection.hPipe, resumeMode, restart, pEngineState->registration.fDetectedForeignProviderKeyBundleId, qwEstimatedSize, registrationType); 551 hr = ElevationSessionEnd(pEngineState->companionConnection.hPipe, resumeMode, restart, pEngineState->registration.fDetectedForeignProviderKeyBundleCode, qwEstimatedSize, registrationType);
552 ExitOnFailure(hr, "Failed to end session in per-machine process."); 552 ExitOnFailure(hr, "Failed to end session in per-machine process.");
553 } 553 }
554 else 554 else
diff --git a/src/burn/engine/bacallback.cpp b/src/burn/engine/bacallback.cpp
index f4e6894d..72ca27ea 100644
--- a/src/burn/engine/bacallback.cpp
+++ b/src/burn/engine/bacallback.cpp
@@ -2120,7 +2120,7 @@ LExit:
2120 2120
2121EXTERN_C HRESULT BACallbackOnDetectForwardCompatibleBundle( 2121EXTERN_C HRESULT BACallbackOnDetectForwardCompatibleBundle(
2122 __in BURN_USER_EXPERIENCE* pUserExperience, 2122 __in BURN_USER_EXPERIENCE* pUserExperience,
2123 __in_z LPCWSTR wzBundleId, 2123 __in_z LPCWSTR wzBundleCode,
2124 __in BOOTSTRAPPER_RELATION_TYPE relationType, 2124 __in BOOTSTRAPPER_RELATION_TYPE relationType,
2125 __in_z LPCWSTR wzBundleTag, 2125 __in_z LPCWSTR wzBundleTag,
2126 __in BOOL fPerMachine, 2126 __in BOOL fPerMachine,
@@ -2138,7 +2138,7 @@ EXTERN_C HRESULT BACallbackOnDetectForwardCompatibleBundle(
2138 2138
2139 // Init structs. 2139 // Init structs.
2140 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; 2140 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION;
2141 args.wzBundleId = wzBundleId; 2141 args.wzBundleCode = wzBundleCode;
2142 args.relationType = relationType; 2142 args.relationType = relationType;
2143 args.wzBundleTag = wzBundleTag; 2143 args.wzBundleTag = wzBundleTag;
2144 args.fPerMachine = fPerMachine; 2144 args.fPerMachine = fPerMachine;
@@ -2151,8 +2151,8 @@ EXTERN_C HRESULT BACallbackOnDetectForwardCompatibleBundle(
2151 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); 2151 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion);
2152 ExitOnFailure(hr, "Failed to write API version of OnDetectForwardCompatibleBundle args."); 2152 ExitOnFailure(hr, "Failed to write API version of OnDetectForwardCompatibleBundle args.");
2153 2153
2154 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); 2154 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode);
2155 ExitOnFailure(hr, "Failed to write bundle id of OnDetectForwardCompatibleBundle args."); 2155 ExitOnFailure(hr, "Failed to write bundle code of OnDetectForwardCompatibleBundle args.");
2156 2156
2157 hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType); 2157 hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType);
2158 ExitOnFailure(hr, "Failed to write relation type of OnDetectForwardCompatibleBundle args."); 2158 ExitOnFailure(hr, "Failed to write relation type of OnDetectForwardCompatibleBundle args.");
@@ -2393,7 +2393,7 @@ LExit:
2393 2393
2394EXTERN_C HRESULT BACallbackOnDetectRelatedBundle( 2394EXTERN_C HRESULT BACallbackOnDetectRelatedBundle(
2395 __in BURN_USER_EXPERIENCE* pUserExperience, 2395 __in BURN_USER_EXPERIENCE* pUserExperience,
2396 __in_z LPCWSTR wzBundleId, 2396 __in_z LPCWSTR wzBundleCode,
2397 __in BOOTSTRAPPER_RELATION_TYPE relationType, 2397 __in BOOTSTRAPPER_RELATION_TYPE relationType,
2398 __in_z LPCWSTR wzBundleTag, 2398 __in_z LPCWSTR wzBundleTag,
2399 __in BOOL fPerMachine, 2399 __in BOOL fPerMachine,
@@ -2411,7 +2411,7 @@ EXTERN_C HRESULT BACallbackOnDetectRelatedBundle(
2411 2411
2412 // Init structs. 2412 // Init structs.
2413 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; 2413 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION;
2414 args.wzBundleId = wzBundleId; 2414 args.wzBundleCode = wzBundleCode;
2415 args.relationType = relationType; 2415 args.relationType = relationType;
2416 args.wzBundleTag = wzBundleTag; 2416 args.wzBundleTag = wzBundleTag;
2417 args.fPerMachine = fPerMachine; 2417 args.fPerMachine = fPerMachine;
@@ -2424,8 +2424,8 @@ EXTERN_C HRESULT BACallbackOnDetectRelatedBundle(
2424 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); 2424 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion);
2425 ExitOnFailure(hr, "Failed to write API version of OnDetectRelatedBundle args."); 2425 ExitOnFailure(hr, "Failed to write API version of OnDetectRelatedBundle args.");
2426 2426
2427 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); 2427 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode);
2428 ExitOnFailure(hr, "Failed to write bundle id of OnDetectRelatedBundle args."); 2428 ExitOnFailure(hr, "Failed to write bundle code of OnDetectRelatedBundle args.");
2429 2429
2430 hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType); 2430 hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType);
2431 ExitOnFailure(hr, "Failed to write relation type of OnDetectRelatedBundle args."); 2431 ExitOnFailure(hr, "Failed to write relation type of OnDetectRelatedBundle args.");
@@ -2478,7 +2478,7 @@ LExit:
2478EXTERN_C HRESULT BACallbackOnDetectRelatedBundlePackage( 2478EXTERN_C HRESULT BACallbackOnDetectRelatedBundlePackage(
2479 __in BURN_USER_EXPERIENCE* pUserExperience, 2479 __in BURN_USER_EXPERIENCE* pUserExperience,
2480 __in_z LPCWSTR wzPackageId, 2480 __in_z LPCWSTR wzPackageId,
2481 __in_z LPCWSTR wzBundleId, 2481 __in_z LPCWSTR wzBundleCode,
2482 __in BOOTSTRAPPER_RELATION_TYPE relationType, 2482 __in BOOTSTRAPPER_RELATION_TYPE relationType,
2483 __in BOOL fPerMachine, 2483 __in BOOL fPerMachine,
2484 __in VERUTIL_VERSION* pVersion 2484 __in VERUTIL_VERSION* pVersion
@@ -2495,7 +2495,7 @@ EXTERN_C HRESULT BACallbackOnDetectRelatedBundlePackage(
2495 // Init structs. 2495 // Init structs.
2496 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; 2496 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION;
2497 args.wzPackageId = wzPackageId; 2497 args.wzPackageId = wzPackageId;
2498 args.wzBundleId = wzBundleId; 2498 args.wzBundleCode = wzBundleCode;
2499 args.relationType = relationType; 2499 args.relationType = relationType;
2500 args.fPerMachine = fPerMachine; 2500 args.fPerMachine = fPerMachine;
2501 args.wzVersion = pVersion->sczVersion; 2501 args.wzVersion = pVersion->sczVersion;
@@ -2509,8 +2509,8 @@ EXTERN_C HRESULT BACallbackOnDetectRelatedBundlePackage(
2509 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzPackageId); 2509 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzPackageId);
2510 ExitOnFailure(hr, "Failed to write package id of OnDetectRelatedBundlePackage args."); 2510 ExitOnFailure(hr, "Failed to write package id of OnDetectRelatedBundlePackage args.");
2511 2511
2512 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); 2512 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode);
2513 ExitOnFailure(hr, "Failed to write bundle id of OnDetectRelatedBundlePackage args."); 2513 ExitOnFailure(hr, "Failed to write bundle code of OnDetectRelatedBundlePackage args.");
2514 2514
2515 hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType); 2515 hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType);
2516 ExitOnFailure(hr, "Failed to write relation type of OnDetectRelatedBundlePackage args."); 2516 ExitOnFailure(hr, "Failed to write relation type of OnDetectRelatedBundlePackage args.");
@@ -4315,7 +4315,7 @@ LExit:
4315 4315
4316EXTERN_C HRESULT BACallbackOnPlanForwardCompatibleBundle( 4316EXTERN_C HRESULT BACallbackOnPlanForwardCompatibleBundle(
4317 __in BURN_USER_EXPERIENCE* pUserExperience, 4317 __in BURN_USER_EXPERIENCE* pUserExperience,
4318 __in_z LPCWSTR wzBundleId, 4318 __in_z LPCWSTR wzBundleCode,
4319 __in BOOTSTRAPPER_RELATION_TYPE relationType, 4319 __in BOOTSTRAPPER_RELATION_TYPE relationType,
4320 __in_z LPCWSTR wzBundleTag, 4320 __in_z LPCWSTR wzBundleTag,
4321 __in BOOL fPerMachine, 4321 __in BOOL fPerMachine,
@@ -4333,7 +4333,7 @@ EXTERN_C HRESULT BACallbackOnPlanForwardCompatibleBundle(
4333 4333
4334 // Init structs. 4334 // Init structs.
4335 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; 4335 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION;
4336 args.wzBundleId = wzBundleId; 4336 args.wzBundleCode = wzBundleCode;
4337 args.relationType = relationType; 4337 args.relationType = relationType;
4338 args.wzBundleTag = wzBundleTag; 4338 args.wzBundleTag = wzBundleTag;
4339 args.fPerMachine = fPerMachine; 4339 args.fPerMachine = fPerMachine;
@@ -4347,8 +4347,8 @@ EXTERN_C HRESULT BACallbackOnPlanForwardCompatibleBundle(
4347 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); 4347 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion);
4348 ExitOnFailure(hr, "Failed to write API version of OnPlanForwardCompatibleBundle args."); 4348 ExitOnFailure(hr, "Failed to write API version of OnPlanForwardCompatibleBundle args.");
4349 4349
4350 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); 4350 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode);
4351 ExitOnFailure(hr, "Failed to write bundle id of OnPlanForwardCompatibleBundle args."); 4351 ExitOnFailure(hr, "Failed to write bundle code of OnPlanForwardCompatibleBundle args.");
4352 4352
4353 hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType); 4353 hr = BuffWriteNumberToBuffer(&bufferArgs, args.relationType);
4354 ExitOnFailure(hr, "Failed to write relation type of OnPlanForwardCompatibleBundle args."); 4354 ExitOnFailure(hr, "Failed to write relation type of OnPlanForwardCompatibleBundle args.");
@@ -4806,7 +4806,7 @@ LExit:
4806 4806
4807EXTERN_C HRESULT BACallbackOnPlanRelatedBundle( 4807EXTERN_C HRESULT BACallbackOnPlanRelatedBundle(
4808 __in BURN_USER_EXPERIENCE* pUserExperience, 4808 __in BURN_USER_EXPERIENCE* pUserExperience,
4809 __in_z LPCWSTR wzBundleId, 4809 __in_z LPCWSTR wzBundleCode,
4810 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState 4810 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState
4811 ) 4811 )
4812{ 4812{
@@ -4820,7 +4820,7 @@ EXTERN_C HRESULT BACallbackOnPlanRelatedBundle(
4820 4820
4821 // Init structs. 4821 // Init structs.
4822 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; 4822 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION;
4823 args.wzBundleId = wzBundleId; 4823 args.wzBundleCode = wzBundleCode;
4824 args.recommendedState = *pRequestedState; 4824 args.recommendedState = *pRequestedState;
4825 4825
4826 results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; 4826 results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION;
@@ -4830,8 +4830,8 @@ EXTERN_C HRESULT BACallbackOnPlanRelatedBundle(
4830 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); 4830 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion);
4831 ExitOnFailure(hr, "Failed to write API version of OnPlanRelatedBundle args."); 4831 ExitOnFailure(hr, "Failed to write API version of OnPlanRelatedBundle args.");
4832 4832
4833 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); 4833 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode);
4834 ExitOnFailure(hr, "Failed to write bundle id of OnPlanRelatedBundle args."); 4834 ExitOnFailure(hr, "Failed to write bundle code of OnPlanRelatedBundle args.");
4835 4835
4836 hr = BuffWriteNumberToBuffer(&bufferArgs, args.recommendedState); 4836 hr = BuffWriteNumberToBuffer(&bufferArgs, args.recommendedState);
4837 ExitOnFailure(hr, "Failed to write recommended state of OnPlanRelatedBundle args."); 4837 ExitOnFailure(hr, "Failed to write recommended state of OnPlanRelatedBundle args.");
@@ -4879,7 +4879,7 @@ LExit:
4879 4879
4880EXTERN_C HRESULT BACallbackOnPlanRelatedBundleType( 4880EXTERN_C HRESULT BACallbackOnPlanRelatedBundleType(
4881 __in BURN_USER_EXPERIENCE* pUserExperience, 4881 __in BURN_USER_EXPERIENCE* pUserExperience,
4882 __in_z LPCWSTR wzBundleId, 4882 __in_z LPCWSTR wzBundleCode,
4883 __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType 4883 __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType
4884 ) 4884 )
4885{ 4885{
@@ -4893,7 +4893,7 @@ EXTERN_C HRESULT BACallbackOnPlanRelatedBundleType(
4893 4893
4894 // Init structs. 4894 // Init structs.
4895 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; 4895 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION;
4896 args.wzBundleId = wzBundleId; 4896 args.wzBundleCode = wzBundleCode;
4897 args.recommendedType = *pRequestedType; 4897 args.recommendedType = *pRequestedType;
4898 4898
4899 results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; 4899 results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION;
@@ -4903,8 +4903,8 @@ EXTERN_C HRESULT BACallbackOnPlanRelatedBundleType(
4903 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); 4903 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion);
4904 ExitOnFailure(hr, "Failed to write API version of OnPlanRelatedBundleType args."); 4904 ExitOnFailure(hr, "Failed to write API version of OnPlanRelatedBundleType args.");
4905 4905
4906 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); 4906 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode);
4907 ExitOnFailure(hr, "Failed to write bundle id of OnPlanRelatedBundleType args."); 4907 ExitOnFailure(hr, "Failed to write bundle code of OnPlanRelatedBundleType args.");
4908 4908
4909 hr = BuffWriteNumberToBuffer(&bufferArgs, args.recommendedType); 4909 hr = BuffWriteNumberToBuffer(&bufferArgs, args.recommendedType);
4910 ExitOnFailure(hr, "Failed to write recommended type of OnPlanRelatedBundleType args."); 4910 ExitOnFailure(hr, "Failed to write recommended type of OnPlanRelatedBundleType args.");
@@ -4952,7 +4952,7 @@ LExit:
4952 4952
4953EXTERN_C HRESULT BACallbackOnPlanRestoreRelatedBundle( 4953EXTERN_C HRESULT BACallbackOnPlanRestoreRelatedBundle(
4954 __in BURN_USER_EXPERIENCE* pUserExperience, 4954 __in BURN_USER_EXPERIENCE* pUserExperience,
4955 __in_z LPCWSTR wzBundleId, 4955 __in_z LPCWSTR wzBundleCode,
4956 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState 4956 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState
4957 ) 4957 )
4958{ 4958{
@@ -4966,7 +4966,7 @@ EXTERN_C HRESULT BACallbackOnPlanRestoreRelatedBundle(
4966 4966
4967 // Init structs. 4967 // Init structs.
4968 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; 4968 args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION;
4969 args.wzBundleId = wzBundleId; 4969 args.wzBundleCode = wzBundleCode;
4970 args.recommendedState = *pRequestedState; 4970 args.recommendedState = *pRequestedState;
4971 4971
4972 results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; 4972 results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION;
@@ -4976,8 +4976,8 @@ EXTERN_C HRESULT BACallbackOnPlanRestoreRelatedBundle(
4976 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); 4976 hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion);
4977 ExitOnFailure(hr, "Failed to write API version of OnPlanRestoreRelatedBundle args."); 4977 ExitOnFailure(hr, "Failed to write API version of OnPlanRestoreRelatedBundle args.");
4978 4978
4979 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleId); 4979 hr = BuffWriteStringToBuffer(&bufferArgs, args.wzBundleCode);
4980 ExitOnFailure(hr, "Failed to write bundle id of OnPlanRestoreRelatedBundle args."); 4980 ExitOnFailure(hr, "Failed to write bundle code of OnPlanRestoreRelatedBundle args.");
4981 4981
4982 hr = BuffWriteNumberToBuffer(&bufferArgs, args.recommendedState); 4982 hr = BuffWriteNumberToBuffer(&bufferArgs, args.recommendedState);
4983 ExitOnFailure(hr, "Failed to write recommended state of OnPlanRestoreRelatedBundle args."); 4983 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 8d1f41c4..cd363b6e 100644
--- a/src/burn/engine/bacallback.h
+++ b/src/burn/engine/bacallback.h
@@ -193,7 +193,7 @@ HRESULT BACallbackOnDetectComplete(
193 ); 193 );
194HRESULT BACallbackOnDetectForwardCompatibleBundle( 194HRESULT BACallbackOnDetectForwardCompatibleBundle(
195 __in BURN_USER_EXPERIENCE* pUserExperience, 195 __in BURN_USER_EXPERIENCE* pUserExperience,
196 __in_z LPCWSTR wzBundleId, 196 __in_z LPCWSTR wzBundleCode,
197 __in BOOTSTRAPPER_RELATION_TYPE relationType, 197 __in BOOTSTRAPPER_RELATION_TYPE relationType,
198 __in_z LPCWSTR wzBundleTag, 198 __in_z LPCWSTR wzBundleTag,
199 __in BOOL fPerMachine, 199 __in BOOL fPerMachine,
@@ -219,7 +219,7 @@ HRESULT BACallbackOnDetectPackageComplete(
219 ); 219 );
220HRESULT BACallbackOnDetectRelatedBundle( 220HRESULT BACallbackOnDetectRelatedBundle(
221 __in BURN_USER_EXPERIENCE* pUserExperience, 221 __in BURN_USER_EXPERIENCE* pUserExperience,
222 __in_z LPCWSTR wzBundleId, 222 __in_z LPCWSTR wzBundleCode,
223 __in BOOTSTRAPPER_RELATION_TYPE relationType, 223 __in BOOTSTRAPPER_RELATION_TYPE relationType,
224 __in_z LPCWSTR wzBundleTag, 224 __in_z LPCWSTR wzBundleTag,
225 __in BOOL fPerMachine, 225 __in BOOL fPerMachine,
@@ -229,7 +229,7 @@ HRESULT BACallbackOnDetectRelatedBundle(
229HRESULT BACallbackOnDetectRelatedBundlePackage( 229HRESULT BACallbackOnDetectRelatedBundlePackage(
230 __in BURN_USER_EXPERIENCE* pUserExperience, 230 __in BURN_USER_EXPERIENCE* pUserExperience,
231 __in_z LPCWSTR wzPackageId, 231 __in_z LPCWSTR wzPackageId,
232 __in_z LPCWSTR wzBundleId, 232 __in_z LPCWSTR wzBundleCode,
233 __in BOOTSTRAPPER_RELATION_TYPE relationType, 233 __in BOOTSTRAPPER_RELATION_TYPE relationType,
234 __in BOOL fPerMachine, 234 __in BOOL fPerMachine,
235 __in VERUTIL_VERSION* pVersion 235 __in VERUTIL_VERSION* pVersion
@@ -388,7 +388,7 @@ HRESULT BACallbackOnPlanComplete(
388 ); 388 );
389HRESULT BACallbackOnPlanForwardCompatibleBundle( 389HRESULT BACallbackOnPlanForwardCompatibleBundle(
390 __in BURN_USER_EXPERIENCE* pUserExperience, 390 __in BURN_USER_EXPERIENCE* pUserExperience,
391 __in_z LPCWSTR wzBundleId, 391 __in_z LPCWSTR wzBundleCode,
392 __in BOOTSTRAPPER_RELATION_TYPE relationType, 392 __in BOOTSTRAPPER_RELATION_TYPE relationType,
393 __in_z LPCWSTR wzBundleTag, 393 __in_z LPCWSTR wzBundleTag,
394 __in BOOL fPerMachine, 394 __in BOOL fPerMachine,
@@ -443,17 +443,17 @@ HRESULT BACallbackOnPlanPackageComplete(
443 ); 443 );
444HRESULT BACallbackOnPlanRelatedBundle( 444HRESULT BACallbackOnPlanRelatedBundle(
445 __in BURN_USER_EXPERIENCE* pUserExperience, 445 __in BURN_USER_EXPERIENCE* pUserExperience,
446 __in_z LPCWSTR wzBundleId, 446 __in_z LPCWSTR wzBundleCode,
447 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState 447 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState
448 ); 448 );
449HRESULT BACallbackOnPlanRelatedBundleType( 449HRESULT BACallbackOnPlanRelatedBundleType(
450 __in BURN_USER_EXPERIENCE* pUserExperience, 450 __in BURN_USER_EXPERIENCE* pUserExperience,
451 __in_z LPCWSTR wzBundleId, 451 __in_z LPCWSTR wzBundleCode,
452 __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType 452 __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType
453 ); 453 );
454HRESULT BACallbackOnPlanRestoreRelatedBundle( 454HRESULT BACallbackOnPlanRestoreRelatedBundle(
455 __in BURN_USER_EXPERIENCE* pUserExperience, 455 __in BURN_USER_EXPERIENCE* pUserExperience,
456 __in_z LPCWSTR wzBundleId, 456 __in_z LPCWSTR wzBundleCode,
457 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState 457 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState
458 ); 458 );
459HRESULT BACallbackOnPlanRollbackBoundary( 459HRESULT BACallbackOnPlanRollbackBoundary(
diff --git a/src/burn/engine/baengine.cpp b/src/burn/engine/baengine.cpp
index e63836f4..d1704ad9 100644
--- a/src/burn/engine/baengine.cpp
+++ b/src/burn/engine/baengine.cpp
@@ -330,7 +330,7 @@ static HRESULT BAEngineGetRelatedBundleVariable(
330 HRESULT hr = S_OK; 330 HRESULT hr = S_OK;
331 BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS args = { }; 331 BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS args = { };
332 BAENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS results = { }; 332 BAENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS results = { };
333 LPWSTR sczBundleId = NULL; 333 LPWSTR sczBundleCode = NULL;
334 LPWSTR sczVariable = NULL; 334 LPWSTR sczVariable = NULL;
335 LPWSTR sczValue = NULL; 335 LPWSTR sczValue = NULL;
336 336
@@ -338,13 +338,13 @@ static HRESULT BAEngineGetRelatedBundleVariable(
338 hr = BuffReaderReadNumber(pReaderArgs, &args.dwApiVersion); 338 hr = BuffReaderReadNumber(pReaderArgs, &args.dwApiVersion);
339 ExitOnFailure(hr, "Failed to read API version of BAEngineGetRelatedBundleVariable args."); 339 ExitOnFailure(hr, "Failed to read API version of BAEngineGetRelatedBundleVariable args.");
340 340
341 hr = BuffReaderReadString(pReaderArgs, &sczBundleId); 341 hr = BuffReaderReadString(pReaderArgs, &sczBundleCode);
342 ExitOnFailure(hr, "Failed to read bundle id of BAEngineGetRelatedBundleVariable args."); 342 ExitOnFailure(hr, "Failed to read bundle code of BAEngineGetRelatedBundleVariable args.");
343 343
344 hr = BuffReaderReadString(pReaderArgs, &sczVariable); 344 hr = BuffReaderReadString(pReaderArgs, &sczVariable);
345 ExitOnFailure(hr, "Failed to read variable name of BAEngineGetRelatedBundleVariable args."); 345 ExitOnFailure(hr, "Failed to read variable name of BAEngineGetRelatedBundleVariable args.");
346 346
347 args.wzBundleId = sczBundleId; 347 args.wzBundleCode = sczBundleCode;
348 args.wzVariable = sczVariable; 348 args.wzVariable = sczVariable;
349 349
350 // Read results. 350 // Read results.
@@ -355,7 +355,7 @@ static HRESULT BAEngineGetRelatedBundleVariable(
355 ExitOnFailure(hr, "Failed to read API version of BAEngineGetRelatedBundleVariable results."); 355 ExitOnFailure(hr, "Failed to read API version of BAEngineGetRelatedBundleVariable results.");
356 356
357 // Execute. 357 // Execute.
358 hr = BundleGetBundleVariable(args.wzBundleId, args.wzVariable, &sczValue); 358 hr = BundleGetBundleVariable(args.wzBundleCode, args.wzVariable, &sczValue);
359 ExitOnFailure(hr, "Failed to get related bundle variable: %ls", sczVariable); 359 ExitOnFailure(hr, "Failed to get related bundle variable: %ls", sczVariable);
360 360
361 results.cchValue = lstrlenW(sczValue); 361 results.cchValue = lstrlenW(sczValue);
@@ -374,7 +374,7 @@ static HRESULT BAEngineGetRelatedBundleVariable(
374LExit: 374LExit:
375 ReleaseStr(sczValue); 375 ReleaseStr(sczValue);
376 ReleaseStr(sczVariable); 376 ReleaseStr(sczVariable);
377 ReleaseStr(sczBundleId); 377 ReleaseStr(sczBundleCode);
378 378
379 return hr; 379 return hr;
380} 380}
diff --git a/src/burn/engine/bundlepackageengine.cpp b/src/burn/engine/bundlepackageengine.cpp
index 90262638..612da389 100644
--- a/src/burn/engine/bundlepackageengine.cpp
+++ b/src/burn/engine/bundlepackageengine.cpp
@@ -52,8 +52,8 @@ extern "C" HRESULT BundlePackageEngineParsePackageFromXml(
52 LPWSTR scz = NULL; 52 LPWSTR scz = NULL;
53 53
54 // @DetectCondition 54 // @DetectCondition
55 hr = XmlGetAttributeEx(pixnBundlePackage, L"BundleId", &pPackage->Bundle.sczBundleId); 55 hr = XmlGetAttributeEx(pixnBundlePackage, L"BundleCode", &pPackage->Bundle.sczBundleCode);
56 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @BundleId."); 56 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @BundleCode.");
57 57
58 // @Version 58 // @Version
59 hr = XmlGetAttributeEx(pixnBundlePackage, L"Version", &scz); 59 hr = XmlGetAttributeEx(pixnBundlePackage, L"Version", &scz);
@@ -100,7 +100,7 @@ extern "C" HRESULT BundlePackageEngineParsePackageFromXml(
100 hr = ExeEngineParseCommandLineArgumentsFromXml(pixnBundlePackage, &pPackage->Bundle.rgCommandLineArguments, &pPackage->Bundle.cCommandLineArguments); 100 hr = ExeEngineParseCommandLineArgumentsFromXml(pixnBundlePackage, &pPackage->Bundle.rgCommandLineArguments, &pPackage->Bundle.cCommandLineArguments);
101 ExitOnFailure(hr, "Failed to parse command lines."); 101 ExitOnFailure(hr, "Failed to parse command lines.");
102 102
103 hr = StrAllocFormatted(&pPackage->Bundle.sczRegistrationKey, L"%ls\\%ls", BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY, pPackage->Bundle.sczBundleId); 103 hr = StrAllocFormatted(&pPackage->Bundle.sczRegistrationKey, L"%ls\\%ls", BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY, pPackage->Bundle.sczBundleCode);
104 ExitOnFailure(hr, "Failed to build uninstall registry key path."); 104 ExitOnFailure(hr, "Failed to build uninstall registry key path.");
105 105
106LExit: 106LExit:
@@ -126,7 +126,7 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes(
126 IXMLDOMNodeList* pixnNodes = NULL; 126 IXMLDOMNodeList* pixnNodes = NULL;
127 IXMLDOMNode* pixnElement = NULL; 127 IXMLDOMNode* pixnElement = NULL;
128 LPWSTR sczAction = NULL; 128 LPWSTR sczAction = NULL;
129 LPWSTR sczId = NULL; 129 LPWSTR sczCode = NULL;
130 DWORD cElements = 0; 130 DWORD cElements = 0;
131 131
132 hr = XmlSelectNodes(pixnBundle, L"RelatedBundle", &pixnNodes); 132 hr = XmlSelectNodes(pixnBundle, L"RelatedBundle", &pixnNodes);
@@ -143,16 +143,16 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes(
143 hr = XmlGetAttributeEx(pixnElement, L"Action", &sczAction); 143 hr = XmlGetAttributeEx(pixnElement, L"Action", &sczAction);
144 ExitOnFailure(hr, "Failed to get @Action."); 144 ExitOnFailure(hr, "Failed to get @Action.");
145 145
146 hr = XmlGetAttributeEx(pixnElement, L"Id", &sczId); 146 hr = XmlGetAttributeEx(pixnElement, L"Code", &sczCode);
147 ExitOnFailure(hr, "Failed to get @Id."); 147 ExitOnFailure(hr, "Failed to get @Code.");
148 148
149 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Detect", -1)) 149 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Detect", -1))
150 { 150 {
151 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczDetectCodes), *pcDetectCodes, 1, sizeof(LPWSTR), 5); 151 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczDetectCodes), *pcDetectCodes, 1, sizeof(LPWSTR), 5);
152 ExitOnFailure(hr, "Failed to resize Detect code array"); 152 ExitOnFailure(hr, "Failed to resize Detect code array");
153 153
154 (*prgsczDetectCodes)[*pcDetectCodes] = sczId; 154 (*prgsczDetectCodes)[*pcDetectCodes] = sczCode;
155 sczId = NULL; 155 sczCode = NULL;
156 *pcDetectCodes += 1; 156 *pcDetectCodes += 1;
157 } 157 }
158 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Upgrade", -1)) 158 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Upgrade", -1))
@@ -160,8 +160,8 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes(
160 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczUpgradeCodes), *pcUpgradeCodes, 1, sizeof(LPWSTR), 5); 160 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczUpgradeCodes), *pcUpgradeCodes, 1, sizeof(LPWSTR), 5);
161 ExitOnFailure(hr, "Failed to resize Upgrade code array"); 161 ExitOnFailure(hr, "Failed to resize Upgrade code array");
162 162
163 (*prgsczUpgradeCodes)[*pcUpgradeCodes] = sczId; 163 (*prgsczUpgradeCodes)[*pcUpgradeCodes] = sczCode;
164 sczId = NULL; 164 sczCode = NULL;
165 *pcUpgradeCodes += 1; 165 *pcUpgradeCodes += 1;
166 } 166 }
167 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Addon", -1)) 167 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Addon", -1))
@@ -169,8 +169,8 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes(
169 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczAddonCodes), *pcAddonCodes, 1, sizeof(LPWSTR), 5); 169 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczAddonCodes), *pcAddonCodes, 1, sizeof(LPWSTR), 5);
170 ExitOnFailure(hr, "Failed to resize Addon code array"); 170 ExitOnFailure(hr, "Failed to resize Addon code array");
171 171
172 (*prgsczAddonCodes)[*pcAddonCodes] = sczId; 172 (*prgsczAddonCodes)[*pcAddonCodes] = sczCode;
173 sczId = NULL; 173 sczCode = NULL;
174 *pcAddonCodes += 1; 174 *pcAddonCodes += 1;
175 } 175 }
176 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Patch", -1)) 176 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczAction, -1, L"Patch", -1))
@@ -178,8 +178,8 @@ extern "C" HRESULT BundlePackageEngineParseRelatedCodes(
178 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczPatchCodes), *pcPatchCodes, 1, sizeof(LPWSTR), 5); 178 hr = MemEnsureArraySizeForNewItems(reinterpret_cast<LPVOID*>(prgsczPatchCodes), *pcPatchCodes, 1, sizeof(LPWSTR), 5);
179 ExitOnFailure(hr, "Failed to resize Patch code array"); 179 ExitOnFailure(hr, "Failed to resize Patch code array");
180 180
181 (*prgsczPatchCodes)[*pcPatchCodes] = sczId; 181 (*prgsczPatchCodes)[*pcPatchCodes] = sczCode;
182 sczId = NULL; 182 sczCode = NULL;
183 *pcPatchCodes += 1; 183 *pcPatchCodes += 1;
184 } 184 }
185 else 185 else
@@ -193,7 +193,7 @@ LExit:
193 ReleaseObject(pixnNodes); 193 ReleaseObject(pixnNodes);
194 ReleaseObject(pixnElement); 194 ReleaseObject(pixnElement);
195 ReleaseStr(sczAction); 195 ReleaseStr(sczAction);
196 ReleaseStr(sczId); 196 ReleaseStr(sczCode);
197 197
198 return hr; 198 return hr;
199} 199}
@@ -202,7 +202,7 @@ extern "C" void BundlePackageEnginePackageUninitialize(
202 __in BURN_PACKAGE* pPackage 202 __in BURN_PACKAGE* pPackage
203 ) 203 )
204{ 204{
205 ReleaseStr(pPackage->Bundle.sczBundleId); 205 ReleaseStr(pPackage->Bundle.sczBundleCode);
206 ReleaseStr(pPackage->Bundle.sczArpKeyPath); 206 ReleaseStr(pPackage->Bundle.sczArpKeyPath);
207 ReleaseVerutilVersion(pPackage->Bundle.pVersion); 207 ReleaseVerutilVersion(pPackage->Bundle.pVersion);
208 ReleaseStr(pPackage->Bundle.sczRegistrationKey); 208 ReleaseStr(pPackage->Bundle.sczRegistrationKey);
@@ -457,7 +457,7 @@ extern "C" HRESULT BundlePackageEnginePlanAddPackage(
457 pAction->bundlePackage.pPackage = pPackage; 457 pAction->bundlePackage.pPackage = pPackage;
458 pAction->bundlePackage.action = pPackage->rollback; 458 pAction->bundlePackage.action = pPackage->rollback;
459 459
460 hr = StrAllocString(&pAction->bundlePackage.sczParent, pPlan->wzBundleId, 0); 460 hr = StrAllocString(&pAction->bundlePackage.sczParent, pPlan->wzBundleCode, 0);
461 ExitOnFailure(hr, "Failed to allocate the parent."); 461 ExitOnFailure(hr, "Failed to allocate the parent.");
462 462
463 if (pPackage->Bundle.wzAncestors) 463 if (pPackage->Bundle.wzAncestors)
@@ -488,7 +488,7 @@ extern "C" HRESULT BundlePackageEnginePlanAddPackage(
488 pAction->bundlePackage.pPackage = pPackage; 488 pAction->bundlePackage.pPackage = pPackage;
489 pAction->bundlePackage.action = pPackage->execute; 489 pAction->bundlePackage.action = pPackage->execute;
490 490
491 hr = StrAllocString(&pAction->bundlePackage.sczParent, pPlan->wzBundleId, 0); 491 hr = StrAllocString(&pAction->bundlePackage.sczParent, pPlan->wzBundleCode, 0);
492 ExitOnFailure(hr, "Failed to allocate the parent."); 492 ExitOnFailure(hr, "Failed to allocate the parent.");
493 493
494 if (pPackage->Bundle.wzAncestors) 494 if (pPackage->Bundle.wzAncestors)
@@ -686,7 +686,7 @@ static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback(
686 BOOTSTRAPPER_RELATION_TYPE relationType = RelatedBundleConvertRelationType(pBundle->relationType); 686 BOOTSTRAPPER_RELATION_TYPE relationType = RelatedBundleConvertRelationType(pBundle->relationType);
687 BOOL fPerMachine = BUNDLE_INSTALL_CONTEXT_MACHINE == pBundle->installContext; 687 BOOL fPerMachine = BUNDLE_INSTALL_CONTEXT_MACHINE == pBundle->installContext;
688 688
689 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pBundle->wzBundleId, -1, pPackage->Bundle.sczBundleId, -1) && 689 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pBundle->wzBundleCode, -1, pPackage->Bundle.sczBundleCode, -1) &&
690 pPackage->Bundle.fWin64 == (REG_KEY_64BIT == pBundle->regBitness)) 690 pPackage->Bundle.fWin64 == (REG_KEY_64BIT == pBundle->regBitness))
691 { 691 {
692 Assert(BOOTSTRAPPER_RELATION_UPGRADE == relationType); 692 Assert(BOOTSTRAPPER_RELATION_UPGRADE == relationType);
@@ -695,14 +695,14 @@ static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback(
695 } 695 }
696 696
697 hr = RegReadString(pBundle->hkBundle, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, &sczBundleVersion); 697 hr = RegReadString(pBundle->hkBundle, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, &sczBundleVersion);
698 ExitOnFailure(hr, "Failed to read version from registry for related bundle package: %ls", pBundle->wzBundleId); 698 ExitOnFailure(hr, "Failed to read version from registry for related bundle package: %ls", pBundle->wzBundleCode);
699 699
700 hr = VerParseVersion(sczBundleVersion, 0, FALSE, &pVersion); 700 hr = VerParseVersion(sczBundleVersion, 0, FALSE, &pVersion);
701 ExitOnFailure(hr, "Failed to parse related bundle package version: %ls", sczBundleVersion); 701 ExitOnFailure(hr, "Failed to parse related bundle package version: %ls", sczBundleVersion);
702 702
703 if (pVersion->fInvalid) 703 if (pVersion->fInvalid)
704 { 704 {
705 LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, pBundle->wzBundleId, sczBundleVersion); 705 LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, pBundle->wzBundleCode, sczBundleVersion);
706 } 706 }
707 707
708 if (BOOTSTRAPPER_RELATION_UPGRADE == relationType) 708 if (BOOTSTRAPPER_RELATION_UPGRADE == relationType)
@@ -719,7 +719,7 @@ static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback(
719 result = BUNDLE_QUERY_CALLBACK_RESULT_CANCEL; 719 result = BUNDLE_QUERY_CALLBACK_RESULT_CANCEL;
720 720
721 // Pass to BA. 721 // Pass to BA.
722 hr = BACallbackOnDetectRelatedBundlePackage(pContext->pUserExperience, pPackage->sczId, pBundle->wzBundleId, relationType, fPerMachine, pVersion); 722 hr = BACallbackOnDetectRelatedBundlePackage(pContext->pUserExperience, pPackage->sczId, pBundle->wzBundleCode, relationType, fPerMachine, pVersion);
723 ExitOnRootFailure(hr, "BA aborted detect related BUNDLE package."); 723 ExitOnRootFailure(hr, "BA aborted detect related BUNDLE package.");
724 724
725 result = BUNDLE_QUERY_CALLBACK_RESULT_CONTINUE; 725 result = BUNDLE_QUERY_CALLBACK_RESULT_CONTINUE;
@@ -1064,7 +1064,7 @@ static HRESULT DetectArpEntry(
1064 1064
1065 if (!pPackage->Bundle.sczArpKeyPath) 1065 if (!pPackage->Bundle.sczArpKeyPath)
1066 { 1066 {
1067 hr = PathConcatRelativeToBase(L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\", pPackage->Bundle.sczBundleId, &pPackage->Bundle.sczArpKeyPath); 1067 hr = PathConcatRelativeToBase(L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\", pPackage->Bundle.sczBundleCode, &pPackage->Bundle.sczArpKeyPath);
1068 ExitOnFailure(hr, "Failed to build full key path."); 1068 ExitOnFailure(hr, "Failed to build full key path.");
1069 } 1069 }
1070 1070
diff --git a/src/burn/engine/cache.cpp b/src/burn/engine/cache.cpp
index 358327a2..5a8388c4 100644
--- a/src/burn/engine/cache.cpp
+++ b/src/burn/engine/cache.cpp
@@ -259,7 +259,7 @@ extern "C" HRESULT CacheInitializeSources(
259 ExitOnFailure(hr, "Failed to get current process path."); 259 ExitOnFailure(hr, "Failed to get current process path.");
260 260
261 // Determine if we are running from the package cache or not. 261 // Determine if we are running from the package cache or not.
262 hr = CacheGetCompletedPath(pCache, pRegistration->fPerMachine, pRegistration->sczId, &sczCompletedFolder); 262 hr = CacheGetCompletedPath(pCache, pRegistration->fPerMachine, pRegistration->sczCode, &sczCompletedFolder);
263 ExitOnFailure(hr, "Failed to get completed path for bundle."); 263 ExitOnFailure(hr, "Failed to get completed path for bundle.");
264 264
265 hr = PathConcatRelativeToFullyQualifiedBase(sczCompletedFolder, pRegistration->sczExecutableName, &sczCompletedPath); 265 hr = PathConcatRelativeToFullyQualifiedBase(sczCompletedFolder, pRegistration->sczExecutableName, &sczCompletedPath);
@@ -432,7 +432,7 @@ LExit:
432 432
433extern "C" HRESULT CacheCalculateBundleLayoutWorkingPath( 433extern "C" HRESULT CacheCalculateBundleLayoutWorkingPath(
434 __in BURN_CACHE* pCache, 434 __in BURN_CACHE* pCache,
435 __in_z LPCWSTR wzBundleId, 435 __in_z LPCWSTR wzBundleCode,
436 __deref_out_z LPWSTR* psczWorkingPath 436 __deref_out_z LPWSTR* psczWorkingPath
437 ) 437 )
438{ 438{
@@ -440,8 +440,8 @@ extern "C" HRESULT CacheCalculateBundleLayoutWorkingPath(
440 440
441 HRESULT hr = S_OK; 441 HRESULT hr = S_OK;
442 442
443 hr = PathConcatRelativeToFullyQualifiedBase(pCache->sczAcquisitionFolder, wzBundleId, psczWorkingPath); 443 hr = PathConcatRelativeToFullyQualifiedBase(pCache->sczAcquisitionFolder, wzBundleCode, psczWorkingPath);
444 ExitOnFailure(hr, "Failed to append bundle id for bundle layout working path."); 444 ExitOnFailure(hr, "Failed to append bundle code for bundle layout working path.");
445 445
446LExit: 446LExit:
447 return hr; 447 return hr;
@@ -978,7 +978,7 @@ extern "C" HRESULT CacheCompleteBundle(
978 __in BURN_CACHE* pCache, 978 __in BURN_CACHE* pCache,
979 __in BOOL fPerMachine, 979 __in BOOL fPerMachine,
980 __in_z LPCWSTR wzExecutableName, 980 __in_z LPCWSTR wzExecutableName,
981 __in_z LPCWSTR wzBundleId, 981 __in_z LPCWSTR wzBundleCode,
982 __in_z LPCWSTR wzSourceBundlePath 982 __in_z LPCWSTR wzSourceBundlePath
983#ifdef DEBUG 983#ifdef DEBUG
984 , __in_z LPCWSTR wzExecutablePath 984 , __in_z LPCWSTR wzExecutablePath
@@ -990,7 +990,7 @@ extern "C" HRESULT CacheCompleteBundle(
990 LPWSTR sczTargetDirectory = NULL; 990 LPWSTR sczTargetDirectory = NULL;
991 LPWSTR sczTargetPath = NULL; 991 LPWSTR sczTargetPath = NULL;
992 992
993 hr = CreateCompletedPath(pCache, fPerMachine, wzBundleId, NULL, &sczTargetDirectory); 993 hr = CreateCompletedPath(pCache, fPerMachine, wzBundleCode, NULL, &sczTargetDirectory);
994 ExitOnFailure(hr, "Failed to create completed cache path for bundle."); 994 ExitOnFailure(hr, "Failed to create completed cache path for bundle.");
995 995
996 hr = PathConcatRelativeToFullyQualifiedBase(sczTargetDirectory, wzExecutableName, &sczTargetPath); 996 hr = PathConcatRelativeToFullyQualifiedBase(sczTargetDirectory, wzExecutableName, &sczTargetPath);
@@ -1217,13 +1217,13 @@ extern "C" HRESULT CacheRemoveBaseWorkingFolder(
1217extern "C" HRESULT CacheRemoveBundle( 1217extern "C" HRESULT CacheRemoveBundle(
1218 __in BURN_CACHE* pCache, 1218 __in BURN_CACHE* pCache,
1219 __in BOOL fPerMachine, 1219 __in BOOL fPerMachine,
1220 __in_z LPCWSTR wzBundleId 1220 __in_z LPCWSTR wzBundleCode
1221 ) 1221 )
1222{ 1222{
1223 HRESULT hr = S_OK; 1223 HRESULT hr = S_OK;
1224 1224
1225 hr = RemoveBundleOrPackage(pCache, TRUE, fPerMachine, wzBundleId, wzBundleId); 1225 hr = RemoveBundleOrPackage(pCache, TRUE, fPerMachine, wzBundleCode, wzBundleCode);
1226 ExitOnFailure(hr, "Failed to remove bundle id: %ls.", wzBundleId); 1226 ExitOnFailure(hr, "Failed to remove bundle code: %ls.", wzBundleCode);
1227 1227
1228LExit: 1228LExit:
1229 return hr; 1229 return hr;
diff --git a/src/burn/engine/cache.h b/src/burn/engine/cache.h
index 7c4dfaa1..cce35df0 100644
--- a/src/burn/engine/cache.h
+++ b/src/burn/engine/cache.h
@@ -107,7 +107,7 @@ HRESULT CacheCalculateBundleWorkingPath(
107 ); 107 );
108HRESULT CacheCalculateBundleLayoutWorkingPath( 108HRESULT CacheCalculateBundleLayoutWorkingPath(
109 __in BURN_CACHE* pCache, 109 __in BURN_CACHE* pCache,
110 __in_z LPCWSTR wzBundleId, 110 __in_z LPCWSTR wzBundleCode,
111 __deref_out_z LPWSTR* psczWorkingPath 111 __deref_out_z LPWSTR* psczWorkingPath
112 ); 112 );
113HRESULT CacheCalculatePayloadWorkingPath( 113HRESULT CacheCalculatePayloadWorkingPath(
@@ -191,7 +191,7 @@ HRESULT CacheCompleteBundle(
191 __in BURN_CACHE* pCache, 191 __in BURN_CACHE* pCache,
192 __in BOOL fPerMachine, 192 __in BOOL fPerMachine,
193 __in_z LPCWSTR wzExecutableName, 193 __in_z LPCWSTR wzExecutableName,
194 __in_z LPCWSTR wzBundleId, 194 __in_z LPCWSTR wzBundleCode,
195 __in_z LPCWSTR wzSourceBundlePath 195 __in_z LPCWSTR wzSourceBundlePath
196#ifdef DEBUG 196#ifdef DEBUG
197 , __in_z LPCWSTR wzExecutablePath 197 , __in_z LPCWSTR wzExecutablePath
diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp
index a85e6f18..3fe9b586 100644
--- a/src/burn/engine/core.cpp
+++ b/src/burn/engine/core.cpp
@@ -202,12 +202,12 @@ extern "C" HRESULT CoreInitializeConstants(
202 // Support passing Ancestors to embedded burn bundles. 202 // Support passing Ancestors to embedded burn bundles.
203 if (pInternalCommand->sczAncestors && *pInternalCommand->sczAncestors) 203 if (pInternalCommand->sczAncestors && *pInternalCommand->sczAncestors)
204 { 204 {
205 hr = StrAllocFormatted(&pRegistration->sczBundlePackageAncestors, L"%ls;%ls", pInternalCommand->sczAncestors, pRegistration->sczId); 205 hr = StrAllocFormatted(&pRegistration->sczBundlePackageAncestors, L"%ls;%ls", pInternalCommand->sczAncestors, pRegistration->sczCode);
206 ExitOnFailure(hr, "Failed to copy ancestors and self to bundle package ancestors."); 206 ExitOnFailure(hr, "Failed to copy ancestors and self to bundle package ancestors.");
207 } 207 }
208 else 208 else
209 { 209 {
210 hr = StrAllocString(&pRegistration->sczBundlePackageAncestors, pRegistration->sczId, 0); 210 hr = StrAllocString(&pRegistration->sczBundlePackageAncestors, pRegistration->sczCode, 0);
211 ExitOnFailure(hr, "Failed to copy self to bundle package ancestors."); 211 ExitOnFailure(hr, "Failed to copy self to bundle package ancestors.");
212 } 212 }
213 213
@@ -330,7 +330,7 @@ extern "C" HRESULT CoreDetect(
330 ExitOnFailure(hr, "Failed to report detected related bundles."); 330 ExitOnFailure(hr, "Failed to report detected related bundles.");
331 331
332 // Do update detection. 332 // Do update detection.
333 hr = DetectUpdate(pEngineState->registration.sczId, &pEngineState->userExperience, &pEngineState->update); 333 hr = DetectUpdate(pEngineState->registration.sczCode, &pEngineState->userExperience, &pEngineState->update);
334 ExitOnFailure(hr, "Failed to detect update."); 334 ExitOnFailure(hr, "Failed to detect update.");
335 335
336 // Detecting MSPs requires special initialization before processing each package but 336 // Detecting MSPs requires special initialization before processing each package but
@@ -462,8 +462,8 @@ extern "C" HRESULT CorePlan(
462 pEngineState->plan.pCommand = &pEngineState->command; 462 pEngineState->plan.pCommand = &pEngineState->command;
463 pEngineState->plan.pInternalCommand = &pEngineState->internalCommand; 463 pEngineState->plan.pInternalCommand = &pEngineState->internalCommand;
464 pEngineState->plan.pPayloads = &pEngineState->payloads; 464 pEngineState->plan.pPayloads = &pEngineState->payloads;
465 pEngineState->plan.wzBundleId = pEngineState->registration.sczId; 465 pEngineState->plan.wzBundleCode = pEngineState->registration.sczCode;
466 pEngineState->plan.wzBundleProviderKey = pEngineState->registration.sczId; 466 pEngineState->plan.wzBundleProviderKey = pEngineState->registration.sczCode;
467 pEngineState->plan.fDisableRollback = pEngineState->fDisableRollback || BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pEngineState->plan.action; 467 pEngineState->plan.fDisableRollback = pEngineState->fDisableRollback || BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pEngineState->plan.action;
468 pEngineState->plan.fPlanPackageCacheRollback = BOOTSTRAPPER_REGISTRATION_TYPE_NONE == pEngineState->registration.detectedRegistrationType; 468 pEngineState->plan.fPlanPackageCacheRollback = BOOTSTRAPPER_REGISTRATION_TYPE_NONE == pEngineState->registration.detectedRegistrationType;
469 469
diff --git a/src/burn/engine/dependency.cpp b/src/burn/engine/dependency.cpp
index d6698680..f398a070 100644
--- a/src/burn/engine/dependency.cpp
+++ b/src/burn/engine/dependency.cpp
@@ -200,10 +200,10 @@ extern "C" HRESULT DependencyInitialize(
200 200
201 HRESULT hr = S_OK; 201 HRESULT hr = S_OK;
202 202
203 // If no parent was specified at all, use the bundle id as the self dependent. 203 // If no parent was specified at all, use the bundle code as the self dependent.
204 if (!pInternalCommand->sczActiveParent) 204 if (!pInternalCommand->sczActiveParent)
205 { 205 {
206 pDependencies->wzSelfDependent = pRegistration->sczId; 206 pDependencies->wzSelfDependent = pRegistration->sczCode;
207 } 207 }
208 else if (*pInternalCommand->sczActiveParent) // if parent was specified use that as the self dependent. 208 else if (*pInternalCommand->sczActiveParent) // if parent was specified use that as the self dependent.
209 { 209 {
@@ -243,30 +243,30 @@ extern "C" void DependencyUninitialize(
243 memset(pDependencies, 0, sizeof(BURN_DEPENDENCIES)); 243 memset(pDependencies, 0, sizeof(BURN_DEPENDENCIES));
244} 244}
245 245
246extern "C" HRESULT DependencyDetectProviderKeyBundleId( 246extern "C" HRESULT DependencyDetectProviderKeyBundleCode(
247 __in BURN_REGISTRATION* pRegistration 247 __in BURN_REGISTRATION* pRegistration
248 ) 248 )
249{ 249{
250 HRESULT hr = S_OK; 250 HRESULT hr = S_OK;
251 251
252 hr = DepGetProviderInformation(pRegistration->hkRoot, pRegistration->sczProviderKey, &pRegistration->sczDetectedProviderKeyBundleId, NULL, NULL); 252 hr = DepGetProviderInformation(pRegistration->hkRoot, pRegistration->sczProviderKey, &pRegistration->sczDetectedProviderKeyBundleCode, NULL, NULL);
253 if (E_NOTFOUND == hr) 253 if (E_NOTFOUND == hr)
254 { 254 {
255 ReleaseNullStr(pRegistration->sczDetectedProviderKeyBundleId); 255 ReleaseNullStr(pRegistration->sczDetectedProviderKeyBundleCode);
256 ExitFunction1(hr = S_OK); 256 ExitFunction1(hr = S_OK);
257 } 257 }
258 ExitOnFailure(hr, "Failed to get provider key bundle id."); 258 ExitOnFailure(hr, "Failed to get provider key bundle code.");
259 259
260 // If a bundle id was not explicitly set, default the provider key bundle id to this bundle's provider key. 260 // If a bundle code was not explicitly set, default the provider key bundle code to this bundle's provider key.
261 if (!pRegistration->sczDetectedProviderKeyBundleId || !*pRegistration->sczDetectedProviderKeyBundleId) 261 if (!pRegistration->sczDetectedProviderKeyBundleCode || !*pRegistration->sczDetectedProviderKeyBundleCode)
262 { 262 {
263 hr = StrAllocString(&pRegistration->sczDetectedProviderKeyBundleId, pRegistration->sczProviderKey, 0); 263 hr = StrAllocString(&pRegistration->sczDetectedProviderKeyBundleCode, pRegistration->sczProviderKey, 0);
264 ExitOnFailure(hr, "Failed to initialize provider key bundle id."); 264 ExitOnFailure(hr, "Failed to initialize provider key bundle code.");
265 } 265 }
266 else if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczId, -1, pRegistration->sczDetectedProviderKeyBundleId, -1)) 266 else if (CSTR_EQUAL != ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczCode, -1, pRegistration->sczDetectedProviderKeyBundleCode, -1))
267 { 267 {
268 pRegistration->fDetectedForeignProviderKeyBundleId = TRUE; 268 pRegistration->fDetectedForeignProviderKeyBundleCode = TRUE;
269 LogId(REPORT_STANDARD, MSG_DETECTED_FOREIGN_BUNDLE_PROVIDER_REGISTRATION, pRegistration->sczProviderKey, pRegistration->sczDetectedProviderKeyBundleId); 269 LogId(REPORT_STANDARD, MSG_DETECTED_FOREIGN_BUNDLE_PROVIDER_REGISTRATION, pRegistration->sczProviderKey, pRegistration->sczDetectedProviderKeyBundleCode);
270 } 270 }
271 271
272LExit: 272LExit:
@@ -281,8 +281,8 @@ extern "C" HRESULT DependencyDetectBundle(
281 HRESULT hr = S_OK; 281 HRESULT hr = S_OK;
282 BOOL fExists = FALSE; 282 BOOL fExists = FALSE;
283 283
284 hr = DependencyDetectProviderKeyBundleId(pRegistration); 284 hr = DependencyDetectProviderKeyBundleCode(pRegistration);
285 ExitOnFailure(hr, "Failed to detect provider key bundle id."); 285 ExitOnFailure(hr, "Failed to detect provider key bundle code.");
286 286
287 hr = DepCheckDependents(pRegistration->hkRoot, pRegistration->sczProviderKey, 0, NULL, &pRegistration->rgDependents, &pRegistration->cDependents); 287 hr = DepCheckDependents(pRegistration->hkRoot, pRegistration->sczProviderKey, 0, NULL, &pRegistration->rgDependents, &pRegistration->cDependents);
288 ExitOnPathFailure(hr, fExists, "Failed dependents check on bundle."); 288 ExitOnPathFailure(hr, fExists, "Failed dependents check on bundle.");
@@ -794,7 +794,7 @@ extern "C" HRESULT DependencyRegisterBundle(
794 LogId(REPORT_VERBOSE, MSG_DEPENDENCY_BUNDLE_REGISTER, pRegistration->sczProviderKey, pRegistration->pVersion->sczVersion); 794 LogId(REPORT_VERBOSE, MSG_DEPENDENCY_BUNDLE_REGISTER, pRegistration->sczProviderKey, pRegistration->pVersion->sczVersion);
795 795
796 // Register the bundle provider key. 796 // Register the bundle provider key.
797 hr = DepRegisterDependency(pRegistration->hkRoot, pRegistration->sczProviderKey, pRegistration->pVersion->sczVersion, pRegistration->sczDisplayName, pRegistration->sczId, 0); 797 hr = DepRegisterDependency(pRegistration->hkRoot, pRegistration->sczProviderKey, pRegistration->pVersion->sczVersion, pRegistration->sczDisplayName, pRegistration->sczCode, 0);
798 ExitOnFailure(hr, "Failed to register the bundle dependency provider."); 798 ExitOnFailure(hr, "Failed to register the bundle dependency provider.");
799 799
800LExit: 800LExit:
@@ -835,10 +835,10 @@ extern "C" void DependencyUnregisterBundle(
835 ) 835 )
836{ 836{
837 HRESULT hr = S_OK; 837 HRESULT hr = S_OK;
838 LPCWSTR wzDependentProviderKey = pRegistration->sczId; 838 LPCWSTR wzDependentProviderKey = pRegistration->sczCode;
839 839
840 // If we own the bundle dependency then remove it. 840 // If we own the bundle dependency then remove it.
841 if (!pRegistration->fDetectedForeignProviderKeyBundleId) 841 if (!pRegistration->fDetectedForeignProviderKeyBundleCode)
842 { 842 {
843 // Remove the bundle provider key. 843 // Remove the bundle provider key.
844 hr = DepUnregisterDependency(pRegistration->hkRoot, pRegistration->sczProviderKey); 844 hr = DepUnregisterDependency(pRegistration->hkRoot, pRegistration->sczProviderKey);
@@ -969,7 +969,7 @@ static HRESULT DetectPackageDependents(
969 { 969 {
970 DEPENDENCY* pDependent = pProvider->rgDependents + iDependent; 970 DEPENDENCY* pDependent = pProvider->rgDependents + iDependent;
971 971
972 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczId, -1, pDependent->sczKey, -1)) 972 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczCode, -1, pDependent->sczKey, -1))
973 { 973 {
974 pProvider->fBundleRegisteredAsDependent = TRUE; 974 pProvider->fBundleRegisteredAsDependent = TRUE;
975 fBundleRegisteredAsDependent = TRUE; 975 fBundleRegisteredAsDependent = TRUE;
diff --git a/src/burn/engine/dependency.h b/src/burn/engine/dependency.h
index b5e4050f..d539e9b5 100644
--- a/src/burn/engine/dependency.h
+++ b/src/burn/engine/dependency.h
@@ -55,12 +55,12 @@ void DependencyUninitialize(
55 ); 55 );
56 56
57/******************************************************************** 57/********************************************************************
58 DependencyDetectProviderKeyBundleId - Detect if the provider key is 58 DependencyDetectProviderKeyBundleCode - Detect if the provider key is
59 registered and if so what bundle is registered. 59 registered and if so what bundle is registered.
60 60
61 Note: Returns E_NOTFOUND if the provider key is not registered. 61 Note: Returns E_NOTFOUND if the provider key is not registered.
62*********************************************************************/ 62*********************************************************************/
63HRESULT DependencyDetectProviderKeyBundleId( 63HRESULT DependencyDetectProviderKeyBundleCode(
64 __in BURN_REGISTRATION* pRegistration 64 __in BURN_REGISTRATION* pRegistration
65 ); 65 );
66 66
diff --git a/src/burn/engine/detect.cpp b/src/burn/engine/detect.cpp
index 18820c5d..08f6b57c 100644
--- a/src/burn/engine/detect.cpp
+++ b/src/burn/engine/detect.cpp
@@ -18,13 +18,13 @@ static HRESULT WINAPI AuthenticationRequired(
18 ); 18 );
19 19
20static HRESULT DetectAtomFeedUpdate( 20static HRESULT DetectAtomFeedUpdate(
21 __in_z LPCWSTR wzBundleId, 21 __in_z LPCWSTR wzBundleCode,
22 __in BURN_USER_EXPERIENCE* pUX, 22 __in BURN_USER_EXPERIENCE* pUX,
23 __in BURN_UPDATE* pUpdate 23 __in BURN_UPDATE* pUpdate
24 ); 24 );
25 25
26static HRESULT DownloadUpdateFeed( 26static HRESULT DownloadUpdateFeed(
27 __in_z LPCWSTR wzBundleId, 27 __in_z LPCWSTR wzBundleCode,
28 __in BURN_USER_EXPERIENCE* pUX, 28 __in BURN_USER_EXPERIENCE* pUX,
29 __in BURN_UPDATE* pUpdate, 29 __in BURN_UPDATE* pUpdate,
30 __deref_inout_z LPWSTR* psczTempFile 30 __deref_inout_z LPWSTR* psczTempFile
@@ -38,8 +38,8 @@ extern "C" void DetectReset(
38 ) 38 )
39{ 39{
40 RelatedBundlesUninitialize(&pRegistration->relatedBundles); 40 RelatedBundlesUninitialize(&pRegistration->relatedBundles);
41 ReleaseNullStr(pRegistration->sczDetectedProviderKeyBundleId); 41 ReleaseNullStr(pRegistration->sczDetectedProviderKeyBundleCode);
42 pRegistration->fDetectedForeignProviderKeyBundleId = FALSE; 42 pRegistration->fDetectedForeignProviderKeyBundleCode = FALSE;
43 pRegistration->fSelfRegisteredAsDependent = FALSE; 43 pRegistration->fSelfRegisteredAsDependent = FALSE;
44 pRegistration->fParentRegisteredAsDependent = FALSE; 44 pRegistration->fParentRegisteredAsDependent = FALSE;
45 pRegistration->fForwardCompatibleBundleExists = FALSE; 45 pRegistration->fForwardCompatibleBundleExists = FALSE;
@@ -123,14 +123,14 @@ extern "C" HRESULT DetectForwardCompatibleBundles(
123 HRESULT hr = S_OK; 123 HRESULT hr = S_OK;
124 int nCompareResult = 0; 124 int nCompareResult = 0;
125 125
126 if (pRegistration->fDetectedForeignProviderKeyBundleId) 126 if (pRegistration->fDetectedForeignProviderKeyBundleCode)
127 { 127 {
128 for (DWORD iRelatedBundle = 0; iRelatedBundle < pRegistration->relatedBundles.cRelatedBundles; ++iRelatedBundle) 128 for (DWORD iRelatedBundle = 0; iRelatedBundle < pRegistration->relatedBundles.cRelatedBundles; ++iRelatedBundle)
129 { 129 {
130 BURN_RELATED_BUNDLE* pRelatedBundle = pRegistration->relatedBundles.rgRelatedBundles + iRelatedBundle; 130 BURN_RELATED_BUNDLE* pRelatedBundle = pRegistration->relatedBundles.rgRelatedBundles + iRelatedBundle;
131 131
132 if (BOOTSTRAPPER_RELATION_UPGRADE == pRelatedBundle->detectRelationType && 132 if (BOOTSTRAPPER_RELATION_UPGRADE == pRelatedBundle->detectRelationType &&
133 CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczDetectedProviderKeyBundleId, -1, pRelatedBundle->package.sczId, -1)) 133 CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczDetectedProviderKeyBundleCode, -1, pRelatedBundle->package.sczId, -1))
134 { 134 {
135 hr = VerCompareParsedVersions(pRegistration->pVersion, pRelatedBundle->pVersion, &nCompareResult); 135 hr = VerCompareParsedVersions(pRegistration->pVersion, pRelatedBundle->pVersion, &nCompareResult);
136 ExitOnFailure(hr, "Failed to compare bundle version '%ls' to related bundle version '%ls'", pRegistration->pVersion->sczVersion, pRelatedBundle->pVersion->sczVersion); 136 ExitOnFailure(hr, "Failed to compare bundle version '%ls' to related bundle version '%ls'", pRegistration->pVersion->sczVersion, pRelatedBundle->pVersion->sczVersion);
@@ -201,7 +201,7 @@ LExit:
201} 201}
202 202
203extern "C" HRESULT DetectUpdate( 203extern "C" HRESULT DetectUpdate(
204 __in_z LPCWSTR wzBundleId, 204 __in_z LPCWSTR wzBundleCode,
205 __in BURN_USER_EXPERIENCE* pUX, 205 __in BURN_USER_EXPERIENCE* pUX,
206 __in BURN_UPDATE* pUpdate 206 __in BURN_UPDATE* pUpdate
207 ) 207 )
@@ -228,7 +228,7 @@ extern "C" HRESULT DetectUpdate(
228 228
229 if (!fSkip) 229 if (!fSkip)
230 { 230 {
231 hr = DetectAtomFeedUpdate(wzBundleId, pUX, pUpdate); 231 hr = DetectAtomFeedUpdate(wzBundleCode, pUX, pUpdate);
232 ExitOnFailure(hr, "Failed to detect atom feed update."); 232 ExitOnFailure(hr, "Failed to detect atom feed update.");
233 } 233 }
234 234
@@ -306,7 +306,7 @@ LExit:
306} 306}
307 307
308static HRESULT DownloadUpdateFeed( 308static HRESULT DownloadUpdateFeed(
309 __in_z LPCWSTR wzBundleId, 309 __in_z LPCWSTR wzBundleCode,
310 __in BURN_USER_EXPERIENCE* pUX, 310 __in BURN_USER_EXPERIENCE* pUX,
311 __in BURN_UPDATE* pUpdate, 311 __in BURN_UPDATE* pUpdate,
312 __deref_inout_z LPWSTR* psczTempFile 312 __deref_inout_z LPWSTR* psczTempFile
@@ -334,7 +334,7 @@ static HRESULT DownloadUpdateFeed(
334 cacheCallback.pv = NULL; //pProgress; 334 cacheCallback.pv = NULL; //pProgress;
335 335
336 authenticationData.pUX = pUX; 336 authenticationData.pUX = pUX;
337 authenticationData.wzPackageOrContainerId = wzBundleId; 337 authenticationData.wzPackageOrContainerId = wzBundleCode;
338 338
339 authenticationCallback.pv = static_cast<LPVOID>(&authenticationData); 339 authenticationCallback.pv = static_cast<LPVOID>(&authenticationData);
340 authenticationCallback.pfnAuthenticate = &AuthenticationRequired; 340 authenticationCallback.pfnAuthenticate = &AuthenticationRequired;
@@ -364,7 +364,7 @@ LExit:
364 364
365 365
366static HRESULT DetectAtomFeedUpdate( 366static HRESULT DetectAtomFeedUpdate(
367 __in_z LPCWSTR wzBundleId, 367 __in_z LPCWSTR wzBundleCode,
368 __in BURN_USER_EXPERIENCE* pUX, 368 __in BURN_USER_EXPERIENCE* pUX,
369 __in BURN_UPDATE* pUpdate 369 __in BURN_UPDATE* pUpdate
370 ) 370 )
@@ -385,7 +385,7 @@ static HRESULT DetectAtomFeedUpdate(
385 hr = AtomInitialize(); 385 hr = AtomInitialize();
386 ExitOnFailure(hr, "Failed to initialize Atom."); 386 ExitOnFailure(hr, "Failed to initialize Atom.");
387 387
388 hr = DownloadUpdateFeed(wzBundleId, pUX, pUpdate, &sczUpdateFeedTempFile); 388 hr = DownloadUpdateFeed(wzBundleCode, pUX, pUpdate, &sczUpdateFeedTempFile);
389 ExitOnFailure(hr, "Failed to download update feed."); 389 ExitOnFailure(hr, "Failed to download update feed.");
390 390
391 hr = AtomParseFromFile(sczUpdateFeedTempFile, &pAtomFeed); 391 hr = AtomParseFromFile(sczUpdateFeedTempFile, &pAtomFeed);
diff --git a/src/burn/engine/detect.h b/src/burn/engine/detect.h
index cdca2777..a0562ba2 100644
--- a/src/burn/engine/detect.h
+++ b/src/burn/engine/detect.h
@@ -33,7 +33,7 @@ HRESULT DetectReportRelatedBundles(
33 ); 33 );
34 34
35HRESULT DetectUpdate( 35HRESULT DetectUpdate(
36 __in_z LPCWSTR wzBundleId, 36 __in_z LPCWSTR wzBundleCode,
37 __in BURN_USER_EXPERIENCE* pUX, 37 __in BURN_USER_EXPERIENCE* pUX,
38 __in BURN_UPDATE* pUpdate 38 __in BURN_UPDATE* pUpdate
39 ); 39 );
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp
index 924d2184..85d5a543 100644
--- a/src/burn/engine/elevation.cpp
+++ b/src/burn/engine/elevation.cpp
@@ -556,7 +556,7 @@ extern "C" HRESULT ElevationSessionBegin(
556 __in BOOL fDisableResume, 556 __in BOOL fDisableResume,
557 __in BURN_VARIABLES* pVariables, 557 __in BURN_VARIABLES* pVariables,
558 __in DWORD dwRegistrationOperations, 558 __in DWORD dwRegistrationOperations,
559 __in BOOL fDetectedForeignProviderKeyBundleId, 559 __in BOOL fDetectedForeignProviderKeyBundleCode,
560 __in DWORD64 qwEstimatedSize, 560 __in DWORD64 qwEstimatedSize,
561 __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType 561 __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType
562 ) 562 )
@@ -579,7 +579,7 @@ extern "C" HRESULT ElevationSessionBegin(
579 hr = BuffWriteNumber(&pbData, &cbData, dwRegistrationOperations); 579 hr = BuffWriteNumber(&pbData, &cbData, dwRegistrationOperations);
580 ExitOnFailure(hr, "Failed to write registration operations to message buffer."); 580 ExitOnFailure(hr, "Failed to write registration operations to message buffer.");
581 581
582 hr = BuffWriteNumber(&pbData, &cbData, (DWORD)fDetectedForeignProviderKeyBundleId); 582 hr = BuffWriteNumber(&pbData, &cbData, (DWORD)fDetectedForeignProviderKeyBundleCode);
583 ExitOnFailure(hr, "Failed to write dependency registration action to message buffer."); 583 ExitOnFailure(hr, "Failed to write dependency registration action to message buffer.");
584 584
585 hr = BuffWriteNumber64(&pbData, &cbData, qwEstimatedSize); 585 hr = BuffWriteNumber64(&pbData, &cbData, qwEstimatedSize);
@@ -611,7 +611,7 @@ extern "C" HRESULT ElevationSessionEnd(
611 __in HANDLE hPipe, 611 __in HANDLE hPipe,
612 __in BURN_RESUME_MODE resumeMode, 612 __in BURN_RESUME_MODE resumeMode,
613 __in BOOTSTRAPPER_APPLY_RESTART restart, 613 __in BOOTSTRAPPER_APPLY_RESTART restart,
614 __in BOOL fDetectedForeignProviderKeyBundleId, 614 __in BOOL fDetectedForeignProviderKeyBundleCode,
615 __in DWORD64 qwEstimatedSize, 615 __in DWORD64 qwEstimatedSize,
616 __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType 616 __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType
617 ) 617 )
@@ -628,7 +628,7 @@ extern "C" HRESULT ElevationSessionEnd(
628 hr = BuffWriteNumber(&pbData, &cbData, (DWORD)restart); 628 hr = BuffWriteNumber(&pbData, &cbData, (DWORD)restart);
629 ExitOnFailure(hr, "Failed to write restart enum to message buffer."); 629 ExitOnFailure(hr, "Failed to write restart enum to message buffer.");
630 630
631 hr = BuffWriteNumber(&pbData, &cbData, (DWORD)fDetectedForeignProviderKeyBundleId); 631 hr = BuffWriteNumber(&pbData, &cbData, (DWORD)fDetectedForeignProviderKeyBundleCode);
632 ExitOnFailure(hr, "Failed to write dependency registration action to message buffer."); 632 ExitOnFailure(hr, "Failed to write dependency registration action to message buffer.");
633 633
634 hr = BuffWriteNumber64(&pbData, &cbData, qwEstimatedSize); 634 hr = BuffWriteNumber64(&pbData, &cbData, qwEstimatedSize);
@@ -821,8 +821,8 @@ extern "C" HRESULT ElevationProcessDependentRegistration(
821 hr = BuffWriteNumber(&pbData, &cbData, pAction->type); 821 hr = BuffWriteNumber(&pbData, &cbData, pAction->type);
822 ExitOnFailure(hr, "Failed to write action type to message buffer."); 822 ExitOnFailure(hr, "Failed to write action type to message buffer.");
823 823
824 hr = BuffWriteString(&pbData, &cbData, pAction->sczBundleId); 824 hr = BuffWriteString(&pbData, &cbData, pAction->sczBundleCode);
825 ExitOnFailure(hr, "Failed to write bundle id to message buffer."); 825 ExitOnFailure(hr, "Failed to write bundle code to message buffer.");
826 826
827 hr = BuffWriteString(&pbData, &cbData, pAction->sczDependentProviderKey); 827 hr = BuffWriteString(&pbData, &cbData, pAction->sczDependentProviderKey);
828 ExitOnFailure(hr, "Failed to write dependent provider key to message buffer."); 828 ExitOnFailure(hr, "Failed to write dependent provider key to message buffer.");
@@ -2559,7 +2559,7 @@ static HRESULT OnSessionBegin(
2559 hr = BuffReadNumber(pbData, cbData, &iData, &dwRegistrationOperations); 2559 hr = BuffReadNumber(pbData, cbData, &iData, &dwRegistrationOperations);
2560 ExitOnFailure(hr, "Failed to read registration operations."); 2560 ExitOnFailure(hr, "Failed to read registration operations.");
2561 2561
2562 hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&pRegistration->fDetectedForeignProviderKeyBundleId); 2562 hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&pRegistration->fDetectedForeignProviderKeyBundleCode);
2563 ExitOnFailure(hr, "Failed to read dependency registration action."); 2563 ExitOnFailure(hr, "Failed to read dependency registration action.");
2564 2564
2565 hr = BuffReadNumber64(pbData, cbData, &iData, &qwEstimatedSize); 2565 hr = BuffReadNumber64(pbData, cbData, &iData, &qwEstimatedSize);
@@ -2604,7 +2604,7 @@ static HRESULT OnSessionEnd(
2604 hr = BuffReadNumber(pbData, cbData, &iData, &dwRestart); 2604 hr = BuffReadNumber(pbData, cbData, &iData, &dwRestart);
2605 ExitOnFailure(hr, "Failed to read restart enum."); 2605 ExitOnFailure(hr, "Failed to read restart enum.");
2606 2606
2607 hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&pRegistration->fDetectedForeignProviderKeyBundleId); 2607 hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&pRegistration->fDetectedForeignProviderKeyBundleCode);
2608 ExitOnFailure(hr, "Failed to read dependency registration action."); 2608 ExitOnFailure(hr, "Failed to read dependency registration action.");
2609 2609
2610 hr = BuffReadNumber64(pbData, cbData, &iData, &qwEstimatedSize); 2610 hr = BuffReadNumber64(pbData, cbData, &iData, &qwEstimatedSize);
@@ -2810,8 +2810,8 @@ static HRESULT OnProcessDependentRegistration(
2810 hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&action.type); 2810 hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&action.type);
2811 ExitOnFailure(hr, "Failed to read action type."); 2811 ExitOnFailure(hr, "Failed to read action type.");
2812 2812
2813 hr = BuffReadString(pbData, cbData, &iData, &action.sczBundleId); 2813 hr = BuffReadString(pbData, cbData, &iData, &action.sczBundleCode);
2814 ExitOnFailure(hr, "Failed to read bundle id."); 2814 ExitOnFailure(hr, "Failed to read bundle code.");
2815 2815
2816 hr = BuffReadString(pbData, cbData, &iData, &action.sczDependentProviderKey); 2816 hr = BuffReadString(pbData, cbData, &iData, &action.sczDependentProviderKey);
2817 ExitOnFailure(hr, "Failed to read dependent provider key."); 2817 ExitOnFailure(hr, "Failed to read dependent provider key.");
@@ -2824,7 +2824,7 @@ LExit:
2824 // TODO: do the right thing here. 2824 // TODO: do the right thing here.
2825 //DependencyUninitializeRegistrationAction(&action); 2825 //DependencyUninitializeRegistrationAction(&action);
2826 ReleaseStr(action.sczDependentProviderKey); 2826 ReleaseStr(action.sczDependentProviderKey);
2827 ReleaseStr(action.sczBundleId) 2827 ReleaseStr(action.sczBundleCode)
2828 2828
2829 return hr; 2829 return hr;
2830} 2830}
@@ -2854,7 +2854,7 @@ static HRESULT OnExecuteRelatedBundle(
2854 2854
2855 // Deserialize message data. 2855 // Deserialize message data.
2856 hr = BuffReadString(pbData, cbData, &iData, &sczPackage); 2856 hr = BuffReadString(pbData, cbData, &iData, &sczPackage);
2857 ExitOnFailure(hr, "Failed to read related bundle id."); 2857 ExitOnFailure(hr, "Failed to read related bundle code.");
2858 2858
2859 hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.relatedBundle.action); 2859 hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&executeAction.relatedBundle.action);
2860 ExitOnFailure(hr, "Failed to read action."); 2860 ExitOnFailure(hr, "Failed to read action.");
diff --git a/src/burn/engine/elevation.h b/src/burn/engine/elevation.h
index 02019977..04ad244c 100644
--- a/src/burn/engine/elevation.h
+++ b/src/burn/engine/elevation.h
@@ -29,7 +29,7 @@ HRESULT ElevationSessionBegin(
29 __in BOOL fDisableResume, 29 __in BOOL fDisableResume,
30 __in BURN_VARIABLES* pVariables, 30 __in BURN_VARIABLES* pVariables,
31 __in DWORD dwRegistrationOperations, 31 __in DWORD dwRegistrationOperations,
32 __in BOOL fDetectedForeignProviderKeyBundleId, 32 __in BOOL fDetectedForeignProviderKeyBundleCode,
33 __in DWORD64 qwEstimatedSize, 33 __in DWORD64 qwEstimatedSize,
34 __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType 34 __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType
35 ); 35 );
@@ -37,7 +37,7 @@ HRESULT ElevationSessionEnd(
37 __in HANDLE hPipe, 37 __in HANDLE hPipe,
38 __in BURN_RESUME_MODE resumeMode, 38 __in BURN_RESUME_MODE resumeMode,
39 __in BOOTSTRAPPER_APPLY_RESTART restart, 39 __in BOOTSTRAPPER_APPLY_RESTART restart,
40 __in BOOL fDetectedForeignProviderKeyBundleId, 40 __in BOOL fDetectedForeignProviderKeyBundleCode,
41 __in DWORD64 qwEstimatedSize, 41 __in DWORD64 qwEstimatedSize,
42 __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType 42 __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType
43 ); 43 );
diff --git a/src/burn/engine/externalengine.cpp b/src/burn/engine/externalengine.cpp
index 1c775e23..352d184c 100644
--- a/src/burn/engine/externalengine.cpp
+++ b/src/burn/engine/externalengine.cpp
@@ -837,7 +837,7 @@ LExit:
837 837
838HRESULT ExternalEngineGetRelatedBundleVariable( 838HRESULT ExternalEngineGetRelatedBundleVariable(
839 __in BURN_ENGINE_STATE* /*pEngineState*/, 839 __in BURN_ENGINE_STATE* /*pEngineState*/,
840 __in_z LPCWSTR wzBundleId, 840 __in_z LPCWSTR wzBundleCode,
841 __in_z LPCWSTR wzVariable, 841 __in_z LPCWSTR wzVariable,
842 __out_ecount_opt(*pcchValue) LPWSTR wzValue, 842 __out_ecount_opt(*pcchValue) LPWSTR wzValue,
843 __inout SIZE_T* pcchValue 843 __inout SIZE_T* pcchValue
@@ -848,7 +848,7 @@ HRESULT ExternalEngineGetRelatedBundleVariable(
848 848
849 if (wzVariable && *wzVariable && pcchValue) 849 if (wzVariable && *wzVariable && pcchValue)
850 { 850 {
851 hr = BundleGetBundleVariable(wzBundleId, wzVariable, &sczValue); 851 hr = BundleGetBundleVariable(wzBundleCode, wzVariable, &sczValue);
852 if (SUCCEEDED(hr)) 852 if (SUCCEEDED(hr))
853 { 853 {
854 hr = CopyStringToExternal(sczValue, wzValue, pcchValue); 854 hr = CopyStringToExternal(sczValue, wzValue, pcchValue);
diff --git a/src/burn/engine/externalengine.h b/src/burn/engine/externalengine.h
index 3569392d..9b95e645 100644
--- a/src/burn/engine/externalengine.h
+++ b/src/burn/engine/externalengine.h
@@ -133,7 +133,7 @@ HRESULT ExternalEngineCompareVersions(
133 133
134HRESULT ExternalEngineGetRelatedBundleVariable( 134HRESULT ExternalEngineGetRelatedBundleVariable(
135 __in BURN_ENGINE_STATE* pEngineState, 135 __in BURN_ENGINE_STATE* pEngineState,
136 __in_z LPCWSTR wzBundleId, 136 __in_z LPCWSTR wzBundleCode,
137 __in_z LPCWSTR wzVariable, 137 __in_z LPCWSTR wzVariable,
138 __out_ecount_opt(*pcchValue) LPWSTR wzValue, 138 __out_ecount_opt(*pcchValue) LPWSTR wzValue,
139 __inout SIZE_T* pcchValue 139 __inout SIZE_T* pcchValue
diff --git a/src/burn/engine/package.h b/src/burn/engine/package.h
index 1ea169e6..d596d7c0 100644
--- a/src/burn/engine/package.h
+++ b/src/burn/engine/package.h
@@ -323,7 +323,7 @@ typedef struct _BURN_PACKAGE
323 { 323 {
324 struct 324 struct
325 { 325 {
326 LPWSTR sczBundleId; 326 LPWSTR sczBundleCode;
327 LPWSTR sczArpKeyPath; 327 LPWSTR sczArpKeyPath;
328 VERUTIL_VERSION* pVersion; 328 VERUTIL_VERSION* pVersion;
329 LPWSTR sczRegistrationKey; 329 LPWSTR sczRegistrationKey;
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp
index be281827..47b1c621 100644
--- a/src/burn/engine/plan.cpp
+++ b/src/burn/engine/plan.cpp
@@ -74,7 +74,7 @@ static HRESULT AddRegistrationAction(
74 __in BURN_PLAN* pPlan, 74 __in BURN_PLAN* pPlan,
75 __in BURN_DEPENDENT_REGISTRATION_ACTION_TYPE type, 75 __in BURN_DEPENDENT_REGISTRATION_ACTION_TYPE type,
76 __in_z LPCWSTR wzDependentProviderKey, 76 __in_z LPCWSTR wzDependentProviderKey,
77 __in_z LPCWSTR wzOwnerBundleId 77 __in_z LPCWSTR wzOwnerBundleCode
78 ); 78 );
79static HRESULT AddCachePackage( 79static HRESULT AddCachePackage(
80 __in BURN_PLAN* pPlan, 80 __in BURN_PLAN* pPlan,
@@ -467,7 +467,7 @@ extern "C" HRESULT PlanLayoutBundle(
467 hr = StrAllocString(&pCacheAction->bundleLayout.sczExecutableName, wzExecutableName, 0); 467 hr = StrAllocString(&pCacheAction->bundleLayout.sczExecutableName, wzExecutableName, 0);
468 ExitOnFailure(hr, "Failed to to copy executable name for bundle."); 468 ExitOnFailure(hr, "Failed to to copy executable name for bundle.");
469 469
470 hr = CacheCalculateBundleLayoutWorkingPath(pPlan->pCache, pPlan->wzBundleId, &pCacheAction->bundleLayout.sczUnverifiedPath); 470 hr = CacheCalculateBundleLayoutWorkingPath(pPlan->pCache, pPlan->wzBundleCode, &pCacheAction->bundleLayout.sczUnverifiedPath);
471 ExitOnFailure(hr, "Failed to calculate bundle layout working path."); 471 ExitOnFailure(hr, "Failed to calculate bundle layout working path.");
472 472
473 pCacheAction->bundleLayout.qwBundleSize = qwBundleSize; 473 pCacheAction->bundleLayout.qwBundleSize = qwBundleSize;
@@ -599,7 +599,7 @@ extern "C" HRESULT PlanRegistration(
599 // If our provider key was not owned by a different bundle, 599 // If our provider key was not owned by a different bundle,
600 // then plan to write our provider key registration to "fix it" if broken 600 // then plan to write our provider key registration to "fix it" if broken
601 // in case the bundle isn't successfully uninstalled. 601 // in case the bundle isn't successfully uninstalled.
602 if (!pRegistration->fDetectedForeignProviderKeyBundleId) 602 if (!pRegistration->fDetectedForeignProviderKeyBundleCode)
603 { 603 {
604 pPlan->dwRegistrationOperations |= BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY; 604 pPlan->dwRegistrationOperations |= BURN_REGISTRATION_ACTION_OPERATIONS_WRITE_PROVIDER_KEY;
605 } 605 }
@@ -612,7 +612,7 @@ extern "C" HRESULT PlanRegistration(
612 // would prevent self-removal. 612 // would prevent self-removal.
613 if (pRegistration->fSelfRegisteredAsDependent) 613 if (pRegistration->fSelfRegisteredAsDependent)
614 { 614 {
615 hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_UNREGISTER, pDependencies->wzSelfDependent, pRegistration->sczId); 615 hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_UNREGISTER, pDependencies->wzSelfDependent, pRegistration->sczCode);
616 ExitOnFailure(hr, "Failed to allocate registration action."); 616 ExitOnFailure(hr, "Failed to allocate registration action.");
617 617
618 hr = DependencyAddIgnoreDependencies(sdIgnoreDependents, pDependencies->wzSelfDependent); 618 hr = DependencyAddIgnoreDependencies(sdIgnoreDependents, pDependencies->wzSelfDependent);
@@ -758,7 +758,7 @@ extern "C" HRESULT PlanRegistration(
758 // as our own dependent. 758 // as our own dependent.
759 if (pDependencies->wzSelfDependent && !pRegistration->fSelfRegisteredAsDependent && (pDependencies->wzActiveParent || !fAddonOrPatchBundle)) 759 if (pDependencies->wzSelfDependent && !pRegistration->fSelfRegisteredAsDependent && (pDependencies->wzActiveParent || !fAddonOrPatchBundle))
760 { 760 {
761 hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_REGISTER, pDependencies->wzSelfDependent, pRegistration->sczId); 761 hr = AddRegistrationAction(pPlan, BURN_DEPENDENT_REGISTRATION_ACTION_TYPE_REGISTER, pDependencies->wzSelfDependent, pRegistration->sczCode);
762 ExitOnFailure(hr, "Failed to add registration action for self dependent."); 762 ExitOnFailure(hr, "Failed to add registration action for self dependent.");
763 } 763 }
764 } 764 }
@@ -1439,7 +1439,7 @@ extern "C" HRESULT PlanRelatedBundlesBegin(
1439 } 1439 }
1440 else if (E_NOTFOUND != hr) 1440 else if (E_NOTFOUND != hr)
1441 { 1441 {
1442 ExitOnFailure(hr, "Failed to lookup the bundle ID in the ancestors dictionary."); 1442 ExitOnFailure(hr, "Failed to lookup the bundle code in the ancestors dictionary.");
1443 } 1443 }
1444 } 1444 }
1445 else if (fDependent && BOOTSTRAPPER_RELATION_NONE != relationType) 1445 else if (fDependent && BOOTSTRAPPER_RELATION_NONE != relationType)
@@ -2076,7 +2076,7 @@ static void UninitializeRegistrationAction(
2076 ) 2076 )
2077{ 2077{
2078 ReleaseStr(pAction->sczDependentProviderKey); 2078 ReleaseStr(pAction->sczDependentProviderKey);
2079 ReleaseStr(pAction->sczBundleId); 2079 ReleaseStr(pAction->sczBundleCode);
2080 memset(pAction, 0, sizeof(BURN_DEPENDENT_REGISTRATION_ACTION)); 2080 memset(pAction, 0, sizeof(BURN_DEPENDENT_REGISTRATION_ACTION));
2081} 2081}
2082 2082
@@ -2271,7 +2271,7 @@ static HRESULT AddRegistrationAction(
2271 __in BURN_PLAN* pPlan, 2271 __in BURN_PLAN* pPlan,
2272 __in BURN_DEPENDENT_REGISTRATION_ACTION_TYPE type, 2272 __in BURN_DEPENDENT_REGISTRATION_ACTION_TYPE type,
2273 __in_z LPCWSTR wzDependentProviderKey, 2273 __in_z LPCWSTR wzDependentProviderKey,
2274 __in_z LPCWSTR wzOwnerBundleId 2274 __in_z LPCWSTR wzOwnerBundleCode
2275 ) 2275 )
2276{ 2276{
2277 HRESULT hr = S_OK; 2277 HRESULT hr = S_OK;
@@ -2287,7 +2287,7 @@ static HRESULT AddRegistrationAction(
2287 2287
2288 pAction->type = type; 2288 pAction->type = type;
2289 2289
2290 hr = StrAllocString(&pAction->sczBundleId, wzOwnerBundleId, 0); 2290 hr = StrAllocString(&pAction->sczBundleCode, wzOwnerBundleCode, 0);
2291 ExitOnFailure(hr, "Failed to copy owner bundle to registration action."); 2291 ExitOnFailure(hr, "Failed to copy owner bundle to registration action.");
2292 2292
2293 hr = StrAllocString(&pAction->sczDependentProviderKey, wzDependentProviderKey, 0); 2293 hr = StrAllocString(&pAction->sczDependentProviderKey, wzDependentProviderKey, 0);
@@ -2302,7 +2302,7 @@ static HRESULT AddRegistrationAction(
2302 2302
2303 pAction->type = rollbackType; 2303 pAction->type = rollbackType;
2304 2304
2305 hr = StrAllocString(&pAction->sczBundleId, wzOwnerBundleId, 0); 2305 hr = StrAllocString(&pAction->sczBundleCode, wzOwnerBundleCode, 0);
2306 ExitOnFailure(hr, "Failed to copy owner bundle to registration action."); 2306 ExitOnFailure(hr, "Failed to copy owner bundle to registration action.");
2307 2307
2308 hr = StrAllocString(&pAction->sczDependentProviderKey, wzDependentProviderKey, 0); 2308 hr = StrAllocString(&pAction->sczDependentProviderKey, wzDependentProviderKey, 0);
@@ -2880,7 +2880,7 @@ static void DependentRegistrationActionLog(
2880 2880
2881 if (wzType) 2881 if (wzType)
2882 { 2882 {
2883 LogStringLine(PlanDumpLevel, "%ls action[%u]: %ls bundle id: %ls, provider key: %ls", wzBase, iAction, wzType, pAction->sczBundleId, pAction->sczDependentProviderKey); 2883 LogStringLine(PlanDumpLevel, "%ls action[%u]: %ls bundle code: %ls, provider key: %ls", wzBase, iAction, wzType, pAction->sczBundleCode, pAction->sczDependentProviderKey);
2884 } 2884 }
2885} 2885}
2886 2886
@@ -3076,7 +3076,7 @@ extern "C" void PlanDump(
3076 LogStringLine(PlanDumpLevel, "--- Begin plan dump ---"); 3076 LogStringLine(PlanDumpLevel, "--- Begin plan dump ---");
3077 3077
3078 LogStringLine(PlanDumpLevel, "Plan action: %hs", LoggingBurnActionToString(pPlan->action)); 3078 LogStringLine(PlanDumpLevel, "Plan action: %hs", LoggingBurnActionToString(pPlan->action));
3079 LogStringLine(PlanDumpLevel, " bundle id: %ls", pPlan->wzBundleId); 3079 LogStringLine(PlanDumpLevel, " bundle code: %ls", pPlan->wzBundleCode);
3080 LogStringLine(PlanDumpLevel, " bundle provider key: %ls", pPlan->wzBundleProviderKey); 3080 LogStringLine(PlanDumpLevel, " bundle provider key: %ls", pPlan->wzBundleProviderKey);
3081 LogStringLine(PlanDumpLevel, " use-forward-compatible: %hs", LoggingTrueFalseToString(pPlan->fEnabledForwardCompatibleBundle)); 3081 LogStringLine(PlanDumpLevel, " use-forward-compatible: %hs", LoggingTrueFalseToString(pPlan->fEnabledForwardCompatibleBundle));
3082 LogStringLine(PlanDumpLevel, " per-machine: %hs", LoggingTrueFalseToString(pPlan->fPerMachine)); 3082 LogStringLine(PlanDumpLevel, " per-machine: %hs", LoggingTrueFalseToString(pPlan->fPerMachine));
diff --git a/src/burn/engine/plan.h b/src/burn/engine/plan.h
index 386de2c6..03b1423d 100644
--- a/src/burn/engine/plan.h
+++ b/src/burn/engine/plan.h
@@ -71,7 +71,7 @@ enum BURN_CLEAN_ACTION_TYPE
71typedef struct _BURN_DEPENDENT_REGISTRATION_ACTION 71typedef struct _BURN_DEPENDENT_REGISTRATION_ACTION
72{ 72{
73 BURN_DEPENDENT_REGISTRATION_ACTION_TYPE type; 73 BURN_DEPENDENT_REGISTRATION_ACTION_TYPE type;
74 LPWSTR sczBundleId; 74 LPWSTR sczBundleCode;
75 LPWSTR sczDependentProviderKey; 75 LPWSTR sczDependentProviderKey;
76} BURN_DEPENDENT_REGISTRATION_ACTION; 76} BURN_DEPENDENT_REGISTRATION_ACTION;
77 77
@@ -253,7 +253,7 @@ typedef struct _BURN_PLAN
253 BOOTSTRAPPER_COMMAND* pCommand; 253 BOOTSTRAPPER_COMMAND* pCommand;
254 BURN_ENGINE_COMMAND* pInternalCommand; 254 BURN_ENGINE_COMMAND* pInternalCommand;
255 BURN_PAYLOADS* pPayloads; 255 BURN_PAYLOADS* pPayloads;
256 LPWSTR wzBundleId; // points directly into parent the ENGINE_STATE. 256 LPWSTR wzBundleCode; // points directly into parent the ENGINE_STATE.
257 LPWSTR wzBundleProviderKey; // points directly into parent the ENGINE_STATE. 257 LPWSTR wzBundleProviderKey; // points directly into parent the ENGINE_STATE.
258 BOOL fPerMachine; 258 BOOL fPerMachine;
259 BOOL fCanAffectMachineState; 259 BOOL fCanAffectMachineState;
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp
index 771b9425..85c006f7 100644
--- a/src/burn/engine/registration.cpp
+++ b/src/burn/engine/registration.cpp
@@ -132,9 +132,9 @@ extern "C" HRESULT RegistrationParseFromXml(
132 hr = XmlSelectSingleNode(pixnBundle, L"Registration", &pixnRegistrationNode); 132 hr = XmlSelectSingleNode(pixnBundle, L"Registration", &pixnRegistrationNode);
133 ExitOnRequiredXmlQueryFailure(hr, "Failed to select registration node."); 133 ExitOnRequiredXmlQueryFailure(hr, "Failed to select registration node.");
134 134
135 // @Id 135 // @Code
136 hr = XmlGetAttributeEx(pixnRegistrationNode, L"Id", &pRegistration->sczId); 136 hr = XmlGetAttributeEx(pixnRegistrationNode, L"Code", &pRegistration->sczCode);
137 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Id."); 137 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Code.");
138 138
139 // @Tag 139 // @Tag
140 hr = XmlGetAttributeEx(pixnRegistrationNode, L"Tag", &pRegistration->sczTag); 140 hr = XmlGetAttributeEx(pixnRegistrationNode, L"Tag", &pRegistration->sczTag);
@@ -305,7 +305,7 @@ extern "C" void RegistrationUninitialize(
305 __in BURN_REGISTRATION* pRegistration 305 __in BURN_REGISTRATION* pRegistration
306 ) 306 )
307{ 307{
308 ReleaseStr(pRegistration->sczId); 308 ReleaseStr(pRegistration->sczCode);
309 ReleaseStr(pRegistration->sczTag); 309 ReleaseStr(pRegistration->sczTag);
310 310
311 for (DWORD i = 0; i < pRegistration->cDetectCodes; ++i) 311 for (DWORD i = 0; i < pRegistration->cDetectCodes; ++i)
@@ -371,7 +371,7 @@ extern "C" void RegistrationUninitialize(
371 MemFree(pRegistration->softwareTags.rgSoftwareTags); 371 MemFree(pRegistration->softwareTags.rgSoftwareTags);
372 } 372 }
373 373
374 ReleaseStr(pRegistration->sczDetectedProviderKeyBundleId); 374 ReleaseStr(pRegistration->sczDetectedProviderKeyBundleCode);
375 ReleaseStr(pRegistration->sczBundlePackageAncestors); 375 ReleaseStr(pRegistration->sczBundlePackageAncestors);
376 RelatedBundlesUninitialize(&pRegistration->relatedBundles); 376 RelatedBundlesUninitialize(&pRegistration->relatedBundles);
377 377
@@ -620,7 +620,7 @@ extern "C" HRESULT RegistrationSessionBegin(
620 // Cache bundle executable. 620 // Cache bundle executable.
621 if (dwRegistrationOptions & BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE) 621 if (dwRegistrationOptions & BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE)
622 { 622 {
623 hr = CacheCompleteBundle(pCache, pRegistration->fPerMachine, pRegistration->sczExecutableName, pRegistration->sczId, wzEngineWorkingPath 623 hr = CacheCompleteBundle(pCache, pRegistration->fPerMachine, pRegistration->sczExecutableName, pRegistration->sczCode, wzEngineWorkingPath
624#ifdef DEBUG 624#ifdef DEBUG
625 , pRegistration->sczCacheExecutablePath 625 , pRegistration->sczCacheExecutablePath
626#endif 626#endif
@@ -888,7 +888,7 @@ extern "C" HRESULT RegistrationSessionEnd(
888 hr = RegDelete(pRegistration->hkRoot, pRegistration->sczRegistrationKey, REG_KEY_DEFAULT, TRUE); 888 hr = RegDelete(pRegistration->hkRoot, pRegistration->sczRegistrationKey, REG_KEY_DEFAULT, TRUE);
889 ExitOnPathFailure(hr, fDeleted, "Failed to delete registration key: %ls", pRegistration->sczRegistrationKey); 889 ExitOnPathFailure(hr, fDeleted, "Failed to delete registration key: %ls", pRegistration->sczRegistrationKey);
890 890
891 CacheRemoveBundle(pCache, pRegistration->fPerMachine, pRegistration->sczId); 891 CacheRemoveBundle(pCache, pRegistration->fPerMachine, pRegistration->sczCode);
892 } 892 }
893 else // the mode needs to be updated so open the registration key. 893 else // the mode needs to be updated so open the registration key.
894 { 894 {
@@ -1153,11 +1153,11 @@ static HRESULT SetPaths(
1153 pRegistration->hkRoot = pRegistration->fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; 1153 pRegistration->hkRoot = pRegistration->fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
1154 1154
1155 // build uninstall registry key path 1155 // build uninstall registry key path
1156 hr = StrAllocFormatted(&pRegistration->sczRegistrationKey, L"%ls\\%ls", BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY, pRegistration->sczId); 1156 hr = StrAllocFormatted(&pRegistration->sczRegistrationKey, L"%ls\\%ls", BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY, pRegistration->sczCode);
1157 ExitOnFailure(hr, "Failed to build uninstall registry key path."); 1157 ExitOnFailure(hr, "Failed to build uninstall registry key path.");
1158 1158
1159 // build cache directory 1159 // build cache directory
1160 hr = CacheGetCompletedPath(pCache, pRegistration->fPerMachine, pRegistration->sczId, &sczCacheDirectory); 1160 hr = CacheGetCompletedPath(pCache, pRegistration->fPerMachine, pRegistration->sczCode, &sczCacheDirectory);
1161 ExitOnFailure(hr, "Failed to build cache directory."); 1161 ExitOnFailure(hr, "Failed to build cache directory.");
1162 1162
1163 // build cached executable path 1163 // build cached executable path
@@ -1287,7 +1287,7 @@ static HRESULT UpdateResumeMode(
1287 hr = RegCreate(pRegistration->hkRoot, sczResumeKey, KEY_WRITE, &hkRun); 1287 hr = RegCreate(pRegistration->hkRoot, sczResumeKey, KEY_WRITE, &hkRun);
1288 ExitOnFailure(hr, "Failed to create run key."); 1288 ExitOnFailure(hr, "Failed to create run key.");
1289 1289
1290 hr = RegWriteString(hkRun, pRegistration->sczId, sczRunOnceCommandLine); 1290 hr = RegWriteString(hkRun, pRegistration->sczCode, sczRunOnceCommandLine);
1291 ExitOnFailure(hr, "Failed to write run key value."); 1291 ExitOnFailure(hr, "Failed to write run key value.");
1292 1292
1293 hr = RegWriteString(hkRegistration, REGISTRY_BUNDLE_RESUME_COMMAND_LINE, pRegistration->sczResumeCommandLine); 1293 hr = RegWriteString(hkRegistration, REGISTRY_BUNDLE_RESUME_COMMAND_LINE, pRegistration->sczResumeCommandLine);
@@ -1304,7 +1304,7 @@ static HRESULT UpdateResumeMode(
1304 { 1304 {
1305 ExitOnFailure(hr, "Failed to open run key."); 1305 ExitOnFailure(hr, "Failed to open run key.");
1306 1306
1307 er = ::RegDeleteValueW(hkRun, pRegistration->sczId); 1307 er = ::RegDeleteValueW(hkRun, pRegistration->sczCode);
1308 if (ERROR_FILE_NOT_FOUND == er) 1308 if (ERROR_FILE_NOT_FOUND == er)
1309 { 1309 {
1310 er = ERROR_SUCCESS; 1310 er = ERROR_SUCCESS;
diff --git a/src/burn/engine/registration.h b/src/burn/engine/registration.h
index 91c3fdcd..326f21c6 100644
--- a/src/burn/engine/registration.h
+++ b/src/burn/engine/registration.h
@@ -99,7 +99,7 @@ typedef struct _BURN_REGISTRATION
99 BOOL fDisableResume; 99 BOOL fDisableResume;
100 BOOL fCached; 100 BOOL fCached;
101 BOOTSTRAPPER_REGISTRATION_TYPE detectedRegistrationType; 101 BOOTSTRAPPER_REGISTRATION_TYPE detectedRegistrationType;
102 LPWSTR sczId; 102 LPWSTR sczCode;
103 LPWSTR sczTag; 103 LPWSTR sczTag;
104 104
105 LPWSTR *rgsczDetectCodes; 105 LPWSTR *rgsczDetectCodes;
@@ -155,8 +155,8 @@ typedef struct _BURN_REGISTRATION
155 BOOL fForwardCompatibleBundleExists; // Only valid after detect. 155 BOOL fForwardCompatibleBundleExists; // Only valid after detect.
156 BOOL fEligibleForCleanup; // Only valid after detect. 156 BOOL fEligibleForCleanup; // Only valid after detect.
157 157
158 BOOL fDetectedForeignProviderKeyBundleId; 158 BOOL fDetectedForeignProviderKeyBundleCode;
159 LPWSTR sczDetectedProviderKeyBundleId; 159 LPWSTR sczDetectedProviderKeyBundleCode;
160 LPWSTR sczBundlePackageAncestors; 160 LPWSTR sczBundlePackageAncestors;
161} BURN_REGISTRATION; 161} BURN_REGISTRATION;
162 162
diff --git a/src/burn/engine/relatedbundle.cpp b/src/burn/engine/relatedbundle.cpp
index 23e0f352..938b24d7 100644
--- a/src/burn/engine/relatedbundle.cpp
+++ b/src/burn/engine/relatedbundle.cpp
@@ -30,8 +30,8 @@ static HRESULT LoadIfRelatedBundle(
30 __in BURN_RELATED_BUNDLES* pRelatedBundles 30 __in BURN_RELATED_BUNDLES* pRelatedBundles
31 ); 31 );
32static HRESULT LoadRelatedBundleFromKey( 32static HRESULT LoadRelatedBundleFromKey(
33 __in_z LPCWSTR wzRelatedBundleId, 33 __in_z LPCWSTR wzRelatedBundleCode,
34 __in HKEY hkBundleId, 34 __in HKEY hkBundleCode,
35 __in BOOL fPerMachine, 35 __in BOOL fPerMachine,
36 __in BOOTSTRAPPER_RELATION_TYPE relationType, 36 __in BOOTSTRAPPER_RELATION_TYPE relationType,
37 __in BURN_RELATED_BUNDLE *pRelatedBundle 37 __in BURN_RELATED_BUNDLE *pRelatedBundle
@@ -108,7 +108,7 @@ extern "C" HRESULT RelatedBundleFindById(
108 HRESULT hr = S_OK; 108 HRESULT hr = S_OK;
109 BURN_RELATED_BUNDLE* pRelatedBundle = NULL; 109 BURN_RELATED_BUNDLE* pRelatedBundle = NULL;
110 BURN_PACKAGE* pPackage = NULL; 110 BURN_PACKAGE* pPackage = NULL;
111 111
112 *ppRelatedBundle = NULL; 112 *ppRelatedBundle = NULL;
113 113
114 for (DWORD i = 0; i < pRelatedBundles->cRelatedBundles; ++i) 114 for (DWORD i = 0; i < pRelatedBundles->cRelatedBundles; ++i)
@@ -180,7 +180,7 @@ static __callback int __cdecl CompareRelatedBundlesDetect(
180 const BURN_RELATED_BUNDLE* pBundleLeft = static_cast<const BURN_RELATED_BUNDLE*>(pvLeft); 180 const BURN_RELATED_BUNDLE* pBundleLeft = static_cast<const BURN_RELATED_BUNDLE*>(pvLeft);
181 const BURN_RELATED_BUNDLE* pBundleRight = static_cast<const BURN_RELATED_BUNDLE*>(pvRight); 181 const BURN_RELATED_BUNDLE* pBundleRight = static_cast<const BURN_RELATED_BUNDLE*>(pvRight);
182 182
183 // Sort by relation type, then version, then bundle id. 183 // Sort by relation type, then version, then bundle code.
184 if (pBundleLeft->detectRelationType != pBundleRight->detectRelationType) 184 if (pBundleLeft->detectRelationType != pBundleRight->detectRelationType)
185 { 185 {
186 // Upgrade bundles last, everything else according to the enum. 186 // Upgrade bundles last, everything else according to the enum.
@@ -223,7 +223,7 @@ static __callback int __cdecl CompareRelatedBundlesPlan(
223 const BURN_RELATED_BUNDLE* pBundleLeft = *reinterpret_cast<BURN_RELATED_BUNDLE**>(const_cast<void*>(pvLeft)); 223 const BURN_RELATED_BUNDLE* pBundleLeft = *reinterpret_cast<BURN_RELATED_BUNDLE**>(const_cast<void*>(pvLeft));
224 const BURN_RELATED_BUNDLE* pBundleRight = *reinterpret_cast<BURN_RELATED_BUNDLE**>(const_cast<void*>(pvRight)); 224 const BURN_RELATED_BUNDLE* pBundleRight = *reinterpret_cast<BURN_RELATED_BUNDLE**>(const_cast<void*>(pvRight));
225 225
226 // Sort by relation type, then version, then bundle id. 226 // Sort by relation type, then version, then bundle code.
227 if (pBundleLeft->planRelationType != pBundleRight->planRelationType) 227 if (pBundleLeft->planRelationType != pBundleRight->planRelationType)
228 { 228 {
229 // Upgrade bundles last, everything else according to the enum. 229 // Upgrade bundles last, everything else according to the enum.
@@ -266,7 +266,7 @@ static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback(
266 BUNDLE_QUERY_CONTEXT* pContext = reinterpret_cast<BUNDLE_QUERY_CONTEXT*>(pvContext); 266 BUNDLE_QUERY_CONTEXT* pContext = reinterpret_cast<BUNDLE_QUERY_CONTEXT*>(pvContext);
267 267
268 hr = LoadIfRelatedBundle(pBundle, pContext->pRegistration, pContext->pRelatedBundles); 268 hr = LoadIfRelatedBundle(pBundle, pContext->pRegistration, pContext->pRelatedBundles);
269 ExitOnFailure(hr, "Failed to load related bundle: %ls", pBundle->wzBundleId); 269 ExitOnFailure(hr, "Failed to load related bundle: %ls", pBundle->wzBundleCode);
270 270
271LExit: 271LExit:
272 return result; 272 return result;
@@ -283,8 +283,8 @@ static HRESULT LoadIfRelatedBundle(
283 BOOTSTRAPPER_RELATION_TYPE relationType = RelatedBundleConvertRelationType(pBundle->relationType); 283 BOOTSTRAPPER_RELATION_TYPE relationType = RelatedBundleConvertRelationType(pBundle->relationType);
284 BURN_RELATED_BUNDLE* pRelatedBundle = NULL; 284 BURN_RELATED_BUNDLE* pRelatedBundle = NULL;
285 285
286 // If we found our bundle id, it's not a related bundle. 286 // If we found our bundle code, it's not a related bundle.
287 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pBundle->wzBundleId, -1, pRegistration->sczId, -1)) 287 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pBundle->wzBundleCode, -1, pRegistration->sczCode, -1))
288 { 288 {
289 ExitFunction1(hr = S_FALSE); 289 ExitFunction1(hr = S_FALSE);
290 } 290 }
@@ -294,8 +294,8 @@ static HRESULT LoadIfRelatedBundle(
294 294
295 pRelatedBundle = pRelatedBundles->rgRelatedBundles + pRelatedBundles->cRelatedBundles; 295 pRelatedBundle = pRelatedBundles->rgRelatedBundles + pRelatedBundles->cRelatedBundles;
296 296
297 hr = LoadRelatedBundleFromKey(pBundle->wzBundleId, pBundle->hkBundle, fPerMachine, relationType, pRelatedBundle); 297 hr = LoadRelatedBundleFromKey(pBundle->wzBundleCode, pBundle->hkBundle, fPerMachine, relationType, pRelatedBundle);
298 ExitOnFailure(hr, "Failed to initialize package from related bundle id: %ls", pBundle->wzBundleId); 298 ExitOnFailure(hr, "Failed to initialize package from related bundle code: %ls", pBundle->wzBundleCode);
299 299
300 hr = DependencyDetectRelatedBundle(pRelatedBundle, pRegistration); 300 hr = DependencyDetectRelatedBundle(pRelatedBundle, pRegistration);
301 ExitOnFailure(hr, "Failed to detect dependencies for related bundle."); 301 ExitOnFailure(hr, "Failed to detect dependencies for related bundle.");
@@ -307,8 +307,8 @@ LExit:
307} 307}
308 308
309static HRESULT LoadRelatedBundleFromKey( 309static HRESULT LoadRelatedBundleFromKey(
310 __in_z LPCWSTR wzRelatedBundleId, 310 __in_z LPCWSTR wzRelatedBundleCode,
311 __in HKEY hkBundleId, 311 __in HKEY hkBundleCode,
312 __in BOOL fPerMachine, 312 __in BOOL fPerMachine,
313 __in BOOTSTRAPPER_RELATION_TYPE relationType, 313 __in BOOTSTRAPPER_RELATION_TYPE relationType,
314 __in BURN_RELATED_BUNDLE* pRelatedBundle 314 __in BURN_RELATED_BUNDLE* pRelatedBundle
@@ -327,7 +327,7 @@ static HRESULT LoadRelatedBundleFromKey(
327 BURN_DEPENDENCY_PROVIDER* pBundleDependencyProvider = NULL; 327 BURN_DEPENDENCY_PROVIDER* pBundleDependencyProvider = NULL;
328 328
329 // Only support progress from engines that are compatible. 329 // Only support progress from engines that are compatible.
330 hr = RegReadNumber(hkBundleId, BURN_REGISTRATION_REGISTRY_ENGINE_PROTOCOL_VERSION, &dwEngineProtocolVersion); 330 hr = RegReadNumber(hkBundleCode, BURN_REGISTRATION_REGISTRY_ENGINE_PROTOCOL_VERSION, &dwEngineProtocolVersion);
331 if (SUCCEEDED(hr)) 331 if (SUCCEEDED(hr))
332 { 332 {
333 fSupportsBurnProtocol = BURN_PROTOCOL_VERSION == dwEngineProtocolVersion; 333 fSupportsBurnProtocol = BURN_PROTOCOL_VERSION == dwEngineProtocolVersion;
@@ -335,7 +335,7 @@ static HRESULT LoadRelatedBundleFromKey(
335 else 335 else
336 { 336 {
337 // 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) 337 // 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)
338 hr = RegReadVersion(hkBundleId, BURN_REGISTRATION_REGISTRY_ENGINE_VERSION, &qwEngineVersion); 338 hr = RegReadVersion(hkBundleCode, BURN_REGISTRATION_REGISTRY_ENGINE_VERSION, &qwEngineVersion);
339 if (SUCCEEDED(hr)) 339 if (SUCCEEDED(hr))
340 { 340 {
341 fSupportsBurnProtocol = (FILEMAKEVERSION(3, 6, 2221, 0) <= qwEngineVersion && qwEngineVersion <= FILEMAKEVERSION(rmj, rmm, rup, rpr)); 341 fSupportsBurnProtocol = (FILEMAKEVERSION(3, 6, 2221, 0) <= qwEngineVersion && qwEngineVersion <= FILEMAKEVERSION(rmj, rmm, rup, rpr));
@@ -344,19 +344,19 @@ static HRESULT LoadRelatedBundleFromKey(
344 hr = S_OK; 344 hr = S_OK;
345 } 345 }
346 346
347 hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, &sczBundleVersion); 347 hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, &sczBundleVersion);
348 ExitOnFailure(hr, "Failed to read version from registry for bundle: %ls", wzRelatedBundleId); 348 ExitOnFailure(hr, "Failed to read version from registry for bundle: %ls", wzRelatedBundleCode);
349 349
350 hr = VerParseVersion(sczBundleVersion, 0, FALSE, &pRelatedBundle->pVersion); 350 hr = VerParseVersion(sczBundleVersion, 0, FALSE, &pRelatedBundle->pVersion);
351 ExitOnFailure(hr, "Failed to parse pseudo bundle version: %ls", sczBundleVersion); 351 ExitOnFailure(hr, "Failed to parse pseudo bundle version: %ls", sczBundleVersion);
352 352
353 if (pRelatedBundle->pVersion->fInvalid) 353 if (pRelatedBundle->pVersion->fInvalid)
354 { 354 {
355 LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, wzRelatedBundleId, sczBundleVersion); 355 LogId(REPORT_WARNING, MSG_RELATED_PACKAGE_INVALID_VERSION, wzRelatedBundleCode, sczBundleVersion);
356 } 356 }
357 357
358 hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH, &sczCachePath); 358 hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH, &sczCachePath);
359 ExitOnFailure(hr, "Failed to read cache path from registry for bundle: %ls", wzRelatedBundleId); 359 ExitOnFailure(hr, "Failed to read cache path from registry for bundle: %ls", wzRelatedBundleCode);
360 360
361 if (FileExistsEx(sczCachePath, NULL)) 361 if (FileExistsEx(sczCachePath, NULL))
362 { 362 {
@@ -364,13 +364,13 @@ static HRESULT LoadRelatedBundleFromKey(
364 } 364 }
365 else 365 else
366 { 366 {
367 LogId(REPORT_STANDARD, MSG_DETECT_RELATED_BUNDLE_NOT_CACHED, wzRelatedBundleId, sczCachePath); 367 LogId(REPORT_STANDARD, MSG_DETECT_RELATED_BUNDLE_NOT_CACHED, wzRelatedBundleCode, sczCachePath);
368 } 368 }
369 369
370 pRelatedBundle->fPlannable = fCached; 370 pRelatedBundle->fPlannable = fCached;
371 371
372 hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY, &dependencyProvider.sczKey); 372 hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_PROVIDER_KEY, &dependencyProvider.sczKey);
373 ExitOnPathFailure(hr, fExists, "Failed to read provider key from registry for bundle: %ls", wzRelatedBundleId); 373 ExitOnPathFailure(hr, fExists, "Failed to read provider key from registry for bundle: %ls", wzRelatedBundleCode);
374 374
375 if (dependencyProvider.sczKey && *dependencyProvider.sczKey) 375 if (dependencyProvider.sczKey && *dependencyProvider.sczKey)
376 { 376 {
@@ -379,23 +379,23 @@ static HRESULT LoadRelatedBundleFromKey(
379 dependencyProvider.fImported = TRUE; 379 dependencyProvider.fImported = TRUE;
380 380
381 hr = StrAllocString(&dependencyProvider.sczVersion, pRelatedBundle->pVersion->sczVersion, 0); 381 hr = StrAllocString(&dependencyProvider.sczVersion, pRelatedBundle->pVersion->sczVersion, 0);
382 ExitOnFailure(hr, "Failed to copy version for bundle: %ls", wzRelatedBundleId); 382 ExitOnFailure(hr, "Failed to copy version for bundle: %ls", wzRelatedBundleCode);
383 383
384 hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME, &dependencyProvider.sczDisplayName); 384 hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_DISPLAY_NAME, &dependencyProvider.sczDisplayName);
385 ExitOnPathFailure(hr, fExists, "Failed to copy display name for bundle: %ls", wzRelatedBundleId); 385 ExitOnPathFailure(hr, fExists, "Failed to copy display name for bundle: %ls", wzRelatedBundleCode);
386 } 386 }
387 387
388 hr = RegReadString(hkBundleId, BURN_REGISTRATION_REGISTRY_BUNDLE_TAG, &pRelatedBundle->sczTag); 388 hr = RegReadString(hkBundleCode, BURN_REGISTRATION_REGISTRY_BUNDLE_TAG, &pRelatedBundle->sczTag);
389 ExitOnPathFailure(hr, fExists, "Failed to read tag from registry for bundle: %ls", wzRelatedBundleId); 389 ExitOnPathFailure(hr, fExists, "Failed to read tag from registry for bundle: %ls", wzRelatedBundleCode);
390 390
391 pRelatedBundle->detectRelationType = relationType; 391 pRelatedBundle->detectRelationType = relationType;
392 392
393 hr = PseudoBundleInitializeRelated(&pRelatedBundle->package, fSupportsBurnProtocol, fPerMachine, wzRelatedBundleId, 393 hr = PseudoBundleInitializeRelated(&pRelatedBundle->package, fSupportsBurnProtocol, fPerMachine, wzRelatedBundleCode,
394#ifdef DEBUG 394#ifdef DEBUG
395 pRelatedBundle->detectRelationType, 395 pRelatedBundle->detectRelationType,
396#endif 396#endif
397 fCached, sczCachePath, qwFileSize, pBundleDependencyProvider); 397 fCached, sczCachePath, qwFileSize, pBundleDependencyProvider);
398 ExitOnFailure(hr, "Failed to initialize related bundle to represent bundle: %ls", wzRelatedBundleId); 398 ExitOnFailure(hr, "Failed to initialize related bundle to represent bundle: %ls", wzRelatedBundleCode);
399 399
400LExit: 400LExit:
401 DependencyUninitializeProvider(&dependencyProvider); 401 DependencyUninitializeProvider(&dependencyProvider);
diff --git a/src/burn/engine/section.cpp b/src/burn/engine/section.cpp
index fd3ce92c..f7c508f3 100644
--- a/src/burn/engine/section.cpp
+++ b/src/burn/engine/section.cpp
@@ -9,7 +9,7 @@ typedef struct _BURN_SECTION_HEADER
9 DWORD dwMagic; 9 DWORD dwMagic;
10 DWORD dwVersion; 10 DWORD dwVersion;
11 11
12 GUID guidBundleId; 12 GUID guidBundleCode;
13 13
14 DWORD dwStubSize; 14 DWORD dwStubSize;
15 DWORD dwOriginalChecksum; 15 DWORD dwOriginalChecksum;
@@ -235,7 +235,7 @@ extern "C" HRESULT SectionInitialize(
235 memcpy(pSection->rgcbContainers, pBurnSectionHeader->rgcbContainers, sizeof(DWORD) * pSection->cContainers); 235 memcpy(pSection->rgcbContainers, pBurnSectionHeader->rgcbContainers, sizeof(DWORD) * pSection->cContainers);
236 236
237 // TODO: verify more than just the GUID. 237 // TODO: verify more than just the GUID.
238 hr = VerifySectionMatchesMemoryPEHeader(pBurnSectionHeader->guidBundleId); 238 hr = VerifySectionMatchesMemoryPEHeader(pBurnSectionHeader->guidBundleCode);
239 ExitOnRootFailure(hr, "PE Header from file didn't match PE Header in memory."); 239 ExitOnRootFailure(hr, "PE Header from file didn't match PE Header in memory.");
240 240
241LExit: 241LExit:
@@ -299,7 +299,7 @@ LExit:
299} 299}
300 300
301HRESULT VerifySectionMatchesMemoryPEHeader( 301HRESULT VerifySectionMatchesMemoryPEHeader(
302 __in REFGUID pBundleId 302 __in REFGUID pBundleCode
303 ) 303 )
304{ 304{
305 HRESULT hr = S_OK; 305 HRESULT hr = S_OK;
@@ -382,7 +382,7 @@ HRESULT VerifySectionMatchesMemoryPEHeader(
382 ExitOnRootFailure(hr, "Failed to read section info, unsupported version: %08x", pBurnSectionHeader->dwVersion); 382 ExitOnRootFailure(hr, "Failed to read section info, unsupported version: %08x", pBurnSectionHeader->dwVersion);
383 } 383 }
384 384
385 if (!::IsEqualGUID(pBundleId, pBurnSectionHeader->guidBundleId)) 385 if (!::IsEqualGUID(pBundleCode, pBurnSectionHeader->guidBundleCode))
386 { 386 {
387 hr = E_INVALIDDATA; 387 hr = E_INVALIDDATA;
388 ExitOnRootFailure(hr, "Bundle guid didn't match the guid in the PE Header in memory."); 388 ExitOnRootFailure(hr, "Bundle guid didn't match the guid in the PE Header in memory.");