diff options
author | Rob Mensching <rob@firegiant.com> | 2024-01-10 23:48:40 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2024-01-11 18:24:06 -0800 |
commit | 57b7689b2dc5e971911d1c6d48eebb5424ebca89 (patch) | |
tree | 5a40c4ec7cec3548a119c6ef1a2a274c2258f627 /src/burn/engine/burnpipe.h | |
parent | f676ceeaedbba4125d3e0c691959afcba182d008 (diff) | |
download | wix-57b7689b2dc5e971911d1c6d48eebb5424ebca89.tar.gz wix-57b7689b2dc5e971911d1c6d48eebb5424ebca89.tar.bz2 wix-57b7689b2dc5e971911d1c6d48eebb5424ebca89.zip |
Rename inter-Burn communication related pipe file
When BootstrapperApplications move out of proc there will be another set of
pipes in Burn that behave differently from the inter-Burn communication pipes
that exist now. So renaming the existing pipe related files now to better
reflect that it is related to Burn talking to Burn when elevated or embedded.
Diffstat (limited to 'src/burn/engine/burnpipe.h')
-rw-r--r-- | src/burn/engine/burnpipe.h | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/src/burn/engine/burnpipe.h b/src/burn/engine/burnpipe.h new file mode 100644 index 00000000..6571c0e2 --- /dev/null +++ b/src/burn/engine/burnpipe.h | |||
@@ -0,0 +1,104 @@ | |||
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 | #ifdef __cplusplus | ||
6 | extern "C" { | ||
7 | #endif | ||
8 | |||
9 | typedef struct _BURN_PIPE_CONNECTION | ||
10 | { | ||
11 | LPWSTR sczName; | ||
12 | LPWSTR sczSecret; | ||
13 | DWORD dwProcessId; | ||
14 | |||
15 | HANDLE hProcess; | ||
16 | HANDLE hPipe; | ||
17 | HANDLE hCachePipe; | ||
18 | HANDLE hLoggingPipe; | ||
19 | } BURN_PIPE_CONNECTION; | ||
20 | |||
21 | typedef enum _BURN_PIPE_MESSAGE_TYPE : DWORD | ||
22 | { | ||
23 | BURN_PIPE_MESSAGE_TYPE_LOG = 0xF0000001, | ||
24 | BURN_PIPE_MESSAGE_TYPE_COMPLETE = 0xF0000002, | ||
25 | BURN_PIPE_MESSAGE_TYPE_TERMINATE = 0xF0000003, | ||
26 | } BURN_PIPE_MESSAGE_TYPE; | ||
27 | |||
28 | typedef struct _BURN_PIPE_MESSAGE | ||
29 | { | ||
30 | DWORD dwMessage; | ||
31 | DWORD cbData; | ||
32 | |||
33 | BOOL fAllocatedData; | ||
34 | LPVOID pvData; | ||
35 | } BURN_PIPE_MESSAGE; | ||
36 | |||
37 | typedef struct _BURN_PIPE_RESULT | ||
38 | { | ||
39 | DWORD dwResult; | ||
40 | BOOL fRestart; | ||
41 | } BURN_PIPE_RESULT; | ||
42 | |||
43 | |||
44 | typedef HRESULT (*PFN_PIPE_MESSAGE_CALLBACK)( | ||
45 | __in BURN_PIPE_MESSAGE* pMsg, | ||
46 | __in_opt LPVOID pvContext, | ||
47 | __out DWORD* pdwResult | ||
48 | ); | ||
49 | |||
50 | |||
51 | // Common functions. | ||
52 | void PipeConnectionInitialize( | ||
53 | __in BURN_PIPE_CONNECTION* pConnection | ||
54 | ); | ||
55 | void PipeConnectionUninitialize( | ||
56 | __in BURN_PIPE_CONNECTION* pConnection | ||
57 | ); | ||
58 | HRESULT PipeSendMessage( | ||
59 | __in HANDLE hPipe, | ||
60 | __in DWORD dwMessage, | ||
61 | __in_bcount_opt(cbData) LPVOID pvData, | ||
62 | __in SIZE_T cbData, | ||
63 | __in_opt PFN_PIPE_MESSAGE_CALLBACK pfnCallback, | ||
64 | __in_opt LPVOID pvContext, | ||
65 | __out DWORD* pdwResult | ||
66 | ); | ||
67 | HRESULT PipePumpMessages( | ||
68 | __in HANDLE hPipe, | ||
69 | __in_opt PFN_PIPE_MESSAGE_CALLBACK pfnCallback, | ||
70 | __in_opt LPVOID pvContext, | ||
71 | __in BURN_PIPE_RESULT* pResult | ||
72 | ); | ||
73 | |||
74 | // Parent functions. | ||
75 | HRESULT PipeCreateNameAndSecret( | ||
76 | __out_z LPWSTR *psczConnectionName, | ||
77 | __out_z LPWSTR *psczSecret | ||
78 | ); | ||
79 | HRESULT PipeCreatePipes( | ||
80 | __in BURN_PIPE_CONNECTION* pConnection, | ||
81 | __in BOOL fCompanion | ||
82 | ); | ||
83 | HRESULT PipeWaitForChildConnect( | ||
84 | __in BURN_PIPE_CONNECTION* pConnection | ||
85 | ); | ||
86 | HRESULT PipeTerminateLoggingPipe( | ||
87 | __in HANDLE hLoggingPipe, | ||
88 | __in DWORD dwParentExitCode | ||
89 | ); | ||
90 | HRESULT PipeTerminateChildProcess( | ||
91 | __in BURN_PIPE_CONNECTION* pConnection, | ||
92 | __in DWORD dwParentExitCode, | ||
93 | __in BOOL fRestart | ||
94 | ); | ||
95 | |||
96 | // Child functions. | ||
97 | HRESULT PipeChildConnect( | ||
98 | __in BURN_PIPE_CONNECTION* pConnection, | ||
99 | __in BOOL fCompanion | ||
100 | ); | ||
101 | |||
102 | #ifdef __cplusplus | ||
103 | } | ||
104 | #endif | ||