I fucking hate C# now

This commit is contained in:
Mino 2020-04-08 23:54:35 +09:00
parent 2c2db8e779
commit 380c8732c6
4 changed files with 24 additions and 1 deletions

View file

View file

@ -8,7 +8,7 @@ namespace Dalamud.Bootstrap.Windows
public string? CommandLine { get; set; } = null;
public IEnumerable<KeyValuePair<string, string>>? Environments { get; set; } = null;
public IDictionary<string, string>? Environments { get; set; } = null;
public bool CreateSuspended { get; set; }
}

View file

@ -9,5 +9,8 @@ namespace Dalamud.Bootstrap.OS.Windows.Raw
[DllImport(Name, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool InitializeSecurityDescriptor(out SECURITY_DESCRIPTOR pSecurityDescriptor, uint revision);
[DllImport(Name, CallingConvention = CallingConvention.Winapi)]
public static extern uint SetEntriesInAclA(ulong cCountOfExplicitEntries, ref ACL oldAcl, out ACL* NewAcl);
}
}

View file

@ -130,4 +130,24 @@ namespace Dalamud.Bootstrap.OS.Windows.Raw
public IntPtr Sacl;
public IntPtr Dacl;
}
[StructLayout(LayoutKind.Sequential)]
internal struct EXPLICIT_ACCESS_A
{
// TODO
uint grfAccessPermissions;
ACCESS_MODE grfAccessMode;
uint grfInheritance;
TRUSTEE_A Trustee;
}
[StructLayout(LayoutKind.Sequential)]
internal struct ACL
{
byte AclRevision;
byte Sbz1;
ushort AclSize;
ushort AceCount;
ushort Sbz2;
}
}