mozaSdk
src
sdk_api
effects
WinDirectInputApiException.h
1
#pragma once
2
#include <exception>
3
#include <string>
4
#include "Windows.h"
//DWORD
5
#include "winbase.h"
6
namespace
RS21::direct_input
{
7
8
class
WinDirectInputApiException
:
public
std::exception
9
{
10
public
:
11
WinDirectInputApiException
(HRESULT newHResult, std::string additionalString);
12
WinDirectInputApiException
(HRESULT newHResult,
const
char
* additionalString);
13
14
long
hResult
()
const
throw()
15
{
16
return
m_hResult;
17
}
18
virtual
const
char
*
what
()
const
throw()
override
19
{
20
return
m_errorString.c_str();
21
}
22
private
:
23
HRESULT m_hResult;
24
std::string m_errorString;
25
std::string ConvertWStringToString(
wchar_t
* wstr);
26
};
27
}
//rs21::direct_input
28
RS21::direct_input::WinDirectInputApiException
Definition:
WinDirectInputApiException.h:8
RS21::direct_input::WinDirectInputApiException::what
virtual const char * what() const override
Definition:
WinDirectInputApiException.h:18
RS21::direct_input::WinDirectInputApiException::hResult
long hResult() const
Definition:
WinDirectInputApiException.h:14
RS21::direct_input::WinDirectInputApiException::WinDirectInputApiException
WinDirectInputApiException(HRESULT newHResult, std::string additionalString)
RS21::direct_input
Definition:
DeviceException.h:7
制作者
1.8.15