Solved

OLE Automation Error

Posted on 1998-07-28
6
866 Views
Last Modified: 2013-11-13
I have an VB 4.0 application that runs correctly on some Windows 95 computers but on others the following run-time error occurs:
21474836400(8000008) OLE Automation Error

I think that perhaps there are some version mismatches with my installed DLL's because my application install only writes over the version if it is a higher revision.

Is there something specific that causes that error?  And what can I do to correct it?
0
Comment
Question by:deanw041997
[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
  • 3
  • 3
6 Comments
 

Accepted Solution

by:
cdecker earned 350 total points
ID: 1467014
There are several things that can cause this error:

1) The existing DLL's that have a greater version number are not binary compatible with the version that your version ships with.  The changed class id's on those DLL's will not load when called from the .exe. SOLUTION : register all your DLL's in the rollout of the application, or, if there are naming conflicts, change the name of your libraries so as not to conflict.

2) Although not as frequent a problem, you could have circular references in your application.  If you have class objects that refer to children objects in the DLL, and the DLL refers back to the parent, your shutdown code from the .exe could not be executing correctly.  It is possible that your shutdown of any class objects fails because the parent could not shut down because the child still references the parent.  
0
 

Author Comment

by:deanw041997
ID: 1467015
When you suggest the following: register all your DLL's in the rollout of the application
do you mean install all the DLL's that are used in the application directory or something else?
0
 

Expert Comment

by:cdecker
ID: 1467016
"Registration" is the process of exposing the DLL's class ids and type libraries in the registry.  When a DLL is registered, it is available for other tools (VB 5) to be used and the class ID guarantees the versioning of the DLL.  To register a DLL, run the program regsvr32.exe.

How did you write the DLL's?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:deanw041997
ID: 1467017
The application is a 16-bit application and I'm using Wise Install to install it.  There are several DLL's that need to be installed with it - only one that I wrote myself.  A few of the canned DLL files are: OLE2.dll, OLE2DISP.DLL, OLE2PROX.DLL.  We execute regedit.exe during the install and copy the ole2.reg file from the VB setup/kitfiles to the system directory.  (I believe.)  Also, according to the Wise manual, the OCX and DLL files are self-registered at the end of the install.  Where in the registry should they be?  Is there a way for me to determine if the class id's are compatible?  

I'm sure since ours is a 16 bit application that when we install, that some of the DLL's on the installed computer are a higher version.  Is it possible to get a 16 bit application to use a DLL in the application directory that is in the system directory?  I know I've tried this before with the CRPE.DLL.  I put the version I needed in the app directory but the application always used the system DLL.
0
 

Expert Comment

by:cdecker
ID: 1467018
YOu can't have both DLL's on the machine and realistically expect to use one for your application and the other for other applications.  This could work if you tweaked your system path but the real solution is to compile your .exe using the latest version of all of the DLL's and then rollout the app with these DLL's.  This seems like it would solve the problem now because the workstations, if they have old versions, get upgraded and if they have the current version they are ready to go.
0
 

Author Comment

by:deanw041997
ID: 1467019
You have been very helpful and I this is my last request for information.  When I run the VB Application setup wizard, it uses DLLs from c:\vb\setup\kitfiles\sys16.   Does VB use the DLL files from the c:\vb\setup\kitfiles\sys16 to make the executable or does it use the system directory?  If it does use the VB directory to make the executable, is there a way to change that or should I just copy over the latest DLLs into the VB\setup\... directory?
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month5 days, 1 hour left to enroll

636 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