diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-02-09 10:32:32 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-02-09 12:13:35 +0100 |
commit | e80d210dcc7e2b45656dfe29cb42e4363a088b05 (patch) | |
tree | 3e2826a8d496cd3ccd8cf03b678dedf10636793a /compat/activation-context.hpp | |
parent | e39a753236808603bc1e3530a7d6091eeeeacd39 (diff) |
proto/simconnect: move activation context to compat
Diffstat (limited to 'compat/activation-context.hpp')
-rw-r--r-- | compat/activation-context.hpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/compat/activation-context.hpp b/compat/activation-context.hpp new file mode 100644 index 00000000..a3b0429e --- /dev/null +++ b/compat/activation-context.hpp @@ -0,0 +1,26 @@ +#pragma once + +#ifdef _WIN32 + +#include "export.hpp" + +#include <cstdint> +#include <QString> + +class OTR_COMPAT_EXPORT activation_context +{ +public: + explicit activation_context(const QString& module_name, int resid); + ~activation_context(); + + explicit operator bool() const { return ok; } + +private: + std::uintptr_t cookie = 0; + void* handle = (void*)-1; + bool ok = false; +}; + +#else +# error "tried to use win32-only activation context" +#endif |