aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/dependency.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/burn/engine/dependency.cpp')
-rw-r--r--src/burn/engine/dependency.cpp38
1 files changed, 19 insertions, 19 deletions
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;