Vinay Anantharaman wrote:
> Hi,
>
> I am trying to translate an error into text by using a library function in 
> vix com:
>        
> http://www.vmware.com/products/beta/vmware_server/vix_api/ReferenceGuide/lang/com/functions/GetErrorText.html
>
> My code is as follows:
>       vixLib = win32com.client.gencache.EnsureDispatch('VixCom.VixLib') 
>       vixLib.GetErrorText(4, None)
>       
> Instead of getting some explanation that a file was not found I get an 
> exception:
>       File 
> "C:\Users\vinaya\AppData\Local\Temp\gen_py\2.4\7A474EE3-0062-4239-AE91-134AC9BD5FD3x0x1x0.py",
>  line 1316, in GetErrorText
>     , locale)
> TypeError: The VARIANT type is unknown (0x00000015)
>   

It's ironic that you posted this the same day as the other recent COM
question, because it is exactly the same problem.  VARIANT type 0x15 is
VT_UI8 -- a 64-bit integer.  It's kind of loony for an API to use a
64-bit integer as an error number, but that's what they're doing.

As Mark said, pywin32 doesn't support VT_UI8 at all.  There may be a
hacky way to do this with comtypes.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to