[ctypes-users] Adding new HRESULT
Brought to you by:
theller
From: Paul Du B. <pau...@gm...> - 2006-02-25 03:34:12
|
I'm using ctypes to wrap a library that defines a lot of its own HRESULT error codes. It also contains a TranslateError(HRESULT, char*, int bufsize) function. I'm currently using ctypes.oledll to wrap the functions because they all return an HRESULT. Is there a way for me to hook into (or monkey-patch) ctypes to extend the HRESULTs it recognizes? I poked around the python source, but it looks like the interesting stuff is implemented in C :-(. Thanks, Paul |