diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-03-30 18:52:22 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-03-30 21:43:47 +1000 |
commit | 51af2090a7c911d0ae1b8232b11ca67613adf3ef (patch) | |
tree | b73a03186dac016c9c7f31237b8bcdb5ba8ea58e /src/bextutil/inc/BextBaseBundleExtensionProc.h | |
parent | 83e4e5d759903e70a9bbf75d4d084bfda49e5877 (diff) | |
download | wix-51af2090a7c911d0ae1b8232b11ca67613adf3ef.tar.gz wix-51af2090a7c911d0ae1b8232b11ca67613adf3ef.tar.bz2 wix-51af2090a7c911d0ae1b8232b11ca67613adf3ef.zip |
Add bextutil.
Diffstat (limited to 'src/bextutil/inc/BextBaseBundleExtensionProc.h')
-rw-r--r-- | src/bextutil/inc/BextBaseBundleExtensionProc.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/bextutil/inc/BextBaseBundleExtensionProc.h b/src/bextutil/inc/BextBaseBundleExtensionProc.h new file mode 100644 index 00000000..f71e3b92 --- /dev/null +++ b/src/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 | } | ||