I used, myApp = CDLL("C:...") ...as I saw it in one of the ctypes samples.
Anyhow, I tried... myApp = cdll.LoadLibrary("C:\\myapp.dll") myApp.AddNumbers(1, 4) ..I get an error... AttributeError: function 'AddNumbers' not found ...myapp certainly has AddNumbers. Grant Edwards wrote: > On 2005-10-04, Java and Swing <[EMAIL PROTECTED]> wrote: > > ok i got ctypes...now i try > > > >>> from ctypes import * > >>> myApp = CDLL("C:\\myapp.dll") > > I've never seen that sort of usage before. I don't know what > CDLL does, and I can't find it in the docs anywhere. > > Based on my reading of the tutorial, I would have tried eitehr > > myApp = cdll.myapp > or > myApp = cdll.LoadLibrary("C:/myapp.dll") > > > ..now how can I call functions on in myapp.dll? From the > > tutorial I am not sure.. > > Assuming CDLL did something equivalent to cdll.LoadLibrary(), > I'd try: > > myApp.FuncName() > > I've always done it the way it's done in the tutorial: > > mylib = windll.Lib_Name > mylib.myFuncName() > > > i try, dir(cdll.myApp) and dir(myApp)..but don't see my > > functions listed. > > I don't think dir() works on dll's like that. I certainly > don't see it mentioned in the tutorial. What happened when you > tried calling the function the way the tutorial does? > > myapp = cdll.myapp > myapp.MyFunc() > > -- > Grant Edwards grante Yow! Yow! Is my fallout > at shelter termite proof? > visi.com -- http://mail.python.org/mailman/listinfo/python-list