• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
DllMain(IN HINSTANCE hInstance,IN DWORD dwReason,IN LPVOID)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 
BootstrapperApplicationCreate(__in IBootstrapperEngine * pEngine,__in const BOOTSTRAPPER_COMMAND * pCommand,__out IBootstrapperApplication ** ppApplication)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 
BootstrapperApplicationDestroy()58 extern "C" void WINAPI BootstrapperApplicationDestroy()
59 {
60     BalUninitialize();
61 }
62 
63 
MbaPrereqBootstrapperApplicationCreate(__in HRESULT hrHostInitialization,__in IBootstrapperEngine * pEngine,__in const BOOTSTRAPPER_COMMAND * pCommand,__out IBootstrapperApplication ** ppApplication)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 
MbaPrereqBootstrapperApplicationDestroy()75 extern "C" void WINAPI MbaPrereqBootstrapperApplicationDestroy()
76 { }
77