OpenVPN 3 Core Library
Loading...
Searching...
No Matches
winerr.hpp
Go to the documentation of this file.
1
// OpenVPN -- An application to securely tunnel IP networks
2
// over a single port, with support for SSL/TLS-based
3
// session authentication and key exchange,
4
// packet encryption, packet authentication, and
5
// packet compression.
6
//
7
// Copyright (C) 2012- OpenVPN Inc.
8
//
9
// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10
//
11
12
// Windows error utilities
13
14
#ifndef OPENVPN_WIN_WINERR_H
15
#define OPENVPN_WIN_WINERR_H
16
17
#include <windows.h>
18
19
#include <
openvpn/io/io.hpp
>
20
21
namespace
openvpn::Win
{
22
struct
Error
:
public
openvpn_io::error_code
23
{
24
Error
(
const
DWORD err)
25
: openvpn_io::error_code(err, openvpn_io::error::get_system_category())
26
{
27
}
28
};
29
30
struct
LastError
:
public
Error
31
{
32
LastError
()
33
:
Error
(::GetLastError())
34
{
35
}
36
};
37
}
// namespace openvpn::Win
38
39
#endif
io.hpp
openvpn::Win
Definition
call.hpp:27
openvpn::Win::Error
Definition
winerr.hpp:23
openvpn::Win::Error::Error
Error(const DWORD err)
Definition
winerr.hpp:24
openvpn::Win::LastError
Definition
winerr.hpp:31
openvpn::Win::LastError::LastError
LastError()
Definition
winerr.hpp:32
openvpn
win
winerr.hpp
Generated by
1.9.8