using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.IO;
using System.Runtime.InteropServices.ComTypes;
using Microsoft.Win32.SafeHandles;

namespace Sample7_CustomVirtualDirectory
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            BoxedAppSDK.NativeMethods.BoxedAppSDK_Init();
            BoxedAppSDK.NativeMethods.BoxedAppSDK_EnableOption(BoxedAppSDK.NativeMethods.DEF_BOXEDAPPSDK_OPTION__EMBED_BOXEDAPP_IN_CHILD_PROCESSES, true);

            CustomVirtualDirectory VirtualDirectory = new CustomVirtualDirectory();

            BoxedAppSDK.NativeMethods.BoxedAppSDK_CreateCustomVirtualDirectory(Application.StartupPath + @"\virtual", VirtualDirectory, IntPtr.Zero);

            System.Diagnostics.Process process = System.Diagnostics.Process.Start("cmd.exe");

            process.WaitForExit();
        }
    }
}