Okay my title might not be clear enough. I work with an application for which we can develop VB6 macros. This macro needs to work with a .NET dll that I also developped. When I launch the application in x86 mode and I try to run the macro, it's working fine, I can access the methods of the class and everything.
But when I do the same in x64 mode I get the error : "Automation server can't create object"
What's really strange is that I'm not using any x86 unnmanaged COM dll which would be a problem with an x64 architecture. When I do : "Dim myClass as new MyClass.App"
it's working but when I call for example a myClass.Start()
method, I get this error. And I tried just having a MsgBox('hello world')
in my Start
method, to be sure it had nothing to do with my code, still no luck. I'm linking my macro to my class with a TLB
file.
I tried registering my DLL with RegAsm
, but it's still not working in x64. Is there a way to generate both x86 and x64 versions of my TLB
? Then I would add both references and if the x64 version throws me an error on Start method, I simply call the x86 method (not a perfect solution, but still..).
Any idea how to solve this problem?