Skip to content

Commit

Permalink
Python bindings (@noword - issue #13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukem9 committed Apr 13, 2015
1 parent 3885286 commit 61debd8
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions bindings/XEDParsePython.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from ctypes import *

XEDPARSE_MAXBUFSIZE = 256
XEDPARSE_MAXASMSIZE = 16

XEDPARSE_ERROR = 0
XEDPARSE_OK = 1

class XEDPARSE(Structure):
_pack_= 8
_fields_ = [("x64", c_bool),
("cip", c_ulonglong),
("dest_size", c_uint),
("cbUnknown", c_void_p),
("dest", c_char * XEDPARSE_MAXASMSIZE),
("instr", c_char * XEDPARSE_MAXBUFSIZE),
("error", c_char * XEDPARSE_MAXBUFSIZE)
]

import os
if os.name == 'nt':
__module = CDLL('XEDParse')
elif os.name == 'posix':
__module = CDLL('libXEDParse.so')

XEDParseAssemble = __module.XEDParseAssemble

0 comments on commit 61debd8

Please sign in to comment.