Re: "Error in loading dll" when Making ActiveX DLL



"Matt Diephouse" <mddiep@xxxxxxxxx> wrote in message
news:1120855529.303172.69580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> By the way, I should have mentioned that the old version of the add-in
> that I compiled a few weeks ago no longer compiles. It gives the same
> error.
>
> --
> matt

I should've mentioned... if you can't compile any add-ins at all, you'll
probably need to re-install VB. If the problem is specific to your project,
and changing the name doesn't help, try this....

Fire up VB and select a new Add-in project. Save that somewhere and look at
the Connect.dsr file using Notepad (or other). There should be some hidden
attributes there that look a lot like....

Attribute VB_Name = "Connect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True

One time, I had a DLL project and one of the classes had invalid settings
for the attributes above. I found this out by starting a new project and
copy/pasting my code there. When everything worked as it should, I cracked
open the class with my text editor (UltraEdit32) and noticed the attributes
were "strange". iirc, Exposed was set = False and Creatable was set = False.
How they got that way is still a mystery and it hasn't happened since.

If all else fails, back up the entire project folder and delete the
Connect.DCA file. That may be corrupt as well.

btw.. you really should consider setting up Binary Compatibility. In case
you're not familiar with it, here's a quicky "primer"...

Binary Compatibility
http://www.vbsight.com/BinaryComp.htm

Maintaining compatibility on an add-in should be very simple since, for the
most part, everything's private to the project.

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..


.