| Update of /cvsroot/pywin32/pywin32/SWIG/swig_lib/python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6331/python
Modified Files:
	pythoncom.i 
Log Message:
Add HRESULT_KEEP_INFO, which will raise an exception on failure, but still
return the hresult on success.
Index: pythoncom.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/SWIG/swig_lib/python/pythoncom.i,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pythoncom.i	28 Oct 2000 01:15:05 -0000	1.1
--- pythoncom.i	22 Sep 2004 09:09:54 -0000	1.2
***************
*** 31,34 ****
--- 31,57 ----
  }
  
+ // HRESULT_KEEP_INFO will raise an exception on failure,
+ // but still return the hresult to the caller
+ //typedef long HRESULT_KEEP_INFO;
+ %typedef long HRESULT_KEEP_INFO;
+ 
+ %typemap(python,out) HRESULT_KEEP_INFO {
+ 	$target = PyInt_FromLong($source);
+ }
+ 
+ %typemap(python,except) HRESULT_KEEP_INFO {
+       Py_BEGIN_ALLOW_THREADS
+       $function
+       Py_END_ALLOW_THREADS
+       if (FAILED($source))  {
+            $cleanup
+ #ifdef SWIG_THIS_IID
+            return PyCom_BuildPyException($source, _swig_self,  SWIG_THIS_IID);
+ #else
+            return PyCom_BuildPyException($source);
+ #endif
+       }
+ }
+ 
  %typemap(python,in) IID *INPUT(IID temp)
  {
 |