summaryrefslogtreecommitdiffhomepage
path: root/Public/Kits/System.Core
diff options
context:
space:
mode:
Diffstat (limited to 'Public/Kits/System.Core')
-rw-r--r--Public/Kits/System.Core/Containers/XIFF.hxx2
-rw-r--r--Public/Kits/System.Core/CoreAPI.hxx8
-rw-r--r--Public/Kits/System.Core/HCoreBase.hxx13
-rw-r--r--Public/Kits/System.Core/HCoreHeap.hxx13
-rw-r--r--Public/Kits/System.Core/HcHeapAPI.h23
-rw-r--r--Public/Kits/System.Core/HeapAPI.cxx7
-rw-r--r--Public/Kits/System.Core/hcore.h15
7 files changed, 56 insertions, 25 deletions
diff --git a/Public/Kits/System.Core/Containers/XIFF.hxx b/Public/Kits/System.Core/Containers/XIFF.hxx
index 28c25bf9..dbfe5b04 100644
--- a/Public/Kits/System.Core/Containers/XIFF.hxx
+++ b/Public/Kits/System.Core/Containers/XIFF.hxx
@@ -31,6 +31,8 @@ struct PACKED XiffHeader final {
DWORD f_SpecificFormatType; // format type. generic
};
+typedef struct XiffHeader XiffHeader;
+
#define kXIFFContainerVideo "XVFF"
#define kXIFFContainerAudio "XAFF"
#define kXIFFContainerInstaller "XnFF"
diff --git a/Public/Kits/System.Core/CoreAPI.hxx b/Public/Kits/System.Core/CoreAPI.hxx
index 1cd48442..66d356d7 100644
--- a/Public/Kits/System.Core/CoreAPI.hxx
+++ b/Public/Kits/System.Core/CoreAPI.hxx
@@ -23,11 +23,16 @@
#define CA_CDECL __attribute__((cdecl))
#define CA_MSCALL __attribute__((ms_abi))
+#define CA_PASCALL CA_STDCALL
+
typedef __UINT8_TYPE__ BYTE;
typedef __UINT16_TYPE__ WORD;
typedef __UINT32_TYPE__ DWORD;
typedef __UINT64_TYPE__ QWORD;
+typedef void* PVOID;
+typedef void VOID;
+
typedef __WCHAR_TYPE__ WCHAR;
typedef WCHAR* PWCHAR;
@@ -46,3 +51,6 @@ typedef WCHAR* PWCHAR;
#ifdef __64x0__
# define _M_64000 5
#endif
+
+#define CA_STATIC static
+#define CA_INLINE inline \ No newline at end of file
diff --git a/Public/Kits/System.Core/HCoreBase.hxx b/Public/Kits/System.Core/HCoreBase.hxx
new file mode 100644
index 00000000..c8a3a99c
--- /dev/null
+++ b/Public/Kits/System.Core/HCoreBase.hxx
@@ -0,0 +1,13 @@
+/** ===========================================
+ (C) Mahrouss Logic
+ ===========================================*/
+
+#pragma once
+
+#include <System.Core/CoreAPI.hxx>
+
+typedef struct HcObject {
+ void(*Release)(void);
+ void(*Invoke)(void);
+ void(*QueryInterface)(void);
+} *HcObjectPtr;
diff --git a/Public/Kits/System.Core/HCoreHeap.hxx b/Public/Kits/System.Core/HCoreHeap.hxx
new file mode 100644
index 00000000..88cbbeb7
--- /dev/null
+++ b/Public/Kits/System.Core/HCoreHeap.hxx
@@ -0,0 +1,13 @@
+/** ===========================================
+ (C) Mahrouss Logic
+ ===========================================*/
+
+#pragma once
+
+#include <System.Core/HCoreBase.hxx>
+
+CA_EXTERN_C HcObjectPtr HcGetProcessHeap(void);
+CA_EXTERN_C void* HcAllocateProcessHeap(HcObjectPtr refObj, long long int sz, int flags);
+CA_EXTERN_C void HcFreeProcessHeap(HcObjectPtr refObj, void* ptr);
+CA_EXTERN_C long long int HcProcessHeapSize(HcObjectPtr refObj, void* ptr);
+CA_EXTERN_C long long int HcProcessHeapExists(HcObjectPtr refObj, void* ptr);
diff --git a/Public/Kits/System.Core/HcHeapAPI.h b/Public/Kits/System.Core/HcHeapAPI.h
deleted file mode 100644
index 20078ce7..00000000
--- a/Public/Kits/System.Core/HcHeapAPI.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/** ===========================================
- (C) Mahrouss Logic
- ===========================================*/
-
-#pragma once
-
-#ifdef __cplusplus
-#define EXTERN_C extern "C"
-#else
-#define EXTERN_C extern
-#endif // ifdef __cplusplus
-
-typedef struct HcObject {
- void(*Release)(void);
- void(*Invoke)(void);
- void(*QueryInterface)(void);
-} *HcObjectPtr;
-
-EXTERN_C HcObjectPtr HcGetProcessHeap(void);
-EXTERN_C void* HcAllocateProcessHeap(HcObjectPtr refObj, long long int sz, int flags);
-EXTERN_C void HcFreeProcessHeap(HcObjectPtr refObj, void* ptr);
-EXTERN_C long long int HcProcessHeapSize(HcObjectPtr refObj, void* ptr);
-EXTERN_C long long int HcProcessHeapExists(HcObjectPtr refObj, void* ptr); \ No newline at end of file
diff --git a/Public/Kits/System.Core/HeapAPI.cxx b/Public/Kits/System.Core/HeapAPI.cxx
index f59e0b1b..2dc7338b 100644
--- a/Public/Kits/System.Core/HeapAPI.cxx
+++ b/Public/Kits/System.Core/HeapAPI.cxx
@@ -5,7 +5,7 @@
------------------------------------------- */
#include <System.Core/HeapAPI.hxx>
-#include <System.Core/HcHeapAPI.h>
+#include <System.Core/hcore.h>
using namespace HCore;
@@ -24,7 +24,10 @@ HHeap* HHeap::Shared() noexcept {
void HHeap::Delete(HHeapPtr me) noexcept { HcFreeProcessHeap(kObjectHeap, me); }
-SizeT HHeap::Size(HHeapPtr me) noexcept { return HcProcessHeapSize(kObjectHeap, me); }
+SizeT HHeap::Size(HHeapPtr me) noexcept {
+ CA_MUST_PASS(me);
+ return HcProcessHeapSize(kObjectHeap, me);
+}
HHeapPtr HHeap::New(const SizeT &sz, const Int32 flags) {
SizeT _sz = sz;
diff --git a/Public/Kits/System.Core/hcore.h b/Public/Kits/System.Core/hcore.h
new file mode 100644
index 00000000..b368b997
--- /dev/null
+++ b/Public/Kits/System.Core/hcore.h
@@ -0,0 +1,15 @@
+/** ===========================================
+ (C) Mahrouss Logic
+ ===========================================*/
+
+#pragma once
+
+/// Core API
+#include <System.Core/HCoreBase.hxx>
+
+/// Process Heap API
+#include <System.Core/HCoreHeap.hxx>
+
+/// File API & Device API.
+
+/// Process & Threading API \ No newline at end of file