On Mon, Jan 10, 2011 at 8:41 PM, Xiaofan Chen <[email protected]> wrote:
> It seems my Cygwin Ctypes does not have WinDLL.
> I am not so sure if this is the problem. Last time I
> rebuilt libusb-1.0 using cdecl, now it only supports
> stdcall under Windows.
>
It is indeed true under Cygwin.
mc...@mcuee-pc-win7 ~
$ python
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)
[GCC 4.3.4 20090804 (release) 1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import usb.core
>>> import usb.util
>>> from ctypes import CDLL, WinDLL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name WinDLL
>>> c=CDLL('cygusb-1.0.dll')
>>> c.libusb_init(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/ctypes/__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "/usr/lib/python2.6/ctypes/__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'libusb_init' not found (4▒▒⌂)
>>>
--
Xiaofan
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
pyusb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyusb-users