Hi,<div>I am experimenting with getting a Python library running in IronPython that relies on PyBonjour (<a href="http://code.google.com/p/pybonjour/">http://code.google.com/p/pybonjour/</a>).</div><div>PyBonjour is a pure python library interfacing with the systems bonjour installation. I am completely unexperienced with CTypes, so what I am proposing now might seem naïve.</div>
<div><br></div><div>At the top of the pybonjour.py is code looking like this:</div><div><div>if sys.platform == &#39;win32&#39;:</div><div>    # Need to use the stdcall variants</div><div>    _libdnssd = ctypes.windll.dnssd</div>
<div>    _CFunc = ctypes.WINFUNCTYPE</div></div><div><br></div><div>IronPython&#39;s sys.platform evaluates to &#39;cli&#39;, so I have tried to change the check to if sys.platform == &#39;win32&#39; or sys.platform == &#39;cli&#39;:</div>
<div>This seems to work, but everytime a C function is called now, Python complains that theres an argument too much.</div><div>E.g. TypeError: CFunctionType() takes at most 2 arguments (3 given). My suggestion is that ctypes.WINFUNCTYPE in IronPython might be a wrong value? (In IronPython it seems to always be 0x000000000000002B, whereas in CPython the value varies)</div>
<div><br></div><div>Does anyone have an idea of how to go about this?</div><div><br></div><div>It should be noted that I have pybonjour running with the standard CPython on Windows.</div><div><br></div><div>Thanks,</div><div>
Clemens</div>