summaryrefslogtreecommitdiffhomepage
path: root/compat/activation-context.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/activation-context.hpp')
-rw-r--r--compat/activation-context.hpp26
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