libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
NTSTATUS.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 "NTSTATUS_CODE.hh"
19
20#include <introvirt/util/json/json.hh>
21
22#include <cstdint>
23#include <memory>
24#include <string>
25
26namespace introvirt {
27namespace windows {
28namespace nt {
29
34class NTSTATUS final {
35 public:
54
55 public:
59 bool NT_SUCCESS() const;
65 bool NT_INFORMATION() const;
69 bool NT_WARNING() const;
73 bool NT_ERROR() const;
74
79 bool initialized() const;
80
81 public:
85 uint32_t value() const;
86
87 explicit operator uint32_t() const;
88
89 Json::Value json() const;
90
91 operator Json::Value() const;
92
93 explicit operator bool() const;
94
99 operator NTSTATUS_CODE() const;
100
101 public:
106
110 NTSTATUS(uint32_t value);
111
118
124 NTSTATUS(const NTSTATUS& other);
125
133
140
148
150
151 private:
152 NTSTATUS_CODE code_;
153};
154
155const std::string& to_string(NTSTATUS status);
156std::ostream& operator<<(std::ostream& os, NTSTATUS status);
157
158} /* namespace nt */
159} /* namespace windows */
160} /* namespace introvirt */
Status codes returned by Windows NT system calls.
Definition NTSTATUS.hh:34
NTSTATUS(NTSTATUS_CODE code)
static bool NT_INFORMATION(NTSTATUS_CODE code)
NTSTATUS(const NTSTATUS &other)
NTSTATUS & operator=(NTSTATUS &&other)
NTSTATUS_CODE code() const
NTSTATUS & operator=(const NTSTATUS &other)
static bool NT_SUCCESS(NTSTATUS_CODE code)
static bool NT_ERROR(NTSTATUS_CODE code)
static bool NT_WARNING(NTSTATUS_CODE code)
NTSTATUS_CODE
Definition NTSTATUS_CODE.hh:28
std::ostream & operator<<(std::ostream &, APPHELPCACHESERVICECLASS val)
const std::string & to_string(APPHELPCACHESERVICECLASS val)
Core IntroVirt classes.
Definition Cr0.hh:20