diff --git a/demos/DemoImGui/examples/example_win32_directx11/example_win32_directx11.vcxproj b/demos/DemoImGui/examples/example_win32_directx11/example_win32_directx11.vcxproj
index 115877c..f202e4d 100644
--- a/demos/DemoImGui/examples/example_win32_directx11/example_win32_directx11.vcxproj
+++ b/demos/DemoImGui/examples/example_win32_directx11/example_win32_directx11.vcxproj
@@ -85,7 +85,6 @@
-
diff --git a/demos/DemoImGui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters b/demos/DemoImGui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters
index 50e3ed5..72b4511 100644
--- a/demos/DemoImGui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters
+++ b/demos/DemoImGui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters
@@ -55,7 +55,6 @@
-
sources
diff --git a/demos/Theodosius-Client/client.cpp b/demos/Theodosius-Client/client.cpp
index 61ae330..2748622 100644
--- a/demos/Theodosius-Client/client.cpp
+++ b/demos/Theodosius-Client/client.cpp
@@ -33,7 +33,7 @@ namespace theo
{
case theo::theo_packet_type::alloc_memory:
{
- packet.alloc.addr = alloc(packet.alloc.alloc_size);
+ packet.alloc.addr = alloc(packet.alloc.alloc_size, packet.alloc.prot);
break;
}
case theo::theo_packet_type::copy_memory:
diff --git a/demos/Theodosius-Client/client.hpp b/demos/Theodosius-Client/client.hpp
index 3332703..7057aed 100644
--- a/demos/Theodosius-Client/client.hpp
+++ b/demos/Theodosius-Client/client.hpp
@@ -45,6 +45,7 @@ namespace theo
{
void* addr;
std::size_t alloc_size;
+ std::uint32_t prot;
} alloc;
struct
@@ -64,7 +65,7 @@ namespace theo
} theo_data, * ptheo_data;
#pragma pack(pop)
- using malloc_t = std::function;
+ using malloc_t = std::function;
using memcpy_t = std::function;
using resolve_symbol_t = std::function;
diff --git a/demos/Theodosius-Client/main.cpp b/demos/Theodosius-Client/main.cpp
index 6aa6e86..9f41fe6 100644
--- a/demos/Theodosius-Client/main.cpp
+++ b/demos/Theodosius-Client/main.cpp
@@ -155,16 +155,18 @@ int __cdecl main(int argc, char** argv)
return -1;
}
- theo::malloc_t _alloc = [&](std::size_t size) -> void*
+ theo::malloc_t _alloc =
+ [&](std::size_t size, std::uint32_t prot) -> void*
{
- const auto result = VirtualAllocEx
- (
- phandle,
- nullptr,
- size,
- MEM_COMMIT | MEM_RESERVE,
- PAGE_EXECUTE_READWRITE
- );
+ const auto result =
+ VirtualAllocEx
+ (
+ phandle,
+ nullptr,
+ size,
+ MEM_COMMIT | MEM_RESERVE,
+ prot
+ );
if (!result)
{
@@ -361,7 +363,9 @@ int __cdecl main(int argc, char** argv)
};
vdm::msrexec_ctx msrexec(_write_msr);
- theo::malloc_t _kalloc = [&](std::size_t size) -> void*
+
+ theo::malloc_t _kalloc =
+ [&](std::size_t size, std::uint32_t prot) -> void*
{
void* alloc_base;
msrexec.exec
@@ -453,7 +457,9 @@ int __cdecl main(int argc, char** argv)
// use VDM to syscall into ExAllocatePool...
vdm::vdm_ctx vdm(_read_phys, _write_phys);
- theo::malloc_t _kalloc = [&](std::size_t size) -> void*
+
+ theo::malloc_t _kalloc =
+ [&](std::size_t size, std::uint32_t prot) -> void*
{
using ex_alloc_pool_t =
void* (*)(std::uint32_t, std::uint32_t);
diff --git a/demos/Theodosius-Kernel/Theodosius-MSREXEC/main.cpp b/demos/Theodosius-Kernel/Theodosius-MSREXEC/main.cpp
index 4347b71..12d1fec 100644
--- a/demos/Theodosius-Kernel/Theodosius-MSREXEC/main.cpp
+++ b/demos/Theodosius-Kernel/Theodosius-MSREXEC/main.cpp
@@ -86,7 +86,9 @@ int main(int argc, char** argv)
};
vdm::msrexec_ctx msrexec(_write_msr);
- theo::malloc_t _kalloc = [&](std::size_t size) -> void*
+
+ theo::malloc_t _kalloc =
+ [&](std::size_t size, std::uint32_t prot) -> void*
{
void* alloc_base;
msrexec.exec
diff --git a/demos/Theodosius-Kernel/Theodosius-MSREXEC/theo.h b/demos/Theodosius-Kernel/Theodosius-MSREXEC/theo.h
index 2cef67f..3615438 100644
--- a/demos/Theodosius-Kernel/Theodosius-MSREXEC/theo.h
+++ b/demos/Theodosius-Kernel/Theodosius-MSREXEC/theo.h
@@ -2,6 +2,7 @@
#include
#include
#include
+#include
#include