From c55c1f2993d4ec950fc6b04508bc2b03cd733035 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 6 Jan 2019 21:09:03 -0600 Subject: Undo changes for condutil/varutil. --- src/dutil/condutil.cpp | 20 --- src/dutil/dutil.vcxproj | 4 - src/dutil/dutil.vcxproj.filters | 12 -- src/dutil/inc/condutil.h | 19 --- src/dutil/inc/varutil.h | 126 ------------------ src/dutil/precomp.h | 2 - src/dutil/varutil.cpp | 274 ---------------------------------------- 7 files changed, 457 deletions(-) delete mode 100644 src/dutil/condutil.cpp delete mode 100644 src/dutil/inc/condutil.h delete mode 100644 src/dutil/inc/varutil.h delete mode 100644 src/dutil/varutil.cpp diff --git a/src/dutil/condutil.cpp b/src/dutil/condutil.cpp deleted file mode 100644 index 99923c18..00000000 --- a/src/dutil/condutil.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -#include "precomp.h" - -// function definitions - -/******************************************************************** -CondEvaluate - evaluates the condition using the given variables. -********************************************************************/ -extern "C" HRESULT DAPI CondEvaluate( - __in VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzCondition, - __out BOOL* pf - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzCondition); - UNREFERENCED_PARAMETER(pf); - return E_NOTIMPL; -} diff --git a/src/dutil/dutil.vcxproj b/src/dutil/dutil.vcxproj index 606eb87b..d8393cb4 100644 --- a/src/dutil/dutil.vcxproj +++ b/src/dutil/dutil.vcxproj @@ -168,7 +168,6 @@ - @@ -220,7 +219,6 @@ - @@ -236,7 +234,6 @@ - @@ -276,7 +273,6 @@ - diff --git a/src/dutil/dutil.vcxproj.filters b/src/dutil/dutil.vcxproj.filters index b7fda8d4..ddd008ed 100644 --- a/src/dutil/dutil.vcxproj.filters +++ b/src/dutil/dutil.vcxproj.filters @@ -45,9 +45,6 @@ Source Files - - Source Files - Source Files @@ -162,9 +159,6 @@ Source Files - - Source Files - Source Files @@ -221,9 +215,6 @@ Header Files - - Header Files - Header Files @@ -329,9 +320,6 @@ Header Files - - Header Files - Header Files diff --git a/src/dutil/inc/condutil.h b/src/dutil/inc/condutil.h deleted file mode 100644 index fb960042..00000000 --- a/src/dutil/inc/condutil.h +++ /dev/null @@ -1,19 +0,0 @@ -#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 - -// function declarations - -HRESULT DAPI CondEvaluate( - __in VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzCondition, - __out BOOL* pf - ); - -#if defined(__cplusplus) -} -#endif diff --git a/src/dutil/inc/varutil.h b/src/dutil/inc/varutil.h deleted file mode 100644 index 86d0aca0..00000000 --- a/src/dutil/inc/varutil.h +++ /dev/null @@ -1,126 +0,0 @@ -#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 - -#define ReleaseVariables(vh) if (vh) { VarDestroy(vh, NULL); } -#define ReleaseVariableValue(v) if (v) { VarFreeValue(v); } -#define ReleaseNullVariables(vh) if (vh) { VarDestroy(vh, NULL); vh = NULL; } -#define ReleaseNullVariableValue(v) if (v) { VarFreeValue(v); v = NULL; } - -typedef void* VARIABLE_ENUM_HANDLE; -typedef void* VARIABLES_HANDLE; -typedef const void* C_VARIABLES_HANDLE; - -extern const int VARIABLE_ENUM_HANDLE_BYTES; -extern const int VARIABLES_HANDLE_BYTES; - -typedef void(*PFN_FREEVARIABLECONTEXT)( - __in LPVOID pvContext - ); - -typedef enum VARIABLE_VALUE_TYPE -{ - VARIABLE_VALUE_TYPE_NONE, - VARIABLE_VALUE_TYPE_NUMERIC, - VARIABLE_VALUE_TYPE_STRING, - VARIABLE_VALUE_TYPE_VERSION, -} VARIABLE_VALUE_TYPE; - -typedef struct _VARIABLE_VALUE -{ - VARIABLE_VALUE_TYPE type; - union - { - LONGLONG llValue; - DWORD64 qwValue; - LPWSTR sczValue; - }; - BOOL fHidden; - LPVOID pvContext; -} VARIABLE_VALUE; - -HRESULT DAPI VarCreate( - __out_bcount(VARIABLES_HANDLE_BYTES) VARIABLES_HANDLE* ppVariables - ); -void DAPI VarDestroy( - __in_bcount(VARIABLES_HANDLE_BYTES) VARIABLES_HANDLE pVariables, - __in_opt PFN_FREEVARIABLECONTEXT vpfFreeVariableContext - ); -void DAPI VarFreeValue( - __in VARIABLE_VALUE* pValue - ); -HRESULT DAPI VarEscapeString( - __in_z LPCWSTR wzIn, - __out_z LPWSTR* psczOut - ); -HRESULT DAPI VarFormatString( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzIn, - __out_z_opt LPWSTR* psczOut, - __out_opt DWORD* pcchOut - ); -HRESULT DAPI VarGetFormatted( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __out_z LPWSTR* psczValue - ); -HRESULT DAPI VarGetNumeric( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __out LONGLONG* pllValue - ); -HRESULT DAPI VarGetString( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __out_z LPWSTR* psczValue - ); -HRESULT DAPI VarGetVersion( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __in DWORD64* pqwValue - ); -HRESULT DAPI VarGetValue( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __out VARIABLE_VALUE** ppValue - ); -HRESULT DAPI VarSetNumeric( - __in VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __in LONGLONG llValue - ); -HRESULT DAPI VarSetString( - __in VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __in_z_opt LPCWSTR wzValue - ); -HRESULT DAPI VarSetVersion( - __in VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __in DWORD64 qwValue - ); -HRESULT DAPI VarSetValue( - __in VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __in VARIABLE_VALUE* pValue - ); -HRESULT DAPI VarStartEnum( - __in VARIABLES_HANDLE pVariables, - __out_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE* ppEnum, - __out VARIABLE_VALUE** ppValue - ); -HRESULT DAPI VarNextVariable( - __in_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE pEnum, - __out VARIABLE_VALUE** ppValue - ); -void DAPI VarFinishEnum( - __in_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE pEnum - ); - -#if defined(__cplusplus) -} -#endif diff --git a/src/dutil/precomp.h b/src/dutil/precomp.h index c305573d..374d0fc1 100644 --- a/src/dutil/precomp.h +++ b/src/dutil/precomp.h @@ -86,8 +86,6 @@ #include "uncutil.h" #include "uriutil.h" #include "userutil.h" -#include "varutil.h" -#include "condutil.h" // NOTE: This must come after varutil.h since it uses it. #include "wiutil.h" #include "wuautil.h" #include // This header is needed for msxml2.h to compile correctly diff --git a/src/dutil/varutil.cpp b/src/dutil/varutil.cpp deleted file mode 100644 index 88716105..00000000 --- a/src/dutil/varutil.cpp +++ /dev/null @@ -1,274 +0,0 @@ -// 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. - -#include "precomp.h" - -struct VARIABLE_ENUM_STRUCT -{ -}; - -struct VARIABLES_STRUCT -{ -}; - -const int VARIABLE_ENUM_HANDLE_BYTES = sizeof(VARIABLE_ENUM_STRUCT); -const int VARIABLES_HANDLE_BYTES = sizeof(VARIABLES_STRUCT); - -// function definitions - -/******************************************************************** -VarCreate - creates a variables group. -********************************************************************/ -extern "C" HRESULT DAPI VarCreate( - __out_bcount(VARIABLES_HANDLE_BYTES) VARIABLES_HANDLE* ppVariables - ) -{ - UNREFERENCED_PARAMETER(ppVariables); - return E_NOTIMPL; -} - -/******************************************************************** -VarDestroy - destroys a variables group, accepting an optional callback - to help free the variable contexts. -********************************************************************/ -extern "C" void DAPI VarDestroy( - __in_bcount(VARIABLES_HANDLE_BYTES) VARIABLES_HANDLE pVariables, - __in_opt PFN_FREEVARIABLECONTEXT vpfFreeVariableContext - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(vpfFreeVariableContext); -} - -/******************************************************************** -VarFreeValue - frees a variable value. -********************************************************************/ -extern "C" void DAPI VarFreeValue( - __in VARIABLE_VALUE* pValue - ) -{ - UNREFERENCED_PARAMETER(pValue); -} - -/******************************************************************** -VarEscapeString - escapes special characters in wzIn so that it can - be used in conditions or variable values. -********************************************************************/ -extern "C" HRESULT DAPI VarEscapeString( - __in_z LPCWSTR wzIn, - __out_z LPWSTR* psczOut - ) -{ - UNREFERENCED_PARAMETER(wzIn); - UNREFERENCED_PARAMETER(psczOut); - return E_NOTIMPL; -} - -/******************************************************************** -VarFormatString - similar to MsiFormatRecord. -********************************************************************/ -extern "C" HRESULT DAPI VarFormatString( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzIn, - __out_z_opt LPWSTR* psczOut, - __out_opt DWORD* pcchOut - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzIn); - UNREFERENCED_PARAMETER(psczOut); - UNREFERENCED_PARAMETER(pcchOut); - return E_NOTIMPL; -} - -/******************************************************************** -VarGetFormatted - gets the formatted value of a single variable. -********************************************************************/ -extern "C" HRESULT DAPI VarGetFormatted( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __out_z LPWSTR* psczValue - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzVariable); - UNREFERENCED_PARAMETER(psczValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarGetNumeric - gets the numeric value of a variable. If the type of - the variable is not numeric, it will attempt to - convert the value into a number. -********************************************************************/ -extern "C" HRESULT DAPI VarGetNumeric( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __out LONGLONG* pllValue - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzVariable); - UNREFERENCED_PARAMETER(pllValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarGetString - gets the unformatted string value of a variable. If - the type of the variable is not string, it will - convert the value to a string. -********************************************************************/ -extern "C" HRESULT DAPI VarGetString( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __out_z LPWSTR* psczValue - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzVariable); - UNREFERENCED_PARAMETER(psczValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarGetVersion - gets the version value of a variable. If the type of - the variable is not version, it will attempt to - convert the value into a version. -********************************************************************/ -extern "C" HRESULT DAPI VarGetVersion( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __in DWORD64* pqwValue - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzVariable); - UNREFERENCED_PARAMETER(pqwValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarGetValue - gets the value of a variable along with its metadata. -********************************************************************/ -extern "C" HRESULT DAPI VarGetValue( - __in C_VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __out VARIABLE_VALUE** ppValue - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzVariable); - UNREFERENCED_PARAMETER(ppValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarSetNumeric - sets the value of the variable to a number, the type - of the variable to numeric, and adds the variable to - the group if necessary. -********************************************************************/ -extern "C" HRESULT DAPI VarSetNumeric( - __in VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __in LONGLONG llValue - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzVariable); - UNREFERENCED_PARAMETER(llValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarSetString - sets the value of the variable to a string, the type - of the variable to string, and adds the variable to - the group if necessary. -********************************************************************/ -extern "C" HRESULT DAPI VarSetString( - __in VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __in_z_opt LPCWSTR wzValue - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzVariable); - UNREFERENCED_PARAMETER(wzValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarSetVersion - sets the value of the variable to a version, the type - of the variable to version, and adds the variable to - the group if necessary. -********************************************************************/ -extern "C" HRESULT DAPI VarSetVersion( - __in VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __in DWORD64 qwValue - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzVariable); - UNREFERENCED_PARAMETER(qwValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarSetValue - sets the value of the variable along with its metadata. - Also adds the variable to the group if necessary. -********************************************************************/ -extern "C" HRESULT DAPI VarSetValue( - __in VARIABLES_HANDLE pVariables, - __in_z LPCWSTR wzVariable, - __in VARIABLE_VALUE* pValue - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(wzVariable); - UNREFERENCED_PARAMETER(pValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarStartEnum - starts the enumeration of the variable group. There - is no guarantee for the order of the variable enumeration. - -NOTE: caller is responsible for calling VarFinishEnum even if function fails -********************************************************************/ -extern "C" HRESULT DAPI VarStartEnum( - __in VARIABLES_HANDLE pVariables, - __out_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE* ppEnum, - __out VARIABLE_VALUE** ppValue - ) -{ - UNREFERENCED_PARAMETER(pVariables); - UNREFERENCED_PARAMETER(ppEnum); - UNREFERENCED_PARAMETER(ppValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarNextVariable - continues the enumeration of the variable group. It - will fail if any variables were added or removed - during the enumeration. - -NOTE: caller is responsible for calling VarFinishEnum even if function fails -********************************************************************/ -extern "C" HRESULT DAPI VarNextVariable( - __in_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE pEnum, - __out VARIABLE_VALUE** ppValue - ) -{ - UNREFERENCED_PARAMETER(pEnum); - UNREFERENCED_PARAMETER(ppValue); - return E_NOTIMPL; -} - -/******************************************************************** -VarFinishEnum - cleans up resources used for the enumeration. -********************************************************************/ -extern "C" void DAPI VarFinishEnum( - __in_bcount(VARIABLE_ENUM_HANDLE_BYTES) VARIABLE_ENUM_HANDLE pEnum - ) -{ - UNREFERENCED_PARAMETER(pEnum); -} -- cgit v1.2.3-55-g6feb