So I have a function in vb that is converted to a dll that I want to use in python. However trying to use it, I get an error message this is the VB function
Function DISPLAYNAME(Name)
MsgBox ("Hello " & Name & "!")
End Function
and this is how I call it in python
from ctypes import *
test = windll.TestDLL
print test
print test.DISPLAYNAME("one")
But I get errors so what is the right way of calling the dll
Traceback (most recent call last):
File "C:\Test\testdll.py", line 4, in <module>
print test.DISPLAYNAME("one")
File "C:\Python26\lib\ctypes\__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "C:\Python26\lib\ctypes\__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'DISPLAYNAME' not found
I have been looking around online but no solution so far. Can't use cdll since this is for c progs.
I have looked at some of the python and dll related questions but no solution so far works for my issue.