summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/KernelKit/IDLLObject.h
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-12-21 21:59:13 +0100
committerAmlal <amlalelmahrouss@icloud.com>2024-12-21 21:59:45 +0100
commit610f91d87152cbe48d3054fcf437d8239da6ef35 (patch)
treea386f7047ab73d088169ab2371ddc6ffe8020f1c /dev/Kernel/KernelKit/IDLLObject.h
parent509fcca5986651c8ba712fb395f8498f2dea4109 (diff)
IMP: :boom: Breaking changes some checks are needed to be done.
Signed-off-by: Amlal <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/KernelKit/IDLLObject.h')
-rw-r--r--dev/Kernel/KernelKit/IDLLObject.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/dev/Kernel/KernelKit/IDLLObject.h b/dev/Kernel/KernelKit/IDLLObject.h
new file mode 100644
index 00000000..3a8c20cb
--- /dev/null
+++ b/dev/Kernel/KernelKit/IDLLObject.h
@@ -0,0 +1,48 @@
+/*
+ * ========================================================
+ *
+ * Kernel
+ * Copyright (C) 2024, TQ B.V, all rights reserved., all rights reserved.
+ *
+ * ========================================================
+ */
+
+#pragma once
+
+#include <NewKit/Defines.h>
+#include <CompilerKit/CompilerKit.h>
+
+#define ZKA_DLL_OBJECT : public IDLLObject
+
+namespace Kernel
+{
+ /// @brief DLL class object. A handle to a shared library.
+ class IDLLObject
+ {
+ public:
+ explicit IDLLObject() = default;
+ virtual ~IDLLObject() = default;
+
+ struct DLL_TRAITS final
+ {
+ VoidPtr ImageObject{nullptr};
+ VoidPtr ImageEntrypointOffset{nullptr};
+
+ Bool IsValid()
+ {
+ return ImageObject && ImageEntrypointOffset;
+ }
+ };
+
+ ZKA_COPY_DEFAULT(IDLLObject);
+
+ virtual DLL_TRAITS** GetAddressOf() = 0;
+ virtual DLL_TRAITS* Get() = 0;
+
+ virtual Void Mount(DLL_TRAITS* to_mount) = 0;
+ virtual Void Unmount() = 0;
+ };
+
+ /// @brief Pure implementation, missing method/function handler.
+ EXTERN_C void __zka_pure_call(void);
+} // namespace Kernel