Solved

OLE Automation Error

Posted on 1998-07-28
6
855 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

707 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

11 Experts available now in Live!

Get 1:1 Help Now