?
Solved

Run-time error 430 Class does not support Automation or does not support expected interface

Posted on 2006-06-08
2
Medium Priority
?
1,924 Views
Last Modified: 2009-12-16
Please help.

I am using windows 2000 and vb 6.  I made a .exe for my VB project using VB's Package and Development wizard. When i install it on other machines that have Window 2000 it works fine.  I get a run-time error (Run-time error "430": Class does not support Automation or does not support expected interface.
 ) when i run it on machines with XP.  

I have MDAC 2.8 on my machine (win 2000) and XP should have MDAC 2.8 (is that correct?)...so i dont think that MDAC is my problem.


Please help, I have some critical work to be done.
Thank you,
0
Comment
Question by:GoldenJag
2 Comments
 
LVL 12

Expert Comment

by:jkaios
ID: 16865441
I would suggest using Visual Studio Installer 1.1 - it creates MSI packages and uses the Windows Installer engine.
It's much better than the VB's Package and Deployment and it is free.

You can download it from microsoft.com
0
 
LVL 29

Accepted Solution

by:
Nightman earned 2000 total points
ID: 16866003
The most common cause of this is that the version of a dll that you are using on the XP machine differs from the one on your development machine.

This could be MDAC - XP does not have MDAC 2.8 by default (only SP2 or later, I think) , but 2.7 (and even then, not even 2.7 SP1!!). Alternatively, there is a component on the XP box that one of the dll's that you reference has a reference to, and this has a different interface (and hasn't been compiled for Binary compatability). Do you have error handling in your application that will return class/function/line names/numbers? If so, this is where the error is occurring - post that code. If not, I'm afraid you may have to try and run this interactively on the XP boxor another test pc - this may not help though, as the installation of visual studio may install the required components.

Check your project references, and ensure that the same components (and versions) or all referenced objects are installed and registered on the server. What happens when the interface (i.e. the PUBLIC functions, methods and properties) changes on a COM component or library: -
1. If it has been compiled to maintain binary compatability with the last version, and the methods that you reference remain unchanged, you should have no problem.
2. If the interface has changed, and binary compatability has not been maintained between builds, you will get this error.

Noting point 2, if the target machine has a previous version of the COM components, there is an extremely high chance that it is with a previous interface, and you will get this error. This is commonly known as dll hell.

jkaios's suggestion could help you solve the problem, but you need to understand the root cause. VS Installers attempt to 'gift wrap' your installations, but they are not foolproof, and this kind of error can still occur.

Cheers
Night
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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

839 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