Solved

Automation

Posted on 1998-02-17
3
207 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
  • 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 200 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

813 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

10 Experts available now in Live!

Get 1:1 Help Now