/// <summary>
        /// Initializes the native part of <see cref="WixToolset.Mba.Core"/>.
        /// Most users should inherit from <see cref="BaseBootstrapperApplicationFactory"/> instead of calling this method.
        /// </summary>
        /// <param name="pArgs">The args struct given by the engine when initially creating the BA.</param>
        /// <param name="engine">The bundle engine interface.</param>
        /// <param name="bootstrapperCommand">The context of the current run of the bundle.</param>
        public static void InitializeFromCreateArgs(IntPtr pArgs, out IEngine engine, out IBootstrapperCommand bootstrapperCommand)
        {
            Command pCommand = new Command
            {
                cbSize = Marshal.SizeOf(typeof(Command))
            };
            var pEngine = MbaNative.InitializeFromCreateArgs(pArgs, ref pCommand);

            engine = new Engine(pEngine);
            bootstrapperCommand = pCommand.GetBootstrapperCommand();
        }
 /// <summary>
 /// Registers the BA with the engine using the default mapping between the message based interface and the COM interface.
 /// Most users should inherit from <see cref="BaseBootstrapperApplicationFactory"/> instead of calling this method.
 /// </summary>
 /// <param name="pResults">The results struct given by the engine when initially creating the BA</param>
 /// <param name="ba">The <see cref="IBootstrapperApplication"/>.</param>
 public static void StoreBAInCreateResults(IntPtr pResults, IBootstrapperApplication ba)
 {
     MbaNative.StoreBAInCreateResults(pResults, ba);
 }