You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.9 KiB

  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. #include "pch.h"
  14. static HINSTANCE vhInstance = NULL;
  15. extern "C" BOOL WINAPI DllMain(
  16. IN HINSTANCE hInstance,
  17. IN DWORD dwReason,
  18. IN LPVOID /* pvReserved */
  19. )
  20. {
  21. switch(dwReason)
  22. {
  23. case DLL_PROCESS_ATTACH:
  24. ::DisableThreadLibraryCalls(hInstance);
  25. vhInstance = hInstance;
  26. break;
  27. case DLL_PROCESS_DETACH:
  28. vhInstance = NULL;
  29. break;
  30. }
  31. return TRUE;
  32. }
  33. extern "C" HRESULT WINAPI BootstrapperApplicationCreate(
  34. __in IBootstrapperEngine* pEngine,
  35. __in const BOOTSTRAPPER_COMMAND* pCommand,
  36. __out IBootstrapperApplication** ppApplication
  37. )
  38. {
  39. HRESULT hr = S_OK;
  40. BalInitialize(pEngine);
  41. hr = CreateBootstrapperApplication(vhInstance, FALSE, S_OK, pEngine, pCommand, ppApplication);
  42. BalExitOnFailure(hr, "Failed to create bootstrapper application interface.");
  43. LExit:
  44. return hr;
  45. }
  46. extern "C" void WINAPI BootstrapperApplicationDestroy()
  47. {
  48. BalUninitialize();
  49. }
  50. extern "C" HRESULT WINAPI MbaPrereqBootstrapperApplicationCreate(
  51. __in HRESULT hrHostInitialization,
  52. __in IBootstrapperEngine* pEngine,
  53. __in const BOOTSTRAPPER_COMMAND* pCommand,
  54. __out IBootstrapperApplication** ppApplication
  55. )
  56. {
  57. return E_NOTIMPL;
  58. }
  59. extern "C" void WINAPI MbaPrereqBootstrapperApplicationDestroy()
  60. { }