7
votes

So I have a registration free VB6 DLL referenced by my .NET 3.5 assembly library that's ultimately referenced by a .NET 3.5 WinForms application (not sure it's relevant, but included to paint a picture).

I am getting the error 'Problem isolating COM reference 'SomeVBDll': Registry key 'HKEY_CURRENT_USER\SOFTWARE\CLASSES\CLSID\{dd1d7f58-1d6b-4370-a1b9-05c03816a128}\InProcServer32' is missing value '(Default)'

My initial attempt was to check if this value actually existed and then put it into place. This resulted in the same above message on compilation.

Has anyone encountered this problem and know of any resolution to it?

Thanks in advance. Below is the manifest from the assembly that directly references the VB6 dll.

    <assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyIdentity name="Native.App.Core" version="1.0.0.0" type="win32" />
  <file name="SomeVBDll.dll" asmv2:size="184320">
    <hash xmlns="urn:schemas-microsoft-com:asm.v2">
      <dsig:Transforms>
        <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
      </dsig:Transforms>
      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
      <dsig:DigestValue>BWWHQTqNGUupT8xznLoN3jn7S9Y=</dsig:DigestValue>
    </hash>
    <typelib tlbid="{755c1df5-d0c5-4e10-a93d-54bf186e8daf}" version="1.0" helpdir="" resourceid="0" flags="HASDISKIMAGE" />
    <comClass clsid="{dd1d7f58-1d6b-4370-a1b9-05c03816a128}" threadingModel="Apartment" tlbid="{755c1df5-d0c5-4e10-a93d-54bf186e8daf}" progid="SomeVBDll.MyClass" />
  </file>
</assembly>

EDIT///

Marking all of the classes within the VB6 DLL as MultiUse seems to have resolved the problem. While this gets around the problem I was experiencing and still allows me to use reg-free COM, does anyone know a way to get around having to set all of the COM classes Instancing to MultiUse?

2
This thread [tech-archive.net/Archive/DotNet/… indicates the problem could be related to the fact that there are some classes within the VB6 dll that have instancing marked as private. This is also the case for me, I have one MultiUse (non-private) class and the rest are private. I would rather not mark the others as MultiUse, but I will do so to see if in fact that works around the problem.... - Wil P
Ok, so the MultiUse thing seems to be only a temporary fix and was not the actual underlying problem. I am now getting the same issue as mentioned in my original post. I am running as a Non-Admin on Windows Vista Ultimate x64 buildingt the project in Visual Studio 2008 as a Non-Admin. - Wil P
It seems to be reporting the error described above for every single class defined in the COM DLL. I have verified that each class is marked as MultiUse. - Wil P
Just for future readers - I think this other question which has a similar error message is the result of a different problem: stackoverflow.com/questions/8914138/… - StayOnTarget

2 Answers

0
votes

The only solution I've seen proposed (if you want to avoid the possible security/maintenance issues of marking all classes as MultiUse) is to delete the ".../InProcServer32" registry key, but that workaround comes with the standard "be careful messing with the registry" caveat.

0
votes

When marked as private VB6 COM classes do not register a value for Inproc32 and the assembly manifest generated by Visual Studio is incomplete. There are some tools like Make my Manifest http://mmm4vb6.atom5.com/ that can help you create a manifest for your components