INFINITE = -1
INVALID_HANDLE_VALUE = -1

LIST_MODULES_DEFAULT = 0x00
LIST_MODULES_32BIT = 0x01
LIST_MODULES_64BIT = 0x02
LIST_MODULES_ALL = 0x03

TH32CS_SNAPHEAPLIST = 0x00000001
TH32CS_SNAPPROCESS = 0x00000002
TH32CS_SNAPTHREAD = 0x00000004
TH32CS_SNAPMODULE = 0x00000008
TH32CS_SNAPMODULE32 = 0x00000010
TH32CS_SNAPALL = (TH32CS_SNAPHEAPLIST | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD | TH32CS_SNAPMODULE)
TH32CS_INHERIT = 0x80000000

SYNCHRONIZE = 0x00100000
STANDARD_RIGHTS_REQUIRED = 0x000F0000

PROCESS_TERMINATE = 0x0001
PROCESS_CREATE_THREAD = 0x0002
PROCESS_SET_SESSIONID = 0x0004
PROCESS_VM_OPERATION = 0x0008
PROCESS_VM_READ = 0x0010
PROCESS_VM_WRITE = 0x0020
PROCESS_DUP_HANDLE = 0x0040
PROCESS_CREATE_PROCESS = 0x0080
PROCESS_SET_QUOTA = 0x0100
PROCESS_SET_INFORMATION = 0x0200
PROCESS_QUERY_INFORMATION = 0x0400
PROCESS_SUSPEND_RESUME = 0x0800
PROCESS_QUERY_LIMITED_INFORMATION = 0x1000
PROCESS_SET_LIMITED_INFORMATION = 0x2000

# NTDDI_VERSION >= NTDDI_VISTA
PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFFF

# NTDDI_VERSION < NTDDI_VISTA
# PROCESS_ALL_ACCESS                 = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFF

PAGE_SIZE = 4096
PAGE_NOACCESS = 0x01
PAGE_READONLY = 0x02
PAGE_READWRITE = 0x04
PAGE_WRITECOPY = 0x08
PAGE_EXECUTE = 0x10
PAGE_EXECUTE_READ = 0x20
PAGE_EXECUTE_READWRITE = 0x40
PAGE_EXECUTE_WRITECOPY = 0x80
PAGE_GUARD = 0x100
PAGE_NOCACHE = 0x200
PAGE_WRITECOMBINE = 0x400
PAGE_GRAPHICS_NOACCESS = 0x0800
PAGE_GRAPHICS_READONLY = 0x1000
PAGE_GRAPHICS_READWRITE = 0x2000
PAGE_GRAPHICS_EXECUTE = 0x4000
PAGE_GRAPHICS_EXECUTE_READ = 0x8000
PAGE_GRAPHICS_EXECUTE_READWRITE = 0x10000
PAGE_GRAPHICS_COHERENT = 0x20000
PAGE_GRAPHICS_NOCACHE = 0x40000
PAGE_ENCLAVE_THREAD_CONTROL = 0x80000000
PAGE_REVERT_TO_FILE_MAP = 0x80000000
PAGE_TARGETS_NO_UPDATE = 0x40000000
PAGE_TARGETS_INVALID = 0x40000000
PAGE_ENCLAVE_UNVALIDATED = 0x20000000
PAGE_ENCLAVE_MASK = 0x10000000
PAGE_ENCLAVE_DECOMMIT = (PAGE_ENCLAVE_MASK | 0)
PAGE_ENCLAVE_SS_FIRST = (PAGE_ENCLAVE_MASK | 1)
PAGE_ENCLAVE_SS_REST = (PAGE_ENCLAVE_MASK | 2)
MEM_COMMIT = 0x00001000
MEM_RESERVE = 0x00002000
MEM_REPLACE_PLACEHOLDER = 0x00004000
MEM_RESERVE_PLACEHOLDER = 0x00040000
MEM_RESET = 0x00080000
MEM_TOP_DOWN = 0x00100000
MEM_WRITE_WATCH = 0x00200000
MEM_PHYSICAL = 0x00400000
MEM_ROTATE = 0x00800000
MEM_DIFFERENT_IMAGE_BASE_OK = 0x00800000
MEM_RESET_UNDO = 0x01000000
MEM_LARGE_PAGES = 0x20000000
MEM_4MB_PAGES = 0x80000000
MEM_64K_PAGES = (MEM_LARGE_PAGES | MEM_PHYSICAL)
MEM_UNMAP_WITH_TRANSIENT_BOOST = 0x00000001
MEM_COALESCE_PLACEHOLDERS = 0x00000001
MEM_PRESERVE_PLACEHOLDER = 0x00000002
MEM_DECOMMIT = 0x00004000
MEM_RELEASE = 0x00008000
MEM_FREE = 0x00010000

