DevIL problems, affect unitsync

DevIL problems, affect unitsync

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

DevIL problems, affect unitsync

Post by imbaczek »

a simple python program:

Code: Select all

#!/usr/bin/python

from ctypes import *

print cdll.DevIL
print 'iBindImageTemp', cdll.DevIL.iBindImageTemp
print '_iFlipBuffer@16 by ordinal',cdll.DevIL[5]
print '_iFlipBuffer@16 by name', getattr(cdll.DevIL, "_iFlipBuffer@16")
(http://www.nirsoft.net/utils/dllexp.zip will show ordinal exports.)

Output of this program:

Code: Select all

<CDLL 'DevIL', handle 10000000 at ad6810>
iBindImageTemp <_FuncPtr object at 0x00A6DBE8>
_iFlipBuffer@16 by ordinal <_FuncPtr object at 0x00A6DC60>
_iFlipBuffer@16 by name
Traceback (most recent call last):
  File "unitsynctest.py", line 8, in <module>
    print '_iFlipBuffer@16 by name', getattr(cdll.DevIL, "_iFlipBuffer@16")
  File "C:\Python25\lib\ctypes\__init__.py", line 325, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python25\lib\ctypes\__init__.py", line 330, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function '_iFlipBuffer@16' not found
why is this an issue? AFLobby apparently is affected by this problem, as it can't load unitsync. Try this program:

Code: Select all

#!/usr/bin/python

from ctypes import *
# windll uses stdcall
print windll.unitsync
and it will complain that it can't load that funciton.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Should be ilFlipBuffer? Or is that just a typo in your post?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

nah, that was copied straight from exports. anyway, I had a old copy of devil in system32. head, meet wall.
Post Reply

Return to “Engine”