diff options
Diffstat (limited to 'src/engine/externalengine.h')
-rw-r--r-- | src/engine/externalengine.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/engine/externalengine.h b/src/engine/externalengine.h new file mode 100644 index 00000000..7910b224 --- /dev/null +++ b/src/engine/externalengine.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 | #define ValidateMessageParameter(x, pv, type) { x = ExternalEngineValidateMessageParameter(pv, offsetof(type, cbSize), sizeof(type)); if (FAILED(x)) { goto LExit; }} | ||
6 | #define ValidateMessageArgs(x, pv, type, identifier) ValidateMessageParameter(x, pv, type); const type* identifier = reinterpret_cast<type*>(pv); UNREFERENCED_PARAMETER(identifier) | ||
7 | #define ValidateMessageResults(x, pv, type, identifier) ValidateMessageParameter(x, pv, type); type* identifier = reinterpret_cast<type*>(pv); UNREFERENCED_PARAMETER(identifier) | ||
8 | |||
9 | |||
10 | #if defined(__cplusplus) | ||
11 | extern "C" { | ||
12 | #endif | ||
13 | |||
14 | HRESULT WINAPI ExternalEngineValidateMessageParameter( | ||
15 | __in_opt const LPVOID pv, | ||
16 | __in SIZE_T cbSizeOffset, | ||
17 | __in DWORD dwMinimumSize | ||
18 | ); | ||
19 | |||
20 | #if defined(__cplusplus) | ||
21 | } | ||
22 | #endif | ||