summaryrefslogtreecommitdiff
path: root/src/libs/dutil/WixToolset.DUtil/inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/inc')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/inc/apputil.h21
-rw-r--r--src/libs/dutil/WixToolset.DUtil/inc/dutil.h2
-rw-r--r--src/libs/dutil/WixToolset.DUtil/inc/dutilsources.h1
-rw-r--r--src/libs/dutil/WixToolset.DUtil/inc/procutil.h2
-rw-r--r--src/libs/dutil/WixToolset.DUtil/inc/thrdutil.h22
5 files changed, 47 insertions, 1 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/apputil.h b/src/libs/dutil/WixToolset.DUtil/inc/apputil.h
index 95a98e73..e2812ee4 100644
--- a/src/libs/dutil/WixToolset.DUtil/inc/apputil.h
+++ b/src/libs/dutil/WixToolset.DUtil/inc/apputil.h
@@ -84,6 +84,27 @@ HRESULT DAPI AppEscapeCommandLineArgumentFormattedArgs(
84 __in va_list args 84 __in va_list args
85 ); 85 );
86 86
87/********************************************************************
88AppWaitForSingleObject - wrapper for ::WaitForSingleObject.
89
90********************************************************************/
91HRESULT DAPI AppWaitForSingleObject(
92 __in HANDLE hHandle,
93 __in DWORD dwMilliseconds
94 );
95
96/********************************************************************
97AppWaitForMultipleObjects - wrapper for ::WaitForMultipleObjects.
98
99********************************************************************/
100HRESULT DAPI AppWaitForMultipleObjects(
101 __in DWORD dwCount,
102 __in const HANDLE* rghHandles,
103 __in BOOL fWaitAll,
104 __in DWORD dwMilliseconds,
105 __out_opt DWORD* pdwSignaledIndex
106 );
107
87#ifdef __cplusplus 108#ifdef __cplusplus
88} 109}
89#endif 110#endif
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/dutil.h b/src/libs/dutil/WixToolset.DUtil/inc/dutil.h
index 6f099f35..2db64812 100644
--- a/src/libs/dutil/WixToolset.DUtil/inc/dutil.h
+++ b/src/libs/dutil/WixToolset.DUtil/inc/dutil.h
@@ -130,6 +130,7 @@ void DAPI Dutil_RootFailure(__in_z LPCSTR szFile, __in int iLine, __in HRESULT h
130#define ExitOnWin32ErrorSource(d, e, x, s, ...) if (ERROR_SUCCESS != e) { x = HRESULT_FROM_WIN32(e); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTraceSource(d, x, s, __VA_ARGS__); goto LExit; } 130#define ExitOnWin32ErrorSource(d, e, x, s, ...) if (ERROR_SUCCESS != e) { x = HRESULT_FROM_WIN32(e); if (!FAILED(x)) { x = E_FAIL; } Dutil_RootFailure(__FILE__, __LINE__, x); ExitTraceSource(d, x, s, __VA_ARGS__); goto LExit; }
131#define ExitOnOptionalXmlQueryFailureSource(d, x, b, s, ...) { { if (S_FALSE == x || E_NOTFOUND == x) { b = FALSE; x = S_OK; } else { b = SUCCEEDED(x); } }; ExitOnRootFailureSource(d, x, s, __VA_ARGS__); } 131#define ExitOnOptionalXmlQueryFailureSource(d, x, b, s, ...) { { if (S_FALSE == x || E_NOTFOUND == x) { b = FALSE; x = S_OK; } else { b = SUCCEEDED(x); } }; ExitOnRootFailureSource(d, x, s, __VA_ARGS__); }
132#define ExitOnRequiredXmlQueryFailureSource(d, x, s, ...) { if (S_FALSE == x) { x = E_NOTFOUND; } ExitOnRootFailureSource(d, x, s, __VA_ARGS__); } 132#define ExitOnRequiredXmlQueryFailureSource(d, x, s, ...) { if (S_FALSE == x) { x = E_NOTFOUND; } ExitOnRootFailureSource(d, x, s, __VA_ARGS__); }
133#define ExitOnWaitObjectFailureSource(d, x, b, s, ...) { { if (HRESULT_FROM_WIN32(WAIT_TIMEOUT) == x) { b = TRUE; x = S_OK; } else { b = FALSE; } }; ExitOnFailureSource(d, x, s, __VA_ARGS__); }
133 134
134#define ExitOnLastError(x, s, ...) ExitOnLastErrorSource(DUTIL_SOURCE_DEFAULT, x, s, __VA_ARGS__) 135#define ExitOnLastError(x, s, ...) ExitOnLastErrorSource(DUTIL_SOURCE_DEFAULT, x, s, __VA_ARGS__)
135#define ExitOnLastErrorDebugTrace(x, s, ...) ExitOnLastErrorDebugTraceSource(DUTIL_SOURCE_DEFAULT, x, s, __VA_ARGS__) 136#define ExitOnLastErrorDebugTrace(x, s, ...) ExitOnLastErrorDebugTraceSource(DUTIL_SOURCE_DEFAULT, x, s, __VA_ARGS__)
@@ -145,6 +146,7 @@ void DAPI Dutil_RootFailure(__in_z LPCSTR szFile, __in int iLine, __in HRESULT h
145#define ExitOnWin32Error(e, x, s, ...) ExitOnWin32ErrorSource(DUTIL_SOURCE_DEFAULT, e, x, s, __VA_ARGS__) 146#define ExitOnWin32Error(e, x, s, ...) ExitOnWin32ErrorSource(DUTIL_SOURCE_DEFAULT, e, x, s, __VA_ARGS__)
146#define ExitOnOptionalXmlQueryFailure(x, b, s, ...) ExitOnOptionalXmlQueryFailureSource(DUTIL_SOURCE_DEFAULT, x, b, s, __VA_ARGS__) 147#define ExitOnOptionalXmlQueryFailure(x, b, s, ...) ExitOnOptionalXmlQueryFailureSource(DUTIL_SOURCE_DEFAULT, x, b, s, __VA_ARGS__)
147#define ExitOnRequiredXmlQueryFailure(x, s, ...) ExitOnRequiredXmlQueryFailureSource(DUTIL_SOURCE_DEFAULT, x, s, __VA_ARGS__) 148#define ExitOnRequiredXmlQueryFailure(x, s, ...) ExitOnRequiredXmlQueryFailureSource(DUTIL_SOURCE_DEFAULT, x, s, __VA_ARGS__)
149#define ExitOnWaitObjectFailure(x, b, s, ...) ExitOnWaitObjectFailureSource(DUTIL_SOURCE_DEFAULT, x, b, s, __VA_ARGS__)
148 150
149// release macros 151// release macros
150#define ReleaseObject(x) if (x) { x->Release(); } 152#define ReleaseObject(x) if (x) { x->Release(); }
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/dutilsources.h b/src/libs/dutil/WixToolset.DUtil/inc/dutilsources.h
index f1dd5d1a..664c21e5 100644
--- a/src/libs/dutil/WixToolset.DUtil/inc/dutilsources.h
+++ b/src/libs/dutil/WixToolset.DUtil/inc/dutilsources.h
@@ -63,6 +63,7 @@ typedef enum DUTIL_SOURCE
63 DUTIL_SOURCE_VERUTIL, 63 DUTIL_SOURCE_VERUTIL,
64 DUTIL_SOURCE_WNDUTIL, 64 DUTIL_SOURCE_WNDUTIL,
65 DUTIL_SOURCE_ENVUTIL, 65 DUTIL_SOURCE_ENVUTIL,
66 DUTIL_SOURCE_THRDUTIL,
66 67
67 DUTIL_SOURCE_EXTERNAL = 256, 68 DUTIL_SOURCE_EXTERNAL = 256,
68} DUTIL_SOURCE; 69} DUTIL_SOURCE;
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/procutil.h b/src/libs/dutil/WixToolset.DUtil/inc/procutil.h
index d5ab9242..d61d91b5 100644
--- a/src/libs/dutil/WixToolset.DUtil/inc/procutil.h
+++ b/src/libs/dutil/WixToolset.DUtil/inc/procutil.h
@@ -58,7 +58,7 @@ HRESULT DAPI ProcExecute(
58HRESULT DAPI ProcWaitForCompletion( 58HRESULT DAPI ProcWaitForCompletion(
59 __in HANDLE hProcess, 59 __in HANDLE hProcess,
60 __in DWORD dwTimeout, 60 __in DWORD dwTimeout,
61 __out DWORD *pReturnCode 61 __out_opt DWORD* pdwReturnCode
62 ); 62 );
63HRESULT DAPI ProcWaitForIds( 63HRESULT DAPI ProcWaitForIds(
64 __in_ecount(cProcessIds) const DWORD* pdwProcessIds, 64 __in_ecount(cProcessIds) const DWORD* pdwProcessIds,
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/thrdutil.h b/src/libs/dutil/WixToolset.DUtil/inc/thrdutil.h
new file mode 100644
index 00000000..47e159a1
--- /dev/null
+++ b/src/libs/dutil/WixToolset.DUtil/inc/thrdutil.h
@@ -0,0 +1,22 @@
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#ifdef __cplusplus
6extern "C" {
7#endif
8
9/********************************************************************
10 ThrdWaitForCompletion - waits for thread to complete and gets return code.
11
12 *******************************************************************/
13HRESULT DAPI ThrdWaitForCompletion(
14 __in HANDLE hThread,
15 __in DWORD dwTimeout,
16 __out_opt DWORD* pdwReturnCode
17 );
18
19#ifdef __cplusplus
20}
21#endif
22