/// <summary>
        /// Open dos devices directory for a token.
        /// </summary>
        /// <returns>The directory object</returns>
        /// <exception cref="NtException">Thrown on error</exception>
        public static NtDirectory OpenDosDevicesDirectory(NtToken token)
        {
            Luid authid = token.AuthenticationId;
            if (authid.Equals(NtToken.LocalSystemAuthId))
            {
                return NtDirectory.Open(@"\GLOBAL??");
            }

            return NtDirectory.Open($@"\Sessions\0\DosDevices\{authid}");
        }
        /// <summary>
        /// Open dos devices directory for a token.
        /// </summary>
        /// <returns>The directory object</returns>
        /// <exception cref="NtException">Thrown on error</exception>
        public static NtDirectory OpenDosDevicesDirectory(NtToken token)
        {
            Luid authid = token.AuthenticationId;
            if (authid.Equals(NtToken.LocalSystemAuthId))
            {
                return NtDirectory.Open(@"\GLOBAL??");
            }

            return NtDirectory.Open(String.Format(@"\Sessions\0\DosDevices\{0:X08}-{1:X08}", authid.HighPart, authid.LowPart));
        }