aboutsummaryrefslogtreecommitdiff
path: root/src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.cpp')
-rw-r--r--src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.cpp35
1 files changed, 13 insertions, 22 deletions
diff --git a/src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.cpp b/src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.cpp
index 01750b4b..ba559b05 100644
--- a/src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.cpp
+++ b/src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.cpp
@@ -29,37 +29,28 @@ public: //IBootstrapperApplication
29 29
30 hr = BalGetRelatedBundleVariable(wzBundleId, STRING_VARIABLE, &wzValue); 30 hr = BalGetRelatedBundleVariable(wzBundleId, STRING_VARIABLE, &wzValue);
31 31
32 ExitOnFailure(hr, "Failed to get related bundle string variable."); 32 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Retrieved related bundle variable with BAFunctions: AString = %ws, Error: 0x%x", wzValue, hr);
33
34 if (wzValue)
35 {
36 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Retrieved related bundle variable with BAFunctions: AString = %ws", wzValue);
37 }
38 33
39 hr = BalGetRelatedBundleVariable(wzBundleId, NUMBER_VARIABLE, &wzValue); 34 hr = BalGetRelatedBundleVariable(wzBundleId, NUMBER_VARIABLE, &wzValue);
40 35
41 if (wzValue) 36 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Retrieved related bundle variable with BAFunctions: ANumber = %ws, Error: 0x%x", wzValue, hr);
42 {
43 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Retrieved related bundle variable with BAFunctions: ANumber = %ws", wzValue);
44 }
45 37
46 hr = __super::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, pfCancel); 38 hr = __super::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, pfCancel);
47 LExit: 39
48 ReleaseStr(wzValue); 40 ReleaseStr(wzValue);
49 return hr; 41 return hr;
50 } 42 }
43
51private: 44private:
52 45
53 46
54public: 47public:
55 // 48 //
56 // Constructor - initialize member variables. 49 // Constructor - initialize member variables.
57 // 50 //
58 CBafRelatedBundleVariableTesting( 51 CBafRelatedBundleVariableTesting(
59 __in HMODULE hModule, 52 __in HMODULE hModule
60 __in IBootstrapperEngine* pEngine, 53 ) : CBalBaseBAFunctions(hModule)
61 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs
62 ) : CBalBaseBAFunctions(hModule, pEngine, pArgs)
63 { 54 {
64 } 55 }
65 56
@@ -82,21 +73,21 @@ HRESULT WINAPI CreateBAFunctions(
82{ 73{
83 HRESULT hr = S_OK; 74 HRESULT hr = S_OK;
84 CBafRelatedBundleVariableTesting* pBAFunctions = NULL; 75 CBafRelatedBundleVariableTesting* pBAFunctions = NULL;
85 IBootstrapperEngine* pEngine = NULL;
86 76
87 hr = BalInitializeFromCreateArgs(pArgs->pBootstrapperCreateArgs, &pEngine); 77 BalInitialize(pArgs->pEngine);
88 ExitOnFailure(hr, "Failed to initialize Bal.");
89 78
90 pBAFunctions = new CBafRelatedBundleVariableTesting(hModule, pEngine, pArgs); 79 pBAFunctions = new CBafRelatedBundleVariableTesting(hModule);
91 ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CBafRelatedBundleVariableTesting object."); 80 ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CBafRelatedBundleVariableTesting object.");
92 81
82 hr = pBAFunctions->OnCreate(pArgs->pEngine, pArgs->pCommand);
83 ExitOnFailure(hr, "Failed to create BA function");
84
93 pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; 85 pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc;
94 pResults->pvBAFunctionsProcContext = pBAFunctions; 86 pResults->pvBAFunctionsProcContext = pBAFunctions;
95 pBAFunctions = NULL; 87 pBAFunctions = NULL;
96 88
97LExit: 89LExit:
98 ReleaseObject(pBAFunctions); 90 ReleaseObject(pBAFunctions);
99 ReleaseObject(pEngine);
100 91
101 return hr; 92 return hr;
102} 93}