Exception_Record in python2.5 problem
- by amir
I'm using Python2.5 & the following code produce 2 errors.
Can any body help me?
class EXCEPTION_RECORD(Structure):
_fields_ = [
("ExceptionCode", DWORD),
("ExceptionFlags", DWORD),
("ExceptionRecord", POINTER(EXCEPTION_RECORD)),
("ExceptionAddress", LPVOID),
("NumberParameters", DWORD),
("ExceptionInformation", ULONG_PTR * EXCEPTION_MAXIMUM_PARAMETERS)]
Python Error:
Traceback (most recent call last):
File "E:\Python25\my_debugger_defines.py", line 70, in <module>
class EXCEPTION_RECORD(Structure):
File "E:\Python25\my_debugger_defines.py", line 74, in EXCEPTION_RECORD
("ExceptionRecord", POINTER(EXCEPTION_RECORD)),
NameError: name 'EXCEPTION_RECORD' is not defined
Microsoft Document:
The EXCEPTION_RECORD structure describes an exception.
typedef struct _EXCEPTION_RECORD { // exr
DWORD ExceptionCode;
DWORD ExceptionFlags;
struct _EXCEPTION_RECORD *ExceptionRecord;
PVOID ExceptionAddress;
DWORD NumberParameters;
DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
} EXCEPTION_RECORD;
Thanks in advance