November 27th, 2013, 08:01 AM
Creating a .dll compatible with VB6 and manifets
I'm trying to create a regfree version of a software that I have written, but so far I cannot get it to work. The software is written in .NET and is supposed to be implemented in vb6. It works perfectly fine with registration, but when I use the regfree version with manifests on another PC I always get "ActiveX component can't create object". As I am very unsure about all of this (first time working with dlls), could you please look at the steps I have taken and tell me if I have done everything right on the VB. NET side?
-I created a new project as a class library and made it com visible via properties.
-I also checked the register COM-Interop option.
-As my main program didn't work, I wrote a simple class for testing purposes
Public Class Test
Public Function hello()
Is there anything I have missed here? I know you can still assign a guid or progid, but no source I could find told me it was necessary.
-Then I went into vb6 and wrote a program that uses the class
-I added a reference to the dll
-I copy the in the project folder
-I ran "Make My Manifest" and generate a manifest file
-I tried putting the dll in the MMM folder and in the main project and running the executable in the project folder and the MMM folder. It worked on my PC but not on others ("ActiveX component can't create object")
Did I miss anything? Isn't that supposed to be enough? The generated manifest is incredibly small and contains no reference to the dll, so I doubt it was executed correctly, but Make My Manifest didn't produce any errors. The manifest is simply these few lines:
Lastly I read something about needing to account for <clrClass> in a .NET generated dll, but I have no idea how to do that. Could that be it? I am incredibly confused and no one at work is familiar with manifests.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<!-- Make My Manifest 0.12.308 -->
<assemblyIdentity name="Kennametal.Inc.Projekt1" processorArchitecture="X86" type="win32" version="22.214.171.124" />