473,320 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DLL Hell

I have a versioning problem with a .Net component.

The component (COM DLL) was originally compiled to version 1.0.x.x . The
application that calls this component is a VB 6 Exe.

Having recompiled the component to version 1.3.x.x (no code changes just
getting the version numbers to conform to company policy), uninstalled the
original version from a second dev machine and installed the new version,
the application now refuses to create an object from the DLL (Cannot create
Active X object....).

I've run regclean on the machine, installed the component via it's own
installer (originally to a C:\Program Files\Subdir.. directory and later to
the System32 dir), ensured all previous version were removed etc .... But
I'm still in the DLL Hell that .Net was supposed to eradicate.

I've added a reference to the component in a new project in VB 6.... tried
to create an object from the library and got the same result.
Checked the Assembly permissions etc (set to Unrestricted).... and now I'm
starting to have a nervous breakdown !!!!! :-|

Anyone got any hints ?

Thanks

Gary
Nov 21 '05 #1
5 2400
"Gary Dunne" <Mo*********@Eircom.Net> wrote in message
news:uV**************@TK2MSFTNGP15.phx.gbl...
I have a versioning problem with a .Net component.

The component (COM DLL) was originally compiled to version 1.0.x.x . The
application that calls this component is a VB 6 Exe.


Are you using Binary Compatibility for that VB6 component (if the COM dll
you're talking about is a VB6 component, that is)? If not, all interface IDs
change each time you compile and any apps that require the component will
need to be recompiled. It doesn't matter if any code was changed. All that
matters is that you didn't tell VB to retain the original IIDs.

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

DLL Hell's generally caused by invalid registry entries due to subtle
compatibility "goofs".... like forgetting to update the Compatibility Model
after adding a new public interface.
--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
Nov 21 '05 #2
The DLL was written in VB .Net and compiled as a COM component. Therefore
the only way that the IDs could change would be if I had changed them
manually ? The application that calls the DLL was written in VB6.

The effect is basically that the DLL works only on the machine that it was
compiled on. I have even tried installing the DLL on a second machine and
calling it from within the VB6 IDE. Same result.......
"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:ul**************@TK2MSFTNGP14.phx.gbl...
"Gary Dunne" <Mo*********@Eircom.Net> wrote in message
news:uV**************@TK2MSFTNGP15.phx.gbl...
I have a versioning problem with a .Net component.

The component (COM DLL) was originally compiled to version 1.0.x.x . The
application that calls this component is a VB 6 Exe.
Are you using Binary Compatibility for that VB6 component (if the COM dll
you're talking about is a VB6 component, that is)? If not, all interface

IDs change each time you compile and any apps that require the component will
need to be recompiled. It doesn't matter if any code was changed. All that
matters is that you didn't tell VB to retain the original IIDs.

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

DLL Hell's generally caused by invalid registry entries due to subtle
compatibility "goofs".... like forgetting to update the Compatibility Model after adding a new public interface.
--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..

Nov 21 '05 #3
"Gary Dunne" <Mo*********@Eircom.Net> wrote in message
news:uV**************@TK2MSFTNGP15.phx.gbl...
I have a versioning problem with a .Net component.
That's unusual.
The component (COM DLL) was originally compiled to
version 1.0.x.x .
OK, the "x.x" bit worries me, but I'll /assume/ these represent
some /fixed/ values ...
The application that calls this component is a VB 6 Exe.
Now; are you getting hold of this object using

Dim x as Project.Classname
Set x = New Project.Classname

or

Dim x as Object
Set x = CreateObject( "Project.Classname" )

?
Having recompiled the component to version 1.3.x.x (no code
changes just getting the version numbers to conform to company
policy)
And how did you manage that? VB "Proper" assigns the
Interface (version) numbers internally - you'd /have/ to make a
code change to get a new "version".

*Or*, have we now made the leap away from a [VB6] COM
DLL and we're talking about a .Net Assembly that wraps around
one?
, uninstalled the original version from a second dev machine and
installed the new version, the application now refuses to create
an object from the DLL (Cannot create Active X object....).
COM Reply : Which makes me think you're using Early Binding,
which relies on a [Interface] GUID in the Registry to identify the
required DLL.
This would have been the one from the 1.1 DLL, which you have
now eradicated, replacing it by a totally different one for the 1.3
DLL. Your Early bound client applications will remain "broken"
until they are recompiled against the new, 1.3 DLL.

..NET reply : Assembly versions "1.1.x.y" and "1.3.x.y" are totally
different enties and an application built to run against one [usually]
won't even acknowledge the existence of the other (I should point
I'm used to loading Assemblies into the Global Assembly Cache;
XCopy deployment may work differently).
I'm still in the DLL Hell that .Net was supposed to eradicate.

I've added a reference to the component in a new project in
VB 6.... tried to create an object from the library and got the
same result.


Which is 'InterOp'ing the "other" way around, calling a .Net
Assembly from VB6. In that caase, have you ticked the .Net
assembly option to "Register it for COM InterOp"?
Without this, COM will never see your ("new") assembly.

HTH,
Phill W.
Nov 21 '05 #4
Mac
I don't have solution to ur problem but seems like u do have solution
to my problem. I m trying to get the version number of a dll (Compiled
using VB 6.0) and then compare it with the version number of another
DLL(this also compiled using VB 6.0) and then based on the result do
some stuff. I donno how to get the Version number of the DLL, can u
help me with that?
Thanks

Nov 21 '05 #5
"Mac" <ba**********@gmail.com> schrieb:
I donno how to get the Version number of the DLL


Take a look at the 'FileVersionInfo' class.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: kayodeok | last post by:
We're Mad As Hell And We're Not Going To Take It Anymore http://hownow.brownpau.com/index.html The web is a mess. We're tired of this deluge of <font> tags, nested tables, spacer GIFs, and...
3
by: .DLL hell II - The Evil Empire Strikes Back | last post by:
I can't figure out how this side-by-side assembly stuff it supposed to work. I have a stack of four assemblies A has no references B references A & C C References A & B D References A, B and C...
22
by: Jim Hubbard | last post by:
I am reposting a portion of a thread that I am involved in under a new topic because it seems that there are still people that believe the whole "DLL Hell" myth. I hope I can shed some light on...
2
by: Nad | last post by:
Hello, dll hell has been eliminated in .NET using assembly versioning. I am new in .NET and would like to know if there is any dll-hell-equivalent in .NET Windows or Web development...
21
by: Nx | last post by:
Hi I am unpacking a list into variables, for some reason they need to be unpacked into variable names like a0,a1,a2....upto aN whatever is in the list. How to create the variables dynamically...
1
by: GreatB | last post by:
Bill Gates died in a car accident. He found himself in Purgatory being sized up by God . .. "Well, Bill, I'm really confused on this call. I'm not sure whether to send you to Heaven or Hell....
18
by: Dave Sauny | last post by:
Ok, its a friday, I'm at work and I cant get this to work: I have 3 listboxes on one tab control page. when i select an item in listbox1 i want whatever is selected on the other 2 listboxes...
3
by: fyleow | last post by:
I just spent hours trying to figure out why even after I set my SQL table attributes to UTF-8 only garbage kept adding into the database. Apparently you need to execute "SET NAMES 'utf8'" before...
2
by: Scott M. | last post by:
I need a little help please... I'm simply trying to set up a very basic event for a class and then create an event handler for that class in a Console application. I think I'm very close, but...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.