Example #1
0
 public ConsoleProperties()
 {
     ntConsoleProps                 = new NT_CONSOLE_PROPS();
     ntConsoleProps.dbh.cbSize      = SIZE;
     ntConsoleProps.dbh.dwSignature = SIGNATURE;
     ntConsoleProps.ColorTable      = new uint[COLOR_TABLE_SIZE];
 }
Example #2
0
        public bool ReadConsoleProperties()
        {
            IntPtr ppConsoleProperties;
            int    hResult = (_handle as IShellLinkDataList).CopyDataBlock(ConsoleProperties.SIGNATURE, out ppConsoleProperties);

            if (hResult != 0)
            {
                return(false);
            }

            NT_CONSOLE_PROPS _ntConsoleProps = (NT_CONSOLE_PROPS)Marshal.PtrToStructure(ppConsoleProperties, typeof(NT_CONSOLE_PROPS));

            Marshal.FreeHGlobal(ppConsoleProperties);

            ConsoleProperties.ntConsoleProps = _ntConsoleProps;
            return(true);
        }
Example #3
0
 ///<summary>
 ///  Makes a copy of another ConsoleProperty
 ///</summary>
 ///<remarks>
 ///  Note that the 'owner' field is not copied here.
 ///</remarks>
 public ConsoleProperties(ConsoleProperties another)
 {
     nt_console_props = another.nt_console_props;
     colorTable = new ColorTable(this);
 }
Example #4
0
 public ConsoleProperties()
 {
     nt_console_props = NT_CONSOLE_PROPS.AnEmptyOne();
     colorTable = new ColorTable(this);
 }
Example #5
0
 /// <summary>
 ///     Makes a copy of another ConsoleProperty
 /// </summary>
 /// <remarks>
 ///     Note that the 'owner' field is not copied here.
 /// </remarks>
 public ConsoleProperties(ConsoleProperties another)
 {
     nt_console_props = another.nt_console_props;
     colorTable       = new ColorTable(this);
 }
Example #6
0
 public ConsoleProperties()
 {
     nt_console_props = NT_CONSOLE_PROPS.AnEmptyOne();
     colorTable       = new ColorTable(this);
 }