[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Automation

Posted on 1998-02-17
3
Medium Priority
?
213 Views
Last Modified: 2012-05-04
I am sorry that the following problem may not have enough information but I will try my best to explain my situation.

I have written an automation object by Visual C++ 5.0 using its Class Wizard.  Then, the object is used in Visual Basic.  This object has several mehtods.  The methods are computational type and very TIME-CONSUMING but have been tested in the Windows Console mode and can be assumed that they are error-free.  

1) Now, the problem is when these methods are called by VB, it may sometimes pop out the Error Message Box "Automation Error".  

2) However, sometimes it works without any error but the result is different from what I obtained in the Windows Console mode.

 I'd like to know what's going on.  I really have no idea and if anybofy has appropriate suggestion given, I would grant the marks.
0
Comment
Question by:Harvey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Author Comment

by:Harvey
ID: 1182413
Edited text of question
0
 
LVL 1

Author Comment

by:Harvey
ID: 1182414
Adjusted points to 200
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 800 total points
ID: 1182415
The problem is that most OLE automation controllers have a timeout that when the time expires, it displays an error message saying that the server failed. You should look into breaking up your computation into smaller parts if possible. If it isn't possible, then you probably would want to change your mechanism from an RPC to a callback scheme.

That is instead of calling a function directly, you should call the server to set up some variables, set a callback function and call a function. The function should start a thread and the computation. When the computation is done, the server will call the callback with the results. This way, the actual connection time between the controller and the server is kept to a minimum.

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

650 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