我正在使用Python2.5 &以下代码会产生2个错误。 任何机构可以帮助我吗?Exception_Record in python2.5 problem
class EXCEPTION_RECORD(Structure):
_fields_ = [
("ExceptionCode", DWORD),
("ExceptionFlags", DWORD),
("ExceptionRecord", POINTER(EXCEPTION_RECORD)),
("ExceptionAddress", LPVOID),
("NumberParameters", DWORD),
("ExceptionInformation", ULONG_PTR * EXCEPTION_MAXIMUM_PARAMETERS)]
Python的错误:
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
微软文档:
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;
在此先感谢