VB6 Reg-Free COM Discussion
Yes, one could consider it an ActiveX/COM topic. And yes, one might also consider it a deployment topic.
Once some of the issues are resolved we'll have a nice, simple XCopy deployment technology. Of course there are many issues.
I'm not talking about yet another desire to install without creating installer packages, though in theory we can do that too. That is probably more applicable to installing VB6 programs onto a runnable CD or flash memory drive - which reg-free COM enables, with a few restrictions.
No, in the most general terms I'm talking about a package one might still wrap up in an installer, but with dependencies isolated so that installing your WhizBang 2012 on somebody's machine doesn't deposit anything into System32 and doesn't make any registry entries. This can also ease Vista deployment.
Reg-free COM isn't available until Windows XP or later. It really wasn't viable until XP SP1, and it really didn't support VB6 fully until XP SP2 with the VB6 SP6 runtimes.
Escape DLL Hell (http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/):
Incidentally, existing code does not generally need to be altered to take advantage of Reg-Free COM. Setting up the proper configuration of manifests is all that may be required. In fact, the original intent of Reg-Free COM was to enable existing native applications, such as ones written in Visual Basic 6.0, C++, or some combination of languages.
It also doesn't apply in a number of scenarios, see the sidebar item The Limitations of Reg-Free COM at the link above.
I wouldn't bring it up at all, but I'm having some decent success with it. Much more success than people trying to use VS2005 for this purpose - even when they use it for interop! It seems that VS2005 isn't really very smart about reg-free COM, in particular regarding VB6 controls. .Net doesn't actually use OS-provided SxS isolation itself except in a vestigial way, except in the case of interop - where it can fall down hard. Over there they use something called Fusion/CLR isolation for their ClickOnce and XCopy packages.
I suspect VS2008 may improve on its handling of reg-free COM.
I wonder who else has been working with Reg-Free COM and VB6? What successes have you had? What approach have you taken?
I've gone the route of creating a post-build tool that processes your program's VBP to create a resulting XCopy package. I've been working at it off and on about two years now, and I'm approaching the late "alpha" stages. The utility works for many programs already, but I have more things to add before it'll be feature-complete enough for a beta release. But it can handle isolating late-bound libraries and non-COM DLLs now as well as early-bound COM libraries - and even works when you have PublicNotCreatable classes.
I started talking about this and posting code over at VBCity a long while back. The truth is though that place is a bit of a ghost ship today. Since my little utility has vastly matured since then and I've discovered a lot I thought about bringing the discussion here where things are more lively.
I've noticed some Visual FoxPro guys have been beavering away trying to beat us to the finish line!

