summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit/MSDOS.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Private/KernelKit/MSDOS.hpp')
-rw-r--r--Private/KernelKit/MSDOS.hpp68
1 files changed, 37 insertions, 31 deletions
diff --git a/Private/KernelKit/MSDOS.hpp b/Private/KernelKit/MSDOS.hpp
index 8826c2c7..41e8340f 100644
--- a/Private/KernelKit/MSDOS.hpp
+++ b/Private/KernelKit/MSDOS.hpp
@@ -24,39 +24,45 @@
#define kMagMz1 'Z'
typedef NewOS::UInt32 DosWord;
-typedef NewOS::Long DosLong;
-
-typedef struct _DosHeader {
- NewOS::UInt8 eMagic[2];
- DosWord eMagLen;
- DosWord ePagesCount;
- DosWord eCrlc;
- DosWord eCParHdr;
- DosWord eMinAlloc;
- DosWord eMaxAlloc;
- DosWord eStackSeg;
- DosWord eStackPtr;
- DosWord eChksum;
- DosWord eIp;
- DosWord eCs;
- DosWord eLfarlc;
- DosWord eOvno;
- DosWord eRes[4];
- DosWord eOemid;
- DosWord eOeminfo;
- DosWord eRes2[10];
- DosLong eLfanew;
+typedef NewOS::Long DosLong;
+
+typedef struct _DosHeader
+{
+ NewOS::UInt8 eMagic[2];
+ DosWord eMagLen;
+ DosWord ePagesCount;
+ DosWord eCrlc;
+ DosWord eCParHdr;
+ DosWord eMinAlloc;
+ DosWord eMaxAlloc;
+ DosWord eStackSeg;
+ DosWord eStackPtr;
+ DosWord eChksum;
+ DosWord eIp;
+ DosWord eCs;
+ DosWord eLfarlc;
+ DosWord eOvno;
+ DosWord eRes[4];
+ DosWord eOemid;
+ DosWord eOeminfo;
+ DosWord eRes2[10];
+ DosLong eLfanew;
} DosHeader, *DosHeaderPtr;
-namespace NewOS {
-/// @brief Find the PE header inside the the blob.
-inline auto rt_find_exec_header(DosHeaderPtr ptrDos) -> VoidPtr {
- if (!ptrDos) return nullptr;
- if (ptrDos->eMagic[0] != kMagMz0) return nullptr;
- if (ptrDos->eMagic[1] != kMagMz1) return nullptr;
+namespace NewOS
+{
+ /// @brief Find the PE header inside the the blob.
+ inline auto rt_find_exec_header(DosHeaderPtr ptrDos) -> VoidPtr
+ {
+ if (!ptrDos)
+ return nullptr;
+ if (ptrDos->eMagic[0] != kMagMz0)
+ return nullptr;
+ if (ptrDos->eMagic[1] != kMagMz1)
+ return nullptr;
- return (VoidPtr)(&ptrDos->eLfanew + 1);
-}
-} // namespace NewOS
+ return (VoidPtr)(&ptrDos->eLfanew + 1);
+ }
+} // namespace NewOS
#endif /* ifndef __MSDOS_EXEC__ */