Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
allendowney
GitHub Repository: allendowney/cpython
Path: blob/main/Tools/msi/bundle/bootstrap/pythonba.cpp
12 views
1
//-------------------------------------------------------------------------------------------------
2
// <copyright file="wixstdba.cpp" company="Outercurve Foundation">
3
// Copyright (c) 2004, Outercurve Foundation.
4
// This software is released under Microsoft Reciprocal License (MS-RL).
5
// The license and further copyright text can be found in the file
6
// LICENSE.TXT at the root directory of the distribution.
7
// </copyright>
8
//
9
// <summary>
10
// Setup chainer/bootstrapper standard UI for WiX toolset.
11
// </summary>
12
//-------------------------------------------------------------------------------------------------
13
14
#include "pch.h"
15
16
static HINSTANCE vhInstance = NULL;
17
18
extern "C" BOOL WINAPI DllMain(
19
IN HINSTANCE hInstance,
20
IN DWORD dwReason,
21
IN LPVOID /* pvReserved */
22
)
23
{
24
switch(dwReason)
25
{
26
case DLL_PROCESS_ATTACH:
27
::DisableThreadLibraryCalls(hInstance);
28
vhInstance = hInstance;
29
break;
30
31
case DLL_PROCESS_DETACH:
32
vhInstance = NULL;
33
break;
34
}
35
36
return TRUE;
37
}
38
39
40
extern "C" HRESULT WINAPI BootstrapperApplicationCreate(
41
__in IBootstrapperEngine* pEngine,
42
__in const BOOTSTRAPPER_COMMAND* pCommand,
43
__out IBootstrapperApplication** ppApplication
44
)
45
{
46
HRESULT hr = S_OK;
47
48
BalInitialize(pEngine);
49
50
hr = CreateBootstrapperApplication(vhInstance, FALSE, S_OK, pEngine, pCommand, ppApplication);
51
BalExitOnFailure(hr, "Failed to create bootstrapper application interface.");
52
53
LExit:
54
return hr;
55
}
56
57
58
extern "C" void WINAPI BootstrapperApplicationDestroy()
59
{
60
BalUninitialize();
61
}
62
63
64
extern "C" HRESULT WINAPI MbaPrereqBootstrapperApplicationCreate(
65
__in HRESULT hrHostInitialization,
66
__in IBootstrapperEngine* pEngine,
67
__in const BOOTSTRAPPER_COMMAND* pCommand,
68
__out IBootstrapperApplication** ppApplication
69
)
70
{
71
return E_NOTIMPL;
72
}
73
74
75
extern "C" void WINAPI MbaPrereqBootstrapperApplicationDestroy()
76
{ }
77
78