none
.NET COM registration to be used by COM RRS feed

  • Question

  • Hi,

    We have host of applications which are a mix of C++, VB6.0 and .NET assemblies. We wanted to go COM free and hence went ahead with side by side dll concept. It works fine with Vb6 and C++ but somehow I could not get the .NET dll that are being refered by VB6 or C++. I have different flavors:

    VB6 EXE -> VB6 DLL -> .NET Dll

    VB6 EXE -> VB6 DLL -> C++ dll -> .NET Dll

    I have a manifest VB6AppName.exe.manifest which has dependent assembly for a manifest which has all COM information. May I know how should I add the .NET COM info? When I added entry for <clrClass name="DllName.Class" clsid="{MY_CLSID}" threadingModel="Both" progid="DllName.Class"/>

    When I use FileMon, I see the process calls VB.dll and then looks for "{MY_CLSID}" in windows registry rather than the app folder. May I know how do I accomplish this?

    Tuesday, July 23, 2013 8:35 PM

All replies

  • Hi ,

    you need to register your com dll in the registry using Regsvr.exe , please see the below link for registration

    http://viralpatel.net/blogs/register-dll-files/

    32 bit dll registration on 64 bit

    http://support.microsoft.com/kb/282747/en-us

    for 64 bit dll's

    http://regsvr64.codeplex.com/documentation

    Regards,

    Stygen

    Wednesday, July 24, 2013 6:30 AM
  • Stygen,

    I actually wanted to go COM free. I am currently indeed doing regasm as a work around. I wanted to avoid doing that too. I have achieved COM free for VB6 and C++ dlls but unfortunately not for .NET libraries.

    Just to give you a sample, I have a testProj.exe, a VB6 exe that refers to a .NET DLL which has a class exposed for COM. I have created a manifest file testProj.exe.manifest. Here is the content:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><assemblyIdentity name="24x7_Plusexe" version="1.0.0.0" type="win32" /><dependency>
     <dependentAssembly>
      <assemblyIdentity name="CPU.EOS.COM" version="1.0.0.0"  processorArchitecture="MSIL" />
     </dependentAssembly>
    </dependency>
    </assembly>

    I have a subfodler inside the application called CPU.EOS.COM which has CPU.EOS.COM.manifest and the .NET library refered by project and I want to go COM free with that.

    My manifest file for CPU.EOS.COM is given below:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
          <assemblyIdentity
     name="CPU.EOS.COM"
     version="1.0.0.0"
      processorArchitecture="MSIL"/>
        <clrClass
            clsid="{91008F8D-2DE9-4205-B7CD-72B69755C6A2}"
            progid="TestClass"
            threadingModel="Both"
            name="TestClass"
            runtimeVersion="v4.0.30319">
        </clrClass>
        <clrSurrogate
            clsid="{1136FA2E-8E83-4D19-A5B3-5D8D751CDE47}"
            name="TestStruct">
        </clrSurrogate>
        <file name="DotNetComDll.dll">
        </file>
    </assembly>

    When I monitor using FileMon, I do see the VB6 exe calls my manifest CPU.EOS.COM but then when it needs to look for .NET clsID, it is looking up in registry but not in the manifest file.

    Regards,

    Arunabh

    Friday, July 26, 2013 4:41 PM
  • If it's already in the registry I believe that takes precedence.

    Phil Wilson

    Thursday, August 1, 2013 6:25 PM