Solved

ActiveX component not responding message.

Posted on 1998-11-04
3
327 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
ID: 1443176
Try compiling your activex as a DLL activex.
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 100 total points
ID: 1443177
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
ID: 1443178
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

867 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

23 Experts available now in Live!

Get 1:1 Help Now