Mark C. Brighton wrote:
Hello, I don't really have experience using win32com and I'm running into a problem.  I'm trying to use a COM object.  Several of the functions take strings as arguments, but when I pass in a string I get an exception:

  
import win32com.client
o=win32com.client.gencache.EnsureDispatch("AT91Boot_DLL.AT91BootDLL.1")
o.AT91Boot_Open("/usb/ARM0")
        
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "C:\Python24\lib\site-packages\win32com\gen_py\A3983AFB-180A-4751-B69B-D5496C253EF2x0x1x0.py", line 52, in AT91Boot_Open
    , h_handle)
  File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 446, in _ApplyTypes_
    return self._get_good_object_(
ValueError: invalid literal for int(): /usb/ARM0

The documentation claims that the argument is a pointer to a string.  Looking in PythonWin's COM browser, it appears that the object is expecting an integer pointer. Is there a way to get around this?  
  

The people who wrote this must have been idiots.  They do want a string, but they declared all the string parameters as "unsigned char *" instead of "char *".  I don't know how to make this work with Python.

By the way, it wasn't entirely reasonable of you to expect us to download and install an 11 megabyte product just for one 85k byte dll.
-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to