Last post Mar 18, 2014 08:14 AM by luckyforu2006
Mar 18, 2014 07:39 AM|luckyforu2006|LINK
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.
Mar 18, 2014 07:47 AM|AidyF|LINK
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.
Mar 18, 2014 07:54 AM|luckyforu2006|LINK
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)
Mar 18, 2014 07:57 AM|AidyF|LINK
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.
Mar 18, 2014 08:04 AM|luckyforu2006|LINK
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?
Mar 18, 2014 08:12 AM|AidyF|LINK
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.
Mar 18, 2014 08:14 AM|luckyforu2006|LINK