4 #include <ail/types.hpp>
5 #include <ail/string.hpp>
9 extern unsigned page_size
;
10 extern DWORD main_thread_id
;
12 void error(std::string
const & message
);
13 void last_error(std::string
const & message
);
14 void initialise_console();
15 void write_text(std::string
const & text
);
16 void write_line(std::string
const & text
);
17 bool procedure_lookup(std::string
const & module
, std::string
const & procedure
, void * & output
);
18 unsigned get_page(unsigned address
);
22 typedef std::vector
<DWORD
> thread_id_vector
;
24 class thread_controller
31 thread_id_vector thread_ids
;
32 DWORD current_thread_id
;
35 bool get_thread_ids();
36 void process_thread_entry(THREADENTRY32
& thread_entry
);
39 std::string
dword_to_string(ulong input
);
40 wchar_t * string_to_wchar(std::string
const & input
);
41 std::string
wchar_to_string(wchar_t * input
);
44 void print_object(type
& object
)
46 write_line("Printing object of size " + ail::number_to_string(sizeof(type
)) + " at address " + ail::hex_string_32(reinterpret_cast<ulong
>(&object
)));
47 std::string
data(reinterpret_cast<char *>(&object
), sizeof(type
));
48 write_line(ail::hex_string(data
));