Solved

ActiveX component not responding message.

Posted on 1998-11-04
3
325 Views
Last Modified: 2011-10-03
I have developed an ActiveX application that provides a class that will be used by other applications for handling communications.  I find that when I'm stress testing the component, (i.e pumping alot of data through it from many applications.) I will often get the message that the component is not responding.  There are option buttons asking if I want to retry, or switch to the component to correct the problem.  I have looked at the App property, OLEServerBusyRaiseError, and that sounds like it should solve the problem for me by trapping the error in my client program, but it doesn't seem to have any effect.  I still get the message on the screen instead of an error being raised in my client.  Has anybody ever run into this problem before?
0
Comment
Question by:jsuper
3 Comments
 
LVL 1

Expert Comment

by:CarlosJac
Comment Utility
Try compiling your activex as a DLL activex.
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 100 total points
Comment Utility
The message about server is busy means that an out of process ole server is taking to long. Therefor CarlosJac answer would make the message go away since the message only appears on  out of process applications.
The problem is that you try to click on your application while your application is waiting for an answer of the server. You can't trap it. Your application is just busy. You can however make your application more responsive by using multi-threading for the client or server. Multi-threading programming is rather hard in VB so don't try it unless you know a lot about VB internals.
The real problem is that your server is taking to much time to perform its actions. Make it faster :-)
Another solution is the usage of timers and make the calls to the server asynchious. That means that the client does not wait until the server is finished but the server tells the client when it is finished.

Here is a sample:
- Client calls function of server
- Server starts timer and returns immediatelly from call
- Clients continues
- Server receives timer message and starts doing the action make sure that the server knows its busy so that it won't try to do another call.
- Client calls to the server result in error at this time since the server is busy (you have to take care of that yourself, raise an error in the server when the server is in a timer message) This can be compared to the message you see only now you are in control in stead of COM.
- Servers raises event to say that it is finished
- Client recieves event and knows that the server has finished.

This is a littlebit hard to program but very workable in a lot of situations.

Hope this explains what you see in your application.

0
 
LVL 1

Author Comment

by:jsuper
Comment Utility
I see what you are saying, but I will not be able to recode the server side to handle asynchronous requests... It's just too much work for this application...   What I think I'll do is caus e the out of process server to reject connections over a certain limit.  This isn't an ideal solution, but it also should happen very infrequently.  Thanks for your input!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now