libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
ThreadCreateFlags.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 CREATE_SUSPENDED = 0x00000001,
27 SKIP_THREAD_ATTACH = 0x00000002,
28 HIDE_FROM_DEBUGGER = 0x00000004,
31 INITIAL_THREAD = 0x00000080,
32};
33
35 public:
39 uint32_t value() const { return value_; }
40
41 operator uint32_t() const { return value_; }
42
46 void value(uint32_t value) { value_ = value; }
47
52 bool has(ThreadCreateFlag flag) const { return (value_ & flag) != 0u; }
53
57 void clear(ThreadCreateFlag flag) { value_ &= ~(static_cast<uint32_t>(flag)); }
58
62 void set(ThreadCreateFlag flag) { value_ |= flag; }
63
68 std::string to_string(const std::string& separator = " ") const;
69
70 ThreadCreateFlags() : value_(0) {}
71 ThreadCreateFlags(uint32_t value) : value_(value) {}
72
73 private:
74 uint32_t value_ = 0;
75};
76
77std::string to_string(const ThreadCreateFlags& flags, const std::string& separator = " ");
78std::ostream& operator<<(std::ostream& os, const ThreadCreateFlags& flags);
79
80} /* namespace nt */
81} /* namespace windows */
82} /* namespace introvirt */
Definition ThreadCreateFlags.hh:34
void set(ThreadCreateFlag flag)
Definition ThreadCreateFlags.hh:62
uint32_t value() const
Definition ThreadCreateFlags.hh:39
void value(uint32_t value)
Definition ThreadCreateFlags.hh:46
ThreadCreateFlags(uint32_t value)
Definition ThreadCreateFlags.hh:71
void clear(ThreadCreateFlag flag)
Definition ThreadCreateFlags.hh:57
ThreadCreateFlags()
Definition ThreadCreateFlags.hh:70
std::string to_string(const std::string &separator=" ") const
bool has(ThreadCreateFlag flag) const
Definition ThreadCreateFlags.hh:52
std::ostream & operator<<(std::ostream &, APPHELPCACHESERVICECLASS val)
ThreadCreateFlag
Definition ThreadCreateFlags.hh:25
@ HIDE_FROM_DEBUGGER
Definition ThreadCreateFlags.hh:28
@ ACCESS_CHECK_IN_TARGET
Definition ThreadCreateFlags.hh:30
@ HAS_SECURITY_DESCRIPTOR
Definition ThreadCreateFlags.hh:29
@ SKIP_THREAD_ATTACH
Definition ThreadCreateFlags.hh:27
@ INITIAL_THREAD
Definition ThreadCreateFlags.hh:31
@ CREATE_SUSPENDED
Definition ThreadCreateFlags.hh:26
const std::string & to_string(APPHELPCACHESERVICECLASS val)
Core IntroVirt classes.
Definition Cr0.hh:20