1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#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
// constants
enum BURN_PAYLOAD_PACKAGING
{
BURN_PAYLOAD_PACKAGING_NONE,
BURN_PAYLOAD_PACKAGING_DOWNLOAD,
BURN_PAYLOAD_PACKAGING_EMBEDDED,
BURN_PAYLOAD_PACKAGING_EXTERNAL,
};
enum BURN_PAYLOAD_STATE
{
BURN_PAYLOAD_STATE_NONE,
BURN_PAYLOAD_STATE_ACQUIRED,
BURN_PAYLOAD_STATE_CACHED,
};
// structs
typedef struct _BURN_PAYLOAD
{
LPWSTR sczKey;
BURN_PAYLOAD_PACKAGING packaging;
BOOL fLayoutOnly;
DWORD64 qwFileSize;
LPWSTR sczFilePath; // file path relative to the execute location
BYTE* pbHash;
DWORD cbHash;
LPWSTR sczSourcePath;
BURN_CONTAINER* pContainer;
DOWNLOAD_SOURCE downloadSource;
// mutable members
BURN_PAYLOAD_STATE state;
LPWSTR sczLocalFilePath; // location of extracted or downloaded copy
} BURN_PAYLOAD;
typedef struct _BURN_PAYLOADS
{
BURN_PAYLOAD* rgPayloads;
DWORD cPayloads;
} BURN_PAYLOADS;
// functions
HRESULT PayloadsParseFromXml(
__in BURN_PAYLOADS* pPayloads,
__in_opt BURN_CONTAINERS* pContainers,
__in IXMLDOMNode* pixnBundle
);
void PayloadsUninitialize(
__in BURN_PAYLOADS* pPayloads
);
HRESULT PayloadExtractFromContainer(
__in BURN_PAYLOADS* pPayloads,
__in_opt BURN_CONTAINER* pContainer,
__in BURN_CONTAINER_CONTEXT* pContainerContext,
__in_z LPCWSTR wzTargetDir
);
HRESULT PayloadFindById(
__in BURN_PAYLOADS* pPayloads,
__in_z LPCWSTR wzId,
__out BURN_PAYLOAD** ppPayload
);
HRESULT PayloadFindEmbeddedBySourcePath(
__in BURN_PAYLOADS* pPayloads,
__in_z LPCWSTR wzStreamName,
__out BURN_PAYLOAD** ppPayload
);
#if defined(__cplusplus)
}
#endif
|