// Copyright © 2015, skdltmxn // Licensed under the MIT License //! Defines the process snapshot API FLAGS!{enum PSS_CAPTURE_FLAGS { PSS_CAPTURE_NONE = 0x00000000, PSS_CAPTURE_VA_CLONE = 0x00000001, PSS_CAPTURE_RESERVED_00000002 = 0x00000002, PSS_CAPTURE_HANDLES = 0x00000004, PSS_CAPTURE_HANDLE_NAME_INFORMATION = 0x00000008, PSS_CAPTURE_HANDLE_BASIC_INFORMATION = 0x00000010, PSS_CAPTURE_HANDLE_TYPE_SPECIFIC_INFORMATION = 0x00000020, PSS_CAPTURE_HANDLE_TRACE = 0x00000040, PSS_CAPTURE_THREADS = 0x00000080, PSS_CAPTURE_THREAD_CONTEXT = 0x00000100, PSS_CAPTURE_THREAD_CONTEXT_EXTENDED = 0x00000200, PSS_CAPTURE_RESERVED_00000400 = 0x00000400, PSS_CAPTURE_VA_SPACE = 0x00000800, PSS_CAPTURE_VA_SPACE_SECTION_INFORMATION = 0x00001000, PSS_CREATE_BREAKAWAY_OPTIONAL = 0x04000000, PSS_CREATE_BREAKAWAY = 0x08000000, PSS_CREATE_FORCE_BREAKAWAY = 0x10000000, PSS_CREATE_USE_VM_ALLOCATIONS = 0x20000000, PSS_CREATE_MEASURE_PERFORMANCE = 0x40000000, PSS_CREATE_RELEASE_SECTION = -2147483648i32 as u32, }} ENUM!{enum PSS_QUERY_INFORMATION_CLASS { PSS_QUERY_PROCESS_INFORMATION = 0, PSS_QUERY_VA_CLONE_INFORMATION = 1, PSS_QUERY_AUXILIARY_PAGES_INFORMATION = 2, PSS_QUERY_VA_SPACE_INFORMATION = 3, PSS_QUERY_HANDLE_INFORMATION = 4, PSS_QUERY_THREAD_INFORMATION = 5, PSS_QUERY_HANDLE_TRACE_INFORMATION = 6, PSS_QUERY_PERFORMANCE_COUNTERS = 7, }} ENUM!{enum PSS_WALK_INFORMATION_CLASS { PSS_WALK_AUXILIARY_PAGES = 0, PSS_WALK_VA_SPACE = 1, PSS_WALK_HANDLES = 2, PSS_WALK_THREADS = 3, }} FLAGS!{enum PSS_DUPLICATE_FLAGS { PSS_DUPLICATE_NONE = 0x00, PSS_DUPLICATE_CLOSE_SOURCE = 0x01, }} DECLARE_HANDLE!(HPSS, HPSS__); DECLARE_HANDLE!(HPSSWALK, HPSSWALK__); pub type pAllocRoutine = Option *mut ::c_void>; pub type pFreeRoutine = Option; STRUCT!{nodebug struct PSS_ALLOCATOR { Context: *mut ::c_void, AllocRoutine: pAllocRoutine, FreeRoutine: pFreeRoutine, }}