I've had some problems a few weeks ago with finding a registration free way of integrating VB .NET dlls into a VB6 exe. I got the manifests working back then and now that part works flawlessly. Sadly there is a new problem that is proving to be just as tedious:
My software is running fine now but my colleagues need to expand on it and use its functions when they program in vb6. Integrating my .NET dll in their vb6 IDE seems to be working only on 32-bit systems though. It is compiled for "x86". What I tried is as follows
- copy the dll and tlb to their project folder (also tried system32 etc) and register it via regasm: "regasm -x.dll /tlb:x.tlb /codebase"
The .dll registers, but when I add it to their vb6 IDE and try to use it I get "Failed to create ActiveX component".
The same happens when I use "createobject" fore late binding.
-register with the 64bit version of regasm. When I use cmd.exe and browse to the framework64/v2.0.50727/ folder and try to register my .dll I get "not a valid assembly". When I use regasm in the VS command prompt it works, but I don't know how to tell it to use the 64bit version. I'm not even sure if using the 64bit version of regasm will even make a difference.
-compile for 64bit (I have 32bit computer with 64bit compiler installed). I set the target CPU to x64 but get the error message that my dll is "not a valid assembly"
Additional info:
The dll is registered for COM interop and is COM visible. The only code I had to add related to DLL/COM is this
<Guid("97f1b6b4-a0ad-4f87-a453-78f0f06e84cg")> _
Public Class GoodsMovement
Public Sub New()
MyBase.new()
End Sub
Any ideas?
My software is running fine now but my colleagues need to expand on it and use its functions when they program in vb6. Integrating my .NET dll in their vb6 IDE seems to be working only on 32-bit systems though. It is compiled for "x86". What I tried is as follows
- copy the dll and tlb to their project folder (also tried system32 etc) and register it via regasm: "regasm -x.dll /tlb:x.tlb /codebase"
The .dll registers, but when I add it to their vb6 IDE and try to use it I get "Failed to create ActiveX component".
The same happens when I use "createobject" fore late binding.
-register with the 64bit version of regasm. When I use cmd.exe and browse to the framework64/v2.0.50727/ folder and try to register my .dll I get "not a valid assembly". When I use regasm in the VS command prompt it works, but I don't know how to tell it to use the 64bit version. I'm not even sure if using the 64bit version of regasm will even make a difference.
-compile for 64bit (I have 32bit computer with 64bit compiler installed). I set the target CPU to x64 but get the error message that my dll is "not a valid assembly"
Additional info:
The dll is registered for COM interop and is COM visible. The only code I had to add related to DLL/COM is this
<Guid("97f1b6b4-a0ad-4f87-a453-78f0f06e84cg")> _
Public Class GoodsMovement
Public Sub New()
MyBase.new()
End Sub
Any ideas?