Hi All,
I am getting error when I execute the code below:
Code:
from ctypes import *
#from ctypes import create_string_buffer
from ctypes import WINFUNCTYPE
from ctypes.wintypes import HWND, DWORD, LPCSTR
pcc = windll.LoadLibrary(r"C:\Windows\System32\setupapi.dll")
prototype =WINFUNCTYPE(c_int, c_char, LPCSTR, HWND, DWORD)
paramflags = (1, "_ClassGuid", None), (1, "_Enumerator", None), (1,
"_hwndParent", None), (1, "_Flags", 0)
setupapis = prototype(("SetupDiGetClassDevsA", pcc), paramflags)
print setupapis
Error:
C:\Users\Administrator\git\localrepo>"C:\Program Files (x86)\IronPython
2.7\ipy.exe" NX1_Setuptools\getdevclass.py
Traceback (most recent call last):
File "NX1_Setuptools\getdevclass.py", line 9, in <module>
TypeError: expected int, got tuple
I got to know that it is expecting int data types but it got tuple.
Note:
I followed the documentation in
https://ironpython-test.readthedocs.org/en/latest/library/ctypes.html ,section
15.18.2.4. Function prototypes
I am trying to install device drivers for network adapter, so I need HDEVINFO.
Please help me resolve this.
Thanks and Regards,
Hemanth M B
@9010054054
_______________________________________________
Ironpython-users mailing list
[email protected]
https://mail.python.org/mailman/listinfo/ironpython-users