Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


430 Class does not support Automation with custom ActiveX DLL

Posted on 2003-10-29
Medium Priority
Last Modified: 2008-02-01
Having trouble with an ActiveX DLL I built.  I've had the DLL and the client application working without incident until just recently.  The two projects work fine in the development environment and on my machine.  I can load them under a Project Group or independentally without incident.  As soon as I distribute them to another workstation in the office, that workstation gets 430 and is completely fried.

I had binary compatibility set on the DLL but decided I needed to make a change to the interface - basically I wanted to expose another method.  I changed the code and recompiled the DLL as a new file (the original My.DLL is now being compiled as My2.DLL).  The public classes kept the same names within the project and the project name stayed the same but the name of the DLL was changed.  I went back and set binary compatibility to the new DLL and compiled again.

At this point I'm losing my mind.  I have tried editing the registry on one workstation to remove references to the older versions of the DLL.  I have recompiled multiple times.  I started a brandnew project and imported the classes and forms from the original with a new project name, new DLL name and new names for my public classes.  I tried building a new test client application and over and over all I see is

  RTE 430 Class does not support Automation....
  Occasionally I'm seeing Class Factory cannot supply requested class (or something like this).  MSDN had no references to that, by the way.

Is there a way to determine exactly what the interface of my DLL consists of?  Like which methods are exposed and what parameters they take (besides using Intellisense)?  I know next to nothing about IUnknown and QueryInterface  - I leave that to my C++ friends - but could the solution be hidden in that interface?

The breakpoint happens when I try to Set the local object, as in:
  Set JM = New My2.Dll.PublicClass

I was able to see the breakpoint by running a test app on the dev environment from a workstation that has never compiled the DLL, and thus has a 'clean' Registry.  I referenced the complied DLL in the WinSys folder in this instance.

Anyway, I'm stuck.  Any thoughts are appreciated....
Question by:jmerritt
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 15

Accepted Solution

SRigney earned 2000 total points
ID: 9642496
You sound like you are in .dll hell.  I'll give you the easy way out without.

Open the ActiveX Dll application.  
Set Compatibility to No Compatibility and recompile.
Set Compatibility to Binary Compatible with the new one and save the project.
Close the project.

Open the front end.
Change the reference to point at the .dll just compiled.
Recompile the front end.

Redeploy to the other pc.

What probably happened is that when you recompiled the application last time the and then changed the compatibility you changed it to be compatible with the original version again.

A few notes on compatibility.
1. You only need to break compatibility when removing an existing public method or changing the parameters or return type of an existing public method.
2. You can add new functions without breaking compatibility.  Any existing application that references the .dll will continue to work, they just won't realize that the new functions exist (unless they are recompiled).

Author Comment

ID: 9642636
Thank you for your quick response.  I'm ready to try your suggestion.  Just a couple of quick questions:
1.  I have 7 available references in my client app:  different names for the various DLLs I've been trying to create to work around this and different locations.  What is the easiest way for me to clean that mess up?
2.  I'm trying to follow your first set of instructions but I'm not sure I totally understand.

'Open the ActiveX Dll application.
  I open my project:
       File:  SMS_TXLet70.VBP
       Name:  SMS_TXLet70
'Set Compatibility to No Compatibility and recompile.
  I do this and create:
       DLL:  SMS_TXLet70.DLL
'Set Compatibility to Binary Compatible with the new one and save the project.
  What do you mean by 'the new one'?  Should I be setting Binary Compatibilty and browsing to the SMS_TXLet70.DLL that I just created in Step 2 or renaming the DLL at this point to create a new reference in the Registry?
Sorry to be so obtuse but my head has been spinning since yesterday afternoon and I'm under some pressure to get a fix.  ...the benefits of being given an office without a door on it!

LVL 15

Expert Comment

ID: 9642826
'Set Compatibility to Binary Compatible with the new one and save the project.
  What do you mean by 'the new one'?  Should I be setting Binary Compatibilty and browsing to the SMS_TXLet70.DLL that I just created in Step 2 or renaming the DLL at this point to create a new reference in the Registry?

Yes set compatibity to binary, then browse to the one that you just created.  This step is really not necessary at this point, but will set up the compatibility for the next time that you have an internal code change in this project.

As for cleaning up your 7 other references I don't know what they are all used for.  
You will want to remove the one reference to SMS_TXLet70.DLL then close the reference window.
Reopen the reference window and browse to find the .dll that you just created in the previous step.  Select that one (to ensure that you are using the correct one). And close the reference window.

Author Comment

ID: 9643442

You've restored me from Sniveling Idiot to Psuedo TechGeek here in my office.

Thanks for giving me somebody to lean on...
LVL 15

Expert Comment

ID: 9643714
You're welcome.  I just come here and do this because I like the gratification I get helping others.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…
Suggested Courses

718 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