tags:

views:

518

answers:

2

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"&gt;
  <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?

A: 

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.

Noah Heldman
Even deleting the /InProcServer32 keys as part of the build process does not address the issue for me. I would be ok if I could make that work, but even when i delete those keys i still receive the errors.
Wil P
A: 

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

CriGoT
So even though I have marked every type in my VB6 dll MultiUse you think I still may have a manifest problem? I'll take a look the MMM when I get time to see if this helps. Thanks for posting.
Wil P