libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
ProcessCreateFlags.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
18#include <cstdint>
19#include <string>
20
21namespace introvirt {
22namespace windows {
23namespace nt {
24
26 BREAKAWAY = 0x00000001,
27 NO_DEBUG_INHERIT = 0x00000002,
28 INHERIT_HANDLES = 0x00000004,
30 LARGE_PAGES = 0x00000010,
31};
32
34 public:
38 uint32_t value() const { return value_; }
39
40 operator uint32_t() const { return value_; }
41
45 void value(uint32_t value) { value_ = value; }
46
51 bool has(ProcessCreateFlag flag) const { return (value_ & flag) != 0u; }
52
56 void clear(ProcessCreateFlag flag) { value_ &= ~(static_cast<uint32_t>(flag)); }
57
61 void set(ProcessCreateFlag flag) { value_ |= flag; }
62
67 std::string to_string(const std::string& separator = " ") const;
68
69 ProcessCreateFlags() : value_(0) {}
70 ProcessCreateFlags(uint32_t value) : value_(value) {}
71
72 private:
73 uint32_t value_;
74};
75
76std::string to_string(ProcessCreateFlags options, const std::string& separator = " ");
77std::ostream& operator<<(std::ostream& os, ProcessCreateFlags);
78
79} /* namespace nt */
80} /* namespace windows */
81} /* namespace introvirt */
Definition ProcessCreateFlags.hh:33
bool has(ProcessCreateFlag flag) const
Definition ProcessCreateFlags.hh:51
ProcessCreateFlags()
Definition ProcessCreateFlags.hh:69
void clear(ProcessCreateFlag flag)
Definition ProcessCreateFlags.hh:56
void value(uint32_t value)
Definition ProcessCreateFlags.hh:45
ProcessCreateFlags(uint32_t value)
Definition ProcessCreateFlags.hh:70
std::string to_string(const std::string &separator=" ") const
void set(ProcessCreateFlag flag)
Definition ProcessCreateFlags.hh:61
uint32_t value() const
Definition ProcessCreateFlags.hh:38
std::ostream & operator<<(std::ostream &, APPHELPCACHESERVICECLASS val)
ProcessCreateFlag
Definition ProcessCreateFlags.hh:25
@ OVERRIDE_ADDRESS_SPACE
Definition ProcessCreateFlags.hh:29
@ BREAKAWAY
Definition ProcessCreateFlags.hh:26
@ NO_DEBUG_INHERIT
Definition ProcessCreateFlags.hh:27
@ LARGE_PAGES
Definition ProcessCreateFlags.hh:30
@ INHERIT_HANDLES
Definition ProcessCreateFlags.hh:28
const std::string & to_string(APPHELPCACHESERVICECLASS val)
Core IntroVirt classes.
Definition Cr0.hh:20