aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2024-03-06 10:20:29 -0800
committerRob Mensching <rob@firegiant.com>2024-03-06 18:03:38 -0800
commita8504dc4eb1c2d09965b0858699ac737336ef3c1 (patch)
tree768d4b6d7fa91c2ba1e4ba1cbfd8843c2a371c98 /src/api
parent0d3d54992104288e9ee0c834d0b96e8502fd2d42 (diff)
downloadwix-a8504dc4eb1c2d09965b0858699ac737336ef3c1.tar.gz
wix-a8504dc4eb1c2d09965b0858699ac737336ef3c1.tar.bz2
wix-a8504dc4eb1c2d09965b0858699ac737336ef3c1.zip
WIP - BA header simplification
Diffstat (limited to 'src/api')
-rw-r--r--src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h (renamed from src/api/burn/WixToolset.BootstrapperCore.Native/inc/batypes.h)9
-rw-r--r--src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h (renamed from src/api/burn/WixToolset.BootstrapperCore.Native/inc/baenginetypes.h)0
-rw-r--r--src/api/burn/balutil/balutil.cpp34
-rw-r--r--src/api/burn/balutil/inc/BalBaseBAFunctions.h2
-rw-r--r--src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h1
-rw-r--r--src/api/burn/balutil/inc/IBAFunctions.h1
-rw-r--r--src/api/burn/balutil/inc/IBootstrapperApplication.h4
-rw-r--r--src/api/burn/balutil/inc/IBootstrapperEngine.h2
-rw-r--r--src/api/burn/balutil/inc/balutil.h17
-rw-r--r--src/api/burn/balutil/precomp.h7
-rw-r--r--src/api/burn/mbanative/mbanative.def2
-rw-r--r--src/api/burn/mbanative/precomp.h4
-rw-r--r--src/api/burn/test/BalUtilUnitTest/precomp.h5
13 files changed, 40 insertions, 48 deletions
diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/batypes.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
index 0116364c..79b1df80 100644
--- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/batypes.h
+++ b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
@@ -1,6 +1,11 @@
1#pragma once 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. 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 3
4#include "BootstrapperEngine.h"
5
6#if defined(__cplusplus)
7extern "C" {
8#endif
4 9
5const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_API_VERSION = L"burn.ba.apiver"; 10const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_API_VERSION = L"burn.ba.apiver";
6const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_PIPE_NAME = L"burn.ba.pipe"; 11const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_PIPE_NAME = L"burn.ba.pipe";
@@ -1595,3 +1600,7 @@ extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_APPLICATION_CREATE)(
1595 ); 1600 );
1596 1601
1597#endif 1602#endif
1603
1604#if defined(__cplusplus)
1605}
1606#endif
diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/baenginetypes.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h
index 7af41d97..7af41d97 100644
--- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/baenginetypes.h
+++ b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h
diff --git a/src/api/burn/balutil/balutil.cpp b/src/api/burn/balutil/balutil.cpp
index a77ff7d0..7f774b6c 100644
--- a/src/api/burn/balutil/balutil.cpp
+++ b/src/api/burn/balutil/balutil.cpp
@@ -38,21 +38,6 @@ static void MsgProc(
38 38
39// prototypes 39// prototypes
40 40
41DAPI_(void) BalInitialize(
42 __in IBootstrapperEngine* pEngine
43 )
44{
45 pEngine->AddRef();
46
47 ReleaseObject(vpEngine);
48 vpEngine = pEngine;
49}
50
51DAPI_(void) BalUninitialize()
52{
53 ReleaseNullObject(vpEngine);
54}
55
56DAPI_(HRESULT) BootstrapperApplicationRun( 41DAPI_(HRESULT) BootstrapperApplicationRun(
57 __in IBootstrapperApplication* pApplication 42 __in IBootstrapperApplication* pApplication
58 ) 43 )
@@ -86,7 +71,7 @@ DAPI_(HRESULT) BootstrapperApplicationRun(
86 BalInitialize(pEngine); 71 BalInitialize(pEngine);
87 fInitializedBal = TRUE; 72 fInitializedBal = TRUE;
88 73
89 BootstrapperApplicationDebuggerCheck(); 74 BalDebuggerCheck();
90 75
91 hr = MsgPump(hBAPipe, pApplication, pEngine); 76 hr = MsgPump(hBAPipe, pApplication, pEngine);
92 BalExitOnFailure(hr, "Failed while pumping messages."); 77 BalExitOnFailure(hr, "Failed while pumping messages.");
@@ -111,7 +96,22 @@ LExit:
111 return hr; 96 return hr;
112} 97}
113 98
114DAPI_(VOID) BootstrapperApplicationDebuggerCheck() 99DAPI_(void) BalInitialize(
100 __in IBootstrapperEngine* pEngine
101 )
102{
103 pEngine->AddRef();
104
105 ReleaseObject(vpEngine);
106 vpEngine = pEngine;
107}
108
109DAPI_(void) BalUninitialize()
110{
111 ReleaseNullObject(vpEngine);
112}
113
114DAPI_(VOID) BalDebuggerCheck()
115{ 115{
116 HRESULT hr = S_OK; 116 HRESULT hr = S_OK;
117 HKEY hk = NULL; 117 HKEY hk = NULL;
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctions.h b/src/api/burn/balutil/inc/BalBaseBAFunctions.h
index 33b71324..df0b7006 100644
--- a/src/api/burn/balutil/inc/BalBaseBAFunctions.h
+++ b/src/api/burn/balutil/inc/BalBaseBAFunctions.h
@@ -4,7 +4,7 @@
4#include <windows.h> 4#include <windows.h>
5#include <msiquery.h> 5#include <msiquery.h>
6 6
7#include <batypes.h> 7#include <BootstrapperApplication.h>
8 8
9#include "IBAFunctions.h" 9#include "IBAFunctions.h"
10 10
diff --git a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
index 30c75fb6..09f1f7a2 100644
--- a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
+++ b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
@@ -3,7 +3,6 @@
3#include <windows.h> 3#include <windows.h>
4#include <msiquery.h> 4#include <msiquery.h>
5 5
6#include "IBootstrapperEngine.h"
7#include "IBootstrapperApplication.h" 6#include "IBootstrapperApplication.h"
8 7
9#include "balutil.h" 8#include "balutil.h"
diff --git a/src/api/burn/balutil/inc/IBAFunctions.h b/src/api/burn/balutil/inc/IBAFunctions.h
index b0afabb3..42b64f9b 100644
--- a/src/api/burn/balutil/inc/IBAFunctions.h
+++ b/src/api/burn/balutil/inc/IBAFunctions.h
@@ -3,6 +3,7 @@
3 3
4 4
5#include "IBootstrapperApplication.h" 5#include "IBootstrapperApplication.h"
6#include "BAFunctions.h"
6 7
7DECLARE_INTERFACE_IID_(IBAFunctions, IBootstrapperApplication, "0FB445ED-17BD-49C7-BE19-479776F8AE96") 8DECLARE_INTERFACE_IID_(IBAFunctions, IBootstrapperApplication, "0FB445ED-17BD-49C7-BE19-479776F8AE96")
8{ 9{
diff --git a/src/api/burn/balutil/inc/IBootstrapperApplication.h b/src/api/burn/balutil/inc/IBootstrapperApplication.h
index 6eb32ee6..3f57f095 100644
--- a/src/api/burn/balutil/inc/IBootstrapperApplication.h
+++ b/src/api/burn/balutil/inc/IBootstrapperApplication.h
@@ -1,8 +1,8 @@
1#pragma once 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. 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 3
4#include <batypes.h> 4#include <BootstrapperApplication.h>
5 5#include <IBootstrapperEngine.h>
6 6
7DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-AB06-099D717C67FE") 7DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-AB06-099D717C67FE")
8{ 8{
diff --git a/src/api/burn/balutil/inc/IBootstrapperEngine.h b/src/api/burn/balutil/inc/IBootstrapperEngine.h
index 3c1afb77..ef3b9812 100644
--- a/src/api/burn/balutil/inc/IBootstrapperEngine.h
+++ b/src/api/burn/balutil/inc/IBootstrapperEngine.h
@@ -1,7 +1,7 @@
1#pragma once 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. 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 3
4#include <baenginetypes.h> 4#include "BootstrapperEngine.h"
5 5
6DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-81512C29C2FB") 6DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-81512C29C2FB")
7{ 7{
diff --git a/src/api/burn/balutil/inc/balutil.h b/src/api/burn/balutil/inc/balutil.h
index 4f8cb23d..d77b3599 100644
--- a/src/api/burn/balutil/inc/balutil.h
+++ b/src/api/burn/balutil/inc/balutil.h
@@ -43,15 +43,6 @@ static const HRESULT E_PREREQBA_INFINITE_LOOP = MAKE_HRESULT(SEVERITY_ERROR, FAC
43 43
44 44
45/******************************************************************* 45/*******************************************************************
46 BootstrapperApplicationDebuggerCheck - allows bootstrapper application to
47 explicitly check whether a debugger should be attached to the boostrapper
48 application.
49
50 Note: Automatically called in BootstrapperApplicationRun().
51********************************************************************/
52DAPI_(VOID) BootstrapperApplicationDebuggerCheck();
53
54/*******************************************************************
55 BootstrapperApplicationRun - runs the IBootstrapperApplication until 46 BootstrapperApplicationRun - runs the IBootstrapperApplication until
56 the application quits. 47 the application quits.
57 48
@@ -61,6 +52,14 @@ DAPI_(HRESULT) BootstrapperApplicationRun(
61 ); 52 );
62 53
63/******************************************************************* 54/*******************************************************************
55 BalDebuggerCheck - allows bootstrapper application to explicitly check
56 whether a debugger should be attached to the boostrapper application.
57
58 Note: Automatically called in BootstrapperApplicationRun().
59********************************************************************/
60DAPI_(VOID) BalDebuggerCheck();
61
62/*******************************************************************
64 BalInitialize - remembers the engine interface to enable logging and 63 BalInitialize - remembers the engine interface to enable logging and
65 other functions. 64 other functions.
66 65
diff --git a/src/api/burn/balutil/precomp.h b/src/api/burn/balutil/precomp.h
index ace4f3ec..68e07a44 100644
--- a/src/api/burn/balutil/precomp.h
+++ b/src/api/burn/balutil/precomp.h
@@ -30,13 +30,6 @@
30#include <thmutil.h> 30#include <thmutil.h>
31#include <xmlutil.h> 31#include <xmlutil.h>
32 32
33#include <baenginetypes.h>
34#include <batypes.h>
35
36#include "IBootstrapperEngine.h"
37#include "IBootstrapperApplication.h"
38
39#include "BAFunctions.h"
40#include "IBAFunctions.h" 33#include "IBAFunctions.h"
41 34
42#include "balutil.h" 35#include "balutil.h"
diff --git a/src/api/burn/mbanative/mbanative.def b/src/api/burn/mbanative/mbanative.def
index bd013699..37876be0 100644
--- a/src/api/burn/mbanative/mbanative.def
+++ b/src/api/burn/mbanative/mbanative.def
@@ -8,7 +8,7 @@ EXPORTS
8 BalGetVersionVariableFromEngine 8 BalGetVersionVariableFromEngine
9 BalGetRelatedBundleVariableFromEngine 9 BalGetRelatedBundleVariableFromEngine
10 BalVariableExistsFromEngine 10 BalVariableExistsFromEngine
11 BootstrapperApplicationDebuggerCheck 11 BalDebuggerCheck
12 BootstrapperApplicationRun 12 BootstrapperApplicationRun
13 StrFree 13 StrFree
14 VerCompareParsedVersions 14 VerCompareParsedVersions
diff --git a/src/api/burn/mbanative/precomp.h b/src/api/burn/mbanative/precomp.h
index 622f341a..81f875af 100644
--- a/src/api/burn/mbanative/precomp.h
+++ b/src/api/burn/mbanative/precomp.h
@@ -8,9 +8,5 @@
8#include <dutil.h> 8#include <dutil.h>
9#include <verutil.h> 9#include <verutil.h>
10 10
11// #include <BootstrapperEngine.h>
12// #include <BootstrapperApplication.h>
13
14#include <IBootstrapperEngine.h>
15#include <IBootstrapperApplication.h> 11#include <IBootstrapperApplication.h>
16#include <balutil.h> 12#include <balutil.h>
diff --git a/src/api/burn/test/BalUtilUnitTest/precomp.h b/src/api/burn/test/BalUtilUnitTest/precomp.h
index 57487bc5..4cdd262c 100644
--- a/src/api/burn/test/BalUtilUnitTest/precomp.h
+++ b/src/api/burn/test/BalUtilUnitTest/precomp.h
@@ -15,11 +15,6 @@
15#include <dutil.h> 15#include <dutil.h>
16#include <dictutil.h> 16#include <dictutil.h>
17 17
18#include <baenginetypes.h>
19#include <batypes.h>
20
21#include <BAFunctions.h>
22#include <IBootstrapperEngine.h>
23#include <IBootstrapperApplication.h> 18#include <IBootstrapperApplication.h>
24#include <IBAFunctions.h> 19#include <IBAFunctions.h>
25#include <balutil.h> 20#include <balutil.h>