Git Product home page Git Product logo

Comments (7)

rene-aguirre avatar rene-aguirre commented on August 29, 2024

Thanks for the report, is this from latest repo right? (as opposed to downloading PyPi snapshot

from pywinusb.

rene-aguirre avatar rene-aguirre commented on August 29, 2024

The hint so far is 2.7.9 ctypes might be enforcing DWORD types when calling, I'll test on my Win7/64 machine next week with forced DWORD types on the DIGCF class.

from pywinusb.

vitome avatar vitome commented on August 29, 2024

Hi René,
Many thanks for your prompt reply. It should be the latest repository:

C:\Downloads\pywinusb-0.3.3\pywinusb-0.3.3\examples>pip show ctypes
---
Name: ctypes
Version: 1.0.2
Location: c:\python27\lib\site-packages\ctypes-1.0.2-py2.7-win32.egg
Requires:

C:\Downloads\pywinusb-0.3.3\pywinusb-0.3.3\examples>pip show pywinusb
---
Name: pywinusb
Version: 0.3.3
Location: c:\python27\lib\site-packages\pywinusb-0.3.3-py2.7.egg
Requires:

C:\Downloads\pywinusb-0.3.3\pywinusb-0.3.3\examples>

Many thanks for the hint... I tried to change the types of the DIGF class (something like

DEFAULT         = DWORD(0x00000001))

but now I have this other error

File "C:\Python27\lib\site-packages\pywinusb\hid\winapi.py", line 439, in open
    (DIGCF.PRESENT | DIGCF.DEVICEINTERFACE) )
TypeError: unsupported operand type(s) for |: 'c_ulong' and 'c_ulong'

I also tried to do this change on the call (lines 438-439):

self.h_info = SetupDiGetClassDevs(byref(self.guid), None, None,
                DWORD((DIGCF.PRESENT | DIGCF.DEVICEINTERFACE)) )

but now I have again the original error

  File "C:\Python27\lib\site-packages\pywinusb\hid\winapi.py", line 439, in open
    DWORD((DIGCF.PRESENT | DIGCF.DEVICEINTERFACE)) )
ctypes.ArgumentError: argument 3: <type 'exceptions.TypeError'>: wrong type

I've the feeling that you would have tried something different...

from pywinusb.

vitome avatar vitome commented on August 29, 2024

Hi René,
were you able to figure out any change I could try? Many thanks

from pywinusb.

rene-aguirre avatar rene-aguirre commented on August 29, 2024

I have python 3.4 on github, but I can see 3.3 is on PyPi, so you are actually no using latest.

I'll update PyPi.

from pywinusb.

rene-aguirre avatar rene-aguirre commented on August 29, 2024

The issue can't be reproduced with latest code (0.3.4)

from pywinusb.

rene-aguirre avatar rene-aguirre commented on August 29, 2024

Tested both Python 2.7.9 x64 and 32 bits with pyWinUsb 0.3.5

from pywinusb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.