Example #1
0
        public static string[] GetAliases(string ExeName)
        {
            int length = GetAliasesLength(ExeName);

            if (length > 0)
            {
                char[] buff = new char[length];
                if (WinCon.GetConsoleAliases(buff, length, ExeName) == 0)
                {
                    throw new IOException("Unable to retrieve alias strings", Marshal.GetLastWin32Error());
                }
                return(CharBufferToStringArray(buff, length));
            }
            return(new string[0]);
        }