Am 19.03.2013 00:12, schrieb Alicia Chen: > I tried a similar setup with a sample C++ server/client and it works > fine. I haven't yet managed to determine what the differences are. Can > anyone shed some light on this? >
Alicia, I have not yet used comtypes on Windows 8. Currently downloading win8 from my MSDN subscription... Thomas > > On Fri, Mar 15, 2013 at 3:49 PM, Alicia Chen > <owlishn...@gmail.com > <mailto:owlishn...@gmail.com>> wrote: > > We pass REGCLS_MULTIPLEUSE as the flag for an out-of-proc server. > This worked fine on Windows 7, but Windows 8 seems to ignore this > flag and attempts to launch a new instance for any call other than > the first. > > I tested this with the sample code given here > <http://starship.python.net/crew/theller/comtypes/server.html> with > only a slight modification, changing the server so that it stays > running and continually processes calls, to emulate what our program > does. > > while True: > comtypes.server.localserver.run([MyObjectImpl]) > > On Win7, if you launch the server, you can run the client multiple > times and the calls will always go to the running instance of the > server. On Win8, the first client call behaves as expected, but all > subsequent calls cause a new instance of the server to be launched, > and CreateObject eventually fails with the following error: > > Creating MyObject object now! > Traceback (most recent call last): > File "tools\sample_com_obj\sample_client.py", line 13, in <module> > x = CreateObject("MyTypelib.MyObject") > File "\comtypes\client\__init__.py", line 235, in CreateObject > obj = comtypes.CoCreateInstance(clsid, clsctx=clsctx, > interface=interface) > File "\comtypes\__init__.py", line 1145, in CoCreateInstance > _ole32.CoCreateInstance(byref(clsid), punkouter, clsctx, > byref(iid), byref(p)) > File "_ctypes/callproc.c", line 936, in GetResult > WindowsError: [Error -2146959355 <tel:2146959355>] Server execution > failed > > (That error number is 0x80080005 for marginally more readability) > > Both server and client files attached for your reference. > > Is anyone else experiencing this? Am I doing something horribly wrong? > > --Alicia > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > > > > _______________________________________________ > comtypes-users mailing list > comtypes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/comtypes-users > ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users