diff options
Diffstat (limited to 'src/burn/engine/baengine.h')
-rw-r--r-- | src/burn/engine/baengine.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/src/burn/engine/baengine.h b/src/burn/engine/baengine.h new file mode 100644 index 00000000..97cfea9c --- /dev/null +++ b/src/burn/engine/baengine.h | |||
@@ -0,0 +1,84 @@ | |||
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 | #if defined(__cplusplus) | ||
6 | extern "C" { | ||
7 | #endif | ||
8 | |||
9 | // structs | ||
10 | |||
11 | typedef struct _BAENGINE_CONTEXT | ||
12 | { | ||
13 | BURN_ENGINE_STATE* pEngineState; | ||
14 | QUEUTIL_QUEUE_HANDLE hQueue; | ||
15 | HANDLE hQueueSemaphore; | ||
16 | CRITICAL_SECTION csQueue; | ||
17 | |||
18 | PIPE_RPC_HANDLE hRpcPipe; | ||
19 | HANDLE hThread; | ||
20 | } BAENGINE_CONTEXT; | ||
21 | |||
22 | typedef struct _BAENGINE_ACTION | ||
23 | { | ||
24 | WM_BURN dwMessage; | ||
25 | union | ||
26 | { | ||
27 | struct | ||
28 | { | ||
29 | HWND hwndParent; | ||
30 | } detect; | ||
31 | struct | ||
32 | { | ||
33 | BOOTSTRAPPER_ACTION action; | ||
34 | } plan; | ||
35 | struct | ||
36 | { | ||
37 | HWND hwndParent; | ||
38 | } elevate; | ||
39 | struct | ||
40 | { | ||
41 | HWND hwndParent; | ||
42 | } apply; | ||
43 | BURN_LAUNCH_APPROVED_EXE launchApprovedExe; | ||
44 | struct | ||
45 | { | ||
46 | DWORD dwExitCode; | ||
47 | } quit; | ||
48 | }; | ||
49 | } BAENGINE_ACTION; | ||
50 | |||
51 | // function declarations | ||
52 | |||
53 | HRESULT BAEngineCreateContext( | ||
54 | __in BURN_ENGINE_STATE* pEngineState, | ||
55 | __inout BAENGINE_CONTEXT** ppContext | ||
56 | ); | ||
57 | |||
58 | void BAEngineFreeContext( | ||
59 | __in BAENGINE_CONTEXT* pContext | ||
60 | ); | ||
61 | |||
62 | void DAPI BAEngineFreeAction( | ||
63 | __in BAENGINE_ACTION* pAction | ||
64 | ); | ||
65 | |||
66 | HRESULT BAEngineStartListening( | ||
67 | __in BAENGINE_CONTEXT* pContext, | ||
68 | __in HANDLE hBAEnginePipe | ||
69 | ); | ||
70 | |||
71 | HRESULT BAEngineStopListening( | ||
72 | __in BAENGINE_CONTEXT * pContext | ||
73 | ); | ||
74 | |||
75 | HRESULT WINAPI EngineForApplicationProc( | ||
76 | __in BAENGINE_CONTEXT* pvContext, | ||
77 | __in BOOTSTRAPPER_ENGINE_MESSAGE message, | ||
78 | __in_bcount(cbArgs) const LPVOID pvArgs, | ||
79 | __in DWORD /*cbArgs*/ | ||
80 | ); | ||
81 | |||
82 | #if defined(__cplusplus) | ||
83 | } | ||
84 | #endif | ||