4
votes

I'm trying to get the simplest Registration Free COM project to work in 64bit Windows7! The COM component is also the simplest vb.NET DLL that works fine from the VB6 EXE when its registered.

Can anyone suggest why the manifests are not working please?

I have already tried to update any VB6 internal Manifest with mt.exe but the general error indicates that there is no internal manifest in Project2.exe

The VB6 program (Project2.exe) manifest is....

    <assemblyIdentity name="Project2.exe" version="1.0.0.0" type="win32"    processorArchitecture="x86"/>

    <dependency>
     <dependentAssembly>
      <assemblyIdentity name="ClassLibrary1" version="1.0.0.0" type="win32"/>
     </dependentAssembly>
    </dependency>

    </assembly>

And the DLL (ClassLibrary1.dll) manifest is.....

    <assemblyIdentity name="ClassLibrary1" version="1.0.0.0" type="win32"/>

    <clrClass
       name="ClassLibrary1.Class1"
       clsid="{D9531C2A-3822-4222-8D45-BC507FCDF5F3}"
       progid="ClassLibrary1.Class1"
       threadingModel="Both"/>

    <file name="ClassLibrary1.tlb">
     <typelib
         tlbid="{DA8A00C1-1E14-4295-AEDE-F8F23DD8E43D}"
         version="1.0"
         helpdir=""
         flags="hasdiskimage"/>
    </file>

    </assembly>
1
Chicken-and-egg problem. The EXE finds the DLL from the manifest. So the entries in your DLL manifest belong in the EXE manifest instead. - Hans Passant
I'm not sure that's the problem. Embedding library info in the application manifest is a shortcut, and one I'm not sure Microsoft has even documented anywhere. A separate assembly manifest is the more "normal" case. Even ancient (~2004) versions of the MMM utility used to create separate assembly manifests and they worked properly. - Bob77
Are you missing the <?xml ?> directive in the assembly manifest? - Bob77
I tried the chicken and egg suggestion, even though its not that way in all the documentation I've seen, but the manifest is unsurprisingly rejected. - Richard Bridger
The <?xml ?> directive is in the manifest, I didnt paste the code in by mistake.... - Richard Bridger

1 Answers

2
votes

The manifests are correct, assuming that the Ids are correct. So your problem is something else. What error message do you get?

I employ RegFree Com succesfully and it has saved me countless headaches once you have the manifests right. I do not embed them. I use Side-by-Side Manifest Maker from Maze software for this, they are very helpful, very much worth the investment. I pasted the application manifest and the manifest of one of the dll's to give you a working example.

Filename=MyVB6App.exe.Manifest (Note the .exe. tag)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

<assemblyIdentity name="MyVB6App.exe" version="2.8.0.127" type="win32" processorArchitecture="x86"/>
<description>Built with: Side-by-Side Manifest Maker (3.7.1.4434) (x86)</description>

<dependency>
 <dependentAssembly>
  <assemblyIdentity name="MyNetComWrapper" version="1.0.24.0" type="win32" publicKeyToken="6ABF096D69195FE6"/>
 </dependentAssembly>
</dependency>

</assembly>

Filename=MyNetComWrapper.Manifest (Note the abscense of a .dll. tag)

<assemblyIdentity name="MyNetComWrapper" version="1.0.24.0" type="win32" publicKeyToken="6ABF096D69195FE6"/>

<description>Built with: Side-by-Side Manifest Maker (3.7.1.4434) (x86)</description>

<clrClass
   name="MyComNetWrapper.SomeClass"
   clsid="{A68F56A1-8425-3E06-BA83-856EC8422F5B}"
   progid="MyComNetWrapper.SomeClass"
   runtimeVersion="v4.0.30319"
   threadingModel="Both"/>
<clrClass
   name="MyComNetWrapper.SomeOtherClass"
   clsid="{D5156DAF-0421-36AE-84B6-5D915068B2DC}"
   progid="MyComNetWrapperc.SomeOtherClass"
   runtimeVersion="v4.0.30319"
   threadingModel="Both"/>

<file name="MyComNetWrapper.tlb">
 <typelib
     tlbid="{D189D056-66F1-4C01-8EB9-1F95BA11254A}"
     version="1.0"
     helpdir=""
     flags="hasdiskimage"/>
</file>

</assembly>