Ola Rylow wrote: > > I know this is not exactly a new question on this list but I have not > been able to solve my problems by reading old threads. > > I have a dll (MyDLL) from which I want to call some methods. I've > tried using Ctypes: > > print windll.MyDLL.FirstMethod() > print windll.MyDLL.SecondMethod() > > If I run this, SecondMethod fails, but if I switch order FirstMethod > will fail instead (since it is the second called...). > The same dll can be used without problems in C++ code. > So my questions are: > > 1. Does Ctypes have any "FreeLibrary" function?
Are you saying your DLL *requires* that you unload the library between each call? That would be a grossly negligent design on the part of the DLL authors. Is it possible you simply have the calling sequence incorrect? Have you tried "cdll" instead of "windll"? How does it fail? -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32