diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-09-01 09:23:10 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-09-01 09:23:10 +0200 |
| commit | e757bb6a90c98f53995e4828d68eba26a2327540 (patch) | |
| tree | feabdd3047b67f21ee0e6f76ccd89f8458493e77 /dev/SCI | |
| parent | 21a0081ac9d9a8abe66cc6a248b5363768de1dc9 (diff) | |
[ IMP ] Found out the issue of ring 3 switch.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/SCI')
| -rw-r--r-- | dev/SCI/sci_base.hxx | 24 | ||||
| -rw-r--r-- | dev/SCI/xpcom_core.hxx (renamed from dev/SCI/scm_core.hxx) | 8 | ||||
| -rw-r--r-- | dev/SCI/xpcom_sms.idl (renamed from dev/SCI/scm_xpcom.idl) | 4 |
3 files changed, 19 insertions, 17 deletions
diff --git a/dev/SCI/sci_base.hxx b/dev/SCI/sci_base.hxx index 9a3038dc..e3bc39de 100644 --- a/dev/SCI/sci_base.hxx +++ b/dev/SCI/sci_base.hxx @@ -37,7 +37,7 @@ typedef char Char; #include <SCI/sci_err.hxx>
#ifdef __SCI_IMPL__
-#include <SCI/scm_core.hxx>
+#include <SCI/xpcom_core.hxx>
#else
class IUnknown; // Refrenced from an IDB entry.
class UnknownUCLSID; // From the IDB, the constructor of the object, e.g: WordUCLSID.
@@ -49,10 +49,10 @@ class UUID; /// @param uclsidOfCls
/// @return
template <typename TCLS, typename UCLSID, typename... Args>
-TCLS* ScmQueryInterface(UCLSID uclsidOfCls, Args... args);
+TCLS* XPCOMQueryInterface(UCLSID uclsidOfCls, Args... args);
template <typename TCLS>
-SInt32 ScmReleaseClass(TCLS** cls);
+SInt32 XPCOMReleaseClass(TCLS** cls);
/// @brief Release SCM class.
/// @tparam TCLS
@@ -169,23 +169,23 @@ IMPORT_C UInt32 TlsInstallIB(UInt0); /// @param uclsidOfCls UCLS factory class
/// @return TCLS interface
template <typename TCLS, typename UCLSID, typename... Args>
-TCLS* ScmQueryInterface(_Input UCLSID* uclsidOfCls, _Input Args&&... args);
+TCLS* XPCOMQueryInterface(_Input UCLSID* uclsidOfCls, _Input Args&&... args);
/// @brief Release SCM object.
/// @tparam TCLS the class type.
/// @param cls the class to release.
/// @return status code.
template <typename TCLS>
-SInt32 ScmReleaseClass(_Input TCLS* cls);
+SInt32 XPCOMReleaseClass(_Input TCLS* cls);
/// @brief Creates an SCM instance in the process.
/// @param handle_instance the SCM handle.
/// @param flags the SCM flags.
-IMPORT_C SInt32 ScmCreateInstance(_Input UInt32 flags, _Output ZKAObject* handle_instance);
+IMPORT_C SInt32 XPCOMCreateInstance(_Input UInt32 flags, _Output ZKAObject* handle_instance);
/// @brief Destroys an SCM instance of the process.
/// @param handle_instance the SCM handle.
-IMPORT_C UInt0 ScmDestroyInstance(_Input ZKAObject handle_instance);
+IMPORT_C UInt0 XPCOMDestroyInstance(_Input ZKAObject handle_instance);
// ------------------------------------------------------------------------
// Memory Management API.
@@ -195,12 +195,18 @@ IMPORT_C UInt0 ScmDestroyInstance(_Input ZKAObject handle_instance); /// @param len the length of it.
/// @param flags the flags of it.
/// @return heap pointer.
-IMPORT_C VoidPtr RtlCreateHeap(_Input SizeT len, _Input UInt32 flags);
+IMPORT_C VoidPtr MmCreateHeap(_Input SizeT len, _Input UInt32 flags);
/// @brief Destroys the pointer
/// @param heap the heap itself.
/// @return void.
-IMPORT_C UInt0 RtlDestroyHeap(_Input VoidPtr heap);
+IMPORT_C UInt0 MmDestroyHeap(_Input VoidPtr heap);
+
+/// @brief Change protection flags of memory region.
+IMPORT_C UInt32 MmChangeHeapFlags(_Input VoidPtr heap, _Input UInt32 flags);
+
+/// @brief Fill memory region with CRC32.
+IMPORT_C UInt32 MmFillCRC32Heap(_Input VoidPtr heap);
// ------------------------------------------------------------------------
// Error handling API.
diff --git a/dev/SCI/scm_core.hxx b/dev/SCI/xpcom_core.hxx index db3b9c69..f48fd30b 100644 --- a/dev/SCI/scm_core.hxx +++ b/dev/SCI/xpcom_core.hxx @@ -17,13 +17,11 @@ Purpose: Base code of SCM. #warning ! You may be using the clang version of the ZKA kit, please be cautious that some thing mayn't be present. !
#endif // !__NDK__
-// Interfaces are divided between classes.
-// So that they aren't too big.
-
protocol IUnknown; // Refrenced from an IDB entry.
protocol UnknownUCLSID; // From the IDB, the constructor of the object, e.g: TextUCLSID.
object UUID;
+/// @brief Unknown XPCOM interface
protocol clsid("d7c144b6-0792-44b8-b06b-02b227b547df") IUnknown
{
public:
@@ -45,7 +43,7 @@ public: /// @param uclsidOfCls UCLS factory class
/// @return TCLS interface
template <typename TCLS, typename UCLSID, typename... Args>
-inline TCLS* ScmQueryInterface(UCLSID* uclsidOfCls, Args&&... args)
+inline TCLS* XPCOMQueryInterface(UCLSID* uclsidOfCls, Args&&... args)
{
uclsidOfCls->AddRef();
return uclsidOfCls->QueryInterfaceWithArgs(args...);
@@ -56,7 +54,7 @@ inline TCLS* ScmQueryInterface(UCLSID* uclsidOfCls, Args&&... args) /// @param cls the class to release.
/// @return status code.
template <typename TCLS>
-inline SInt32 ScmReleaseClass(TCLS** cls)
+inline SInt32 XPCOMReleaseClass(TCLS** cls)
{
if (!cls)
return -1;
diff --git a/dev/SCI/scm_xpcom.idl b/dev/SCI/xpcom_sms.idl index 1fdbd6c9..8c95616b 100644 --- a/dev/SCI/scm_xpcom.idl +++ b/dev/SCI/xpcom_sms.idl @@ -25,10 +25,8 @@ Purpose: Base code of SCM. #warning ! You may be using the clang version of the ZKA kit, please be cautious that some thing mayn't be present. !
#endif // !__NDK__
-protocol IPXCOMSocket;
-
clsid("0943A614-0201-4107-8F8D-E909DF7F53C9")
-protocol IPXCOMSocket
+protocol ISMS
{
interface:
interface_method INT32 SendMessage(_Input CONST CHAR* bytes, _Input SIZE_T bytes_size);
|
