public static SHELLEXECUTEINFO Create()
        {
            var shei = new SHELLEXECUTEINFO();

            shei.cbSize = Marshal.SizeOf(shei);
            return(shei);
        }
        internal static SHELLEXECUTEINFO Create(IntPtr parentWindow)
        {
            var shei = new SHELLEXECUTEINFO();

            shei.cbSize = Marshal.SizeOf(shei);
            shei.hwnd   = parentWindow;
            return(shei);
        }
        public static SHELLEXECUTEINFO Create(Window parentWindow)
        {
            var shei = new SHELLEXECUTEINFO();

            shei.cbSize = Marshal.SizeOf(shei);

            if (parentWindow != null)
            {
                var windowHelper = new WindowInteropHelper(parentWindow);
                shei.hwnd = windowHelper.Handle;
            }

            return(shei);
        }
 internal static extern int ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo);