>Hi Ed:
> Actually I have no need of binding the Winsock control events to "local" code.
> The DataArrival event of the Winsock control fires a method in my class passing the data arrived. The problem is that while the Winsock control is waiting for data everything falls in an "idle" state that is causing my COM dll to return right away to foxisapi.dll
>
> I have used this class with the Winsock control in it many times and it works perfectly. When the class is included in a project that has a UI I have no problems since the UI will keep the program "alive" while the Winsock control is waiting for data. But inside a COM dll there is no UI and I can't use any event driven architecture.
>
The real problem is you're trying to do something that VFP COM objects really aren't suited to well; you'd be much better off writing the COM component in an event-driven mode, but VFP doesn't have an easy way to idle without eating the CPU alive or passing control back to foxisapi. I'd really look at a major redesign, since VFP isn't really a platform well-suited to this type of problem.