diff options
Diffstat (limited to 'src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h')
-rw-r--r-- | src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h b/src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h new file mode 100644 index 00000000..f71e3b92 --- /dev/null +++ b/src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h | |||
@@ -0,0 +1,48 @@ | |||
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 | #include <windows.h> | ||
6 | |||
7 | #include "BundleExtensionEngine.h" | ||
8 | #include "BundleExtension.h" | ||
9 | #include "IBundleExtensionEngine.h" | ||
10 | #include "IBundleExtension.h" | ||
11 | |||
12 | static HRESULT BextBaseBEProcSearch( | ||
13 | __in IBundleExtension* pBE, | ||
14 | __in BUNDLE_EXTENSION_SEARCH_ARGS* pArgs, | ||
15 | __inout BUNDLE_EXTENSION_SEARCH_RESULTS* /*pResults*/ | ||
16 | ) | ||
17 | { | ||
18 | return pBE->Search(pArgs->wzId, pArgs->wzVariable); | ||
19 | } | ||
20 | |||
21 | /******************************************************************* | ||
22 | BextBaseBundleExtensionProc - requires pvContext to be of type IBundleExtension. | ||
23 | Provides a default mapping between the message based | ||
24 | BundleExtension interface and the COM-based BundleExtension interface. | ||
25 | |||
26 | *******************************************************************/ | ||
27 | static HRESULT WINAPI BextBaseBundleExtensionProc( | ||
28 | __in BUNDLE_EXTENSION_MESSAGE message, | ||
29 | __in const LPVOID pvArgs, | ||
30 | __inout LPVOID pvResults, | ||
31 | __in_opt LPVOID pvContext | ||
32 | ) | ||
33 | { | ||
34 | IBundleExtension* pBE = reinterpret_cast<IBundleExtension*>(pvContext); | ||
35 | HRESULT hr = pBE->BundleExtensionProc(message, pvArgs, pvResults, pvContext); | ||
36 | |||
37 | if (E_NOTIMPL == hr) | ||
38 | { | ||
39 | switch (message) | ||
40 | { | ||
41 | case BUNDLE_EXTENSION_MESSAGE_SEARCH: | ||
42 | hr = BextBaseBEProcSearch(pBE, reinterpret_cast<BUNDLE_EXTENSION_SEARCH_ARGS*>(pvArgs), reinterpret_cast<BUNDLE_EXTENSION_SEARCH_RESULTS*>(pvResults)); | ||
43 | break; | ||
44 | } | ||
45 | } | ||
46 | |||
47 | return hr; | ||
48 | } | ||