TYPE_VOID = 0
TYPE_BOOL = 1
TYPE_CHAR = 2
TYPE_UCHAR = 3
TYPE_INT16 = 4
TYPE_UINT16 = 5
TYPE_INT32 = 6
TYPE_UINT32 = 7
TYPE_INT64 = 8
TYPE_UINT64 = 9
TYPE_FLOAT = 10
TYPE_DOUBLE = 11
TYPE_VOID_P = 12
TYPE_CHAR_P = 13
TYPE_CS_STRING = 14


# enum MonoMetaTableEnum
MONO_TABLE_MODULE = 0
MONO_TABLE_TYPEREF = 1
MONO_TABLE_TYPEDEF = 2
MONO_TABLE_FIELD_POINTER = 3
MONO_TABLE_FIELD = 4
MONO_TABLE_METHOD_POINTER = 5
MONO_TABLE_METHOD = 6
MONO_TABLE_PARAM_POINTER = 7
MONO_TABLE_PARAM = 8
MONO_TABLE_INTERFACEIMPL = 9
MONO_TABLE_MEMBERREF = 10
MONO_TABLE_CONSTANT = 11
MONO_TABLE_CUSTOMATTRIBUTE = 12
MONO_TABLE_FIELDMARSHAL = 13
MONO_TABLE_DECLSECURITY = 14
MONO_TABLE_CLASSLAYOUT = 15
MONO_TABLE_FIELDLAYOUT = 16
MONO_TABLE_STANDALONESIG = 17
MONO_TABLE_EVENTMAP = 18
MONO_TABLE_EVENT_POINTER = 19
MONO_TABLE_EVENT = 20
MONO_TABLE_PROPERTYMAP = 21
MONO_TABLE_PROPERTY_POINTER = 22
MONO_TABLE_PROPERTY = 23
MONO_TABLE_METHODSEMANTICS = 24
MONO_TABLE_METHODIMPL = 25
MONO_TABLE_MODULEREF = 26
MONO_TABLE_TYPESPEC = 27
MONO_TABLE_IMPLMAP = 28
MONO_TABLE_FIELDRVA = 29
MONO_TABLE_UNUSED6 = 30
MONO_TABLE_UNUSED7 = 31
MONO_TABLE_ASSEMBLY = 32
MONO_TABLE_ASSEMBLYPROCESSOR = 33
MONO_TABLE_ASSEMBLYOS = 34
MONO_TABLE_ASSEMBLYREF = 35
MONO_TABLE_ASSEMBLYREFPROCESSOR = 36
MONO_TABLE_ASSEMBLYREFOS = 37
MONO_TABLE_FILE = 38
MONO_TABLE_EXPORTEDTYPE = 39
MONO_TABLE_MANIFESTRESOURCE = 40
MONO_TABLE_NESTEDCLASS = 41
MONO_TABLE_GENERICPARAM = 42
MONO_TABLE_METHODSPEC = 43
MONO_TABLE_GENERICPARAMCONSTRAINT = 44

# enum MonoTokenType
MONO_TOKEN_MODULE = 0x00000000
MONO_TOKEN_TYPE_REF = 0x01000000
MONO_TOKEN_TYPE_DEF = 0x02000000
MONO_TOKEN_FIELD_DEF = 0x04000000
MONO_TOKEN_METHOD_DEF = 0x06000000
MONO_TOKEN_PARAM_DEF = 0x08000000
MONO_TOKEN_INTERFACE_IMPL = 0x09000000
MONO_TOKEN_MEMBER_REF = 0x0a000000
MONO_TOKEN_CUSTOM_ATTRIBUTE = 0x0c000000
MONO_TOKEN_PERMISSION = 0x0e000000
MONO_TOKEN_SIGNATURE = 0x11000000
MONO_TOKEN_EVENT = 0x14000000
MONO_TOKEN_PROPERTY = 0x17000000
MONO_TOKEN_MODULE_REF = 0x1a000000
MONO_TOKEN_TYPE_SPEC = 0x1b000000
MONO_TOKEN_ASSEMBLY = 0x20000000
MONO_TOKEN_ASSEMBLY_REF = 0x23000000
MONO_TOKEN_FILE = 0x26000000
MONO_TOKEN_EXPORTED_TYPE = 0x27000000
MONO_TOKEN_MANIFEST_RESOURCE = 0x28000000
MONO_TOKEN_GENERIC_PARAM = 0x2a000000
MONO_TOKEN_METHOD_SPEC = 0x2b000000
MONO_TOKEN_STRING = 0x70000000
MONO_TOKEN_NAME = 0x71000000
MONO_TOKEN_BASE_TYPE = 0x72000000

