mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 14:23:40 +01:00
WIP launch
This commit is contained in:
parent
9965dc313a
commit
2c2db8e779
5 changed files with 47 additions and 1 deletions
|
|
@ -29,6 +29,11 @@ namespace Dalamud.Bootstrap.OS
|
|||
m_handle = null!;
|
||||
}
|
||||
|
||||
public static Process Create(ProcessCreationOptions options)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static Process Open(uint pid, PROCESS_ACCESS_RIGHTS access)
|
||||
{
|
||||
var handle = OpenHandle(pid, access);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Dalamud.Bootstrap.Windows
|
||||
{
|
||||
internal sealed class ProcessCreationOptions
|
||||
|
|
@ -6,6 +8,8 @@ namespace Dalamud.Bootstrap.Windows
|
|||
|
||||
public string? CommandLine { get; set; } = null;
|
||||
|
||||
public IEnumerable<KeyValuePair<string, string>>? Environments { get; set; } = null;
|
||||
|
||||
public bool CreateSuspended { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
13
Dalamud.Bootstrap/OS/Windows/Raw/Advapi32.cs
Normal file
13
Dalamud.Bootstrap/OS/Windows/Raw/Advapi32.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Dalamud.Bootstrap.OS.Windows.Raw
|
||||
{
|
||||
internal static unsafe class Advapi32
|
||||
{
|
||||
private const string Name = "Advapi32";
|
||||
|
||||
[DllImport(Name, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool InitializeSecurityDescriptor(out SECURITY_DESCRIPTOR pSecurityDescriptor, uint revision);
|
||||
}
|
||||
}
|
||||
|
|
@ -48,4 +48,22 @@ namespace Dalamud.Bootstrap.OS.Windows.Raw
|
|||
EXTENDED_STARTUPINFO_PRESENT = 0x00080000,
|
||||
INHERIT_PARENT_AFFINITY = 0x00010000,
|
||||
}
|
||||
|
||||
internal enum SECURITY_DESCRIPTOR_CONTROL : ushort
|
||||
{
|
||||
SE_DACL_AUTO_INHERIT_REQ = 0x0100,
|
||||
SE_DACL_AUTO_INHERITED = 0x0400,
|
||||
SE_DACL_DEFAULTED = 0x0008,
|
||||
SE_DACL_PRESENT = 0x0004,
|
||||
SE_DACL_PROTECTED = 0x1000,
|
||||
SE_GROUP_DEFAULTED = 0x0002,
|
||||
SE_OWNER_DEFAULTED = 0x0001,
|
||||
SE_RM_CONTROL_VALID = 0x4000,
|
||||
SE_SACL_AUTO_INHERIT_REQ = 0x0200,
|
||||
SE_SACL_AUTO_INHERITED = 0x0800,
|
||||
SE_SACL_DEFAULTED = 0x0008,
|
||||
SE_SACL_PRESENT = 0x0010,
|
||||
SE_SACL_PROTECTED = 0x2000,
|
||||
SE_SELF_RELATIVE = 0x8000,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,6 +122,12 @@ namespace Dalamud.Bootstrap.OS.Windows.Raw
|
|||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct SECURITY_DESCRIPTOR
|
||||
{
|
||||
|
||||
public byte Revision;
|
||||
public byte Sbz1;
|
||||
public SECURITY_DESCRIPTOR_CONTROL Control;
|
||||
public IntPtr Owner;
|
||||
public IntPtr Group;
|
||||
public IntPtr Sacl;
|
||||
public IntPtr Dacl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue