Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.42 KB | None | 0 0
  1.         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  2.         public delegate UInt32 SysNtOpenProcess(
  3.             out IntPtr hProcess,
  4.             ProcessAccessFlags processAccess,
  5.             ref OBJECT_ATTRIBUTES objAttribute,
  6.             ref CLIENT_ID clientid);
  7.  
  8.         [Flags]
  9.         public enum ProcessAccessFlags : uint
  10.         {
  11.             All = 0x001F0FFF,
  12.             Terminate = 0x00000001,
  13.             CreateThread = 0x00000002,
  14.             VirtualMemoryOperation = 0x00000008,
  15.             VirtualMemoryRead = 0x00000010,
  16.             VirtualMemoryWrite = 0x00000020,
  17.             DuplicateHandle = 0x00000040,
  18.             CreateProcess = 0x000000080,
  19.             SetQuota = 0x00000100,
  20.             SetInformation = 0x00000200,
  21.             QueryInformation = 0x00000400,
  22.             QueryLimitedInformation = 0x00001000,
  23.             Synchronize = 0x00100000
  24.         }
  25.  
  26.         [StructLayout(LayoutKind.Sequential)]
  27.         public struct OBJECT_ATTRIBUTES
  28.         {
  29.             public ulong Length;
  30.             public IntPtr RootDirectory;
  31.             public IntPtr ObjectName;
  32.             public ulong Attributes;
  33.             public IntPtr SecurityDescriptor;
  34.             public IntPtr SecurityQualityOfService;
  35.         }
  36.  
  37.         [StructLayout(LayoutKind.Sequential)]
  38.         public struct CLIENT_ID
  39.         {
  40.             public IntPtr UniqueProcess;
  41.             public IntPtr UniqueThread;
  42.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement