Hi,

Im facing a strange problem with ctypes module on windows 2000. I did not
face this problem with the windows Xp.

The problem is  this code and specifically "c_long" which behave differently
on win2000 and winxp

from ctypes import *
h = windll.LoadLibrary("C:\\Windows\\System32\\myDll.dll")
print h
ver = getattr(h, "myDll_GetVersion")
versionArr = c_long * 4
version = versionArr(0, 0, 0, 0)
print ver(version)
dllVersionStr = "v%d.%d.%d.%d" % tuple(version)
print dllVersionStr

The same code appears to work on windows xp with dllVersionStr printing as
v1.3.5.0
But on wIindows 2000 it prints v0.0.0.0

Please suggest why does it happen.


Thanks and regards,
Rajat
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to