Solved

OLE Automation Error

Posted on 1998-07-28
6
858 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
  • 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
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.

 

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

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 designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 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

22 Experts available now in Live!

Get 1:1 Help Now