0
votes

We are employing RegFree Com for over a year now succesfully to create hybrid VB6/VB.Net programs. As we now want to develop some components in Net 4.5 we have to start using the VB6 IDE from Win7, where we first developed from WinXP.

The problem is that the exact same RegFree Com configuration that works with the VB6 IDE from WinXP does not work from Win7.(installing the compiled executable works flawlessly). We get the general "ActiveX Component can't create object' error. I used Fuslogvw.exe and SxSTrace.exe, I scourged the Windows logs, but no error message that explains why the instantiation of the object fails surfaces.

So, what more can I do to find the cause of this problem?

1
Didn't we just see this same question a few days ago? Visual Studio IDEs (including VB6) must always be run elevated. ActiveX libraries used in development must be installed and registered on the developer machines even if the output will be used reg-free on target systems.Bob77
@Bob77 I can assure you that we never registered the Net Com wrappers on our WinXP development machines. If on Win7 that has to be done, that would be quite bad, as many versions of the net code are tested and dll hell threatens...Dabblernl
I would be amazed if this is true. How does the IDE run find out which assemblies to use? For a compiled program the application manifest contains this information in <dependentAssembly/> entries.Bob77
@Bob77 I am amazed that you doubt me :-). Also see: stackoverflow.com/questions/4565000/…, which describes this exact problem. Unfortunately running the IDE in WinXP compatibility mode does not work any more either.Dabblernl
If you read that thread they were using an ill-advised technique of creating a manifest for VB6.EXE that lists a raft of possible dependent assemblies. This is Bad Form and can lead to lots of confusion due to manifest caching. You need to register assemblies on development machines. Reg-free COM is a deployment strategy, not a development technique.Bob77

1 Answers

0
votes

This problem was mentioned before on SO in 2010, the solution was then to run the VB6 IDE in WinXP SP2 compatibility mode (as administrator). This solution did not work for me. It seems that WinXP implemented RegFree Com differently. So registering with regasm using the /tlb directive is now necessary.

Bob warns against the practice of using manifests for the VB6.exe to test Com wrappers for Net assemblies. We have used this technique for over a year without any problems though.