Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 347
  • Last Modified:

ActiveX component not responding message.

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
jsuper
Asked:
jsuper
1 Solution
 
CarlosJacCommented:
Try compiling your activex as a DLL activex.
0
 
MirkwoodCommented:
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
 
jsuperAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now