forked from AmrThabet/x86Emulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.h
28 lines (18 loc) · 900 Bytes
/
macros.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
#define EMU_WRITE_MEM(x,y,z) \
int writememError = thread.mem->write_virtual_mem(x,y,z); \
if (writememError != 0)return writememError;
#define EMU_READ_MEM(ptr,x) \
ptr =(DWORD*)thread.mem->read_virtual_mem((DWORD)x); \
if(ptr == 0)return EXP_INVALIDPOINTER;
#define API_WRITE_MEM(x,y,z) \
int writememError = thread->mem->write_virtual_mem(x,y,z); \
if (writememError != 0)return writememError;
#define API_READ_MEM(ptr,x) \
ptr =(DWORD*)thread->mem->read_virtual_mem((DWORD)x); \
if(ptr == 0)return 0;
#define SEH_WRITE_MEM(x,y,z) \
int writememError = this->mem->write_virtual_mem(x,y,z); \
if (writememError != 0)return writememError;
#define SEH_READ_MEM(ptr,x) \
ptr=(DWORD*)this->mem->read_virtual_mem((DWORD)x); \
if(ptr == 0)return EXP_INVALIDPOINTER;