Re: [python-win32] Problem on com server ony in a specifie application

2011-01-07 Thread Tim Roberts
Matteo Boscolo wrote: > I made the following test: > I create a c# application that call the some method > //code > object obj = Activator.CreateInstance > (Type.GetTypeFromProgID("test.Application")); > object[] objArgs = new object[1]; > obj

Re: [python-win32] WSAAsyncSelect

2011-01-07 Thread david.briant
Thx. I realise I now also need to understand the GIL and locking it and unlocking it. Does anyone know of any links where blocking I/O calls are demonstrated in pure python? I'm currently parsing the c code for _socket.pyd and reading up on Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS. My goal

Re: [python-win32] WSAAsyncSelect

2011-01-07 Thread Tim Roberts
david.bri...@ubs.com wrote: > Does anyone know of any links where blocking I/O calls are demonstrated > in pure python? Virtually all I/O calls in pure Python are blocking calls. Did you mean to ask about non-blocking I/O? > I'm currently parsing the c code for _socket.pyd and reading up on > Py

Re: [python-win32] WSAAsyncSelect

2011-01-07 Thread david.briant
I'm looking for how to do blocking calls. If I do a blocking call into a dll and don't release the GIL the whole of python is blocked!!! It says in the C-API whenever you call into a C-DLL with a blocking call you need to release the GIL i.e. the Py_BEGIN_ALLOW_THREADS macro, and when the call ret

Re: [python-win32] WSAAsyncSelect

2011-01-07 Thread Tim Roberts
david.bri...@ubs.com wrote: > I'm looking for how to do blocking calls. If I do a blocking call into a > dll and don't release the GIL the whole of python is blocked!!! > > It says in the C-API whenever you call into a C-DLL with a blocking call > you need to release the GIL i.e. the Py_BEGIN_ALLOW

Re: [python-win32] Problem on com server ony in a specifie application

2011-01-07 Thread Matteo Boscolo
After a lot of testing I find a solution that solve the problem . When I call my comInit method I need to accept a return type.. for c# : object o=obj.GetType().InvokeMember("comInit", BindingFlags.InvokeMethod, null, obj, objArgs); In This way, and modifying the comInit functi