diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-11-15 19:54:20 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-11-17 19:06:00 -0600 |
| commit | 0d873d28c2dd18444afa08b748e91f495ed1cf5c (patch) | |
| tree | c82e70b9ac047b316f976e6078bf19ff19cc7d95 /src/engine/container.cpp | |
| parent | d6aceb1277606fe1f1688d40ee0895d0b89c6705 (diff) | |
| download | wix-0d873d28c2dd18444afa08b748e91f495ed1cf5c.tar.gz wix-0d873d28c2dd18444afa08b748e91f495ed1cf5c.tar.bz2 wix-0d873d28c2dd18444afa08b748e91f495ed1cf5c.zip | |
Add plan tests.
Diffstat (limited to 'src/engine/container.cpp')
| -rw-r--r-- | src/engine/container.cpp | 36 |
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 | ||
| 19 | extern "C" HRESULT ContainersParseFromXml( | 19 | extern "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 | ||
| 144 | extern "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 | |||
| 167 | LExit: | ||
| 168 | return hr; | ||
| 169 | } | ||
| 170 | |||
| 153 | extern "C" void ContainersUninitialize( | 171 | extern "C" void ContainersUninitialize( |
| 154 | __in BURN_CONTAINERS* pContainers | 172 | __in BURN_CONTAINERS* pContainers |
| 155 | ) | 173 | ) |
