I have been developing a dll component that works with socks. The component connects over a certain ip and port and sends a request and recieves a response. However i want to print this response on an Asp page , in other words create an instance of the object on the asp page and call the corresponding function that prints to response object through the object context. However iam losing the focus from the component to the asp page.The component is not waiting for the events to happen like winsock_connect to occur and thus losing focus to the ASP Page . Is there any way i can let my component finish its long task and then flush the response to the Asp page . Please help !