summaryrefslogtreecommitdiff
path: root/src/inc/posterror.h
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-11-23 10:09:09 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2016-11-23 10:09:09 (GMT)
commit4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (patch)
tree98110734c91668dfdbb126fcc0e15ddbd93738ca /src/inc/posterror.h
parentfa45f57ed55137c75ac870356a1b8f76c84b229c (diff)
downloadcoreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.zip
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.gz
coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.bz2
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'src/inc/posterror.h')
-rw-r--r--src/inc/posterror.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/inc/posterror.h b/src/inc/posterror.h
new file mode 100644
index 0000000..816d14e
--- /dev/null
+++ b/src/inc/posterror.h
@@ -0,0 +1,50 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//*****************************************************************************
+// UtilCode.h
+//
+// Utility functions implemented in UtilCode.lib.
+//
+
+//*****************************************************************************
+
+#ifndef __PostError_h__
+#define __PostError_h__
+
+#include "switches.h"
+
+//*****************************************************************************
+// This function will post an error for the client. If the LOWORD(hrRpt) can
+// be found as a valid error message, then it is loaded and formatted with
+// the arguments passed in. If it cannot be found, then the error is checked
+// against FormatMessage to see if it is a system error. System errors are
+// not formatted so no add'l parameters are required. If any errors in this
+// process occur, hrRpt is returned for the client with no error posted.
+//*****************************************************************************
+extern "C"
+HRESULT __cdecl PostError( // Returned error.
+ HRESULT hrRpt, // Reported error.
+ ...); // Error arguments.
+
+extern "C"
+HRESULT __cdecl PostErrorVA( // Returned error.
+ HRESULT hrRpt, // Reported error.
+ va_list marker); // Error arguments.
+
+//*****************************************************************************
+// This function formats an error message, but doesn't fill the IErrorInfo.
+//*****************************************************************************
+HRESULT __cdecl FormatRuntimeErrorVa(
+ __out_ecount(cchMsg) WCHAR *rcMsg, // Buffer into which to format.
+ ULONG cchMsg, // Size of buffer, characters.
+ HRESULT hrRpt, // The HR to report.
+ va_list marker); // Optional args.
+
+HRESULT __cdecl FormatRuntimeError(
+ __out_ecount(cchMsg) WCHAR *rcMsg, // Buffer into which to format.
+ ULONG cchMsg, // Size of buffer, characters.
+ HRESULT hrRpt, // The HR to report.
+ ...); // Optional args.
+
+#endif // __PostError_h__