File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616#include < type_traits>
1717#include < vector>
1818
19-
2019#include " process.h"
2120
2221namespace blook {
@@ -46,6 +45,7 @@ class Pointer {
4645
4746 std::shared_ptr<Process> proc = nullptr ;
4847 bool is_self () const ;
48+ bool is_valid () const ;
4949
5050 bool operator ==(const Pointer &other) const = default ;
5151
@@ -163,8 +163,8 @@ class Pointer {
163163 }
164164
165165 inline void write_bytearray (std::wstring_view data) const {
166- write_bytearray (std::span<const uint8_t >(
167- ( const uint8_t *)data. data (), data.size () * sizeof (wchar_t )));
166+ write_bytearray (std::span<const uint8_t >(( const uint8_t *)data. data (),
167+ data.size () * sizeof (wchar_t )));
168168 }
169169
170170 void write_pointer (Pointer ptr) const ;
@@ -283,8 +283,6 @@ struct ScopedSetMemoryRWX {
283283 Process::MemoryProtection old_protect;
284284
285285 ScopedSetMemoryRWX (Pointer ptr, size_t size);
286- ScopedSetMemoryRWX (void *ptr, size_t size)
287- : ScopedSetMemoryRWX(Pointer(ptr), size) {}
288286 ScopedSetMemoryRWX (const ScopedSetMemoryRWX &) = delete ;
289287 ScopedSetMemoryRWX &operator =(const ScopedSetMemoryRWX &) = delete ;
290288 ScopedSetMemoryRWX (const MemoryRange &r);
You can’t perform that action at this time.
0 commit comments