aboutsummaryrefslogtreecommitdiff
path: root/src/engine/container.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/container.cpp')
-rw-r--r--src/engine/container.cpp36
1 files changed, 27 insertions, 9 deletions
diff --git a/src/engine/container.cpp b/src/engine/container.cpp
index ada9025b..55a16afb 100644
--- a/src/engine/container.cpp
+++ b/src/engine/container.cpp
@@ -17,7 +17,6 @@ static HRESULT GetAttachedContainerInfo(
17// function definitions 17// function definitions
18 18
19extern "C" HRESULT ContainersParseFromXml( 19extern "C" HRESULT ContainersParseFromXml(
20 __in BURN_SECTION* pSection,
21 __in BURN_CONTAINERS* pContainers, 20 __in BURN_CONTAINERS* pContainers,
22 __in IXMLDOMNode* pixnBundle 21 __in IXMLDOMNode* pixnBundle
23 ) 22 )
@@ -128,14 +127,6 @@ extern "C" HRESULT ContainersParseFromXml(
128 ExitOnFailure(hr, "Failed to get @Hash."); 127 ExitOnFailure(hr, "Failed to get @Hash.");
129 } 128 }
130 129
131 // If the container is attached, make sure the information in the section matches what the
132 // manifest contained and get the offset to the container.
133 if (pContainer->fAttached)
134 {
135 hr = SectionGetAttachedContainerInfo(pSection, pContainer->dwAttachedIndex, pContainer->type, &pContainer->qwAttachedOffset, &pContainer->qwFileSize, &pContainer->fActuallyAttached);
136 ExitOnFailure(hr, "Failed to get attached container information.");
137 }
138
139 // prepare next iteration 130 // prepare next iteration
140 ReleaseNullObject(pixnNode); 131 ReleaseNullObject(pixnNode);
141 } 132 }
@@ -150,6 +141,33 @@ LExit:
150 return hr; 141 return hr;
151} 142}
152 143
144extern "C" HRESULT ContainersInitialize(
145 __in BURN_CONTAINERS* pContainers,
146 __in BURN_SECTION* pSection
147 )
148{
149 HRESULT hr = S_OK;
150
151 if (pContainers->rgContainers)
152 {
153 for (DWORD i = 0; i < pContainers->cContainers; ++i)
154 {
155 BURN_CONTAINER* pContainer = &pContainers->rgContainers[i];
156
157 // If the container is attached, make sure the information in the section matches what the
158 // manifest contained and get the offset to the container.
159 if (pContainer->fAttached)
160 {
161 hr = SectionGetAttachedContainerInfo(pSection, pContainer->dwAttachedIndex, pContainer->type, &pContainer->qwAttachedOffset, &pContainer->qwFileSize, &pContainer->fActuallyAttached);
162 ExitOnFailure(hr, "Failed to get attached container information.");
163 }
164 }
165 }
166
167LExit:
168 return hr;
169}
170
153extern "C" void ContainersUninitialize( 171extern "C" void ContainersUninitialize(
154 __in BURN_CONTAINERS* pContainers 172 __in BURN_CONTAINERS* pContainers
155 ) 173 )