2

Here is the situation, we have VB6 apps/libraries legacy code which cannot be converted anytime soon and there are no plans to convert. However a situation has arrived where we need to consume some functionality from 64 bit world. I have written a 64 bit COM dll which I am able to call from VB6 app by creating the DLL surrogate. Now the 64 bit COM dll needs to make the call to the services/other libs and form a result(complex object) which needs to be sent back to VB6 app.

That complex object is part of VB6 legacy library code. So I am trying to instantiate that VB6 library from 64bit COM dll. And it keeps throwing class not registered error. So the flow is 32 bit VB6 app calls 64 bit COM dll which in turn calls 32 bit VB6 class library to build the objects and sent back to 32 bit VB6 as the result. Is this possible? I have tried to create the DLL surrogate in the reverse order too but still same issue.

I saw this Class not registered Error, which kind of gives an idea why this might not be working. But is there a way to make it happen?

Thank you, for your time and help in advance.

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
VizdAVE
  • 21
  • 2
  • You should use COM events (ie: connection points) like here https://stackoverflow.com/questions/55577836/event-handling-at-calling-a-third-party-32-bit-dll-from-a-64-bit-c-sharp-winform – Simon Mourier Jul 05 '22 at 15:53
  • You should add more details - like the specifics of how the surrogates are setup, it could be some error in that. But no one can help spot it without the details. – StayOnTarget Jul 06 '22 at 11:43
  • Suggestion - create a small / simple test setup using fake DLLs just to more quickly iterate and test your configuration. – StayOnTarget Jul 06 '22 at 11:44
  • With more debugging I was able to make it work. If anyone needs more details on it, please drop me a message. Thanks everyone. Ciao. – VizdAVE Sep 27 '22 at 16:48
  • You could / should just add an answer to this question yourself with the details that worked. That would be useful to others... – StayOnTarget Sep 27 '22 at 16:49

0 Answers0