FIELD_ATTRIBUTE_FIELD_ACCESS_MASK = 0x0007
FIELD_ATTRIBUTE_COMPILER_CONTROLLED = 0x0000
FIELD_ATTRIBUTE_PRIVATE = 0x0001
FIELD_ATTRIBUTE_FAM_AND_ASSEM = 0x0002
FIELD_ATTRIBUTE_ASSEMBLY = 0x0003
FIELD_ATTRIBUTE_FAMILY = 0x0004
FIELD_ATTRIBUTE_FAM_OR_ASSEM = 0x0005
FIELD_ATTRIBUTE_PUBLIC = 0x0006
FIELD_ATTRIBUTE_STATIC = 0x0010
FIELD_ATTRIBUTE_INIT_ONLY = 0x0020
FIELD_ATTRIBUTE_LITERAL = 0x0040
FIELD_ATTRIBUTE_NOT_SERIALIZED = 0x0080
FIELD_ATTRIBUTE_SPECIAL_NAME = 0x0200
FIELD_ATTRIBUTE_PINVOKE_IMPL = 0x2000
FIELD_ATTRIBUTE_RESERVED_MASK = 0x9500
FIELD_ATTRIBUTE_RT_SPECIAL_NAME = 0x0400
FIELD_ATTRIBUTE_HAS_FIELD_MARSHAL = 0x1000
FIELD_ATTRIBUTE_HAS_DEFAULT = 0x8000
FIELD_ATTRIBUTE_HAS_FIELD_RVA = 0x0100

METHOD_ATTRIBUTE_MEMBER_ACCESS_MASK = 0x0007
METHOD_ATTRIBUTE_COMPILER_CONTROLLED = 0x0000
METHOD_ATTRIBUTE_PRIVATE = 0x0001
METHOD_ATTRIBUTE_FAM_AND_ASSEM = 0x0002
METHOD_ATTRIBUTE_ASSEM = 0x0003
METHOD_ATTRIBUTE_FAMILY = 0x0004
METHOD_ATTRIBUTE_FAM_OR_ASSEM = 0x0005
METHOD_ATTRIBUTE_PUBLIC = 0x0006

METHOD_ATTRIBUTE_STATIC = 0x0010
METHOD_ATTRIBUTE_FINAL = 0x0020
METHOD_ATTRIBUTE_VIRTUAL = 0x0040
METHOD_ATTRIBUTE_HIDE_BY_SIG = 0x0080

METHOD_ATTRIBUTE_VTABLE_LAYOUT_MASK = 0x0100
METHOD_ATTRIBUTE_REUSE_SLOT = 0x0000
METHOD_ATTRIBUTE_NEW_SLOT = 0x0100

METHOD_ATTRIBUTE_STRICT = 0x0200
METHOD_ATTRIBUTE_ABSTRACT = 0x0400
METHOD_ATTRIBUTE_SPECIAL_NAME = 0x0800

METHOD_ATTRIBUTE_PINVOKE_IMPL = 0x2000
METHOD_ATTRIBUTE_UNMANAGED_EXPORT = 0x0008

MONO_TYPE_NAME_FORMAT_IL = 0
MONO_TYPE_NAME_FORMAT_REFLECTION = 1
MONO_TYPE_NAME_FORMAT_FULL_NAME = 2
MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED = 3


CALL_TYPE_DEF = 0
CALL_TYPE_CDECL = 1
CALL_TYPE_STDCALL = 2
CALL_TYPE_THISCALL = 3
CALL_TYPE_FASTCALL = 4
