Solved

Automation

Posted on 1998-02-17
3
205 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

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

Title # Comments Views Activity
cb: unreferenced local variable 11 72
C++ Language error 28 197
C++ standard library based binary archive format 6 91
How to split this in C++ 4 94
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

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

21 Experts available now in Live!

Get 1:1 Help Now