Undo changes for condutil/varutil.
Sean Hall committed
Jan 6, 2019 at 21:09 UTC
c55c1f2993d4ec950fc6b04508bc2b03cd733035
7 files changed
-457
src/dutil/condutil.cpp
deleted
-20
@@ -1,20 +0,0 @@
1
-// 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.
2
-
3
-#include "precomp.h"
4
-
5
-// function definitions
6
-
7
-/********************************************************************
8
-CondEvaluate - evaluates the condition using the given variables.
9
-********************************************************************/
10
-extern "C" HRESULT DAPI CondEvaluate(
11
- __in VARIABLES_HANDLE pVariables,
12
- __in_z LPCWSTR wzCondition,
13
- __out BOOL* pf
14
- )
15
-{
16
- UNREFERENCED_PARAMETER(pVariables);
17
- UNREFERENCED_PARAMETER(wzCondition);
18
- UNREFERENCED_PARAMETER(pf);
19
- return E_NOTIMPL;
20
-}
src/dutil/dutil.vcxproj
-4
@@ -168,7 +168,6 @@
168
<ClCompile Include="cabcutil.cpp" />
169
<ClCompile Include="cabutil.cpp" />
170
<ClCompile Include="certutil.cpp" />
171
- <ClCompile Include="condutil.cpp" />
171
<ClCompile Include="conutil.cpp" />
172
<ClCompile Include="cryputil.cpp" />
173
<ClCompile Include="deputil.cpp" />
@@ -220,7 +219,6 @@
219
<ClCompile Include="uncutil.cpp" />
220
<ClCompile Include="uriutil.cpp" />
221
<ClCompile Include="userutil.cpp" />
223
- <ClCompile Include="varutil.cpp" />
222
<ClCompile Include="wiutil.cpp" />
223
<ClCompile Include="wuautil.cpp" />
224
<ClCompile Include="xmlutil.cpp" />
@@ -236,7 +234,6 @@
234
<ClInclude Include="inc\cabcutil.h" />
235
<ClInclude Include="inc\cabutil.h" />
236
<ClInclude Include="inc\certutil.h" />
239
- <ClInclude Include="inc\condutil.h" />
237
<ClInclude Include="inc\conutil.h" />
238
<ClInclude Include="inc\cryputil.h" />
239
<ClInclude Include="inc\deputil.h" />
@@ -276,7 +273,6 @@
273
<ClInclude Include="inc\timeutil.h" />
274
<ClInclude Include="inc\uriutil.h" />
275
<ClInclude Include="inc\userutil.h" />
279
- <ClInclude Include="inc\varutil.h" />
276
<ClInclude Include="inc\wiutil.h" />
277
<ClInclude Include="inc\wuautil.h" />
278
<ClInclude Include="inc\xmlutil.h" />
src/dutil/dutil.vcxproj.filters
-12
@@ -45,9 +45,6 @@
45
<ClCompile Include="certutil.cpp">
46
<Filter>Source Files</Filter>
47
</ClCompile>
48
- <ClCompile Include="condutil.cpp">
49
- <Filter>Source Files</Filter>
50
- </ClCompile>
48
<ClCompile Include="conutil.cpp">
49
<Filter>Source Files</Filter>
50
</ClCompile>
@@ -162,9 +159,6 @@
159
<ClCompile Include="userutil.cpp">
160
<Filter>Source Files</Filter>
161
</ClCompile>
165
- <ClCompile Include="varutil.cpp">
166
- <Filter>Source Files</Filter>
167
- </ClCompile>
162
<ClCompile Include="wiutil.cpp">
163
<Filter>Source Files</Filter>
164
</ClCompile>
@@ -221,9 +215,6 @@
215
<ClInclude Include="inc\certutil.h">
216
<Filter>Header Files</Filter>
217
</ClInclude>
224
- <ClInclude Include="inc\condutil.h">
225
- <Filter>Header Files</Filter>
226
- </ClInclude>
218
<ClInclude Include="inc\conutil.h">
219
<Filter>Header Files</Filter>
220
</ClInclude>
@@ -329,9 +320,6 @@
320
<ClInclude Include="inc\userutil.h">
321
<Filter>Header Files</Filter>
322
</ClInclude>
332
- <ClInclude Include="inc\varutil.h">
333
- <Filter>Header Files</Filter>
334
- </ClInclude>
323
<ClInclude Include="inc\wiutil.h">
324
<Filter>Header Files</Filter>
325
</ClInclude>
src/dutil/inc/condutil.h
deleted
-19
@@ -1,19 +0,0 @@
1
-#pragma once
2
-// 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.
3
-
4
-
5
-#if defined(__cplusplus)
6
-extern "C" {
7
-#endif
8
-
9
-// function declarations
10
-
11
-HRESULT DAPI CondEvaluate(
12
- __in VARIABLES_HANDLE pVariables,
13
- __in_z LPCWSTR wzCondition,
14
- __out BOOL* pf
15
- );
16
-
17
-#if defined(__cplusplus)
18
-}
19
-#endif
src/dutil/inc/varutil.h
deleted
-126
@@ -1,126 +0,0 @@
1
-#pragma once
2
-// 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.
3
-
4
-
5
-#if defined(__cplusplus)
6
-extern "C" {
7
-#endif
8
-
9
-#define ReleaseVariables(vh) if (vh) { VarDestroy(vh, NULL); }
10
-#define ReleaseVariableValue(v) if (v) { VarFreeValue(v); }
11
-#define ReleaseNullVariables(vh) if (vh) { VarDestroy(vh, NULL); vh = NULL; }
12
-#define ReleaseNullVariableValue(v) if (v) { VarFreeValue(v); v = NULL; }
13
-
14
-typedef void* VARIABLE_ENUM_HANDLE;
15
-typedef void* VARIABLES_HANDLE;
16
-typedef const void* C_VARIABLES_HANDLE;
17
-
18
-extern const int VARIABLE_ENUM_HANDLE_BYTES;
19
-extern const int VARIABLES_HANDLE_BYTES;
20
-
21
-typedef void(*PFN_FREEVARIABLECONTEXT)(
22
- __in LPVOID pvContext
23
- );
24
-
25
-typedef enum VARIABLE_VALUE_TYPE
26
-{
27
- VARIABLE_VALUE_TYPE_NONE,
28
- VARIABLE_VALUE_TYPE_NUMERIC,
29
- VARIABLE_VALUE_TYPE_STRING,
30
- VARIABLE_VALUE_TYPE_VERSION,
31
-} VARIABLE_VALUE_TYPE;
32
-
33
-typedef struct _VARIABLE_VALUE
34
-{
35
- VARIABLE_VALUE_TYPE type;
36
- union
37
- {
38
- LONGLONG llValue;
39
- DWORD64 qwValue;
40
- LPWSTR sczValue;
41
- };
42
- BOOL fHidden;
43
- LPVOID pvContext;
44
-} VARIABLE_VALUE;
45
-
46
-HRESULT DAPI VarCreate(
47
- __out_bcount(VARIABLES_HANDLE_BYTES) VARIABLES_HANDLE* ppVariables
48
- );
49
-void DAPI VarDestroy(
50
- __in_bcount(VARIABLES_HANDLE_BYTES) VARIABLES_HANDLE pVariables,
51
- __in_opt PFN_FREEVARIABLECONTEXT vpfFreeVariableContext
52
- );
53
-void DAPI VarFreeValue(
54
- __in VARIABLE_VALUE* pValue
55
- );
56
-HRESULT DAPI VarEscapeString(
57
- __in_z LPCWSTR wzIn,
58
- __out_z LPWSTR* psczOut
59
- );
60
-HRESULT DAPI VarFormatString(
61
- __in C_VARIABLES_HANDLE pVariables,
62
- __in_z LPCWSTR wzIn,
63
- __out_z_opt LPWSTR* psczOut,
64
- __out_opt DWORD* pcchOut
65
- );
66
-HRESULT DAPI VarGetFormatted(
67
- __in C_VARIABLES_HANDLE pVariables,
68
- __in_z LPCWSTR wzVariable,
69
- __out_z LPWSTR* psczValue
70
- );
71
-HRESULT DAPI VarGetNumeric(
72
- __in C_VARIABLES_HANDLE pVariables,
73
- __in_z LPCWSTR wzVariable,
74
- __out LONGLONG* pllValue
75
- );
76
-HRESULT DAPI VarGetString(
77
- __in C_VARIABLES_HANDLE pVariables,
78
- __in_z LPCWSTR wzVariable,
79
- __out_z LPWSTR* psczValue
80
- );
81
-HRESULT DAPI VarGetVersion(
82
- __in C_VARIABLES_HANDLE pVariables,
83
- __in_z LPCWSTR wzVariable,
84
- __in DWORD64* pqwValue
85
- );
86
-HRESULT DAPI VarGetValue(
87
- __in C_VARIABLES_HANDLE pVariables,
88
- __in_z LPCWSTR wzVariable,
89
- __out VARIABLE_VALUE** ppValue
90
- );
91
-HRESULT DAPI VarSetNumeric(
92
- __in VARIABLES_HANDLE pVariables,
93
- __in_z LPCWSTR wzVariable,
94
- __in LONGLONG llValue
95
- );
96
-HRESULT DAPI VarSetString(
97
- __in VARIABLES_HANDLE pVariables,
98
- __in_z LPCWSTR wzVariable,
99
- __in_z_opt LPCWSTR wzValue
100
- );
101
-HRESULT DAPI VarSetVersion(
102
- __in VARIABLES_HANDLE pVariables,
103
- __in_z LPCWSTR wzVariable,
104
- __in DWORD64 qwValue
105
- );
106
-HRESULT DAPI VarSetValue(
107
- __in VARIABLES_HANDLE pVariables,
108
- __in_z LPCWSTR wzVariable,
109
- __in VARIABLE_VALUE* pValue
110
- );
111
-HRESULT DAPI VarStartEnum(
112
- __in VARIABLES_HANDLE pVariables,
113
- __out_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE* ppEnum,
114
- __out VARIABLE_VALUE** ppValue
115
- );
116
-HRESULT DAPI VarNextVariable(
117
- __in_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE pEnum,
118
- __out VARIABLE_VALUE** ppValue
119
- );
120
-void DAPI VarFinishEnum(
121
- __in_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE pEnum
122
- );
123
-
124
-#if defined(__cplusplus)
125
-}
126
-#endif
src/dutil/precomp.h
-2
@@ -86,8 +86,6 @@
86
#include "uncutil.h"
87
#include "uriutil.h"
88
#include "userutil.h"
89
-#include "varutil.h"
90
-#include "condutil.h" // NOTE: This must come after varutil.h since it uses it.
89
#include "wiutil.h"
90
#include "wuautil.h"
91
#include <comutil.h> // This header is needed for msxml2.h to compile correctly
src/dutil/varutil.cpp
deleted
-274
@@ -1,274 +0,0 @@
1
-// 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.
2
-
3
-#include "precomp.h"
4
-
5
-struct VARIABLE_ENUM_STRUCT
6
-{
7
-};
8
-
9
-struct VARIABLES_STRUCT
10
-{
11
-};
12
-
13
-const int VARIABLE_ENUM_HANDLE_BYTES = sizeof(VARIABLE_ENUM_STRUCT);
14
-const int VARIABLES_HANDLE_BYTES = sizeof(VARIABLES_STRUCT);
15
-
16
-// function definitions
17
-
18
-/********************************************************************
19
-VarCreate - creates a variables group.
20
-********************************************************************/
21
-extern "C" HRESULT DAPI VarCreate(
22
- __out_bcount(VARIABLES_HANDLE_BYTES) VARIABLES_HANDLE* ppVariables
23
- )
24
-{
25
- UNREFERENCED_PARAMETER(ppVariables);
26
- return E_NOTIMPL;
27
-}
28
-
29
-/********************************************************************
30
-VarDestroy - destroys a variables group, accepting an optional callback
31
- to help free the variable contexts.
32
-********************************************************************/
33
-extern "C" void DAPI VarDestroy(
34
- __in_bcount(VARIABLES_HANDLE_BYTES) VARIABLES_HANDLE pVariables,
35
- __in_opt PFN_FREEVARIABLECONTEXT vpfFreeVariableContext
36
- )
37
-{
38
- UNREFERENCED_PARAMETER(pVariables);
39
- UNREFERENCED_PARAMETER(vpfFreeVariableContext);
40
-}
41
-
42
-/********************************************************************
43
-VarFreeValue - frees a variable value.
44
-********************************************************************/
45
-extern "C" void DAPI VarFreeValue(
46
- __in VARIABLE_VALUE* pValue
47
- )
48
-{
49
- UNREFERENCED_PARAMETER(pValue);
50
-}
51
-
52
-/********************************************************************
53
-VarEscapeString - escapes special characters in wzIn so that it can
54
- be used in conditions or variable values.
55
-********************************************************************/
56
-extern "C" HRESULT DAPI VarEscapeString(
57
- __in_z LPCWSTR wzIn,
58
- __out_z LPWSTR* psczOut
59
- )
60
-{
61
- UNREFERENCED_PARAMETER(wzIn);
62
- UNREFERENCED_PARAMETER(psczOut);
63
- return E_NOTIMPL;
64
-}
65
-
66
-/********************************************************************
67
-VarFormatString - similar to MsiFormatRecord.
68
-********************************************************************/
69
-extern "C" HRESULT DAPI VarFormatString(
70
- __in C_VARIABLES_HANDLE pVariables,
71
- __in_z LPCWSTR wzIn,
72
- __out_z_opt LPWSTR* psczOut,
73
- __out_opt DWORD* pcchOut
74
- )
75
-{
76
- UNREFERENCED_PARAMETER(pVariables);
77
- UNREFERENCED_PARAMETER(wzIn);
78
- UNREFERENCED_PARAMETER(psczOut);
79
- UNREFERENCED_PARAMETER(pcchOut);
80
- return E_NOTIMPL;
81
-}
82
-
83
-/********************************************************************
84
-VarGetFormatted - gets the formatted value of a single variable.
85
-********************************************************************/
86
-extern "C" HRESULT DAPI VarGetFormatted(
87
- __in C_VARIABLES_HANDLE pVariables,
88
- __in_z LPCWSTR wzVariable,
89
- __out_z LPWSTR* psczValue
90
- )
91
-{
92
- UNREFERENCED_PARAMETER(pVariables);
93
- UNREFERENCED_PARAMETER(wzVariable);
94
- UNREFERENCED_PARAMETER(psczValue);
95
- return E_NOTIMPL;
96
-}
97
-
98
-/********************************************************************
99
-VarGetNumeric - gets the numeric value of a variable. If the type of
100
- the variable is not numeric, it will attempt to
101
- convert the value into a number.
102
-********************************************************************/
103
-extern "C" HRESULT DAPI VarGetNumeric(
104
- __in C_VARIABLES_HANDLE pVariables,
105
- __in_z LPCWSTR wzVariable,
106
- __out LONGLONG* pllValue
107
- )
108
-{
109
- UNREFERENCED_PARAMETER(pVariables);
110
- UNREFERENCED_PARAMETER(wzVariable);
111
- UNREFERENCED_PARAMETER(pllValue);
112
- return E_NOTIMPL;
113
-}
114
-
115
-/********************************************************************
116
-VarGetString - gets the unformatted string value of a variable. If
117
- the type of the variable is not string, it will
118
- convert the value to a string.
119
-********************************************************************/
120
-extern "C" HRESULT DAPI VarGetString(
121
- __in C_VARIABLES_HANDLE pVariables,
122
- __in_z LPCWSTR wzVariable,
123
- __out_z LPWSTR* psczValue
124
- )
125
-{
126
- UNREFERENCED_PARAMETER(pVariables);
127
- UNREFERENCED_PARAMETER(wzVariable);
128
- UNREFERENCED_PARAMETER(psczValue);
129
- return E_NOTIMPL;
130
-}
131
-
132
-/********************************************************************
133
-VarGetVersion - gets the version value of a variable. If the type of
134
- the variable is not version, it will attempt to
135
- convert the value into a version.
136
-********************************************************************/
137
-extern "C" HRESULT DAPI VarGetVersion(
138
- __in C_VARIABLES_HANDLE pVariables,
139
- __in_z LPCWSTR wzVariable,
140
- __in DWORD64* pqwValue
141
- )
142
-{
143
- UNREFERENCED_PARAMETER(pVariables);
144
- UNREFERENCED_PARAMETER(wzVariable);
145
- UNREFERENCED_PARAMETER(pqwValue);
146
- return E_NOTIMPL;
147
-}
148
-
149
-/********************************************************************
150
-VarGetValue - gets the value of a variable along with its metadata.
151
-********************************************************************/
152
-extern "C" HRESULT DAPI VarGetValue(
153
- __in C_VARIABLES_HANDLE pVariables,
154
- __in_z LPCWSTR wzVariable,
155
- __out VARIABLE_VALUE** ppValue
156
- )
157
-{
158
- UNREFERENCED_PARAMETER(pVariables);
159
- UNREFERENCED_PARAMETER(wzVariable);
160
- UNREFERENCED_PARAMETER(ppValue);
161
- return E_NOTIMPL;
162
-}
163
-
164
-/********************************************************************
165
-VarSetNumeric - sets the value of the variable to a number, the type
166
- of the variable to numeric, and adds the variable to
167
- the group if necessary.
168
-********************************************************************/
169
-extern "C" HRESULT DAPI VarSetNumeric(
170
- __in VARIABLES_HANDLE pVariables,
171
- __in_z LPCWSTR wzVariable,
172
- __in LONGLONG llValue
173
- )
174
-{
175
- UNREFERENCED_PARAMETER(pVariables);
176
- UNREFERENCED_PARAMETER(wzVariable);
177
- UNREFERENCED_PARAMETER(llValue);
178
- return E_NOTIMPL;
179
-}
180
-
181
-/********************************************************************
182
-VarSetString - sets the value of the variable to a string, the type
183
- of the variable to string, and adds the variable to
184
- the group if necessary.
185
-********************************************************************/
186
-extern "C" HRESULT DAPI VarSetString(
187
- __in VARIABLES_HANDLE pVariables,
188
- __in_z LPCWSTR wzVariable,
189
- __in_z_opt LPCWSTR wzValue
190
- )
191
-{
192
- UNREFERENCED_PARAMETER(pVariables);
193
- UNREFERENCED_PARAMETER(wzVariable);
194
- UNREFERENCED_PARAMETER(wzValue);
195
- return E_NOTIMPL;
196
-}
197
-
198
-/********************************************************************
199
-VarSetVersion - sets the value of the variable to a version, the type
200
- of the variable to version, and adds the variable to
201
- the group if necessary.
202
-********************************************************************/
203
-extern "C" HRESULT DAPI VarSetVersion(
204
- __in VARIABLES_HANDLE pVariables,
205
- __in_z LPCWSTR wzVariable,
206
- __in DWORD64 qwValue
207
- )
208
-{
209
- UNREFERENCED_PARAMETER(pVariables);
210
- UNREFERENCED_PARAMETER(wzVariable);
211
- UNREFERENCED_PARAMETER(qwValue);
212
- return E_NOTIMPL;
213
-}
214
-
215
-/********************************************************************
216
-VarSetValue - sets the value of the variable along with its metadata.
217
- Also adds the variable to the group if necessary.
218
-********************************************************************/
219
-extern "C" HRESULT DAPI VarSetValue(
220
- __in VARIABLES_HANDLE pVariables,
221
- __in_z LPCWSTR wzVariable,
222
- __in VARIABLE_VALUE* pValue
223
- )
224
-{
225
- UNREFERENCED_PARAMETER(pVariables);
226
- UNREFERENCED_PARAMETER(wzVariable);
227
- UNREFERENCED_PARAMETER(pValue);
228
- return E_NOTIMPL;
229
-}
230
-
231
-/********************************************************************
232
-VarStartEnum - starts the enumeration of the variable group. There
233
- is no guarantee for the order of the variable enumeration.
234
-
235
-NOTE: caller is responsible for calling VarFinishEnum even if function fails
236
-********************************************************************/
237
-extern "C" HRESULT DAPI VarStartEnum(
238
- __in VARIABLES_HANDLE pVariables,
239
- __out_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE* ppEnum,
240
- __out VARIABLE_VALUE** ppValue
241
- )
242
-{
243
- UNREFERENCED_PARAMETER(pVariables);
244
- UNREFERENCED_PARAMETER(ppEnum);
245
- UNREFERENCED_PARAMETER(ppValue);
246
- return E_NOTIMPL;
247
-}
248
-
249
-/********************************************************************
250
-VarNextVariable - continues the enumeration of the variable group. It
251
- will fail if any variables were added or removed
252
- during the enumeration.
253
-
254
-NOTE: caller is responsible for calling VarFinishEnum even if function fails
255
-********************************************************************/
256
-extern "C" HRESULT DAPI VarNextVariable(
257
- __in_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE pEnum,
258
- __out VARIABLE_VALUE** ppValue
259
- )
260
-{
261
- UNREFERENCED_PARAMETER(pEnum);
262
- UNREFERENCED_PARAMETER(ppValue);
263
- return E_NOTIMPL;
264
-}
265
-
266
-/********************************************************************
267
-VarFinishEnum - cleans up resources used for the enumeration.
268
-********************************************************************/
269
-extern "C" void DAPI VarFinishEnum(
270
- __in_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE pEnum
271
- )
272
-{
273
- UNREFERENCED_PARAMETER(pEnum);
274
-}