Link to home
Start Free TrialLog in
Avatar of deanw041997
deanw041997

asked on

OLE Automation Error

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?
ASKER CERTIFIED SOLUTION
Avatar of cdecker
cdecker

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of deanw041997
deanw041997

ASKER

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?
"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?
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.
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.
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?