From 61847dddd4fd497057c780658e383c4627de19ec Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 29 Dec 2018 22:12:08 -0600 Subject: Import code from old v4 repo --- src/engine/section.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/engine/section.h (limited to 'src/engine/section.h') diff --git a/src/engine/section.h b/src/engine/section.h new file mode 100644 index 00000000..78331469 --- /dev/null +++ b/src/engine/section.h @@ -0,0 +1,54 @@ +#pragma once +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + + +#if defined(__cplusplus) +extern "C" { +#endif + + +// structs + +typedef struct _BURN_SECTION +{ + HANDLE hEngineFile; + HANDLE hSourceEngineFile; + + DWORD cbStub; + DWORD cbEngineSize; // stub + UX container + original certficiate + DWORD64 qwBundleSize; // stub + UX container + original certificate [+ attached containers* + final certificate] + + DWORD dwChecksumOffset; + DWORD dwCertificateTableOffset; + DWORD dwOriginalChecksumAndSignatureOffset; + + DWORD dwOriginalChecksum; + DWORD dwOriginalSignatureOffset; + DWORD dwOriginalSignatureSize; + + DWORD dwFormat; + DWORD cContainers; + DWORD* rgcbContainers; +} BURN_SECTION; + + +HRESULT SectionInitialize( + __in BURN_SECTION* pSection, + __in HANDLE hEngineFile, + __in HANDLE hSourceEngineFile + ); +void SectionUninitialize( + __in BURN_SECTION* pSection + ); +HRESULT SectionGetAttachedContainerInfo( + __in BURN_SECTION* pSection, + __in DWORD iContainerIndex, + __in DWORD dwExpectedType, + __out DWORD64* pqwOffset, + __out DWORD64* pqwSize, + __out BOOL* pfPresent + ); + +#if defined(__cplusplus) +} +#endif -- cgit v1.2.3-55-g6feb