[LINT] Linted files + Added lint job to CI
This commit is contained in:
committed by
Radosław Gliński
parent
e8afad8f8a
commit
b9061e6292
@@ -44,21 +44,21 @@
|
||||
ntdll versions of functions often skip through a lot of extra garbage in
|
||||
KernelBase
|
||||
*/
|
||||
#define XE_NTDLL_IMPORT(name, cls, clsvar) \
|
||||
static class cls { \
|
||||
public: \
|
||||
FARPROC fn; \
|
||||
cls() : fn(nullptr) { \
|
||||
auto ntdll = GetModuleHandleA("ntdll.dll"); \
|
||||
if (ntdll) { \
|
||||
fn = GetProcAddress(ntdll, #name); \
|
||||
} \
|
||||
} \
|
||||
template <typename TRet = void, typename... TArgs> \
|
||||
inline TRet invoke(TArgs... args) { \
|
||||
return reinterpret_cast<TRet(NTAPI*)(TArgs...)>(fn)(args...); \
|
||||
} \
|
||||
inline operator bool() const { return fn != nullptr; } \
|
||||
#define XE_NTDLL_IMPORT(name, cls, clsvar) \
|
||||
static class cls { \
|
||||
public: \
|
||||
FARPROC fn; \
|
||||
cls() : fn(nullptr) { \
|
||||
auto ntdll = GetModuleHandleA("ntdll.dll"); \
|
||||
if (ntdll) { \
|
||||
fn = GetProcAddress(ntdll, #name); \
|
||||
} \
|
||||
} \
|
||||
template <typename TRet = void, typename... TArgs> \
|
||||
inline TRet invoke(TArgs... args) { \
|
||||
return reinterpret_cast<TRet(NTAPI*)(TArgs...)>(fn)(args...); \
|
||||
} \
|
||||
inline operator bool() const { return fn != nullptr; } \
|
||||
} clsvar
|
||||
#else
|
||||
#define XE_NTDLL_IMPORT(name, cls, clsvar) static constexpr bool clsvar = false
|
||||
|
||||
Reference in New Issue
Block a user