summaryrefslogtreecommitdiffhomepage
path: root/SCIKit
diff options
context:
space:
mode:
Diffstat (limited to 'SCIKit')
-rw-r--r--SCIKit/SharedInterface1.hxx4
-rw-r--r--SCIKit/Types.hxx21
2 files changed, 11 insertions, 14 deletions
diff --git a/SCIKit/SharedInterface1.hxx b/SCIKit/SharedInterface1.hxx
index b1f7ce9d..5edb5e51 100644
--- a/SCIKit/SharedInterface1.hxx
+++ b/SCIKit/SharedInterface1.hxx
@@ -12,10 +12,12 @@ Purpose: System Call Interface Version 1.
#include <SCIKit/Types.hxx>
+typedef UInt32 PowerID;
+
/**
@brief System call class.
*/
-class __attribute__((uuid_of(SharedInterface1))) SharedInterface1 : public UnknownInterface
+class __attribute__((uuid("21f40aef-cce0-4c0b-9672-40f9053394bc"))) SharedInterface1 : public UnknownInterface
{
public:
explicit SharedInterface1() = default;
diff --git a/SCIKit/Types.hxx b/SCIKit/Types.hxx
index c6c93fdc..c42b7718 100644
--- a/SCIKit/Types.hxx
+++ b/SCIKit/Types.hxx
@@ -36,18 +36,13 @@ typedef __INT8_TYPE__ SInt8;
typedef char UTFChar;
-typedef UInt32 PowerID;
-
// Interfaces are divided between classes.
// So that they aren't too big.
-class SharedInterface1;
-class SharedInterface2;
-class SharedInterface3;
-class UnknownInterface;
-class EncodingInterface;
+class UnknownInterface; // Refrenced from an IDB entry.
+class UnknownUCLSID; // From IDB, the constructor of the object.
-class __attribute__((uuid_of(UnknownInterface))) UnknownInterface
+class __attribute__((uuid("d7c144b6-0792-44b8-b06b-02b227b547df"))) UnknownInterface
{
public:
explicit UnknownInterface() = default;
@@ -56,14 +51,14 @@ public:
UnknownInterface& operator=(const UnknownInterface&) = default;
UnknownInterface(const UnknownInterface&) = default;
- SInt32 Release() { return -1; }
+ SInt32 Release() { delete this; }
template <typename TCLS>
- SInt32 Release(TCLS* cls) { return -1; }
+ SInt32 Release(TCLS* cls) { delete cls; return 0; }
- template <typename TCLS, typename UCLSID>
- TCLS* QueryInterface(UCLSID uclsidOfCls) { return nullptr; }
+ template <typename TCLS, typename UCLSID, typename... Args>
+ TCLS* QueryInterface(UCLSID uclsidOfCls, Args... args) { return uclsidOfCls->QueryObject<TCLS>(args...); }
};
template <typename TCLS, typename UCLSID>
-TCLS* SciGetClassFromCLSID(UCLSID uclsidOfCls); \ No newline at end of file
+TCLS* RtlGetClassFromCLSID(UCLSID uclsidOfCls); \ No newline at end of file