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
88
89
90
91
92
93
94
95
96
97
98
99
100
|
#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_VARIANT_TYPE
{
BURN_VARIANT_TYPE_NONE,
BURN_VARIANT_TYPE_FORMATTED,
BURN_VARIANT_TYPE_NUMERIC,
BURN_VARIANT_TYPE_STRING, // when formatting this value should be used as is (don't continue recursively formatting).
BURN_VARIANT_TYPE_VERSION,
};
// struct
typedef struct _BURN_VARIANT
{
union
{
LONGLONG llValue;
VERUTIL_VERSION* pValue;
LPWSTR sczValue;
};
BURN_VARIANT_TYPE Type;
} BURN_VARIANT;
// function declarations
void BVariantUninitialize(
__in BURN_VARIANT* pVariant
);
HRESULT BVariantGetNumeric(
__in BURN_VARIANT* pVariant,
__out LONGLONG* pllValue
);
HRESULT BVariantGetString(
__in BURN_VARIANT* pVariant,
__out_z LPWSTR* psczValue
);
HRESULT BVariantGetVersion(
__in BURN_VARIANT* pVariant,
__out VERUTIL_VERSION** ppValue
);
HRESULT BVariantGetVersionHidden(
__in BURN_VARIANT* pVariant,
__in BOOL fHidden,
__out VERUTIL_VERSION** ppValue
);
HRESULT BVariantGetVersionSilent(
__in BURN_VARIANT* pVariant,
__in BOOL fSilent,
__out VERUTIL_VERSION** ppValue
);
HRESULT BVariantSetNumeric(
__in BURN_VARIANT* pVariant,
__in LONGLONG llValue
);
HRESULT BVariantSetString(
__in BURN_VARIANT* pVariant,
__in_z_opt LPCWSTR wzValue,
__in DWORD_PTR cchValue,
__in BOOL fFormatted
);
HRESULT BVariantSetVersion(
__in BURN_VARIANT* pVariant,
__in VERUTIL_VERSION* pValue
);
/********************************************************************
BVariantSetValue - Convenience function that calls BVariantUninitialize,
BVariantSetNumeric, BVariantSetString, or
BVariantSetVersion based on the type of pValue.
********************************************************************/
HRESULT BVariantSetValue(
__in BURN_VARIANT* pVariant,
__in BURN_VARIANT* pValue
);
/********************************************************************
BVariantCopy - creates a copy of pSource.
********************************************************************/
HRESULT BVariantCopy(
__in BURN_VARIANT* pSource,
__out BURN_VARIANT* pTarget
);
HRESULT BVariantChangeType(
__in BURN_VARIANT* pVariant,
__in BURN_VARIANT_TYPE type
);
#if defined(__cplusplus)
}
#endif
|