-
Notifications
You must be signed in to change notification settings - Fork 1
/
kernel32.h
40 lines (28 loc) · 1.01 KB
/
kernel32.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef KERNEL32_H
#define KERNEL32_H
#include "wintypes.h"
#include "environment.h"
#include <string>
#include <functional>
namespace modules {
struct module_info;
};
namespace kernel32 {
using namespace wintypes;
void set_main_module(modules::module_info*);
void enter_main_thread(const std::function<void()>& f);
void add_virtual_region(void* addr, size_t size, MEM_STATE state, PAGE_PROTECT protect);
void set_cmdline(const std::string& str);
void* virtual_allocate(void* addr, size_t size, MEM_STATE allocation_type, PAGE_PROTECT protect, void* preferred_addr = nullptr);
void virtual_deallocate(void* addr);
void virtual_protect(void* addr, size_t size, PAGE_PROTECT protect);
void WINAPI SetLastError(DWORD err);
DWORD WINAPI GetLastError();
DWORD WINAPI GetCurrentThreadId();
void WINAPI Sleep(DWORD milliseconds);
DWORD WINAPI GetTickCount();
ULONGLONG WINAPI GetTickCount64();
HMODULE WINAPI LoadLibraryA(const char* name);
void* WINAPI GetProcAddress(HMODULE hm, const char* name);
}
#endif