locked
converting vb 6.0 dll to .net dll RRS feed

  • Question

  • User-1800438376 posted

    Hi experts,

    Is it possible to upgrade vb 6 dll (comm dll) to .net standard dll because we need to manually registered using command regsvr32 and then registering in comm services.

    Tuesday, March 18, 2014 7:39 AM

Answers

  • User-760709272 posted

    Have to admit I've never registered a COM object in a 64bit environment.  COM+ is basically what COM became in later versions of the OS.  Maybe under 64 bit they are stopping you use the "old" way of registering via regsvr and insisting you register with Component Services, or maybe regsvr32 just doesn't work in 64 bit environment (ergo the 32 in its name).  If you register with Component Services that should be enough enough anyway you shouldn't need to use regsvr32 as well.  In fact I seem to recall back in the day there were things regsvr didn't do such as recognise interface-forwarding, whereas component services did.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 18, 2014 8:12 AM

All replies

  • User-760709272 posted

    No, you have to re-write the code to be .net or call it via COM interop which will require you to manually register it as you have described.

    Tuesday, March 18, 2014 7:47 AM
  • User-1800438376 posted

    thanks for your quick response.

    can COM interop be automatic process.

    or can we call vb 6.0 dll using DLL import(same like calling C dll)

    Tuesday, March 18, 2014 7:54 AM
  • User-760709272 posted

    COM relies heavily on the registry and what regsvr32 (or registering with COM+ Component Services) does is create those registry entries.  The reason you can access a C dll without any messing around is because it doesn't rely on the registry (neither do .net assemblies which is why they don't need registered either).  You can execute the registration via code by executing regsvr32 yourself I imagine.  You might run into some security issues as your code runs as an anoymous user by default which won't have write access to the registry so you'd need to change the user your code was running under.

    Tuesday, March 18, 2014 7:57 AM
  • User-1800438376 posted

    can you help me with below query?

    In 32 bit OS we only do regsvr32

    and In 64 bit OS (both regsvr32 + COM plus services registration)

    why it is SO?

    Tuesday, March 18, 2014 8:04 AM
  • User-760709272 posted

    Have to admit I've never registered a COM object in a 64bit environment.  COM+ is basically what COM became in later versions of the OS.  Maybe under 64 bit they are stopping you use the "old" way of registering via regsvr and insisting you register with Component Services, or maybe regsvr32 just doesn't work in 64 bit environment (ergo the 32 in its name).  If you register with Component Services that should be enough enough anyway you shouldn't need to use regsvr32 as well.  In fact I seem to recall back in the day there were things regsvr didn't do such as recognise interface-forwarding, whereas component services did.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 18, 2014 8:12 AM
  • User-1800438376 posted

    thanks AidyF.

    Tuesday, March 18, 2014 8:14 AM