Solved

OLE Automation Error

Posted on 1998-07-28
6
860 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

786 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