mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
fix warnings in injector
This commit is contained in:
parent
166301f56f
commit
aa2cd47ef3
4 changed files with 45 additions and 25 deletions
|
|
@ -211,6 +211,9 @@ namespace Dalamud.Injector
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Claim a SE Debug Privilege.
|
||||
/// </summary>
|
||||
public static void ClaimSeDebug()
|
||||
{
|
||||
var hToken = PInvoke.INVALID_HANDLE_VALUE;
|
||||
|
|
@ -345,8 +348,6 @@ namespace Dalamud.Injector
|
|||
private static class PInvoke
|
||||
{
|
||||
#region Constants
|
||||
public static readonly IntPtr INVALID_HANDLE_VALUE = new(-1);
|
||||
|
||||
public const string SE_DEBUG_NAME = "SeDebugPrivilege";
|
||||
|
||||
public const UInt32 STANDARD_RIGHTS_ALL = 0x001F0000;
|
||||
|
|
@ -369,6 +370,8 @@ namespace Dalamud.Injector
|
|||
|
||||
public const UInt32 ERROR_NO_TOKEN = 0x000003F0;
|
||||
|
||||
public static readonly IntPtr INVALID_HANDLE_VALUE = new(-1);
|
||||
|
||||
public enum MULTIPLE_TRUSTEE_OPERATION
|
||||
{
|
||||
NO_MULTIPLE_TRUSTEE,
|
||||
|
|
@ -431,7 +434,7 @@ namespace Dalamud.Injector
|
|||
SecurityAnonymous,
|
||||
SecurityIdentification,
|
||||
SecurityImpersonation,
|
||||
SecurityDelegation
|
||||
SecurityDelegation,
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
@ -485,8 +488,7 @@ namespace Dalamud.Injector
|
|||
|
||||
[DllImport("advapi32.dll", SetLastError = true)]
|
||||
public static extern bool ImpersonateSelf(
|
||||
SECURITY_IMPERSONATION_LEVEL impersonationLevel
|
||||
);
|
||||
SECURITY_IMPERSONATION_LEVEL impersonationLevel);
|
||||
|
||||
[DllImport("advapi32.dll", SetLastError = true)]
|
||||
public static extern bool OpenProcessToken(
|
||||
|
|
@ -496,10 +498,10 @@ namespace Dalamud.Injector
|
|||
|
||||
[DllImport("advapi32.dll", SetLastError = true)]
|
||||
public static extern bool OpenThreadToken(
|
||||
IntPtr ThreadHandle,
|
||||
uint DesiredAccess,
|
||||
bool OpenAsSelf,
|
||||
out IntPtr TokenHandle);
|
||||
IntPtr threadHandle,
|
||||
uint desiredAccess,
|
||||
bool openAsSelf,
|
||||
out IntPtr tokenHandle);
|
||||
|
||||
[DllImport("advapi32.dll", SetLastError = true)]
|
||||
public static extern bool LookupPrivilegeValue(string lpSystemName, string lpName, ref LUID lpLuid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue